{"draft":null,"from":48,"to":318,"files":[{"path":"worker/project/move.ts","added":7,"removed":6,"diff":"--- a/worker/project/move.ts\n+++ b/worker/project/move.ts\n@@ -1,7 +1,7 @@\n // Move a file in the agent's draft. Writes go through MoveHost; today the\n // host is Project.\n \n-import type { EditInput, Hunk, MoveInput, View } from \"../../src/engine/index.ts\";\n+import type { EditInput, Hunk, MoveInput, ReadView } from \"../../src/engine/index.ts\";\n import { checkPath } from \"./path-rules.ts\";\n import { pathKey } from \"./pathkey.ts\";\n import { ProjectError } from \"./project-error.ts\";\n@@ -11,12 +11,12 @@\n export interface MoveHost {\n \tneedInit(): void;\n \treadonly agents: ReadonlyMap<string, AgentState>;\n-\tagentView(agent: AgentState): View;\n-\tsharedView(): View;\n+\tagentView(agent: AgentState): ReadView;\n+\tsharedView(): ReadView;\n \tagent(name: string, entries: Entry[]): AgentState;\n \taddDraft(\n \t\tagent: AgentState,\n-\t\tview: View,\n+\t\tview: ReadView,\n \t\tinput: { edits: readonly EditInput[]; move?: MoveInput },\n \t\ttime: number,\n \t\tmeta: Meta,\n@@ -24,7 +24,7 @@\n \t): void;\n \trecordFile(\n \t\tagent: AgentState,\n-\t\tview: View,\n+\t\tview: ReadView,\n \t\tpath: string,\n \t\ttext: string | null | undefined,\n \t\ttime: number,\n@@ -73,8 +73,9 @@\n \tconst lines = view.lines(from).length;\n \tconst mode: Mode = { exec: attrs.exec, link: attrs.link };\n \tif (lines > 0 && attrs.blob === null) {\n+\t\tconst text = view.text(from);\n \t\thost.addDraft(agent, view, { edits: [], move: { file: from, start: 0, end: lines, to, at: 0 } }, time, {}, entries);\n-\t\thost.recordFile(agent, host.agentView(agent), to, view.text(from), time, {}, entries, mode);\n+\t\thost.recordFile(agent, host.agentView(agent), to, text, time, {}, entries, mode);\n \t} else {\n \t\t// A binary or empty file has no lines to carry: the new name takes its blob and modes.\n \t\thost.recordFile(agent, host.agentView(agent), to, \"\", time, {}, entries, mode, attrs.blob ?? undefined);"}],"unmatched":[]}