adom-vscode
Public Made by Adomby adom
Let Claude, Codex and Kimi drive VS Code inside your Adom container
Place new AI thread tabs in the user's group from the extension host (plus per-tab state ah cannot see)
Ask
Open a new AI thread (Claude Code, Codex, Kimi) in the group the user is already working in, from inside the extension host, so Hydrogen no longer has to move the tab back over CDP after the fact.
Why
Every AI extension asks VS Code for ViewColumn.Beside when it opens a new chat tab. On a workbench with one group that splits the editor and the user gets a second column they never asked for (John, 2026-09-05: "if a user likes just 1, its very rude to open a 2nd"). Hydrogen 1.0.217 works around it: after /ai-threads/new or a keybinding open, ai_threads_home_group() in ah picks the group that already holds AI threads (focused group first) and moves the new tab there through CDP (hydrogen-control-browser/src/hbw.rs). It works, but it is a move after a flash, it depends on the CDP census, and it cannot see extension-private state. None of the three extensions offer a setting: Claude Code has only claudeCode.preferredLocation (sidebar|panel) and addSessionTabToGroup; Codex and Kimi have nothing.
adom-vscode already owns the tab census it pushes to ah (/tabs/events), so it has vscode.window.tabGroups and onDidChangeTabs for free.
Proposal
- In the tab watcher, when a tab whose viewType is one of the AI chat webviews appears in a group that did not exist a moment earlier (or in a group other than the one ah asked for), and the setting
adom.aiThreads.keepInGroup(default true) is on, runworkbench.action.moveEditorToPreviousGroup(or...ToNextGrouptoward the target) while that tab is active. The emptied group closes itself. - Accept a target group hint from ah:
POST /ai-threads/newcan passgroup: <index>on the adom-vscode verb it already calls, and the watcher moves the tab there instead of to "previous". - Report what happened in the census frame (
placed: {from, to}) so/ai-threads/newcan drop its own CDP move and simply relay adom-vscode's answer.
Once 1 to 3 land, ah's ai_threads_place_in_group becomes a fallback for builds without the new adom-vscode, then goes away.
Also worth exposing from the extension host (data ah cannot see today)
- The active group index and its tab list per frame (today ah infers "home group" from AI tab counts).
- Whether an AI webview is showing a permission prompt or a question (the
needs_youstate is inferred from Claude's Notification hook; Codex and Kimi have no hooks, so theirrun-promptjob ends atdeliveredwith no working/done phases). Even a "composer is disabled / streaming" bit per tab would give both aworkingstate. - Which tab the extension actually reused when it decided not to open a new one (the reuse honesty gate in ah diffs transcripts on disk to find out).
Filed from the Hydrogen 1.0.217/1.0.218 work on the AI picker and run-prompt job feedback (hydrogen-ai-threads-api skill, "Know where your prompt went").