MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / AutonomyPanel

Function AutonomyPanel

src/commands/autonomyPanel.tsx:22–194  ·  view source on GitHub ↗
({ onDone }: { onDone: LocalJSXCommandOnDone })

Source from the content-addressed store, hash-verified

20}
21
22function AutonomyPanel({ onDone }: { onDone: LocalJSXCommandOnDone }): React.ReactNode {
23 useRegisterOverlay('autonomy-panel');
24 const [selectedIndex, setSelectedIndex] = useState(0);
25 const [flows, setFlows] = useState<AutonomyFlowRecord[]>([]);
26
27 useEffect(() => {
28 let cancelled = false;
29 void listAutonomyFlows().then(items => {
30 if (!cancelled) setFlows(items.slice(0, 5));
31 });
32 return () => {
33 cancelled = true;
34 };
35 }, []);
36
37 const actions = useMemo<AutonomyAction[]>(() => {
38 const base: AutonomyAction[] = [
39 {
40 label: 'Overview',
41 description: 'Show run and flow counts plus the latest automatic activity',
42 run: () => getAutonomyStatusText(),
43 },
44 {
45 label: 'Full deep status',
46 description: 'Print every local autonomy surface in one diagnostic report',
47 run: () => getAutonomyStatusText({ deep: true }),
48 },
49 {
50 label: 'Auto mode',
51 description: 'Check whether auto permission mode is available and why',
52 run: () => getAutonomyDeepSectionText('auto-mode'),
53 },
54 {
55 label: 'Runs summary',
56 description: 'Show queued/running/completed/failed run totals and latest run',
57 run: () => getAutonomyDeepSectionText('runs'),
58 },
59 {
60 label: 'Recent runs',
61 description: 'List recent autonomy run IDs, triggers, statuses, and prompts',
62 run: () => getAutonomyCommandText('runs 10'),
63 },
64 {
65 label: 'Flows summary',
66 description: 'Show managed flow totals across queued/running/waiting states',
67 run: () => getAutonomyDeepSectionText('flows'),
68 },
69 {
70 label: 'Recent flows',
71 description: 'List recent managed flow IDs, status, current step, and goal',
72 run: () => getAutonomyCommandText('flows 10'),
73 },
74 {
75 label: 'Cron',
76 description: 'Show scheduled autonomy jobs, durability, recurrence, and next run',
77 run: () => getAutonomyDeepSectionText('cron'),
78 },
79 {

Callers

nothing calls this directly

Calls 10

useInputFunction · 0.90
useRegisterOverlayFunction · 0.85
listAutonomyFlowsFunction · 0.85
getAutonomyStatusTextFunction · 0.85
getAutonomyCommandTextFunction · 0.85
maxMethod · 0.80
selectCurrentFunction · 0.70
onDoneFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected