diff --git a/src/hooks/interactive-bash-session/hook.ts b/src/hooks/interactive-bash-session/hook.ts index 1d45a6b0..4128f903 100644 --- a/src/hooks/interactive-bash-session/hook.ts +++ b/src/hooks/interactive-bash-session/hook.ts @@ -1,5 +1,5 @@ import type { PluginInput } from "@opencode-ai/plugin"; -import { loadInteractiveBashSessionState, saveInteractiveBashSessionState, clearInteractiveBashSessionState } from "./storage"; +import { saveInteractiveBashSessionState, clearInteractiveBashSessionState } from "./storage"; import { buildSessionReminderMessage } from "./constants"; import type { InteractiveBashSessionState } from "./types"; import { tokenizeCommand, findSubcommand, extractSessionNameFromTokens } from "./parser"; diff --git a/src/hooks/interactive-bash-session/state-manager.ts b/src/hooks/interactive-bash-session/state-manager.ts index 109e85e9..e655bfaf 100644 --- a/src/hooks/interactive-bash-session/state-manager.ts +++ b/src/hooks/interactive-bash-session/state-manager.ts @@ -1,7 +1,6 @@ import type { InteractiveBashSessionState } from "./types"; -import { loadInteractiveBashSessionState, saveInteractiveBashSessionState } from "./storage"; +import { loadInteractiveBashSessionState } from "./storage"; import { OMO_SESSION_PREFIX } from "./constants"; -import { subagentSessions } from "../../features/claude-code-session-state"; export function getOrCreateState(sessionID: string, sessionStates: Map): InteractiveBashSessionState { if (!sessionStates.has(sessionID)) { @@ -32,9 +31,4 @@ export async function killAllTrackedSessions( await proc.exited; } catch {} } - - for (const sessionId of subagentSessions) { - // Note: ctx is not available here, so we can't call ctx.client.session.abort - // This will need to be handled in the hook where ctx is available - } } diff --git a/src/hooks/session-recovery/storage/parts-reader.ts b/src/hooks/session-recovery/storage/parts-reader.ts index 287fd7b9..5fb546c2 100644 --- a/src/hooks/session-recovery/storage/parts-reader.ts +++ b/src/hooks/session-recovery/storage/parts-reader.ts @@ -8,16 +8,6 @@ import { isRecord } from "../../../shared/record-type-guard" type OpencodeClient = PluginInput["client"] -function isStoredPart(value: unknown): value is StoredPart { - if (!isRecord(value)) return false - return ( - typeof value.id === "string" && - typeof value.sessionID === "string" && - typeof value.messageID === "string" && - typeof value.type === "string" - ) -} - export function readParts(messageID: string): StoredPart[] { if (isSqliteBackend()) return [] diff --git a/src/hooks/start-work/start-work-hook.ts b/src/hooks/start-work/start-work-hook.ts index bd7e52d9..77c76d24 100644 --- a/src/hooks/start-work/start-work-hook.ts +++ b/src/hooks/start-work/start-work-hook.ts @@ -10,7 +10,7 @@ import { clearBoulderState, } from "../../features/boulder-state" import { log } from "../../shared/logger" -import { getSessionAgent, updateSessionAgent } from "../../features/claude-code-session-state" +import { updateSessionAgent } from "../../features/claude-code-session-state" export const HOOK_NAME = "start-work" as const