@0perator/operator 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/persona.js +6 -3
- package/dist/engine/agent.js +5 -0
- package/dist/engine/batch-hints.js +45 -0
- package/dist/engine/batch-scheduler.js +23 -7
- package/dist/mcp/index.js +2 -2
- package/dist/session.js +27 -8
- package/dist/tools/classes.js +2 -0
- package/dist/tools/deferred.js +11 -6
- package/dist/tools/readonly-shell.js +92 -0
- package/dist/tools/registry.js +3 -3
- package/dist/tools/shell-session.js +56 -1
- package/dist/ui/ActivitySpinner.js +2 -2
- package/dist/ui/App.js +8 -8
- package/dist/ui/ApprovalPrompt.js +5 -4
- package/dist/ui/ArtifactPicker.js +4 -3
- package/dist/ui/AuthScreen.js +2 -1
- package/dist/ui/BgPanel.js +6 -6
- package/dist/ui/Composer.js +4 -3
- package/dist/ui/Header.js +2 -2
- package/dist/ui/Markdown.js +50 -77
- package/dist/ui/PlanPane.js +5 -5
- package/dist/ui/QuestionPrompt.js +2 -1
- package/dist/ui/SecretPrompt.js +2 -1
- package/dist/ui/SessionPicker.js +4 -3
- package/dist/ui/SkillFinder.js +3 -2
- package/dist/ui/StatsCard.js +2 -2
- package/dist/ui/StatusRule.js +2 -2
- package/dist/ui/SummaryCard.js +2 -2
- package/dist/ui/Table.js +25 -24
- package/dist/ui/ThinkingSpinner.js +2 -1
- package/dist/ui/ToolBatch.js +3 -3
- package/dist/ui/ToolStep.js +4 -4
- package/dist/ui/Transcript.js +12 -12
- package/dist/ui/UpdatePrompt.js +2 -1
- package/dist/ui/inline.js +109 -0
- package/dist/ui/theme.js +4 -0
- package/package.json +1 -1
package/dist/ui/App.js
CHANGED
|
@@ -23,7 +23,7 @@ import { phaseLine, phaseWord } from "./phase.js";
|
|
|
23
23
|
import { KIND_HUE } from "./toolicons.js";
|
|
24
24
|
import { foldLine } from "./fold.js";
|
|
25
25
|
import { isExpandKey } from "./expand.js";
|
|
26
|
-
import { theme } from "./theme.js";
|
|
26
|
+
import { theme, secondary } from "./theme.js";
|
|
27
27
|
import { ApprovalPrompt } from "./ApprovalPrompt.js";
|
|
28
28
|
import { QuestionPrompt } from "./QuestionPrompt.js";
|
|
29
29
|
import { SecretPrompt } from "./SecretPrompt.js";
|
|
@@ -53,7 +53,7 @@ function LiveRow({ step }) {
|
|
|
53
53
|
const hue = KIND_HUE[toolKind(step.name)];
|
|
54
54
|
const glyph = step.status === "running" ? glyphFor(step.name, "running", frame) : step.status === "selected" ? "○" : step.outcome ? "⊘" : step.status === "error" ? "✗" : "✓";
|
|
55
55
|
const color = step.status === "running" ? hue : step.status === "selected" ? theme.muted : step.outcome === "blocked" ? theme.blocked : step.outcome ? theme.muted : step.status === "error" ? theme.error : theme.success;
|
|
56
|
-
return (_jsxs(Text, { children: [_jsx(Text, { color: color, bold: true, children: glyph }), " ", _jsx(Text, { color: hue, children: head }), _jsx(Text, {
|
|
56
|
+
return (_jsxs(Text, { children: [_jsx(Text, { color: color, bold: true, children: glyph }), " ", _jsx(Text, { color: hue, children: head }), _jsx(Text, { ...(step.status !== "running" ? secondary : {}), children: rest })] }));
|
|
57
57
|
}
|
|
58
58
|
// Which running delegate_task row a child's progress belongs to: the one whose task matches (whitespace aside — the
|
|
59
59
|
// emitter trims it, live 11/04), else the only one running (delegate_task is a scheduler barrier, so one runs at a time).
|
|
@@ -65,7 +65,7 @@ export function delegateRow(rows, view) {
|
|
|
65
65
|
// The specialist's live line under its running delegate_task (TUI plan #9), led by the delegation's own relay motion.
|
|
66
66
|
function DelegateChild({ view }) {
|
|
67
67
|
const frame = useTick(true);
|
|
68
|
-
return (_jsxs(Text, { children: [" ", _jsx(Text, { color: KIND_HUE.agent, children: relayFrame(frame) }), " ", _jsx(Text, {
|
|
68
|
+
return (_jsxs(Text, { children: [" ", _jsx(Text, { color: KIND_HUE.agent, children: relayFrame(frame) }), " ", _jsx(Text, { ...secondary, children: delegateLine(view, termCols()) })] }));
|
|
69
69
|
}
|
|
70
70
|
// The phase line (ui/phase.ts): one dim row naming what the turn is measurably doing, then the keys that act on it
|
|
71
71
|
// (Enter steers, Tab queues, Esc stops), fitted to cols−1. It ticks on the shared clock only while it has something
|
|
@@ -78,10 +78,10 @@ function PhaseLine({ view, rows, offer = null }) {
|
|
|
78
78
|
const frame = useTick(watchingShell || (view.phase === "reading" && !!view.read));
|
|
79
79
|
const act = actNowLine(phaseWord(view.phase), offer);
|
|
80
80
|
if (act)
|
|
81
|
-
return _jsx(Text, {
|
|
81
|
+
return _jsx(Text, { ...secondary, children: cols < 45 ? ACT_NOW_NARROW : fitSegments(act, cols, { sep: "" }) });
|
|
82
82
|
// No steer keys while compacting: a manual /compact is no turn to steer — what is typed waits for it.
|
|
83
83
|
const { meter, text } = phaseLine({ ...view, hint: view.phase === "tools" ? backgroundHint(rows) : null, keys: view.phase === "compacting" ? undefined : turnKeySegs() }, cols, frame);
|
|
84
|
-
return (_jsxs(Text, {
|
|
84
|
+
return (_jsxs(Text, { ...secondary, children: [" ", meter ? _jsx(Text, { color: KIND_HUE.read, children: `${meter} ` }) : null, text] }));
|
|
85
85
|
}
|
|
86
86
|
// ctrl+o appends the newest collapsed item (a sub-agent report, a settled batch). Its own listener, so the composer only
|
|
87
87
|
// has to swallow the key; inactive while an overlay owns the keyboard.
|
|
@@ -112,7 +112,7 @@ export function App(props) {
|
|
|
112
112
|
// The live activity band (spinner / parallel-tool view) and the bg-agents panel — shared by both layouts.
|
|
113
113
|
const activity = (_jsxs(_Fragment, { children: [showSpinner && (_jsx(Box, { marginTop: 1, marginBottom: showLiveRows ? 0 : 1, children: status === "recovering" || status === "compacting" ? _jsx(RecoverSpinner, { active: true, label: stepLabel })
|
|
114
114
|
: status === "executing" && !showLiveRows ? _jsx(StepSpinner, { active: true, label: stepLabel })
|
|
115
|
-
: _jsx(ThinkingSpinner, { active: true, verb: status === "executing" ? thinkingVerb ?? "Running" : thinkingVerb, verbs: verbs, metrics: metrics }) })), showLiveRows && (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, paddingLeft: 1, children: [_jsx(Text, {
|
|
115
|
+
: _jsx(ThinkingSpinner, { active: true, verb: status === "executing" ? thinkingVerb ?? "Running" : thinkingVerb, verbs: verbs, metrics: metrics }) })), showLiveRows && (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, paddingLeft: 1, children: [_jsx(Text, { ...secondary, children: batchHeader(liveTools, termCols()) }), liveTools.slice(0, MAX_LIVE_TOOL_ROWS).map((step) => (_jsxs(React.Fragment, { children: [_jsx(LiveRow, { step: step }), delegate && step.id === delegateRow(liveTools, delegate) ? _jsx(DelegateChild, { view: delegate }) : null] }, step.id))), liveTools.length > MAX_LIVE_TOOL_ROWS ? _jsxs(Text, { ...secondary, children: [" +", liveTools.length - MAX_LIVE_TOOL_ROWS, " more\u2026"] }) : null] })), fold ? (() => { const line = foldLine(fold, termCols(), true); return _jsxs(Text, { children: [_jsx(Text, { color: theme.blocked, children: line.slice(0, 1) }), _jsx(Text, { ...secondary, children: line.slice(1) })] }); })() : null, _jsx(PlanPane, { tasks: tasks, now: planNow }), liveWorkers(mainLane, bgAgents, shellJobs) >= 2
|
|
116
116
|
? _jsx(Lanes, { main: mainLane, agents: bgAgents, jobs: shellJobs, mainServing: mainServing, maxRunning: maxRunning, pool: lanePool, warnings: laneWarnings })
|
|
117
117
|
: _jsx(BgPanel, { agents: bgAgents, jobs: shellJobs }), (thinking || status === "executing" || status === "recovering" || status === "compacting") && (_jsx(PhaseLine, { view: phase ?? { phase: status === "executing" ? "tools" : status === "recovering" ? "recovering" : status === "compacting" ? "compacting" : status === "streaming" ? "writing" : "waiting", label: stepLabel }, rows: liveTools, offer: actOffer }))] }));
|
|
118
118
|
// One input owner at a time. An open overlay — the finder, the focused switcher — keeps the keyboard; a prompt that
|
|
@@ -131,10 +131,10 @@ export function App(props) {
|
|
|
131
131
|
const modeText = opMode ? ` ${MODE_BADGE[opMode]} · shift+tab to cycle` : "";
|
|
132
132
|
const rcText = `${caffeinated ? "☕ " : ""}${rcConnected ? "▮ rc live" : rcActive ? "▮ rc on" : "▯ rc"} `;
|
|
133
133
|
const centre = switcher ? switcherLine(conversations, switcher, Math.max(0, cols - 1 - cellWidth(modeText) - cellWidth(rcText) - 2)) : "";
|
|
134
|
-
const bottom = (_jsxs(_Fragment, { children: [_jsx(SwitcherKeys, { active: owner === "switcher", onKey: onSwitcher }), conversationPane ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "magenta", children: conversationPane.header }), conversationPane.lines.map((l, i) => _jsx(Text, {
|
|
134
|
+
const bottom = (_jsxs(_Fragment, { children: [_jsx(SwitcherKeys, { active: owner === "switcher", onKey: onSwitcher }), conversationPane ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "magenta", children: conversationPane.header }), conversationPane.lines.map((l, i) => _jsx(Text, { ...(!l.startsWith("⏺") && !l.startsWith("❯") ? secondary : {}), children: l || " " }, i))] })) : null, _jsx(StatusRule, { route: route, ctxPct: ctxPct, ctxWindow: ctxWindow, version: version, build: build, user: authUser, tier: tier, planMode: planMode, thinkMode: thinkMode, sessionTokens: sessionTokens }), owner === "composer" && status === "idle" && nextSteps?.length ? _jsx(Text, { color: "cyan", children: nextStepLine(nextSteps, cols) }) : null, pendingLines(pending, cols, phase ? phaseWord(phase.phase) : undefined).map((line, i) => _jsx(Text, { color: "yellow", children: line }, i)), voice ? _jsx(Text, { color: voice.recording ? "red" : undefined, bold: voice.recording, dimColor: !voice.recording, children: fitSegments([seg(voice.line)], cols) }) : null, onExpand ? _jsx(ExpandKey, { onExpand: onExpand, active: owner === "composer" }) : null, _jsx(Composer, { onSubmit: onSubmit, onQueue: onQueue, onSteer: onSteer, queued: pending.length, nextSteps: owner === "composer" && status === "idle" ? nextSteps?.length ?? 0 : 0, onPickNext: onPickNext, onDismissNext: onDismissNext, agents: agents, onAgentMessage: onAgentMessage, onSendTo: conversationPane ? onSendTo : undefined, onFocusSwitcher: onFocusSwitcher, onActNow: onActNow, onOpenFinder: onOpenFinder, onVoiceKey: onVoiceKey, prompt: conversationPane ? `${conversationPane.target} › ` : undefined, onEditQueued: onEditQueued, onDropQueued: onDropQueued, onInterrupt: onInterrupt, onBackground: onBackground, onCycleMode: onCycleMode, onCycleContext: onCycleContext, disabled: status !== "idle", suspended: owner !== "composer" }), _jsx(InputRule, {}), opMode && (_jsxs(Box, { justifyContent: "space-between", children: [_jsx(Text, { ...secondary, children: modeText }), centre ? (() => {
|
|
135
135
|
const pad = centreLayout(cellWidth(modeText), cellWidth(centre), cellWidth(rcText), cols);
|
|
136
136
|
return _jsx(Text, { color: switcher?.focused ? "cyan" : undefined, dimColor: !switcher?.focused, children: " ".repeat(pad.before) + centre + " ".repeat(Math.max(0, pad.after - 1)) });
|
|
137
|
-
})() : null, _jsx(Text, { color: rcConnected ? "green" : rcActive ? "yellow" :
|
|
137
|
+
})() : null, _jsx(Text, { color: rcConnected ? "green" : rcActive ? "yellow" : theme.secondary, bold: rcConnected || rcActive, children: rcText })] }))] }));
|
|
138
138
|
// Fullscreen (opt-in): a full-terminal-height column. The transcript fills a clipped, bottom-anchored
|
|
139
139
|
// region (non-Static tail) so the newest output sits just above a composer pinned to the very bottom —
|
|
140
140
|
// no dead space. Off by default: inline keeps the terminal's native scrollback (mouse-scroll + copy).
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text, useInput } from "ink";
|
|
3
|
+
import { secondary } from "./theme.js";
|
|
3
4
|
// A short, human summary of what the tool is about to do — the args that matter, truncated. Keeps the
|
|
4
5
|
// prompt to a couple of lines instead of dumping raw JSON.
|
|
5
6
|
function summarize(name, args) {
|
|
@@ -45,9 +46,9 @@ export function ApprovalPrompt({ approval, onDecide, suspended = false, waiting
|
|
|
45
46
|
if (!approval)
|
|
46
47
|
return null;
|
|
47
48
|
const detail = summarize(approval.name, approval.args);
|
|
48
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [_jsxs(Text, { color: "yellow", bold: true, children: ["⚠ Operator wants to run ", _jsx(Text, { color: "magenta", children: approval.name })] }), detail ? _jsx(Text, {
|
|
49
|
-
? _jsx(Text, {
|
|
49
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "yellow", paddingX: 1, children: [_jsxs(Text, { color: "yellow", bold: true, children: ["⚠ Operator wants to run ", _jsx(Text, { color: "magenta", children: approval.name })] }), detail ? _jsx(Text, { ...secondary, children: " " + detail }) : null, approval.ctx ? _jsx(Text, { color: "red", bold: true, children: ` ${approval.ctx.line} — a human signs this one, every time` }) : null, approval.ctx?.preview ? _jsx(Text, { children: " the screen it will act on: " + approval.ctx.preview }) : null, suspended
|
|
50
|
+
? _jsx(Text, { ...secondary, children: " waiting · " + (waiting ?? "another prompt has the keyboard") })
|
|
50
51
|
: approval.ctx?.once
|
|
51
|
-
? _jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "[a]" }), " allow once ", _jsx(Text, { color: "red", children: "[d]" }), " deny ", _jsx(Text, {
|
|
52
|
-
: _jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "[a]" }), " allow once ", _jsx(Text, { color: "cyan", children: "[s]" }), " allow always ", _jsx(Text, { color: "red", children: "[d]" }), " deny ", _jsx(Text, {
|
|
52
|
+
? _jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "[a]" }), " allow once ", _jsx(Text, { color: "red", children: "[d]" }), " deny ", _jsx(Text, { ...secondary, children: "(Enter=allow \u00B7 Esc=deny)" })] })
|
|
53
|
+
: _jsxs(Text, { children: [" ", _jsx(Text, { color: "green", children: "[a]" }), " allow once ", _jsx(Text, { color: "cyan", children: "[s]" }), " allow always ", _jsx(Text, { color: "red", children: "[d]" }), " deny ", _jsx(Text, { ...secondary, children: "(Enter=allow \u00B7 Esc=deny)" })] })] }));
|
|
53
54
|
}
|
|
@@ -8,6 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
9
9
|
import { Box, Text, useInput } from "ink";
|
|
10
10
|
import { useClickList } from "./MouseProvider.js";
|
|
11
|
+
import { secondary } from "./theme.js";
|
|
11
12
|
const VISIBLE_ROWS = 12; // window height; longer libraries scroll within it (narrow with / search)
|
|
12
13
|
// Pure keystroke reducer: returns the next state and/or an intent to dispatch. No React, no I/O — the whole
|
|
13
14
|
// selection / search / delete-confirm behavior is unit-tested against this directly.
|
|
@@ -98,12 +99,12 @@ export function ArtifactPicker({ pending, suspended = false }) {
|
|
|
98
99
|
if (!pending)
|
|
99
100
|
return null;
|
|
100
101
|
const { loading, error, note } = pending;
|
|
101
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["◆ Artifacts ", _jsx(Text, { color: "cyan", bold: true, children: "[Mine]" }), _jsx(Text, {
|
|
102
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["◆ Artifacts ", _jsx(Text, { color: "cyan", bold: true, children: "[Mine]" }), _jsx(Text, { ...secondary, children: " All Shared (soon)" })] }), st.mode === "search" ? (_jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: "search› " }), st.query, _jsx(Text, { color: "cyan", children: "\u258C" })] })) : null, loading ? _jsx(Text, { ...secondary, children: " loading…" }) : null, error ? _jsx(Text, { color: "red", children: " " + error }) : null, !loading && !error && n === 0 ? (_jsx(Text, { ...secondary, children: st.query ? ` no artifacts match "${st.query}"` : " no artifacts yet — ask Operator to make one" })) : null, !loading && !error && items.slice(start, end).map((it, i) => {
|
|
102
103
|
const idx = start + i;
|
|
103
104
|
const sel = idx === hi;
|
|
104
105
|
const armed = st.confirmDeleteId === it.id;
|
|
105
|
-
return (_jsxs(Text, { children: [" ", sel ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsx(Text, { bold: sel, children: it.title || "(untitled)" }), armed ? _jsx(Text, { color: "red", children: " delete? press d again" }) : _jsx(Text, {
|
|
106
|
-
}), n > end ? _jsx(Text, {
|
|
106
|
+
return (_jsxs(Text, { children: [" ", sel ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsx(Text, { bold: sel, children: it.title || "(untitled)" }), armed ? _jsx(Text, { color: "red", children: " delete? press d again" }) : _jsx(Text, { ...secondary, children: ` compose${it.content_type ? " · " + it.content_type : ""}` })] }, it.id));
|
|
107
|
+
}), n > end ? _jsx(Text, { ...secondary, children: ` ⋯ +${n - end} more · / to search` }) : null, note ? _jsx(Text, { color: "green", children: " " + note }) : null, _jsx(Text, { ...secondary, children: st.mode === "search"
|
|
107
108
|
? " type to filter · Enter to search · Esc for the list"
|
|
108
109
|
: " ↑/↓ move · Enter attach · c copy url · d delete · r refresh · / search · esc close" })] }));
|
|
109
110
|
}
|
package/dist/ui/AuthScreen.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text, useInput } from "ink";
|
|
3
3
|
import { Masthead } from "./Masthead.js";
|
|
4
|
+
import { secondary } from "./theme.js";
|
|
4
5
|
export function AuthScreen({ version, ctxWindow, authBase, pending, error, onChoice }) {
|
|
5
6
|
useInput((input, key) => {
|
|
6
7
|
if (pending)
|
|
@@ -13,5 +14,5 @@ export function AuthScreen({ version, ctxWindow, authBase, pending, error, onCho
|
|
|
13
14
|
else if (key.return || c === "g")
|
|
14
15
|
onChoice("guest");
|
|
15
16
|
});
|
|
16
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Masthead, { info: `Operator${ctxWindow ? ` · ${ctxWindow >= 1_000_000 ? "1M" : `${Math.round(ctxWindow / 1024)}K`}` : ""} · v${version}` }), _jsx(Box, { marginTop: 1, flexDirection: "column", paddingLeft: 1, children: pending ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["Signing in \u2014 open ", _jsx(Text, { color: "cyanBright", children: pending.url })] }), _jsxs(Text, { children: ["and enter code ", _jsx(Text, { bold: true, color: "whiteBright", children: pending.userCode })] }), _jsx(Text, {
|
|
17
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Masthead, { info: `Operator${ctxWindow ? ` · ${ctxWindow >= 1_000_000 ? "1M" : `${Math.round(ctxWindow / 1024)}K`}` : ""} · v${version}` }), _jsx(Box, { marginTop: 1, flexDirection: "column", paddingLeft: 1, children: pending ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["Signing in \u2014 open ", _jsx(Text, { color: "cyanBright", children: pending.url })] }), _jsxs(Text, { children: ["and enter code ", _jsx(Text, { bold: true, color: "whiteBright", children: pending.userCode })] }), _jsx(Text, { ...secondary, children: "Waiting for approval in your browser\u2026 (Esc to cancel)" })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { color: "whiteBright", children: "Welcome to Operator." }), _jsx(Text, { ...secondary, children: "A local terminal coding agent on your own model." }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: "magentaBright", bold: true, children: " s" }), " Sign in ", _jsx(Text, { ...secondary, children: "\u2014 connect your account (browser approval)" })] }), _jsxs(Text, { children: [_jsx(Text, { color: "magentaBright", bold: true, children: " u" }), " Create account ", _jsxs(Text, { ...secondary, children: ["\u2014 register at ", authBase.replace(/^https?:\/\//, "")] })] }), _jsxs(Text, { children: [_jsx(Text, { color: "magentaBright", bold: true, children: " \u21B5" }), " Continue as guest ", _jsx(Text, { ...secondary, children: "\u2014 no account needed; sign in later with /login" })] })] }), error ? _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) }) : null] })) })] }));
|
|
17
18
|
}
|
package/dist/ui/BgPanel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { OrbitGlyph } from "./ActivitySpinner.js";
|
|
4
|
-
import { theme } from "./theme.js";
|
|
4
|
+
import { theme, secondary } from "./theme.js";
|
|
5
5
|
import { useTick } from "./tick.js";
|
|
6
6
|
import { termCols, termRows } from "./term.js";
|
|
7
7
|
import { cellWidth, truncateToWidth } from "./StatusRule.js";
|
|
@@ -100,7 +100,7 @@ export function detailLine(a) {
|
|
|
100
100
|
// every tick, and Ink repainted the whole frame (the flashing, 10/31).
|
|
101
101
|
function AgentRows({ a }) {
|
|
102
102
|
const d = detailLine(a);
|
|
103
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "truncate-end", children: [a.status === "working" ? _jsx(OrbitGlyph, {}) : _jsx(Text, { color: colorOf(a), children: glyphOf(a) }), " ", _jsx(Text, { bold: true, children: a.name ?? a.label }), a.name ? _jsx(Text, {
|
|
103
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "truncate-end", children: [a.status === "working" ? _jsx(OrbitGlyph, {}) : _jsx(Text, { color: colorOf(a), children: glyphOf(a) }), " ", _jsx(Text, { bold: true, children: a.name ?? a.label }), a.name ? _jsx(Text, { ...secondary, children: ` · ${cap(a.label, 40)}` }) : null, a.round != null ? ` · round ${a.round}` : "", a.status === "working" && missionLine(a) ? _jsxs(Text, { color: theme.accent, children: [" \u00B7 ", cap(missionLine(a), 36)] }) : null] }) }), _jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { ...secondary, children: (() => { const m = metrics(a); const ds = statusOf(a); return m ? `${m} · ${ds}` : ds; })() }) })] }), _jsx(Box, { paddingLeft: 2, children: _jsx(Text, { ...secondary, wrap: "truncate-end", children: ledgerLine(a) }) }), _jsx(Box, { paddingLeft: 2, children: d.tone === "stuck" ? _jsx(Text, { color: theme.error, wrap: "truncate-end", children: d.text }) : _jsx(Text, { ...secondary, wrap: "truncate-end", children: cap(d.text, 110) }) })] }));
|
|
104
104
|
}
|
|
105
105
|
// Cap how many agent rows the DYNAMIC panel renders. Each agent is ~3 lines; a full fan-out (6–8 agents)
|
|
106
106
|
// makes the non-Static frame tall AND it re-renders on every sub-agent token — so when it sits near the
|
|
@@ -121,7 +121,7 @@ function ShellJobs({ jobs }) {
|
|
|
121
121
|
const hidden = jobs.length - shown.length;
|
|
122
122
|
const done = jobs.length - running.length;
|
|
123
123
|
const counts = [running.length ? `${running.length} running` : "", done ? `${done} finished` : ""].filter(Boolean).join(" · ");
|
|
124
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, {
|
|
124
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { ...secondary, children: `shell jobs · ${counts}` }), shown.map((j) => (_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { children: [j.status === "running" ? _jsx(OrbitGlyph, {}) : _jsx(Text, { color: j.status === "done" ? theme.success : j.status === "failed" ? theme.error : theme.muted, children: j.status === "done" ? "✓" : "✗" }), " ", j.id, " ", _jsx(Text, { ...secondary, children: cap(j.cmd.replace(/\s+/g, " "), 40) })] }), _jsx(Text, { ...secondary, children: `${fmtJobTime(j.status === "running" ? Date.now() - j.startedAt : j.elapsedMs)} · ${j.status === "failed" ? `exit ${j.code ?? "?"}` : j.status}` })] }, j.id))), hidden > 0 ? _jsx(Text, { ...secondary, children: ` +${hidden} more · /jobs` }) : null] }));
|
|
125
125
|
}
|
|
126
126
|
export function BgPanel({ agents, jobs = [], title = "sub-agents" }) {
|
|
127
127
|
if (agents.length === 0 && jobs.length === 0)
|
|
@@ -152,7 +152,7 @@ export function BgPanel({ agents, jobs = [], title = "sub-agents" }) {
|
|
|
152
152
|
// frame SHORT — BG_MAX_VISIBLE caps rows, activity lines are capped — so the box stays a few rows tall.
|
|
153
153
|
// If stray border rows ever reappear on a very long turn, drop `borderStyle`/`borderColor` for the
|
|
154
154
|
// borderless column (the label line alone still heads it).
|
|
155
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: theme.muted, paddingX: 1, children: [_jsx(Text, {
|
|
155
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: theme.muted, paddingX: 1, children: [_jsx(Text, { ...secondary, children: label }), shown.map((a) => _jsx(AgentRows, { a: a }, a.id)), hidden > 0 ? _jsx(Text, { ...secondary, children: ` +${hidden} more running` }) : null, _jsx(ShellJobs, { jobs: jobs })] }));
|
|
156
156
|
}
|
|
157
157
|
const LANE_GLYPH = {
|
|
158
158
|
main: "✷", working: "◠", waiting: "◌", queued: "◌", done: "✓", stopped: "■", error: "✗", stuck: "⚠", job: "▶", jobDone: "✓", jobFailed: "✗",
|
|
@@ -226,7 +226,7 @@ export function laneHeader(lanes, cols, pool) {
|
|
|
226
226
|
export const LANES_SHORT_ROWS = 30;
|
|
227
227
|
function LaneRow({ lane, cols }) {
|
|
228
228
|
const { left, mission, right } = laneRow(lane, cols);
|
|
229
|
-
return (_jsxs(Text, { children: [" ", lane.tone === "working" ? _jsx(OrbitGlyph, {}) : _jsx(Text, { color: LANE_COLOR[lane.tone], children: LANE_GLYPH[lane.tone] }), " ", _jsx(Text, { bold: true, children: left.slice(0, 6) }), _jsx(Text, {
|
|
229
|
+
return (_jsxs(Text, { children: [" ", lane.tone === "working" ? _jsx(OrbitGlyph, {}) : _jsx(Text, { color: LANE_COLOR[lane.tone], children: LANE_GLYPH[lane.tone] }), " ", _jsx(Text, { bold: true, children: left.slice(0, 6) }), _jsx(Text, { ...secondary, children: left.slice(6) }), _jsx(Text, { color: lane.tone === "stuck" ? theme.warn : undefined, dimColor: lane.tone !== "stuck" && lane.tone !== "main" && lane.tone !== "working", children: mission }), right ? _jsx(Text, { ...secondary, children: ` ${right}` }) : null] }));
|
|
230
230
|
}
|
|
231
231
|
/** The lanes view: one row per live worker, finished agents lingering until they are reaped. */
|
|
232
232
|
export function Lanes({ main, agents, jobs, mainServing, maxRunning, pool, warnings = [] }) {
|
|
@@ -241,5 +241,5 @@ export function Lanes({ main, agents, jobs, mainServing, maxRunning, pool, warni
|
|
|
241
241
|
];
|
|
242
242
|
const cap = termRows() < LANES_SHORT_ROWS ? 3 : 8;
|
|
243
243
|
const shown = lanes.slice(0, cap);
|
|
244
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, {
|
|
244
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { ...secondary, children: laneHeader(lanes, cols, pool) }), shown.map((l) => _jsx(LaneRow, { lane: l, cols: cols }, l.key)), warnings.slice(0, 1).map((w) => _jsx(Text, { color: theme.warn, wrap: "truncate-end", children: ` ⚠ ${w}` }, w)), lanes.length > shown.length ? _jsx(Text, { ...secondary, children: ` +${lanes.length - shown.length} more · /agents` }) : null] }));
|
|
245
245
|
}
|
package/dist/ui/Composer.js
CHANGED
|
@@ -24,6 +24,7 @@ import { touchInput } from "../idle/activity.js";
|
|
|
24
24
|
import { isSlashCommand } from "../util/slash.js";
|
|
25
25
|
import { agentMention, matchAgentMentions, mentionCompletion, mentionMenuLine } from "./conversations.js";
|
|
26
26
|
import { termCols } from "./term.js";
|
|
27
|
+
import { secondary } from "./theme.js";
|
|
27
28
|
const PASTE_START = "\x1b[200~";
|
|
28
29
|
const PASTE_END = "\x1b[201~";
|
|
29
30
|
export function Composer({ onSubmit, onInterrupt, onQueue, onSteer, disabled, suspended, onCycleMode, onCycleContext, onBackground, queued = 0, onEditQueued, onDropQueued, nextSteps = 0, onPickNext, onDismissNext, agents = [], onAgentMessage, onSendTo, onFocusSwitcher, onActNow, onOpenFinder, onVoiceKey, prompt = "› " }) {
|
|
@@ -329,11 +330,11 @@ export function Composer({ onSubmit, onInterrupt, onQueue, onSteer, disabled, su
|
|
|
329
330
|
// Surface any image/video paths in the draft as attachment chips so the user can see multiple
|
|
330
331
|
// media are attached (dragged/pasted paths land in the text). De-duped, basename only.
|
|
331
332
|
const attachments = Array.from(new Set(value.match(MEDIA_RE) ?? []));
|
|
332
|
-
return (_jsxs(Box, { flexDirection: "column", children: [lines.map((line, i) => (_jsxs(Text, { children: [i === 0 ? prompt : " ", line, i === lines.length - 1 ? "▌" : ""] }, i))), value.length > LONG_DRAFT && _jsx(Text, {
|
|
333
|
+
return (_jsxs(Box, { flexDirection: "column", children: [lines.map((line, i) => (_jsxs(Text, { children: [i === 0 ? prompt : " ", line, i === lines.length - 1 ? "▌" : ""] }, i))), value.length > LONG_DRAFT && _jsx(Text, { ...secondary, children: " ctrl+u clear" }), attachments.length > 0 && (_jsx(Text, { ...secondary, children: " " + attachments.map((a) => `${VIDEO_RE.test(a) ? "▷ vid" : "◇ img"}:${a.split("/").pop()}`).join(" ") })), menuMatches.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [menuMatches.slice(0, 10).map((c, i) => {
|
|
333
334
|
const on = i === menuSel;
|
|
334
335
|
const label = `/${c.name}${c.args ? " " + c.args : ""}`.padEnd(24);
|
|
335
|
-
return (_jsxs(Text, { children: [_jsx(Text, { color: on ? "green" : undefined, bold: on, children: (on ? "▸ " : " ") + label }), _jsx(Text, {
|
|
336
|
-
}), menuMatches.length > 10 && _jsx(Text, {
|
|
336
|
+
return (_jsxs(Text, { children: [_jsx(Text, { color: on ? "green" : undefined, bold: on, children: (on ? "▸ " : " ") + label }), _jsx(Text, { ...secondary, children: c.description })] }, c.name));
|
|
337
|
+
}), menuMatches.length > 10 && _jsx(Text, { ...secondary, children: ` …and ${menuMatches.length - 10} more` })] })), atMatches ? _jsx(Text, { ...secondary, children: mentionMenuLine(atMatches, atSel, termCols()) }) : null] }));
|
|
337
338
|
}
|
|
338
339
|
// A draft this long (an injected or recalled message) shows the one-key way out under it.
|
|
339
340
|
const LONG_DRAFT = 500;
|
package/dist/ui/Header.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { termCols } from "./term.js";
|
|
4
|
-
import { theme } from "./theme.js";
|
|
4
|
+
import { theme, secondary } from "./theme.js";
|
|
5
5
|
import { prettyRoute } from "./StatusRule.js"; // the ONE outward-name rule, shared with the status rule
|
|
6
6
|
const STAR = "✷"; // ✷ — the AXE signal star (brand glyph, matches ThinkingSpinner)
|
|
7
7
|
function tierLabel(ctx) {
|
|
@@ -21,5 +21,5 @@ export function Header({ version, route = "operator", ctxWindow, user, build })
|
|
|
21
21
|
const left = ` ${STAR} OPERATOR`;
|
|
22
22
|
const right = `${model} · v${version}${build ? ` ·${build}` : ""} · ${who} `;
|
|
23
23
|
const gap = Math.max(1, cols - left.length - right.length);
|
|
24
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.accent, bold: true, children: ` ${STAR} ` }), _jsx(Text, { bold: true, color: theme.textBright, children: "OPERATOR" }), _jsx(Text, { children: " ".repeat(gap) }), _jsx(Text, {
|
|
24
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.accent, bold: true, children: ` ${STAR} ` }), _jsx(Text, { bold: true, color: theme.textBright, children: "OPERATOR" }), _jsx(Text, { children: " ".repeat(gap) }), _jsx(Text, { ...secondary, children: `${model} · v${version}${build ? ` ·${build}` : ""} · ` }), _jsx(Text, { color: user ? theme.success : undefined, dimColor: !user, children: who + " " })] }), _jsx(Text, { dimColor: true, children: "─".repeat(cols) })] }));
|
|
25
25
|
}
|
package/dist/ui/Markdown.js
CHANGED
|
@@ -2,49 +2,60 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { termCols } from "./term.js";
|
|
4
4
|
import { parseTable, MarkdownTable } from "./Table.js";
|
|
5
|
-
import {
|
|
6
|
-
import { theme } from "./theme.js";
|
|
5
|
+
import { renderInline, closeOpen } from "./inline.js";
|
|
6
|
+
import { theme, secondary } from "./theme.js";
|
|
7
7
|
import { tokenize } from "./highlight.js";
|
|
8
8
|
import { renderTree } from "./tree.js";
|
|
9
|
-
// Map a highlighter token kind to a theme color (undefined = default fg). Comments
|
|
9
|
+
// Map a highlighter token kind to a theme color (undefined = default fg). Comments render secondary.
|
|
10
10
|
const TOKEN_COLOR = {
|
|
11
11
|
comment: theme.muted, string: theme.success, number: theme.running,
|
|
12
12
|
keyword: theme.accent, call: theme.info, plain: undefined,
|
|
13
13
|
};
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
? _jsx(Text, { color: theme.info, underline: true, children: link(label, url) }, `${kp}l${i++}`)
|
|
33
|
-
: _jsxs(Text, { children: [_jsx(Text, { color: theme.info, underline: true, children: label }), _jsx(Text, { dimColor: true, children: " " + url })] }, `${kp}l${i++}`));
|
|
34
|
-
}
|
|
35
|
-
else if (tok.startsWith("**"))
|
|
36
|
-
nodes.push(_jsx(Text, { bold: true, children: tok.slice(2, -2) }, `${kp}b${i++}`));
|
|
37
|
-
else if (tok.startsWith("`"))
|
|
38
|
-
nodes.push(_jsx(Text, { color: theme.info, children: tok.slice(1, -1) }, `${kp}c${i++}`));
|
|
39
|
-
else if (tok.startsWith("http"))
|
|
40
|
-
nodes.push(_jsx(Text, { color: theme.info, underline: true, children: hyperlinksEnabled() ? link(tok, tok) : tok }, `${kp}u${i++}`));
|
|
41
|
-
else
|
|
42
|
-
nodes.push(_jsx(Text, { italic: true, children: tok.slice(1, -1) }, `${kp}i${i++}`));
|
|
43
|
-
last = m.index + tok.length;
|
|
14
|
+
// One line outside a fence or table: heading, rule, quote, list item or paragraph.
|
|
15
|
+
function renderLine(line, k) {
|
|
16
|
+
const h = /^(#{1,6})\s+(.*?)(?:\s+#+)?\s*$/.exec(line);
|
|
17
|
+
if (h)
|
|
18
|
+
return _jsx(Text, { bold: true, color: theme.accent, children: renderInline(h[2], `h${k}`) }, `h${k}`);
|
|
19
|
+
// Horizontal rule: ---, ***, ___ (3+), possibly spaced. A full-width dim divider.
|
|
20
|
+
if (/^\s*([-*_])(\s*\1){2,}\s*$/.test(line)) {
|
|
21
|
+
return _jsx(Text, { dimColor: true, children: "─".repeat(Math.max(1, termCols() - 1)) }, `hr${k}`);
|
|
22
|
+
}
|
|
23
|
+
// Blockquote: > text (one level; nested > collapse to a single bar). Muted bar + secondary text.
|
|
24
|
+
const q = /^\s*>\s?(.*)$/.exec(line);
|
|
25
|
+
if (q)
|
|
26
|
+
return _jsxs(Text, { children: [_jsx(Text, { color: theme.muted, children: "\u258F " }), _jsx(Text, { ...secondary, children: renderInline(q[1].replace(/^>\s?/, ""), `q${k}`) })] }, `q${k}`);
|
|
27
|
+
// Task list: - [ ] / - [x] (checkbox), before the plain bullet rule.
|
|
28
|
+
const t = /^(\s*)[-*+]\s+\[([ xX])\]\s+(.*)$/.exec(line);
|
|
29
|
+
if (t) {
|
|
30
|
+
const done = t[2].toLowerCase() === "x";
|
|
31
|
+
return _jsxs(Text, { children: [t[1], _jsx(Text, { color: done ? theme.success : theme.muted, children: done ? "☑ " : "☐ " }), renderInline(t[3], `t${k}`)] }, `t${k}`);
|
|
44
32
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
const b = /^(\s*)[-*+]\s+(.*)$/.exec(line);
|
|
34
|
+
if (b)
|
|
35
|
+
return _jsxs(Text, { children: [b[1], _jsx(Text, { color: theme.info, children: "\u2022 " }), renderInline(b[2], `b${k}`)] }, `b${k}`);
|
|
36
|
+
const n = /^(\s*)(\d+)\.\s+(.*)$/.exec(line);
|
|
37
|
+
if (n)
|
|
38
|
+
return _jsxs(Text, { children: [n[1], _jsxs(Text, { bold: true, children: [n[2], "."] }), " ", renderInline(n[3], `n${k}`)] }, `n${k}`);
|
|
39
|
+
if (line.trim() === "")
|
|
40
|
+
return _jsx(Text, { children: " " }, `s${k}`);
|
|
41
|
+
return _jsx(Text, { children: renderInline(line, `p${k}`) }, `p${k}`);
|
|
42
|
+
}
|
|
43
|
+
const FENCE = /^\s*```/;
|
|
44
|
+
/** A tail of streaming text, styled line for line. It never takes more rows than the raw text, which is what the
|
|
45
|
+
* live frame was measured on. `full` is the whole text the tail ends, to know whether the tail starts in a fence. */
|
|
46
|
+
export function LiveMarkdown({ text, full }) {
|
|
47
|
+
let inFence = full.slice(0, full.length - text.length).split("\n").filter((l) => FENCE.test(l)).length % 2 === 1;
|
|
48
|
+
const lines = text.split("\n");
|
|
49
|
+
return (_jsx(Text, { children: lines.map((line, i) => {
|
|
50
|
+
let node = line;
|
|
51
|
+
if (FENCE.test(line)) {
|
|
52
|
+
inFence = !inFence;
|
|
53
|
+
node = "";
|
|
54
|
+
}
|
|
55
|
+
else if (!inFence)
|
|
56
|
+
node = renderLine(i === lines.length - 1 ? closeOpen(line) : line, i);
|
|
57
|
+
return _jsxs(Text, { children: [node, i < lines.length - 1 ? "\n" : ""] }, i);
|
|
58
|
+
}) }));
|
|
48
59
|
}
|
|
49
60
|
export function Markdown({ content }) {
|
|
50
61
|
const lines = content.split("\n");
|
|
@@ -58,12 +69,12 @@ export function Markdown({ content }) {
|
|
|
58
69
|
const lang = fenceLang;
|
|
59
70
|
if (lang === "tree") {
|
|
60
71
|
// A ```tree block: render the indented outline with box-drawing connectors (dim), not highlighted.
|
|
61
|
-
blocks.push(_jsx(Box, { flexDirection: "column", paddingLeft: 1, children: renderTree(fence.join("\n")).map((l, idx) => _jsx(Text, {
|
|
72
|
+
blocks.push(_jsx(Box, { flexDirection: "column", paddingLeft: 1, children: renderTree(fence.join("\n")).map((l, idx) => _jsx(Text, { ...secondary, children: l.length ? l : " " }, idx)) }, `f${k++}`));
|
|
62
73
|
fence = [];
|
|
63
74
|
fenceLang = "";
|
|
64
75
|
return;
|
|
65
76
|
}
|
|
66
|
-
blocks.push(_jsx(Box, { flexDirection: "column", paddingLeft: 1, children: fence.map((l, idx) => l.length === 0 ? (_jsx(Text, { children: " " }, idx)) : (_jsx(Text, { children: tokenize(l, lang).map((tok, ti) => (_jsx(Text, { color: TOKEN_COLOR[tok.k],
|
|
77
|
+
blocks.push(_jsx(Box, { flexDirection: "column", paddingLeft: 1, children: fence.map((l, idx) => l.length === 0 ? (_jsx(Text, { children: " " }, idx)) : (_jsx(Text, { children: tokenize(l, lang).map((tok, ti) => (_jsx(Text, { color: TOKEN_COLOR[tok.k], ...(tok.k === "comment" ? secondary : {}), children: tok.t }, ti))) }, idx))) }, `f${k++}`));
|
|
67
78
|
fence = [];
|
|
68
79
|
fenceLang = "";
|
|
69
80
|
};
|
|
@@ -91,45 +102,7 @@ export function Markdown({ content }) {
|
|
|
91
102
|
li += table.consumed - 1; // -1: the loop's li++ advances past the last consumed line
|
|
92
103
|
continue;
|
|
93
104
|
}
|
|
94
|
-
|
|
95
|
-
if (h) {
|
|
96
|
-
blocks.push(_jsx(Text, { bold: true, color: theme.accent, children: renderInline(h[2], `h${k}`) }, `h${k++}`));
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
// Horizontal rule: ---, ***, ___ (3+), possibly spaced. A full-width dim divider.
|
|
100
|
-
if (/^\s*([-*_])(\s*\1){2,}\s*$/.test(line)) {
|
|
101
|
-
const cols = termCols();
|
|
102
|
-
blocks.push(_jsx(Text, { dimColor: true, children: "─".repeat(Math.max(1, cols - 1)) }, `hr${k++}`));
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
// Blockquote: > text (one level; nested > collapse to a single bar). Dim bar + dim text.
|
|
106
|
-
const q = /^\s*>\s?(.*)$/.exec(line);
|
|
107
|
-
if (q) {
|
|
108
|
-
blocks.push(_jsxs(Text, { children: [_jsx(Text, { color: theme.muted, children: "\u258F " }), _jsx(Text, { dimColor: true, children: renderInline(q[1].replace(/^>\s?/, ""), `q${k}`) })] }, `q${k++}`));
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
// Task list: - [ ] / - [x] (checkbox), before the plain bullet rule.
|
|
112
|
-
const t = /^(\s*)[-*+]\s+\[([ xX])\]\s+(.*)$/.exec(line);
|
|
113
|
-
if (t) {
|
|
114
|
-
const done = t[2].toLowerCase() === "x";
|
|
115
|
-
blocks.push(_jsxs(Text, { children: [t[1], _jsx(Text, { color: done ? theme.success : theme.muted, children: done ? "☑ " : "☐ " }), renderInline(t[3], `t${k}`)] }, `t${k++}`));
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
const b = /^(\s*)[-*+]\s+(.*)$/.exec(line);
|
|
119
|
-
if (b) {
|
|
120
|
-
blocks.push(_jsxs(Text, { children: [b[1], _jsx(Text, { color: theme.info, children: "\u2022 " }), renderInline(b[2], `b${k}`)] }, `b${k++}`));
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
const n = /^(\s*)(\d+)\.\s+(.*)$/.exec(line);
|
|
124
|
-
if (n) {
|
|
125
|
-
blocks.push(_jsxs(Text, { children: [n[1], _jsxs(Text, { bold: true, children: [n[2], "."] }), " ", renderInline(n[3], `n${k}`)] }, `n${k++}`));
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
if (line.trim() === "") {
|
|
129
|
-
blocks.push(_jsx(Text, { children: " " }, `s${k++}`));
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
blocks.push(_jsx(Text, { children: renderInline(line, `p${k}`) }, `p${k++}`));
|
|
105
|
+
blocks.push(renderLine(line, k++));
|
|
133
106
|
}
|
|
134
107
|
if (inFence && fence.length)
|
|
135
108
|
flushFence();
|
package/dist/ui/PlanPane.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
|
-
import { theme } from "./theme.js";
|
|
3
|
+
import { theme, secondary } from "./theme.js";
|
|
4
4
|
import { termCols } from "./term.js";
|
|
5
5
|
import { cellWidth, truncateToWidth } from "./StatusRule.js";
|
|
6
6
|
import { fitSegments, seg } from "./fit.js";
|
|
@@ -100,13 +100,13 @@ export function PlanPane({ tasks, title = "plan", now = Date.now() }) {
|
|
|
100
100
|
return null;
|
|
101
101
|
const cols = termCols();
|
|
102
102
|
if (cols < PLAN_ONE_LINE_COLS)
|
|
103
|
-
return _jsx(Text, {
|
|
103
|
+
return _jsx(Text, { ...secondary, children: planOneLine(tasks, cols) });
|
|
104
104
|
// Borderless: this pane renders in Ink's DYNAMIC region; a box border there orphans its rows into
|
|
105
105
|
// scrollback whenever the Static transcript grows during a long turn (the v0.1.92 line-flood). The
|
|
106
106
|
// dim header labels the group without a border.
|
|
107
107
|
const { shown, hidden } = visiblePlan(tasks);
|
|
108
|
-
return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsx(Text, {
|
|
108
|
+
return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsx(Text, { ...secondary, children: `${title} · ${planProgress(tasks)}` }), shown.map((t) => {
|
|
109
109
|
const { text, pad, dur } = planRow(t, cols, now);
|
|
110
|
-
return (_jsxs(Text, { wrap: "truncate-end", children: [_jsxs(Text, { color: COLOR[t.status], children: [GLYPH[t.status], " "] }), _jsx(Text, {
|
|
111
|
-
}), hidden > 0 ? _jsx(Text, {
|
|
110
|
+
return (_jsxs(Text, { wrap: "truncate-end", children: [_jsxs(Text, { color: COLOR[t.status], children: [GLYPH[t.status], " "] }), _jsx(Text, { ...(finished(t) ? secondary : {}), strikethrough: finished(t), children: text }), dur ? _jsxs(Text, { ...secondary, children: [pad, dur] }) : null] }, t.id));
|
|
111
|
+
}), hidden > 0 ? _jsx(Text, { ...secondary, children: ` +${hidden} more` }) : null] }));
|
|
112
112
|
}
|
|
@@ -8,6 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
9
9
|
import { Box, Text, useInput, measureElement } from "ink";
|
|
10
10
|
import { useClickList } from "./MouseProvider.js";
|
|
11
|
+
import { secondary } from "./theme.js";
|
|
11
12
|
// The always-present final choice. Selecting it lets the owner type their own reply (or just talk it
|
|
12
13
|
// through) instead of picking one of the model's options — so every prompt has an out.
|
|
13
14
|
export const CHAT_LABEL = "Chat about it — type your own reply";
|
|
@@ -128,5 +129,5 @@ export function QuestionPrompt({ pending, suspended = false, waiting }) {
|
|
|
128
129
|
if (!pending)
|
|
129
130
|
return null;
|
|
130
131
|
const chatIndex = pending.options.length; // 0-based highlight index for the chat escape
|
|
131
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsx(Box, { ref: qRef, children: _jsxs(Text, { color: "cyan", bold: true, children: ["? ", _jsx(Text, { color: "white", children: pending.question })] }) }), pending.options.map((o, i) => (_jsxs(Text, { children: [" ", st.mode === "choose" && st.highlight === i ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsx(Text, { color: "cyan", children: multi ? (st.selected?.includes(i) ? "[x]" : "[ ]") : `[${i + 1}]` }), " ", _jsx(Text, { bold: st.mode === "choose" && st.highlight === i, children: o })] }, i))), _jsxs(Text, { children: [" ", st.mode === "choose" && st.highlight === chatIndex ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsxs(Text, { color: "cyan", children: ["[", chatIndex + 1, "]"] }), " ", _jsx(Text, { color: "magenta", bold: st.mode === "choose" && st.highlight === chatIndex, children: CHAT_LABEL })] }), suspended ? (_jsx(Text, {
|
|
132
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsx(Box, { ref: qRef, children: _jsxs(Text, { color: "cyan", bold: true, children: ["? ", _jsx(Text, { color: "white", children: pending.question })] }) }), pending.options.map((o, i) => (_jsxs(Text, { children: [" ", st.mode === "choose" && st.highlight === i ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsx(Text, { color: "cyan", children: multi ? (st.selected?.includes(i) ? "[x]" : "[ ]") : `[${i + 1}]` }), " ", _jsx(Text, { bold: st.mode === "choose" && st.highlight === i, children: o })] }, i))), _jsxs(Text, { children: [" ", st.mode === "choose" && st.highlight === chatIndex ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsxs(Text, { color: "cyan", children: ["[", chatIndex + 1, "]"] }), " ", _jsx(Text, { color: "magenta", bold: st.mode === "choose" && st.highlight === chatIndex, children: CHAT_LABEL })] }), suspended ? (_jsx(Text, { ...secondary, children: " waiting · " + (waiting ?? "another prompt has the keyboard") })) : st.mode === "type" ? (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: "› " }), st.buffer, _jsx(Text, { color: "cyan", children: "\u258C" })] }), _jsx(Text, { ...secondary, children: " type your reply · Enter to send · Esc for the menu" })] })) : multi ? (_jsxs(Text, { ...secondary, children: [" ↑/↓ to move · Space (or 1-", chatIndex, ") to toggle · Enter to confirm · ", chatIndex + 1, " to type your own · Esc to close"] })) : (_jsxs(Text, { ...secondary, children: [" ↑/↓ to move · Enter to pick · or press 1-", chatIndex + 1, " to jump · Esc to close"] }))] }));
|
|
132
133
|
}
|
package/dist/ui/SecretPrompt.js
CHANGED
|
@@ -6,6 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
// the audit trail or a log, and the frame is drawn from its LENGTH alone, so no character of it can ever be shown.
|
|
7
7
|
import { useEffect, useRef, useState } from "react";
|
|
8
8
|
import { Box, Text, useInput } from "ink";
|
|
9
|
+
import { secondary } from "./theme.js";
|
|
9
10
|
// A paste arrives inside bracketed-paste markers (Ink strips a chunk's leading ESC, so "[200~" can lead it), often with a
|
|
10
11
|
// trailing newline; no vendor key carries whitespace or a control character, so all of that is dropped.
|
|
11
12
|
const PASTE_MARKER = /\x1b?\[20[01]~/g;
|
|
@@ -78,5 +79,5 @@ export function SecretPrompt({ pending, suspended = false }) {
|
|
|
78
79
|
}, { isActive: !!pending && !suspended });
|
|
79
80
|
if (!pending)
|
|
80
81
|
return null;
|
|
81
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["? ", _jsx(Text, { color: "white", children: pending.title })] }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "magenta", children: "› " }), maskFor(size), _jsx(Text, { color: "cyan", children: "\u258C" }), size ? _jsx(Text, {
|
|
82
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["? ", _jsx(Text, { color: "white", children: pending.title })] }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "magenta", children: "› " }), maskFor(size), _jsx(Text, { color: "cyan", children: "\u258C" }), size ? _jsx(Text, { ...secondary, children: ` ${size} characters` }) : null] }), _jsx(Text, { ...secondary, children: " Enter to store · Esc to cancel · ctrl+u to clear — the key is never shown or logged" })] }));
|
|
82
83
|
}
|
package/dist/ui/SessionPicker.js
CHANGED
|
@@ -8,6 +8,7 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
9
9
|
import { Box, Text, useInput } from "ink";
|
|
10
10
|
import { SESSION_SCOPES, metaLine, roleLabel } from "../memory/session-catalog.js";
|
|
11
|
+
import { secondary } from "./theme.js";
|
|
11
12
|
const VISIBLE = 5; // sessions on screen (3 lines each); the list scrolls within it
|
|
12
13
|
const SCOPE_LABEL = { workspace: "Workspace", project: "Project", all: "All" };
|
|
13
14
|
// Pure keystroke reducer: next state and/or an intent. Any query or scope change re-runs the search.
|
|
@@ -79,8 +80,8 @@ export function SessionPicker({ pending, suspended = false }) {
|
|
|
79
80
|
return null;
|
|
80
81
|
const { loading, error, note } = pending;
|
|
81
82
|
const { start, end } = windowFor(n, hi);
|
|
82
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["◆ Agent sessions ", SESSION_SCOPES.map((sc) => (_jsxs(Text, { color: sc === st.scope ? "cyan" : undefined, bold: sc === st.scope, dimColor: sc !== st.scope, children: [sc === st.scope ? `[${SCOPE_LABEL[sc]}]` : ` ${SCOPE_LABEL[sc]} `, " "] }, sc))), _jsx(Text, {
|
|
83
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: ["◆ Agent sessions ", SESSION_SCOPES.map((sc) => (_jsxs(Text, { color: sc === st.scope ? "cyan" : undefined, bold: sc === st.scope, dimColor: sc !== st.scope, children: [sc === st.scope ? `[${SCOPE_LABEL[sc]}]` : ` ${SCOPE_LABEL[sc]} `, " "] }, sc))), _jsx(Text, { ...secondary, children: loading ? "indexing…" : `${n} session${n === 1 ? "" : "s"} · newest first` })] }), _jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: "search› " }), st.query, _jsx(Text, { color: "cyan", children: "\u258C" })] }), error ? _jsx(Text, { color: "red", children: " " + error }) : null, !loading && !error && n === 0 ? (_jsx(Text, { ...secondary, children: st.query ? ` no session in ${SCOPE_LABEL[st.scope]} mentions "${st.query}" — Tab widens the scope` : ` no sessions in ${SCOPE_LABEL[st.scope]} yet — Tab widens the scope` })) : null, items.slice(start, end).map((it, i) => {
|
|
83
84
|
const sel = start + i === hi;
|
|
84
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [sel ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsx(Text, { bold: sel, children: it.title }), _jsx(Text, {
|
|
85
|
-
}), n > end ? _jsx(Text, {
|
|
85
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [sel ? _jsx(Text, { color: "cyan", bold: true, children: "❯ " }) : _jsx(Text, { children: " " }), _jsx(Text, { bold: sel, children: it.title }), _jsx(Text, { ...secondary, children: " " + metaLine(it) })] }), _jsx(Text, { ...secondary, wrap: "truncate-end", children: " " + (it.snippet ? `${roleLabel(it.role)}${it.role ? ": " : ""}${it.snippet}` : "") }), _jsxs(Text, { ...secondary, wrap: "truncate-end", children: [" " + (it.cwd ?? ""), it.gone ? _jsx(Text, { color: "yellow", children: " folder gone" }) : null] })] }, it.id));
|
|
86
|
+
}), n > end ? _jsx(Text, { ...secondary, children: ` ⋯ +${n - end} more` }) : null, note ? _jsx(Text, { color: "green", children: " " + note }) : null, _jsx(Text, { ...secondary, children: " type to search · Tab scope · ↑/↓ move · Enter open · Esc clear/close" })] }));
|
|
86
87
|
}
|
package/dist/ui/SkillFinder.js
CHANGED
|
@@ -11,6 +11,7 @@ import { fitSegments, seg } from "./fit.js";
|
|
|
11
11
|
import { fitWithTail } from "./fitTail.js";
|
|
12
12
|
import { termCols } from "./term.js";
|
|
13
13
|
import { typedText } from "./SecretPrompt.js";
|
|
14
|
+
import { secondary } from "./theme.js";
|
|
14
15
|
export const FINDER_ROWS = 7;
|
|
15
16
|
const PREVIEW_ROWS = 4;
|
|
16
17
|
/** A typed or pasted chunk as one-line field text: the paste markers and terminal reports out (review F9), line breaks
|
|
@@ -144,10 +145,10 @@ export function SkillFinder({ pending }) {
|
|
|
144
145
|
const shown = items.slice(start, start + FINDER_ROWS);
|
|
145
146
|
const pad = FINDER_ROWS - shown.length;
|
|
146
147
|
const creating = st.mode !== "search";
|
|
147
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsx(Text, { color: "cyan", bold: true, children: fitSegments([seg("◆ Skills & tools"), seg(pending.sizes ? ` ${pending.sizes}` : "", 1)], width + 1, { sep: "" }) }), creating ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: "new skill› " }), st.mode === "name" ? _jsxs(_Fragment, { children: [st.name, _jsx(Text, { color: "cyan", children: "\u258C" })] }) : st.name] }), _jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: " what for› " }), st.mode === "desc" ? _jsxs(_Fragment, { children: [st.desc, _jsx(Text, { color: "cyan", children: "\u258C" })] }) : _jsx(Text, {
|
|
148
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsx(Text, { color: "cyan", bold: true, children: fitSegments([seg("◆ Skills & tools"), seg(pending.sizes ? ` ${pending.sizes}` : "", 1)], width + 1, { sep: "" }) }), creating ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: "new skill› " }), st.mode === "name" ? _jsxs(_Fragment, { children: [st.name, _jsx(Text, { color: "cyan", children: "\u258C" })] }) : st.name] }), _jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: " what for› " }), st.mode === "desc" ? _jsxs(_Fragment, { children: [st.desc, _jsx(Text, { color: "cyan", children: "\u258C" })] }) : _jsx(Text, { ...secondary, children: st.desc || "(Enter to write what it is for)" })] })] })) : (_jsxs(Text, { children: [_jsx(Text, { color: "magenta", children: "search› " }), st.query, _jsx(Text, { color: "cyan", children: "\u258C" })] })), shown.map((it, i) => {
|
|
148
149
|
const sel = start + i === hi && !creating;
|
|
149
150
|
return _jsx(Text, { bold: sel, color: sel ? "cyan" : undefined, dimColor: !sel && it.source === "tool", children: finderRow(it, sel, width) }, `${it.source}:${it.id}`);
|
|
150
|
-
}), Array.from({ length: pad }, (_, i) => _jsx(Text, { children: i === 0 && n === 0 ? (st.query ? ` nothing matches "${st.query}" yet` : " type to search") : " " }, `pad${i}`)), _jsx(Text, {
|
|
151
|
+
}), Array.from({ length: pad }, (_, i) => _jsx(Text, { children: i === 0 && n === 0 ? (st.query ? ` nothing matches "${st.query}" yet` : " type to search") : " " }, `pad${i}`)), _jsx(Text, { ...secondary, children: fitSegments([seg(pending.status ? ` ${pending.status}` : " "), seg(n > FINDER_ROWS ? ` · ${hi + 1}/${n}` : "")], width + 1, { sep: "" }) }), previewLines(creating ? undefined : items[hi], pending.preview, st.expanded, width).map((l, i) => _jsx(Text, { ...(!st.expanded ? secondary : {}), children: l || " " }, `pv${i}`)), pending.note ? _jsx(Text, { color: "green", children: fitSegments([seg(pending.note)], width + 1, { lead: " " }) }) : _jsx(Text, { children: " " }), _jsx(Text, { ...secondary, children: fitSegments([seg(creating
|
|
151
152
|
? (st.mode === "name" ? "name it · Enter next · Esc back" : "what it is for · Enter: I draft it with the model · Tab: save the skeleton now · Esc back")
|
|
152
153
|
: "type to search · ↑/↓ move · → preview · ⏎ use · ctrl+r run with your words · ctrl+n new skill · esc close")], width + 1, { lead: " " }) })] }));
|
|
153
154
|
}
|
package/dist/ui/StatsCard.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
|
-
import { theme } from "./theme.js";
|
|
3
|
+
import { theme, secondary } from "./theme.js";
|
|
4
4
|
import { sparkline, bar } from "./chart.js";
|
|
5
5
|
const fmtTok = (n) => (n >= 1_000_000 ? `${(n / 1e6).toFixed(1)}M` : n >= 1000 ? `${(n / 1000).toFixed(1)}k` : `${n}`);
|
|
6
6
|
/** The one-line summary (pure, testable): turns · tools · tokens · avg tok/s. */
|
|
@@ -11,5 +11,5 @@ export function statsLine(s) {
|
|
|
11
11
|
export function StatsCard({ stats }) {
|
|
12
12
|
const tps = stats.tokPerSec;
|
|
13
13
|
const last = tps.length ? tps[tps.length - 1] : 0;
|
|
14
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: theme.muted, paddingX: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.accent, children: "\u2726 " }), _jsx(Text, { bold: true, children: "session stats" }), _jsx(Text, {
|
|
14
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: theme.muted, paddingX: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: theme.accent, children: "\u2726 " }), _jsx(Text, { bold: true, children: "session stats" }), _jsx(Text, { ...secondary, children: ` ${statsLine(stats)}` })] }), tps.length > 1 ? (_jsxs(Text, { ...secondary, children: ["throughput ", _jsx(Text, { color: theme.info, children: sparkline(tps) }), ` ${last} tok/s now`] })) : null, _jsxs(Text, { ...secondary, children: ["context ", _jsx(Text, { color: stats.ctxPct > 80 ? theme.warn : theme.success, children: bar(stats.ctxPct, 100, 12) }), ` ${Math.round(stats.ctxPct)}%`] })] }));
|
|
15
15
|
}
|
package/dist/ui/StatusRule.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from "ink";
|
|
3
3
|
import { termCols } from "./term.js";
|
|
4
|
-
import { theme } from "./theme.js";
|
|
4
|
+
import { theme, secondary } from "./theme.js";
|
|
5
5
|
import { ring } from "./chart.js";
|
|
6
6
|
import { opsModeOn } from "./opsMode.js";
|
|
7
7
|
import { shownModelLabel } from "../engine/identity.js";
|
|
@@ -95,5 +95,5 @@ export function StatusRule(props) {
|
|
|
95
95
|
const fill = ruleFill(right, cols);
|
|
96
96
|
// Enterprise header: a dim rule sweeping to a magenta ✷ mark + bright OPERATOR wordmark + dim info,
|
|
97
97
|
// sitting just above the composer (the input is bounded between this and the InputRule below).
|
|
98
|
-
return (_jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: "─".repeat(fill) + " " }), _jsx(Text, { color: theme.accent, children: "\u2737 " }), _jsx(Text, { bold: true, children: ops ? "OPS" : "OPERATOR" }), _jsx(Text, {
|
|
98
|
+
return (_jsxs(Box, { children: [_jsx(Text, { dimColor: true, children: "─".repeat(fill) + " " }), _jsx(Text, { color: theme.accent, children: "\u2737 " }), _jsx(Text, { bold: true, children: ops ? "OPS" : "OPERATOR" }), _jsx(Text, { ...secondary, children: ` · ${info} ─` })] }));
|
|
99
99
|
}
|