fix(electrobun): 7 bug fixes + 3 partial features completed
Bugs fixed: - Agent retry: clear dead session on failed start (was non-recoverable) - seqId persist: save seq_id column in agent_messages, migrate existing DBs - Window frame save: wire resize event listener to saveWindowFrame() - Diagnostics counters: real RPC call counter via withRpcCounting() proxy Partial features completed: - Search auto-seed: rebuildIndex() on startup + indexMessage() on save - Notifications: removed 3 hardcoded demo entries, start empty - Agent cost streaming: emitCostIfChanged() on every message batch New: src/bun/rpc-stats.ts (RPC call + dropped event counters)
This commit is contained in:
parent
0dd402e282
commit
66dce7ebae
8 changed files with 139 additions and 47 deletions
|
|
@ -258,6 +258,9 @@
|
|||
keybindingStore.on("group4", () => setActiveGroup(getGroups()[3]?.id));
|
||||
keybindingStore.on("minimize", () => handleMinimize());
|
||||
|
||||
// Bug 3: Persist window frame on resize (debounced inside saveWindowFrame)
|
||||
window.addEventListener("resize", saveWindowFrame);
|
||||
|
||||
function handleSearchShortcut(e: KeyboardEvent) {
|
||||
if (e.ctrlKey && e.shiftKey && e.key === "F") {
|
||||
e.preventDefault();
|
||||
|
|
@ -316,7 +319,7 @@
|
|||
clearInterval(sessionId);
|
||||
document.removeEventListener("keydown", handleSearchShortcut);
|
||||
window.removeEventListener("palette-command", handlePaletteCommand);
|
||||
// Native resize — no JS listeners to clean
|
||||
window.removeEventListener("resize", saveWindowFrame);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -549,6 +549,9 @@ async function _startAgentInner(
|
|||
if (!result.ok) {
|
||||
sessions[sessionId].status = 'error';
|
||||
sessions[sessionId].error = result.error;
|
||||
// Bug 1: Clear the dead session so the next send starts fresh
|
||||
projectSessionMap.delete(projectId);
|
||||
clearStallTimer(sessionId);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -15,13 +15,9 @@ export interface Notification {
|
|||
|
||||
// ── State ─────────────────────────────────────────────────────────────────
|
||||
|
||||
let notifications = $state<Notification[]>([
|
||||
{ id: 1, message: 'Agent completed: wake scheduler implemented', type: 'success', time: '2m ago' },
|
||||
{ id: 2, message: 'Context pressure: 78% on agent-orchestrator', type: 'warning', time: '5m ago' },
|
||||
{ id: 3, message: 'PTY daemon connected', type: 'info', time: '12m ago' },
|
||||
]);
|
||||
let notifications = $state<Notification[]>([]);
|
||||
|
||||
let nextId = $state(100);
|
||||
let nextId = $state(1);
|
||||
|
||||
// ── Public API ────────────────────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue