refactor: remove unused imports from interactive-bash-session, session-recovery, start-work

This commit is contained in:
YeonGyu-Kim 2026-02-16 22:11:35 +09:00
parent 1ba330f8ca
commit bfabad7681
4 changed files with 3 additions and 19 deletions

View File

@ -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";

View File

@ -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<string, InteractiveBashSessionState>): 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
}
}

View File

@ -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 []

View File

@ -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