@@ -1,68 +1,19 @@
1-import { existsSync, readFileSync } from "node:fs";
2-import { join } from "node:path";
31 import * as c from "yoctocolors";
42 import { loadAgents } from "../cli/agents.ts";
5-import { type CommandContext, handleCommand } from "../cli/commands.ts";
6-import {
7- type ImageAttachment,
8- isImageFilename,
9- loadImageFile,
10-} from "../cli/image-types.ts";
11-import { readline, type InputResult, watchForInterrupt } from "../cli/input.ts";
12-import {
13- PREFIX,
14- formatSubagentLabel,
15- tildePath,
16- writeln,
17-} from "../cli/output.ts";
18-import { loadSkills } from "../cli/skills.ts";
3+import type { CommandContext } from "../cli/commands.ts";
4+import { tildePath } from "../cli/output.ts";
195 import type { AgentReporter } from "./reporter.ts";
206
21-import {
22- getContextWindow,
23- parseModelString,
24- resolveModel,
25-} from "../llm-api/providers.ts";
26-import { type CoreMessage, runTurn } from "../llm-api/turn.ts";
7+import { getContextWindow } from "../llm-api/providers.ts";
278 import type { ToolDef } from "../llm-api/types.ts";
289 import { connectMcpServer } from "../mcp/client.ts";
29-import {
30- type SnapshotRestoreResult,
31- restoreSnapshot,
32- takeSnapshot,
33-} from "../tools/snapshot.ts";
34-import type { SubagentOutput } from "../tools/subagent.ts";
35-
36-import {
37- deleteAllSnapshots,
38- deleteLastTurn,
39- deleteSnapshot,
40- getConfigDir,
41- getMaxTurnIndex,
42- listMcpServers,
43- saveMessages,
44- setPreferredModel,
45-} from "../session/db/index.ts";
46-
47-import {
48- type ActiveSession,
49- newSession,
50- resumeSession,
51- touchActiveSession,
52-} from "../session/manager.ts";
10+
11+import { listMcpServers, setPreferredModel } from "../session/db/index.ts";
5312 import { createSubagentRunner } from "./subagent-runner.ts";
54-import { buildReadOnlyToolSet, buildToolSet } from "./tools.ts";
13+import { buildToolSet } from "./tools.ts";
5514 import { undoLastTurn } from "./undo-snapshot.ts";
5615
57-import {
58- extractAssistantText,
59- getGitBranch,
60- hasRalphSignal,
61- makeInterruptMessage,
62- resolveFileRefs,
63- runShellPassthrough,
64-} from "./agent-helpers.ts";
65-import { buildSystemPrompt } from "./system-prompt.ts";
16+import { getGitBranch } from "./agent-helpers.ts";
6617
6718 import { runInputLoop } from "./input-loop.ts";
6819 import { SessionRunner } from "./session-runner.ts";