mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 05:59:43 +02:00
Merge pull request #367 from shenlvkang-collab/pr/claude-conversation-first-hand
fix(session): learn the live Claude conversation from the CLI's own hook
This commit is contained in:
@@ -110,6 +110,10 @@ export type HookEventType =
|
||||
| 'stop'
|
||||
| 'teammate_idle'
|
||||
| 'task_completed'
|
||||
// Claude Code's UserPromptSubmit. The payload's `session_id` is the pane's
|
||||
// LIVE conversation id, reported by the CLI process itself, so it survives a
|
||||
// `/clear` without any cwd/timestamp correlation.
|
||||
| 'prompt_submitted'
|
||||
// No Claude Code hook behind this one: it is the DeepSeek status bridge's
|
||||
// "a turn STARTED" report (see deepseek-status-shim.ts). Keep in step with
|
||||
// HookEventSchema in web/schemas.ts.
|
||||
|
||||
@@ -688,6 +688,15 @@ export interface SessionState {
|
||||
* again until the pane's own Enter is known.
|
||||
*/
|
||||
lastSubmitAt?: number;
|
||||
/**
|
||||
* Claude conversations this pane has been on, oldest first, current last.
|
||||
* Written ONLY from a first-hand `UserPromptSubmit`/`Stop` hook payload —
|
||||
* never from the history correlation — so it cannot record a sibling pane's
|
||||
* conversation. Persisted because `/clear` is otherwise unrecoverable: once
|
||||
* the pane moves on, the predecessor id exists nowhere else, and the last
|
||||
* entry is what re-pins `claudeSessionId` past `start()`'s three resets.
|
||||
*/
|
||||
claudeSessionChain?: string[];
|
||||
/**
|
||||
* PTY-exit circuit breaker tripped — respawn blocked until an explicit restart
|
||||
* (COD-118). Runtime-only: never restored on boot (fresh server = fresh breaker).
|
||||
|
||||
Reference in New Issue
Block a user