Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

Merge PR #50 (schedules tab) into v0.2.3

Chaitanya Giri75469736d334
diff --cc src/renderer/src/components/CommandCenterPanel.tsx
index d1fc85ac,f2f6fce1..c7d10fa4
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@@ -6,7 -6,7 +6,8 @@@ import { SpritePortrait } from './Sprit
import { PtyTerminalView } from './PtyTerminalView';
import { MessageQueueComposer } from './MessageQueueComposer';
import { TasksKanban } from './TasksKanban';
+import { AskMeTab } from './AskMeTab';
+ import { SchedulesTab } from './SchedulesTab';
import { disposeTerminal } from './terminalPool';
import { Icon } from './Icon';
import { MemoryGraphPanel } from './MemoryGraphPanel';
@@@ -21,33 -21,7 +22,9 @@@ import { buildSpawnCommand, modelsForPr
* per-agent model + dispatch + assistant access), a memory view, and a live
* activity feed / board / usage meter. */
- type CCTab = 'terminal' | 'floor' | 'tasks' | 'human' | 'memory' | 'graph' | 'activity' | 'handbook';
-
- /** A recurring auto-dispatched mission (mirrors the main-process config type). */
- interface ScheduledMission {
- id: string;
- label: string;
- intervalMs: number;
- to: string;
- body: string;
- enabled: boolean;
- autoCompact?: boolean;
- lastFiredAt?: number;
- /** 'heartbeat' (Lane A #1) is a context-aware adaptive beat, not a plain dispatch. */
- kind?: 'dispatch' | 'heartbeat';
- quietThresholdMs?: number;
- }
-
- /** Compact relative time, e.g. "4m ago" / "in 2m" / "just now". A positive ms is
- * in the past, negative in the future. */
- function relTime(ms: number): string {
- const past = ms >= 0;
- const a = Math.abs(ms);
- if (a < 45_000) return 'just now';
- const mins = Math.round(a / 60_000);
- const unit = mins < 60 ? `${mins}m` : mins < 1440 ? `${Math.round(mins / 60)}h` : `${Math.round(mins / 1440)}d`;
- return past ? `${unit} ago` : `in ${unit}`;
- }
-type CCTab = 'terminal' | 'floor' | 'tasks' | 'schedules' | 'memory' | 'graph' | 'activity' | 'handbook';
++// Both the AskMe (#human) tab and the Schedules (#50) tab live here. The inline
++// SCHEDULES section + its ScheduledMission/relTime helpers moved into SchedulesTab.
++type CCTab = 'terminal' | 'floor' | 'tasks' | 'human' | 'schedules' | 'memory' | 'graph' | 'activity' | 'handbook';
/** Fallback denominator for the per-agent token meter when no floor token budget
* is configured — so the bar reads as a budget estimate (filled + remaining)
@@@ -76,7 -42,7 +45,8 @@@ const TABS: { key: CCTab; label: string
{ key: 'terminal', label: 'terminal', icon: 'terminal' },
{ key: 'floor', label: 'monitor', icon: 'mcp' },
{ key: 'tasks', label: 'tasks', icon: 'check' },
+ { key: 'human', label: 'ask me', icon: 'bell' },
+ { key: 'schedules', label: 'schedules', icon: 'clock' },
{ key: 'memory', label: 'memory', icon: 'sparkle' },
{ key: 'graph', label: 'graph', icon: 'web' },
{ key: 'activity', label: 'activity', icon: 'bell' },
@@@ -85,8 -51,8 +55,9 @@@
export function CommandCenterPanel({ agent }: { agent: Agent }) {
const [tab, setTab] = useState<CCTab>('terminal');
- // External tab requests (the office task board click → 'tasks'). seq-keyed so
- // clicking the board again re-opens the tab even if it was already requested.
- // External tab requests (e.g. the boss-room calendar → 'schedules'). seq-keyed
- // so clicking the prop again re-opens the tab even if it was already current.
++ // External tab requests (the office task board → 'tasks', the boss-room
++ // calendar → 'schedules'). seq-keyed so clicking again re-opens the tab even
++ // if it was already requested.
const ccTabRequest = useStore((s) => s.ccTabRequest);
useEffect(() => {
if (ccTabRequest && TABS.some((t) => t.key === ccTabRequest.tab)) {
@@@ -199,8 -160,15 +170,9 @@@
)
)}
{tab === 'floor' && <FloorTab seed={dispatchSeed} />}
+ {tab === 'tasks' && <TasksKanban />}
+ {tab === 'human' && <AskMeTab />}
+ {tab === 'schedules' && <SchedulesTab />}
- {tab === 'tasks' && (
- <TasksKanban
- onAssign={(prefill) => {
- setDispatchSeed((s) => ({ text: prefill, seq: s.seq + 1 }));
- setTab('floor');
- }}
- />
- )}
{tab === 'memory' && (
<MemoryTab godId={agent.id} who={selectedMemoryAgent ?? undefined} onWho={setSelectedMemoryAgent} />
)}
@@@ -575,84 -493,21 +507,6 @@@ function FloorTab({ seed }: { seed: { t
<ArchivedSection />
- <Section title="SCHEDULES">
- {missions.length === 0 && <Muted>No scheduled missions.</Muted>}
- {missions.map((m) => {
- const hb = m.kind === 'heartbeat';
- const fired = m.lastFiredAt ? `fired ${relTime(Date.now() - m.lastFiredAt)}` : 'not yet fired';
- const next = m.enabled && m.lastFiredAt
- ? ` · next ${relTime(Date.now() - (m.lastFiredAt + m.intervalMs))}` : '';
- return (
- <div key={m.id} style={{
- display: 'flex', alignItems: 'center', gap: 6, padding: 6, marginBottom: 6,
- background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)'
- }}>
- <span style={{
- fontFamily: 'var(--cth-font-display)', fontSize: 9, padding: '2px 5px 1px',
- background: hb ? 'var(--cth-lemon)' : 'var(--cth-cream-200)',
- boxShadow: `inset 0 0 0 1px ${hb ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'}`,
- color: 'var(--cth-ink-900)', flexShrink: 0
- }}>{hb ? '♥ beat' : intervalLabel(m.intervalMs)}</span>
- <div style={{ flex: 1, minWidth: 0 }}>
- <div style={{ fontSize: 13, color: 'var(--cth-ink-900)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{m.label}</div>
- <div style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>
- → {targetName(m.to)}{hb ? ` · adaptive ~${intervalLabel(m.intervalMs)} · auto digest` : ''}
- </div>
- <div style={{ fontSize: 10, color: 'var(--cth-ink-500)' }}>{fired}{next}</div>
- </div>
- <button
- onClick={() => toggleMission(m.id)}
- style={{
- padding: '2px 8px 1px', border: 'none', cursor: 'pointer', flexShrink: 0,
- background: m.enabled ? 'var(--cth-lemon)' : 'var(--cth-cream-200)',
- boxShadow: `inset 0 0 0 1px ${m.enabled ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'}`,
- fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-ink-900)'
- }}
- >{m.enabled ? 'on' : 'off'}</button>
- <button
- onClick={() => deleteMission(m.id)}
- title="Delete this scheduled mission"
- style={{
- padding: '2px 6px 1px', border: 'none', cursor: 'pointer', flexShrink: 0,
- background: 'var(--cth-cream-200)',
- boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',
- fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-coral)'
- }}
- >✕</button>
- </div>
- );
- })}
- <div style={{ display: 'flex', gap: 6, marginTop: 6, marginBottom: 6 }}>
- <input
- value={mLabel}
- onChange={(e) => setMLabel(e.target.value)}
- placeholder="mission label"
- style={{ ...textareaStyle, flex: 1, fontFamily: 'var(--cth-font-ui)' }}
- />
- <Select value={mInterval} onChange={setMInterval}>
- {INTERVAL_OPTS.map((o) => <option key={o.ms} value={String(o.ms)}>{o.label}</option>)}
- </Select>
- <Select value={mTo} onChange={setMTo}>
- <option value="broadcast">everyone</option>
- <option value="god">Michael</option>
- {agents.filter((a) => !a.isGod).map((a) => (
- <option key={a.id} value={a.id}>{a.name}</option>
- ))}
- </Select>
- </div>
- <textarea
- value={mBody}
- onChange={(e) => setMBody(e.target.value)}
- rows={2}
- placeholder="Recurring task body… (dispatched on each interval)"
- style={textareaStyle}
- />
- <div style={{ marginTop: 6 }}>
- <PixelButton variant="primary" size="sm" onClick={addMission} disabled={!mLabel.trim() || !mBody.trim()}>
- add mission
- </PixelButton>
- <Section title="ASSISTANT">
- <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
- <span style={{ fontSize: 13, color: 'var(--cth-ink-700)' }}>Route Michael's queue through Dwight</span>
- <button
- onClick={() => setEnrichEnabled(!enrichEnabled)}
- style={{
- marginLeft: 'auto', display: 'inline-flex', alignItems: 'center', gap: 4,
- padding: '2px 8px 1px', border: 'none', cursor: 'pointer',
- background: enrichEnabled ? 'var(--cth-lemon)' : 'var(--cth-cream-200)',
- boxShadow: `inset 0 0 0 1px ${enrichEnabled ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'}`,
- fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-ink-900)'
- }}
- ><Icon name="sparkle" /> enrich {enrichEnabled ? 'on' : 'off'}</button>
-- </div>
-- </Section>
<Section title="DIRECTORIES">
{repos.length === 0 && <Muted>No registered repos.</Muted>}
diff --cc src/renderer/src/store/store.ts
index ccaa1204,51bf7850..c4dbf9e1
--- a/src/renderer/src/store/store.ts
+++ b/src/renderer/src/store/store.ts
@@@ -443,18 -441,6 +446,15 @@@ export const useStore = create<State>((
persistRestorable(restorableAgents);
return { restorableAgents };
}),
- ccTabRequest: null,
- requestCommandCenterTab: (tab) =>
- set((s) => ({ ccTabRequest: { tab, seq: (s.ccTabRequest?.seq ?? 0) + 1 } })),
+ taskDetailId: null,
+ openTaskDetail: (id) => set({ taskDetailId: id }),
+ closeTaskDetail: () => set({ taskDetailId: null }),
+ dispatchSeedRequest: null,
+ requestDispatchSeed: (text) =>
+ set((s) => ({ dispatchSeedRequest: { text, seq: (s.dispatchSeedRequest?.seq ?? 0) + 1 } })),
+ answerDrafts: {},
+ setAnswerDraft: (taskId, text) =>
+ set((s) => ({ answerDrafts: { ...s.answerDrafts, [taskId]: text } })),
drafts: {},
setDraft: (agentId, text) =>
set((s) => ({ drafts: { ...s.drafts, [agentId]: text } })),