Add a read-only Files tab browsing a task's worktree

This commit is contained in:
Ian Gulliver
2026-10-15 07:31:53 -07:00
parent 4ca6f88861
commit de5b944a0c
16 changed files with 1460 additions and 123 deletions
+4 -2
View File
@@ -1,17 +1,19 @@
import { mountAdmin } from "./admin.js";
import { mountChanges } from "./changes.js";
import { h, replace } from "./dom.js";
import { mountFiles } from "./files.js";
import { mountInbox } from "./inbox.js";
import { mountSettings } from "./settings.js";
import { mountTranscript } from "./task.js";
import { mountTasks } from "./tasks.js";
import { mountTodo } from "./todo.js";
export type View = "transcript" | "changes" | "tasks" | "todo" | "inbox" | "admin" | "settings";
export type View = "transcript" | "changes" | "files" | "tasks" | "todo" | "inbox" | "admin" | "settings";
const views: Record<View, { label: string; mount: (root: HTMLElement) => () => void }> = {
transcript: { label: "Transcript", mount: mountTranscript },
changes: { label: "Changes", mount: (root) => mountChanges(root) },
files: { label: "Files", mount: mountFiles },
tasks: { label: "Tasks", mount: mountTasks },
todo: { label: "Todo", mount: mountTodo },
inbox: { label: "Inbox", mount: mountInbox },
@@ -19,7 +21,7 @@ const views: Record<View, { label: string; mount: (root: HTMLElement) => () => v
settings: { label: "Settings", mount: mountSettings },
};
const order: View[] = ["transcript", "changes", "tasks", "todo", "inbox", "admin", "settings"];
const order: View[] = ["transcript", "changes", "files", "tasks", "todo", "inbox", "admin", "settings"];
const panes: Pane[] = [];