nandi/oripublic Fork 0
2434cc7fb724f02b34c0189dfd5fb30c1a8a68e3
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

PlanView.tsx · 38 lines · 1.1 KBTypeScript Blame HistoryRaw
✨ Introduce new feature(s): ACP web client — Go backend (agent, bridge, httpserver, mockagent) + React SPA (Zed-like agent panel), tests, quality gate PASS 2434cc7 k33g 2d ago1/**
2 * PlanView renders the agent's current execution plan (ACP "plan" updates)
3 * as a compact checklist, like the plan block of Zed's agent panel.
4 *
5 * @example
6 * <PlanView entries={[{ content: "Read the code", priority: "medium", status: "completed" }]} />
7 */
8
9import type { AcpPlanEntry } from "../protocol";
10
11const statusMarks: Record<string, string> = {
12 pending: "○",
13 in_progress: "◐",
14 completed: "●",
15};
16
17export function PlanView({ entries }: { entries: AcpPlanEntry[] }) {
18 if (entries.length === 0) {
19 return null;
20 }
21 return (
22 <details className="plan" open>
23 <summary className="plan-summary">
24 Plan ({entries.filter((e) => e.status === "completed").length}/
25 {entries.length})
26 </summary>
27 <ul className="plan-entries">
28 {entries.map((entry, index) => (
29 // biome-ignore lint/suspicious/noArrayIndexKey: ACP plan entries carry no id and the list is replaced wholesale on every update.
30 <li key={index} className={`plan-entry plan-entry-${entry.status}`}>
31 <span aria-hidden>{statusMarks[entry.status] ?? "○"}</span>{" "}
32 {entry.content}
33 </li>
34 ))}
35 </ul>
36 </details>
37 );
38}