feat(coding-agent): added focused subagent session mode for main-agent hub navigation

- Added a SessionFocusController to switch transcript and input context between main and subagent sessions.
- Added agent-hub Enter activation and double-left return behavior for focused local agents.
- Added view-session-based event and render logic to avoid stale focus-session state.
- Added status-line focused agent display with ghost icon and focused-mode border dimming.
This commit is contained in:
can1357
2026-06-12 15:37:56 +02:00
parent b3bcdf3c7c
commit c938fe4d27
34 changed files with 1449 additions and 539 deletions
@@ -91,6 +91,9 @@ function createStubInputControllerContext(opts: { skillCommands: Map<string, str
prompt,
promptCustomMessage,
},
get viewSession() {
return (this as typeof ctx).session;
},
showError,
handleGoalModeCommand,
goalModeEnabled: false,
@@ -384,6 +387,7 @@ function createStubInteractiveModeContextForUiHelpers(session: AgentSession) {
ui: { requestRender },
pendingMessagesContainer,
session,
viewSession: session,
compactionQueuedMessages: [],
keybindings: {
getDisplayString: (_action: string) => "Alt+Up",
@@ -490,6 +494,9 @@ function createEventControllerFixtureForE10() {
updatePendingMessagesDisplay,
pendingTools: new Map(),
session: {},
get viewSession() {
return (this as typeof ctx).session;
},
} as unknown as InteractiveModeContext;
const controller = new EventController(ctx);