feat: ResumeTerminalButton with ephemeral terminal for transcript-debug

- Add ResumeTerminalButton component with floating terminal modal
  (drag, resize, glass morphism, TerminalNavButtons bar)
- Add useEphemeralTerminal composable for temporary PTY sessions
  that auto-run `<agent> --resume <sessionId>` and cleanup on close
- Add /kill-session POST endpoint to terminal server for ephemeral
  session cleanup
- Integrate button in ChatContainer header (ID row) and status bar
- Pass selectedAgent to ChatContainer from TranscriptDebugPage
This commit is contained in:
2026-02-19 18:11:20 -06:00
parent ca315cf040
commit eb2bafaea1
6 changed files with 960 additions and 73 deletions

View File

@@ -276,6 +276,20 @@ export function startTerminalServer() {
}
}
// Kill a specific session by ID (used for ephemeral sessions)
if (url.pathname === '/kill-session' && req.method === 'POST') {
try {
const body = await req.json() as { sessionId: string }
if (!body.sessionId) {
return Response.json({ error: 'sessionId required' }, { status: 400, headers: corsHeaders })
}
const killed = killSession(body.sessionId)
return Response.json({ success: true, killed }, { headers: corsHeaders })
} catch (e: any) {
return Response.json({ error: e.message }, { status: 500, headers: corsHeaders })
}
}
// Transcript update broadcast endpoint
if (url.pathname === '/transcript-update' && req.method === 'POST') {
try {