Add Workflow tab and run-progress API for workflow runs
This commit is contained in:
+5
-1
@@ -13,6 +13,7 @@ import { mountStatus } from "./status.js";
|
||||
import { openSwitcher } from "./switcher.js";
|
||||
import { mountTranscript } from "./task.js";
|
||||
import { mountTerminal } from "./terminal.js";
|
||||
import { mountWorkflow } from "./workflow.js";
|
||||
|
||||
const views: Record<TaskTab, { label: string; mount: (root: HTMLElement) => () => void }> = {
|
||||
transcript: { label: "Transcript", mount: mountTranscript },
|
||||
@@ -21,6 +22,7 @@ const views: Record<TaskTab, { label: string; mount: (root: HTMLElement) => () =
|
||||
terminal: { label: "Terminal", mount: mountTerminal },
|
||||
inbox: { label: "Inbox", mount: mountInbox },
|
||||
reviews: { label: "Reviews", mount: mountReviews },
|
||||
workflow: { label: "Workflow", mount: mountWorkflow },
|
||||
project: { label: "Project", mount: mountProject },
|
||||
};
|
||||
|
||||
@@ -189,6 +191,8 @@ export function taskPane(): HTMLElement {
|
||||
return waiting > 0;
|
||||
case "reviews":
|
||||
return state.transcript.some(isReviewEvent);
|
||||
case "workflow":
|
||||
return state.selectedTaskId !== undefined && findTask(state.selectedTaskId)?.workflow_run !== undefined;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@@ -235,7 +239,7 @@ export function taskPane(): HTMLElement {
|
||||
};
|
||||
|
||||
on("inbox", openAsked);
|
||||
onEach(["focus", "inbox", "selection", "transcript"], render);
|
||||
onEach(["focus", "inbox", "selection", "transcript", "tasks"], render);
|
||||
onEach(["projects", "tasks", "selection"], renderPicker);
|
||||
new ResizeObserver(layout).observe(strip);
|
||||
render();
|
||||
|
||||
Reference in New Issue
Block a user