Repository navigation
Extension: per-tab panels, conversations with memory, faster answers - #41
Merged
Merged
Conversation
…swers Extension: - The task engine runs in the background service worker with one session per tab (conversation, running task, pending confirmation); tasks keep running when the panel closes or the user switches tabs. Panels are tab-specific (sidePanel.setOptions per tab) and connect over a port. - Conversations are saved locally (chrome.storage.local, last 100) with a History view to reopen and continue them; + starts a new one. - Each turn keeps hidden memory (pages visited, where it ended, actions) that follow-ups use, navigating back when the tab has moved on. - Ctrl+Shift+Space opens WebPilot for the current tab; the input is focused on open; Esc stops a task; answers stream in. - Dev builds include a test bridge (dev-bridge.ts + scripts/ extension-bridge.ts) so the scenario harness can run in the user's real browsers and reload the extension after a rebuild; it only trusts a server holding the build's random secret. Release builds compile it out and drop its permissions. Core (lib/core/run-task.ts, lib/jev, lib/model-client.ts): - Jev's preflight also decides whether the request is about the open page and whether reading it is enough; "summarize this page" skips navigation and clicks and streams the answer. - Streaming text generation (generateTextStream, SSE). - When a fast-mode answer is unsupported, Jev gets a second pass that may not finish on that page (e.g. opens the email instead of answering from the search list) before the LLM planner takes over. - Cancel on a confirmation ends the task with a summary and memory, so "go ahead" can continue. Results in the user's real browsers through the dev bridge (realistic suite, fast mode): Chrome 9/9 median 7.6s, Edge 9/9 median 7.0s. Extension smoke 7/7 including a follow-up conversation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per-tab WebPilot. Every tab gets its own side panel, conversation and running task.
extension/src/engine.ts), with one session per tab. Tasks keep running when the panel closes or the user switches tabs.sidePanel.setOptions({ tabId, path })) and are views connected over a port.Conversations that remember.
chrome.storage.local, last 100, never synced).Faster answers (
lib/core/run-task.ts,lib/jev/gates.ts,lib/model-client.ts):generateTextStream, SSE).Dev bridge for testing in real browsers (dev builds only):
extension/src/dev-bridge.tslong-pollsscripts/extension-bridge.tsand only trusts a server holding the build's random secret (extension/.dev-bridge-token, gitignored).extension-bridge.ts reload <browser>picks up a rebuild without clicking.bench:fast-mode -- --engine extension --browser chrome|edgeruns the scenario suite in the user's real browser.npm run extension:build) compile the bridge out (verified: no bridge code inbackground.js) and keep onlysidePanel, debugger, tabs, storage, identity+https://openrouter.ai/*.Testing
npm run build,npm run extension:build(release) andextension:build:devnpm test(48 pass: newtests/run-task.test.tschecks that a decline ends the task and keeps memory; new second-pass test),npm run lint,npx tsc --noEmitnpm run extension:smoke: 7/7, including a two-message follow-up ("find that email where i was asked about relocation" → "when did they send it, and what's their job title?"). Each case now gets a fresh tab and conversation; the harness previously reused a tab the extension had navigated.sidepanel.html?tabId=in the smoke test.Checklist
🤖 Generated with Claude Code