gaunt-sloth 2.0.0-alpha.0 → 2.0.0-alpha.1
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/commands/chatCommand.js +1 -1
- package/dist/commands/chatCommand.js.map +1 -1
- package/dist/commands/codeCommand.js +1 -1
- package/dist/commands/codeCommand.js.map +1 -1
- package/dist/tui/components/App.js +65 -5
- package/dist/tui/components/App.js.map +1 -1
- package/dist/tui/components/ClearBanner.d.ts +10 -0
- package/dist/tui/components/ClearBanner.js +17 -0
- package/dist/tui/components/ClearBanner.js.map +1 -0
- package/dist/tui/components/CommandNotice.d.ts +17 -0
- package/dist/tui/components/CommandNotice.js +17 -0
- package/dist/tui/components/CommandNotice.js.map +1 -0
- package/dist/tui/components/Transcript.js +4 -0
- package/dist/tui/components/Transcript.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +33 -3
- package/dist/tui/slashCommands.js +80 -10
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/terminal.d.ts +14 -0
- package/dist/tui/terminal.js +20 -0
- package/dist/tui/terminal.js.map +1 -0
- package/dist/tui/tuiSessionModule.js +26 -3
- package/dist/tui/tuiSessionModule.js.map +1 -1
- package/dist/tui/types.d.ts +20 -0
- package/package.json +4 -4
|
@@ -6,7 +6,7 @@ export function chatCommand(program, commandLineConfigOverrides) {
|
|
|
6
6
|
readModePrompt: readChatPrompt,
|
|
7
7
|
description: 'Start an interactive chat session with Gaunt Sloth',
|
|
8
8
|
readyMessage: '\nGaunt Sloth is ready to chat. Type your prompt.',
|
|
9
|
-
exitMessage: "Type 'exit' or
|
|
9
|
+
exitMessage: "Type 'exit' or Ctrl+C to exit chat · /help for commands\n",
|
|
10
10
|
};
|
|
11
11
|
// Chat command (REL-3: the no-subcommand default is now `code`, registered in codeCommand)
|
|
12
12
|
program
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatCommand.js","sourceRoot":"","sources":["../../src/commands/chatCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,UAAU,WAAW,CACzB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,oDAAoD;QACjE,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"chatCommand.js","sourceRoot":"","sources":["../../src/commands/chatCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,UAAU,WAAW,CACzB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,oDAAoD;QACjE,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,2DAA2D;KACzE,CAAC;IACF,2FAA2F;IAC3F,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,oDAAoD,CAAC;SACjE,QAAQ,CAAC,WAAW,EAAE,mCAAmC,CAAC;SAC1D,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,MAAM,YAAY,CAAC,aAAa,EAAE,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -6,7 +6,7 @@ export function codeCommand(program, commandLineConfigOverrides) {
|
|
|
6
6
|
readModePrompt: readCodePrompt,
|
|
7
7
|
description: 'Interactively write code with sloth (has full file system access within your project)',
|
|
8
8
|
readyMessage: '\nGaunt Sloth is ready to code. Type your prompt.',
|
|
9
|
-
exitMessage: "Type 'exit' or
|
|
9
|
+
exitMessage: "Type 'exit' or Ctrl+C to exit code session · /help for commands\n",
|
|
10
10
|
};
|
|
11
11
|
// REL-3: bare `gth` (no subcommand) now defaults to the agentic code session.
|
|
12
12
|
program.action(async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeCommand.js","sourceRoot":"","sources":["../../src/commands/codeCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,UAAU,WAAW,CACzB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,cAAc;QAC9B,WAAW,EACT,uFAAuF;QACzF,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"codeCommand.js","sourceRoot":"","sources":["../../src/commands/codeCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,UAAU,WAAW,CACzB,OAAgB,EAChB,0BAAsD;IAEtD,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,cAAc;QAC9B,WAAW,EACT,uFAAuF;QACzF,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,mEAAmE;KACjF,CAAC;IAEF,8EAA8E;IAC9E,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,YAAY,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CACV,uFAAuF,CACxF;SACA,QAAQ,CAAC,WAAW,EAAE,2CAA2C,CAAC;SAClE,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,MAAM,YAAY,CAAC,aAAa,EAAE,0BAA0B,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -7,8 +7,10 @@ import { LiveTurn } from '#src/tui/components/LiveTurn.js';
|
|
|
7
7
|
import { StatusBar } from '#src/tui/components/StatusBar.js';
|
|
8
8
|
import { PromptInput } from '#src/tui/components/PromptInput.js';
|
|
9
9
|
import { Rule } from '#src/tui/components/Rule.js';
|
|
10
|
+
import { ClearBanner } from '#src/tui/components/ClearBanner.js';
|
|
10
11
|
import { DebugPanel, DEBUG_TABS } from '#src/tui/components/DebugPanel.js';
|
|
11
|
-
import { createCommandRegistry, dispatchSlashCommand, parseSlashCommand, } from '#src/tui/slashCommands.js';
|
|
12
|
+
import { createCommandRegistry, dispatchSlashCommand, parseSlashCommand, toolsToggleNotice, } from '#src/tui/slashCommands.js';
|
|
13
|
+
import { viewportBumpSequence } from '#src/tui/terminal.js';
|
|
12
14
|
/** Rows of clipping viewport in the docked debug panel (default / restored size). */
|
|
13
15
|
const DEBUG_VIEWPORT_HEIGHT = 8;
|
|
14
16
|
/** Rows of chrome around the debug viewport we leave for when it is maximised (panel
|
|
@@ -54,6 +56,17 @@ export function App(props) {
|
|
|
54
56
|
// summary lines) so the transcript stays readable; Ctrl+T flips the whole turn's detail,
|
|
55
57
|
// mirroring the docked debug panel's single-key detail toggle.
|
|
56
58
|
const [toolsExpanded, setToolsExpanded] = useState(false);
|
|
59
|
+
// Whether to show the post-`/clear` "history cleared" banner. Lives in the live (non-Static)
|
|
60
|
+
// frame so it is reliably visible — pushing a system line right after setTranscript([]) is
|
|
61
|
+
// swallowed because clearing <Static>'s items resets its internal index (TUI-C12). Hidden
|
|
62
|
+
// again the moment the next user turn starts so it doesn't linger above a fresh conversation.
|
|
63
|
+
const [clearedBanner, setClearedBanner] = useState(false);
|
|
64
|
+
// Mirror of toolsExpanded for the slash-command handler (memoized without it in deps), so
|
|
65
|
+
// /tools can compute the next state without a stale closure or a side effect in the updater.
|
|
66
|
+
const toolsExpandedRef = useRef(false);
|
|
67
|
+
// Likewise a mirror of debugVisible, so the slash dispatch can pass the current panel state
|
|
68
|
+
// into the command context (for state-aware /debug copy) without a stale closure.
|
|
69
|
+
const debugVisibleRef = useRef(false);
|
|
57
70
|
const abortRef = useRef(null);
|
|
58
71
|
const idRef = useRef(0);
|
|
59
72
|
const runningRef = useRef(false);
|
|
@@ -75,6 +88,9 @@ export function App(props) {
|
|
|
75
88
|
// Omit<TranscriptItem,'id'> collapses to the shared `kind` key only).
|
|
76
89
|
const push = (item) => setTranscript((t) => [...t, { ...item, id: nextId() }]);
|
|
77
90
|
const runTurn = useCallback(async (userInput) => {
|
|
91
|
+
// A new exchange supersedes the post-/clear banner; drop it so it doesn't sit above
|
|
92
|
+
// the fresh conversation.
|
|
93
|
+
setClearedBanner(false);
|
|
78
94
|
push({ kind: 'user', text: userInput });
|
|
79
95
|
const ac = new AbortController();
|
|
80
96
|
abortRef.current = ac;
|
|
@@ -117,6 +133,18 @@ export function App(props) {
|
|
|
117
133
|
void Promise.resolve(props.onExit?.()).finally(() => exit());
|
|
118
134
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
119
135
|
}, [exit]);
|
|
136
|
+
// Flip the tool-detail mode and commit the matching notice. Single-sourced so the `/tools`
|
|
137
|
+
// command and the Ctrl+T key handler give the user identical, state-aware feedback (TUI-C14).
|
|
138
|
+
// Committed turns are frozen in Ink's <Static> and never re-fold, so this only affects the
|
|
139
|
+
// live / next turn — the notice copy says exactly that.
|
|
140
|
+
const toggleTools = useCallback(() => {
|
|
141
|
+
const next = !toolsExpandedRef.current;
|
|
142
|
+
toolsExpandedRef.current = next;
|
|
143
|
+
setToolsExpanded(next);
|
|
144
|
+
const { title, lines, tone } = toolsToggleNotice(next);
|
|
145
|
+
push({ kind: 'notice', title, lines, tone: tone ?? 'info' });
|
|
146
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
147
|
+
}, []);
|
|
120
148
|
const handleSubmit = useCallback((value) => {
|
|
121
149
|
if (runningRef.current)
|
|
122
150
|
return;
|
|
@@ -135,6 +163,8 @@ export function App(props) {
|
|
|
135
163
|
mode,
|
|
136
164
|
modelDisplayName: modelDisplayName ?? '',
|
|
137
165
|
turnCount: turnCountRef.current,
|
|
166
|
+
toolsExpanded: toolsExpandedRef.current,
|
|
167
|
+
debugVisible: debugVisibleRef.current,
|
|
138
168
|
});
|
|
139
169
|
if (result.clearTranscript) {
|
|
140
170
|
setTranscript([]);
|
|
@@ -142,13 +172,36 @@ export function App(props) {
|
|
|
142
172
|
setDebugHistory([]);
|
|
143
173
|
setDebugRequest([]);
|
|
144
174
|
setDebugResponse([]);
|
|
175
|
+
// Show visible feedback for the clear. Rendered outside <Static> (see clearedBanner)
|
|
176
|
+
// so the known index-reset swallow quirk can't eat it (TUI-C12).
|
|
177
|
+
setClearedBanner(true);
|
|
178
|
+
// "Bump up" the screen the clear/Ctrl+L way: scroll the prior conversation up and out
|
|
179
|
+
// of the visible viewport (it stays in scrollback — we never emit ESC[3J), so the
|
|
180
|
+
// session restarts at the top. We write the sequence ourselves and then reset Ink's
|
|
181
|
+
// frame accounting (onResetFrame → instance.clear()) so the next render lands cleanly
|
|
182
|
+
// at the top with no leftover artifacts.
|
|
183
|
+
stdout?.write(viewportBumpSequence(stdout?.rows));
|
|
184
|
+
props.onResetFrame?.();
|
|
185
|
+
// Clearing only the on-screen transcript would leave the model's conversation
|
|
186
|
+
// thread intact (the LangGraph checkpointer replays it on the next turn), so the
|
|
187
|
+
// model would still "remember" everything. Reset the agent's thread too so the
|
|
188
|
+
// model context truly matches the now-empty transcript (TUI-C8).
|
|
189
|
+
agent.resetThread?.();
|
|
190
|
+
// The status-bar turn counter is part of the conversation state we just wiped, so
|
|
191
|
+
// reset it too — a cleared session starts back at "turns: 0".
|
|
192
|
+
turnCountRef.current = 0;
|
|
193
|
+
setTurnCount(0);
|
|
145
194
|
}
|
|
146
195
|
if (result.toggleTools) {
|
|
147
|
-
|
|
196
|
+
// Flip the fold mode and commit the notice via the shared helper (single-sourced with
|
|
197
|
+
// Ctrl+T). The command's own `result.notice` is intentionally not pushed for /tools —
|
|
198
|
+
// toggleTools owns the notice so the copy matches the state actually applied.
|
|
199
|
+
toggleTools();
|
|
148
200
|
}
|
|
149
201
|
if (result.toggleDebug) {
|
|
150
202
|
setDebugVisible((v) => {
|
|
151
203
|
const next = !v;
|
|
204
|
+
debugVisibleRef.current = next;
|
|
152
205
|
// Reset scroll + focus each time the panel is shown, so it opens at the top and
|
|
153
206
|
// focus never lingers on a hidden panel.
|
|
154
207
|
if (next) {
|
|
@@ -162,6 +215,12 @@ export function App(props) {
|
|
|
162
215
|
return next;
|
|
163
216
|
});
|
|
164
217
|
}
|
|
218
|
+
// Commit a structured notice (TUI-C14). /tools owns its notice via toggleTools above, so
|
|
219
|
+
// skip the result.notice in that case to avoid a duplicate.
|
|
220
|
+
if (result.notice && !result.toggleTools) {
|
|
221
|
+
const { title, lines, tone } = result.notice;
|
|
222
|
+
push({ kind: 'notice', title, lines, tone: tone ?? 'info' });
|
|
223
|
+
}
|
|
165
224
|
if (result.message) {
|
|
166
225
|
push({ kind: 'system', level: result.level ?? 'info', text: result.message });
|
|
167
226
|
}
|
|
@@ -172,7 +231,7 @@ export function App(props) {
|
|
|
172
231
|
void runTurn(value);
|
|
173
232
|
},
|
|
174
233
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
175
|
-
[runTurn, quit, registry, mode, modelDisplayName]);
|
|
234
|
+
[runTurn, quit, registry, mode, modelDisplayName, toggleTools]);
|
|
176
235
|
// Keyboard handling, in priority order:
|
|
177
236
|
// 1. Esc while running → abort the in-flight turn (stdin is uncontended here — the event
|
|
178
237
|
// path never registers gsloth's readline Esc handler, so Ink owns raw mode cleanly).
|
|
@@ -188,7 +247,8 @@ export function App(props) {
|
|
|
188
247
|
// because the prompt's <TextInput> (mounted only when idle) would otherwise also receive
|
|
189
248
|
// the keystroke and insert a stray 't'. The `/tools` slash command covers the idle case.
|
|
190
249
|
if (key.ctrl && input === 't' && runningRef.current) {
|
|
191
|
-
|
|
250
|
+
// Share the /tools helper so the same state-aware notice is committed (TUI-C14).
|
|
251
|
+
toggleTools();
|
|
192
252
|
return;
|
|
193
253
|
}
|
|
194
254
|
if (debugFocusedRef.current) {
|
|
@@ -261,6 +321,6 @@ export function App(props) {
|
|
|
261
321
|
// The greeting is an intro, not a permanent fixture: show it only before the first
|
|
262
322
|
// exchange, so it stops padding the bottom dock once the conversation is underway.
|
|
263
323
|
const showIntro = !initialMessage && transcript.length === 0 && !live;
|
|
264
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Transcript, { items: transcript, toolsExpanded: toolsExpanded }), showIntro ? _jsx(Text, { dimColor: true, children: readyMessage.trim() }) : null, live ? _jsx(LiveTurn, { turn: live, toolsExpanded: toolsExpanded, streaming: true }) : null, debugVisible ? (_jsx(DebugPanel, { subagents: subagents, historyLines: debugHistory, requestLines: debugRequest, responseLines: debugResponse, activeTab: debugTab, scrollOffset: debugScroll, focused: debugFocused, viewportHeight: debugViewport, maximized: debugMaximized })) : null, _jsx(Rule, {}), _jsx(StatusBar, { running: running, mode: mode, modelDisplayName: modelDisplayName, turnCount: turnCount, debugHint: debugVisible && !debugFocused }), !running && !debugFocused ? _jsx(PromptInput, { onSubmit: handleSubmit }) : null, _jsx(Text, { dimColor: true, children: exitMessage.trim() }), _jsx(Rule, {})] }));
|
|
324
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Transcript, { items: transcript, toolsExpanded: toolsExpanded }), clearedBanner ? _jsx(ClearBanner, {}) : null, showIntro ? _jsx(Text, { dimColor: true, children: readyMessage.trim() }) : null, live ? _jsx(LiveTurn, { turn: live, toolsExpanded: toolsExpanded, streaming: true }) : null, debugVisible ? (_jsx(DebugPanel, { subagents: subagents, historyLines: debugHistory, requestLines: debugRequest, responseLines: debugResponse, activeTab: debugTab, scrollOffset: debugScroll, focused: debugFocused, viewportHeight: debugViewport, maximized: debugMaximized })) : null, _jsx(Rule, {}), _jsx(StatusBar, { running: running, mode: mode, modelDisplayName: modelDisplayName, turnCount: turnCount, debugHint: debugVisible && !debugFocused }), !running && !debugFocused ? _jsx(PromptInput, { onSubmit: handleSubmit }) : null, _jsx(Text, { dimColor: true, children: exitMessage.trim() }), _jsx(Rule, {})] }));
|
|
265
325
|
}
|
|
266
326
|
//# sourceMappingURL=App.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../../src/tui/components/App.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAC7D,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GAGrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAiB,MAAM,mCAAmC,CAAC;AAC1F,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,qFAAqF;AACrF,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC;;;gDAGgD;AAChD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,yFAAyF;AAC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than as a
|
|
4
|
+
* committed transcript line, which sidesteps the known quirk where `setTranscript([])` resets
|
|
5
|
+
* `<Static>`'s internal index and swallows the next pushed item (TUI-C12). Built on the shared
|
|
6
|
+
* {@link CommandNotice} so it matches every other command's feedback (TUI-C14): a title plus the
|
|
7
|
+
* line that the model no longer sees the prior conversation, and a hint that the earlier messages
|
|
8
|
+
* are still reachable by scrolling up in the terminal's scrollback.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ClearBanner(): React.ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CommandNotice } from '#src/tui/components/CommandNotice.js';
|
|
3
|
+
/**
|
|
4
|
+
* Visible feedback for `/clear`. Rendered in the live (non-`<Static>`) frame rather than as a
|
|
5
|
+
* committed transcript line, which sidesteps the known quirk where `setTranscript([])` resets
|
|
6
|
+
* `<Static>`'s internal index and swallows the next pushed item (TUI-C12). Built on the shared
|
|
7
|
+
* {@link CommandNotice} so it matches every other command's feedback (TUI-C14): a title plus the
|
|
8
|
+
* line that the model no longer sees the prior conversation, and a hint that the earlier messages
|
|
9
|
+
* are still reachable by scrolling up in the terminal's scrollback.
|
|
10
|
+
*/
|
|
11
|
+
export function ClearBanner() {
|
|
12
|
+
return (_jsx(CommandNotice, { title: "History cleared", lines: [
|
|
13
|
+
'The model no longer sees the prior conversation.',
|
|
14
|
+
'Scroll up to revisit the earlier conversation in your terminal.',
|
|
15
|
+
] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ClearBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearBanner.js","sourceRoot":"","sources":["../../../src/tui/components/ClearBanner.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAE;YACL,kDAAkD;YAClD,iEAAiE;SAClE,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Tone of a command notice; drives the title colour (info = cyan, warn = yellow). */
|
|
3
|
+
export type CommandNoticeTone = 'info' | 'warn';
|
|
4
|
+
/**
|
|
5
|
+
* A consistent, noticeable ~3-line feedback block for slash-command output (TUI-C14). Every
|
|
6
|
+
* command renders one so none reads as "does nothing": a coloured + bold title line that states
|
|
7
|
+
* WHAT happened, followed by dim body lines explaining HOW it affects the user. A dim rule
|
|
8
|
+
* brackets the block so it stands apart from the conversation.
|
|
9
|
+
*
|
|
10
|
+
* Single-sourced so committed notices (rendered from a `notice` transcript item) and the
|
|
11
|
+
* live-frame `/clear` banner share the exact same look.
|
|
12
|
+
*/
|
|
13
|
+
export declare function CommandNotice({ title, lines, tone, }: {
|
|
14
|
+
title: string;
|
|
15
|
+
lines: string[];
|
|
16
|
+
tone?: CommandNoticeTone;
|
|
17
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { Rule } from '#src/tui/components/Rule.js';
|
|
4
|
+
/**
|
|
5
|
+
* A consistent, noticeable ~3-line feedback block for slash-command output (TUI-C14). Every
|
|
6
|
+
* command renders one so none reads as "does nothing": a coloured + bold title line that states
|
|
7
|
+
* WHAT happened, followed by dim body lines explaining HOW it affects the user. A dim rule
|
|
8
|
+
* brackets the block so it stands apart from the conversation.
|
|
9
|
+
*
|
|
10
|
+
* Single-sourced so committed notices (rendered from a `notice` transcript item) and the
|
|
11
|
+
* live-frame `/clear` banner share the exact same look.
|
|
12
|
+
*/
|
|
13
|
+
export function CommandNotice({ title, lines, tone = 'info', }) {
|
|
14
|
+
const titleColor = tone === 'warn' ? 'yellow' : 'cyan';
|
|
15
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Rule, {}), _jsx(Text, { bold: true, color: titleColor, children: title }), lines.map((line, i) => (_jsx(Text, { dimColor: true, children: line }, i)))] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=CommandNotice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandNotice.js","sourceRoot":"","sources":["../../../src/tui/components/CommandNotice.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAKnD;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,IAAI,GAAG,MAAM,GAKd;IACC,MAAM,UAAU,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACvD,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,KAAC,IAAI,KAAG,EACR,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,UAAU,YACzB,KAAK,GACD,EACN,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,KAAC,IAAI,IAAS,QAAQ,kBACnB,IAAI,IADI,CAAC,CAEL,CACR,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Static, Text } from 'ink';
|
|
3
3
|
import { LiveTurn } from '#src/tui/components/LiveTurn.js';
|
|
4
4
|
import { Rule } from '#src/tui/components/Rule.js';
|
|
5
|
+
import { CommandNotice } from '#src/tui/components/CommandNotice.js';
|
|
5
6
|
/**
|
|
6
7
|
* Committed scrollback. Ink's `<Static>` writes each item exactly once, above the live
|
|
7
8
|
* region, so finished turns are never re-rendered (no flicker, native terminal scrollback).
|
|
@@ -28,6 +29,9 @@ function renderItem(item, toolsExpanded) {
|
|
|
28
29
|
return (_jsx(Box, { flexDirection: "column", children: _jsx(LiveTurn, { turn: item.turn, toolsExpanded: toolsExpanded }) }));
|
|
29
30
|
case 'system':
|
|
30
31
|
return (_jsx(Box, { children: _jsxs(Text, { dimColor: true, children: ["[", item.level, "] ", item.text] }) }));
|
|
32
|
+
case 'notice':
|
|
33
|
+
// Structured command feedback (TUI-C14): a noticeable title + explanatory body lines.
|
|
34
|
+
return _jsx(CommandNotice, { title: item.title, lines: item.lines, tone: item.tone });
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
//# sourceMappingURL=Transcript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transcript.js","sourceRoot":"","sources":["../../../src/tui/components/Transcript.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"Transcript.js","sourceRoot":"","sources":["../../../src/tui/components/Transcript.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,aAAa,GAAG,KAAK,GAKtB;IACC,uFAAuF;IACvF,mCAAmC;IACnC,MAAM,cAAc,GAAG,KAAK,CAAC,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QACJ,KAAK,QAAQ;YACX,sFAAsF;YACtF,OAAO,KAAC,aAAa,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;IACpF,CAAC;AACH,CAAC"}
|
|
@@ -15,13 +15,33 @@ export interface SlashCommandContext {
|
|
|
15
15
|
modelDisplayName: string;
|
|
16
16
|
/** Count of committed turns so far (for `/help`-style introspection if needed). */
|
|
17
17
|
turnCount: number;
|
|
18
|
+
/** Whether tool-call panels currently show their full args/result (drives `/tools` copy). */
|
|
19
|
+
toolsExpanded: boolean;
|
|
20
|
+
/** Whether the docked debug panel is currently shown (drives `/debug` copy). */
|
|
21
|
+
debugVisible: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A structured, noticeable command-feedback block (TUI-C14): a title that states WHAT happened
|
|
25
|
+
* plus body lines explaining HOW it affects the user. The component renders these via
|
|
26
|
+
* `<CommandNotice>` so every command gives consistent, explanatory feedback.
|
|
27
|
+
*/
|
|
28
|
+
export interface SlashCommandNotice {
|
|
29
|
+
title: string;
|
|
30
|
+
lines: string[];
|
|
31
|
+
/** Title tone; defaults to 'info' (cyan). Use 'warn' (yellow) for unknown commands. */
|
|
32
|
+
tone?: 'info' | 'warn';
|
|
18
33
|
}
|
|
19
34
|
/**
|
|
20
35
|
* The effects a dispatched command can request. The component interprets these; the command
|
|
21
36
|
* itself stays pure (no React, no I/O) so it is trivially testable.
|
|
22
37
|
*/
|
|
23
38
|
export interface SlashCommandResult {
|
|
24
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* A structured notice to commit into the transcript (the command's user-visible feedback).
|
|
41
|
+
* Preferred over `message` for all commands so feedback is consistent and noticeable (TUI-C14).
|
|
42
|
+
*/
|
|
43
|
+
notice?: SlashCommandNotice;
|
|
44
|
+
/** A terse system line (incidental/error output); commands prefer `notice`. */
|
|
25
45
|
message?: string;
|
|
26
46
|
/** Level for the system line; defaults to 'info'. */
|
|
27
47
|
level?: string;
|
|
@@ -53,13 +73,23 @@ export interface ParsedSlashCommand {
|
|
|
53
73
|
* whitespace-separated tokens are the args.
|
|
54
74
|
*/
|
|
55
75
|
export declare function parseSlashCommand(input: string): ParsedSlashCommand | null;
|
|
76
|
+
/**
|
|
77
|
+
* The notice for the tool-detail toggle, given the RESULTING (post-toggle) state. Shared by the
|
|
78
|
+
* `/tools` command and the Ctrl+T key handler so the copy is single-sourced (TUI-C14).
|
|
79
|
+
*/
|
|
80
|
+
export declare function toolsToggleNotice(expanded: boolean): SlashCommandNotice;
|
|
81
|
+
/**
|
|
82
|
+
* The notice for the debug-panel toggle, given the RESULTING (post-toggle) state. Shared so the
|
|
83
|
+
* command reports exactly the state the component will apply.
|
|
84
|
+
*/
|
|
85
|
+
export declare function debugToggleNotice(visible: boolean): SlashCommandNotice;
|
|
56
86
|
/**
|
|
57
87
|
* Build the default command registry. Returns a fresh array each call so callers may push
|
|
58
88
|
* extension commands onto it (EXT-5) without sharing mutable module state.
|
|
59
89
|
*/
|
|
60
90
|
export declare function createCommandRegistry(): SlashCommand[];
|
|
61
|
-
/**
|
|
62
|
-
export declare function formatHelp(registry: SlashCommand[]):
|
|
91
|
+
/** Build the `/help` notice from a registry: one body line per command (`/name — description`). */
|
|
92
|
+
export declare function formatHelp(registry: SlashCommand[]): SlashCommandNotice;
|
|
63
93
|
/**
|
|
64
94
|
* Dispatch a parsed command against a registry. Unknown commands return a friendly hint
|
|
65
95
|
* rather than throwing, so the component can render it as a system line and never forward
|
|
@@ -24,6 +24,48 @@ export function parseSlashCommand(input) {
|
|
|
24
24
|
const [name, ...args] = tokens;
|
|
25
25
|
return { name: name.toLowerCase(), args };
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The notice for the tool-detail toggle, given the RESULTING (post-toggle) state. Shared by the
|
|
29
|
+
* `/tools` command and the Ctrl+T key handler so the copy is single-sourced (TUI-C14).
|
|
30
|
+
*/
|
|
31
|
+
export function toolsToggleNotice(expanded) {
|
|
32
|
+
return expanded
|
|
33
|
+
? {
|
|
34
|
+
title: 'Tool details: on',
|
|
35
|
+
lines: [
|
|
36
|
+
'Tool calls now show their full inputs and results in the chat history.',
|
|
37
|
+
'Applies to new turns — run /tools again to collapse them to summaries.',
|
|
38
|
+
],
|
|
39
|
+
}
|
|
40
|
+
: {
|
|
41
|
+
title: 'Tool details: off',
|
|
42
|
+
lines: [
|
|
43
|
+
'Tool calls now show as a single summary line in the chat history.',
|
|
44
|
+
'Applies to new turns — run /tools again to show full inputs and results.',
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The notice for the debug-panel toggle, given the RESULTING (post-toggle) state. Shared so the
|
|
50
|
+
* command reports exactly the state the component will apply.
|
|
51
|
+
*/
|
|
52
|
+
export function debugToggleNotice(visible) {
|
|
53
|
+
return visible
|
|
54
|
+
? {
|
|
55
|
+
title: 'Debug panel: shown',
|
|
56
|
+
lines: [
|
|
57
|
+
'Docked panel with the subagent tree and sent-to-model / raw-response views.',
|
|
58
|
+
'Run /debug again to hide it; Tab cycles its views.',
|
|
59
|
+
],
|
|
60
|
+
}
|
|
61
|
+
: {
|
|
62
|
+
title: 'Debug panel: hidden',
|
|
63
|
+
lines: [
|
|
64
|
+
'The docked subagent + debug views are now closed.',
|
|
65
|
+
'Run /debug again to bring them back.',
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
27
69
|
/**
|
|
28
70
|
* Build the default command registry. Returns a fresh array each call so callers may push
|
|
29
71
|
* extension commands onto it (EXT-5) without sharing mutable module state.
|
|
@@ -40,17 +82,21 @@ export function createCommandRegistry() {
|
|
|
40
82
|
{
|
|
41
83
|
name: 'clear',
|
|
42
84
|
description: 'Clear the transcript',
|
|
43
|
-
|
|
85
|
+
// The visible feedback is the live-frame <ClearBanner> (rendered outside <Static> so it
|
|
86
|
+
// survives the transcript wipe), so no committed notice here.
|
|
87
|
+
run: () => ({ clearTranscript: true }),
|
|
44
88
|
},
|
|
45
89
|
{
|
|
46
90
|
name: 'debug',
|
|
47
91
|
description: 'Toggle the docked subagents + debug panel',
|
|
48
|
-
|
|
92
|
+
// State-aware: report the notice for the state the toggle will land on (the inverse of now).
|
|
93
|
+
run: (ctx) => ({ toggleDebug: true, notice: debugToggleNotice(!ctx.debugVisible) }),
|
|
49
94
|
},
|
|
50
95
|
{
|
|
51
96
|
name: 'tools',
|
|
52
97
|
description: 'Toggle tool-call detail (collapsed summary ⇄ expanded args/result)',
|
|
53
|
-
|
|
98
|
+
// State-aware: report the notice for the state the toggle will land on (the inverse of now).
|
|
99
|
+
run: (ctx) => ({ toggleTools: true, notice: toolsToggleNotice(!ctx.toolsExpanded) }),
|
|
54
100
|
},
|
|
55
101
|
{
|
|
56
102
|
name: 'exit',
|
|
@@ -60,19 +106,37 @@ export function createCommandRegistry() {
|
|
|
60
106
|
{
|
|
61
107
|
name: 'mode',
|
|
62
108
|
description: 'Show the current session mode',
|
|
63
|
-
run: (ctx) => ({
|
|
109
|
+
run: (ctx) => ({
|
|
110
|
+
notice: {
|
|
111
|
+
title: `Session mode: ${ctx.mode}`,
|
|
112
|
+
lines: [
|
|
113
|
+
'This is how the agent handles your messages this session.',
|
|
114
|
+
'Restart with a different subcommand to change it (e.g. `gth chat`).',
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
}),
|
|
64
118
|
},
|
|
65
119
|
{
|
|
66
120
|
name: 'model',
|
|
67
121
|
description: 'Show the current model / provider',
|
|
68
|
-
run: (ctx) => ({
|
|
122
|
+
run: (ctx) => ({
|
|
123
|
+
notice: {
|
|
124
|
+
title: `Model: ${ctx.modelDisplayName || 'unknown'}`,
|
|
125
|
+
lines: [
|
|
126
|
+
'This is the model answering your messages this session.',
|
|
127
|
+
'Change the default via `gth init` or your gsloth config.',
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
}),
|
|
69
131
|
},
|
|
70
132
|
];
|
|
71
133
|
}
|
|
72
|
-
/**
|
|
134
|
+
/** Build the `/help` notice from a registry: one body line per command (`/name — description`). */
|
|
73
135
|
export function formatHelp(registry) {
|
|
74
|
-
|
|
75
|
-
|
|
136
|
+
return {
|
|
137
|
+
title: 'Slash commands',
|
|
138
|
+
lines: registry.map((c) => `/${c.name} — ${c.description}`),
|
|
139
|
+
};
|
|
76
140
|
}
|
|
77
141
|
/**
|
|
78
142
|
* Dispatch a parsed command against a registry. Unknown commands return a friendly hint
|
|
@@ -81,11 +145,17 @@ export function formatHelp(registry) {
|
|
|
81
145
|
*/
|
|
82
146
|
export function dispatchSlashCommand(parsed, registry, ctx) {
|
|
83
147
|
if (parsed.name === 'help') {
|
|
84
|
-
return {
|
|
148
|
+
return { notice: formatHelp(registry) };
|
|
85
149
|
}
|
|
86
150
|
const command = registry.find((c) => c.name === parsed.name);
|
|
87
151
|
if (!command) {
|
|
88
|
-
return {
|
|
152
|
+
return {
|
|
153
|
+
notice: {
|
|
154
|
+
title: `Unknown command: /${parsed.name}`,
|
|
155
|
+
lines: ["That isn't a recognized slash command.", 'Run /help to see everything available.'],
|
|
156
|
+
tone: 'warn',
|
|
157
|
+
},
|
|
158
|
+
};
|
|
89
159
|
}
|
|
90
160
|
return command.run(ctx, parsed.args);
|
|
91
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slashCommands.js","sourceRoot":"","sources":["../../src/tui/slashCommands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"slashCommands.js","sourceRoot":"","sources":["../../src/tui/slashCommands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiEH;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,O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;aACF,CAAC;SACH;KACF,CAAC;AACJ,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,UAAU,CAAC,QAAwB;IACjD,OAAO;QACL,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAA0B,EAC1B,QAAwB,EACxB,GAAwB;IAExB,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1C,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,MAAM,EAAE;gBACN,KAAK,EAAE,qBAAqB,MAAM,CAAC,IAAI,EAAE;gBACzC,KAAK,EAAE,CAAC,wCAAwC,EAAE,wCAAwC,CAAC;gBAC3F,IAAI,EAAE,MAAM;aACb;SACF,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The terminal sequence that "bumps up" the screen like `clear`/Ctrl+L while *preserving*
|
|
3
|
+
* scrollback. We deliberately do NOT emit the clear-scrollback escape `ESC[3J` (which would
|
|
4
|
+
* destroy history and defeat the point):
|
|
5
|
+
* - First push a screenful of newlines so the prior content scrolls up and out of the
|
|
6
|
+
* visible viewport — but stays reachable by scrolling/wheeling up (it lives in scrollback).
|
|
7
|
+
* - Then home the cursor (`ESC[H`) and clear from the cursor to the end of the *visible*
|
|
8
|
+
* screen (`ESC[J`, i.e. `ESC[0J`) so what re-renders lands cleanly at the top with no
|
|
9
|
+
* artifacts.
|
|
10
|
+
* `rows` is the live terminal height; we fall back to a sensible default when it is unknown.
|
|
11
|
+
*
|
|
12
|
+
* Used both by `/clear` (TUI-C12) and on interactive launch (TUI-C13).
|
|
13
|
+
*/
|
|
14
|
+
export declare function viewportBumpSequence(rows: number | undefined): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The terminal sequence that "bumps up" the screen like `clear`/Ctrl+L while *preserving*
|
|
3
|
+
* scrollback. We deliberately do NOT emit the clear-scrollback escape `ESC[3J` (which would
|
|
4
|
+
* destroy history and defeat the point):
|
|
5
|
+
* - First push a screenful of newlines so the prior content scrolls up and out of the
|
|
6
|
+
* visible viewport — but stays reachable by scrolling/wheeling up (it lives in scrollback).
|
|
7
|
+
* - Then home the cursor (`ESC[H`) and clear from the cursor to the end of the *visible*
|
|
8
|
+
* screen (`ESC[J`, i.e. `ESC[0J`) so what re-renders lands cleanly at the top with no
|
|
9
|
+
* artifacts.
|
|
10
|
+
* `rows` is the live terminal height; we fall back to a sensible default when it is unknown.
|
|
11
|
+
*
|
|
12
|
+
* Used both by `/clear` (TUI-C12) and on interactive launch (TUI-C13).
|
|
13
|
+
*/
|
|
14
|
+
export function viewportBumpSequence(rows) {
|
|
15
|
+
const height = rows && rows > 0 ? rows : 24;
|
|
16
|
+
// newlines (bump prior content into scrollback) + cursor home + clear-to-end-of-visible-screen.
|
|
17
|
+
// NOTE: `\x1b[J` is clear-to-end-of-screen (NOT `\x1b[3J`, which would erase scrollback).
|
|
18
|
+
return '\n'.repeat(height) + '\x1b[H' + '\x1b[J';
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../src/tui/terminal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAwB;IAC3D,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,gGAAgG;IAChG,0FAA0F;IAC1F,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACnD,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { GthAgentRunner } from '@gaunt-sloth/core/core/GthAgentRunner.js';
|
|
|
5
5
|
import { StatusLevel } from '@gaunt-sloth/core/core/types.js';
|
|
6
6
|
import { flushSessionLog, initSessionLogging, stopSessionLogging, } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
7
7
|
import { appendToFile, getCommandOutputFilePath } from '@gaunt-sloth/core/utils/fileUtils.js';
|
|
8
|
-
import { env } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
8
|
+
import { env, stdout } from '@gaunt-sloth/core/utils/systemUtils.js';
|
|
9
9
|
import { HumanMessage } from '@langchain/core/messages';
|
|
10
10
|
import { MemorySaver } from '@langchain/langgraph';
|
|
11
11
|
import { createResolvers } from '@gaunt-sloth/agent/resolvers.js';
|
|
@@ -13,6 +13,7 @@ import { gthDeepAgentFactory } from '@gaunt-sloth/agent/core/gthDeepAgentFactory
|
|
|
13
13
|
import { GthDeepAgent } from '@gaunt-sloth/agent/core/GthDeepAgent.js';
|
|
14
14
|
import { App } from '#src/tui/components/App.js';
|
|
15
15
|
import { renderHistory, renderRequestDetails, renderResponse } from '#src/tui/debugRender.js';
|
|
16
|
+
import { viewportBumpSequence } from '#src/tui/terminal.js';
|
|
16
17
|
/** Fan-out so the runner's status callback can reach the mounted React app. */
|
|
17
18
|
function createStatusBridge() {
|
|
18
19
|
const listeners = new Set();
|
|
@@ -72,7 +73,11 @@ export async function createTuiSession(sessionConfig, commandLineConfigOverrides
|
|
|
72
73
|
const fixturePath = env.GTH_TUI_E2E_FIXTURE;
|
|
73
74
|
if (fixturePath) {
|
|
74
75
|
const { createFixtureTuiAgent } = await import('#src/tui/fixtureAgent.js');
|
|
75
|
-
|
|
76
|
+
// Holder so `onResetFrame` can reach the not-yet-created render instance (App writes the
|
|
77
|
+
// /clear scroll/clear escapes itself, then asks Ink to forget its last frame — TUI-C12).
|
|
78
|
+
let resetFrame;
|
|
79
|
+
const instance = render(_jsx(App, { agent: createFixtureTuiAgent(fixturePath), mode: sessionConfig.mode, readyMessage: sessionConfig.readyMessage, exitMessage: sessionConfig.exitMessage, initialMessage: message, onResetFrame: () => resetFrame?.() }));
|
|
80
|
+
resetFrame = () => instance.clear();
|
|
76
81
|
await instance.waitUntilExit();
|
|
77
82
|
return;
|
|
78
83
|
}
|
|
@@ -105,11 +110,29 @@ export async function createTuiSession(sessionConfig, commandLineConfigOverrides
|
|
|
105
110
|
async *runTurn(userInput, signal) {
|
|
106
111
|
yield* runner.processMessagesWithEvents([new HumanMessage(userInput)], signal);
|
|
107
112
|
},
|
|
113
|
+
// `/clear` rotates the runner's thread_id so the model context truly matches the
|
|
114
|
+
// cleared transcript (the checkpointer otherwise replays the whole prior conversation).
|
|
115
|
+
resetThread() {
|
|
116
|
+
runner.resetThread();
|
|
117
|
+
},
|
|
108
118
|
};
|
|
109
|
-
|
|
119
|
+
// "Bump up" the screen on launch the clear/Ctrl+L way (TUI-C13): scroll whatever was on
|
|
120
|
+
// screen before `gth`/`gsloth` ran up and out of the visible viewport (it stays in
|
|
121
|
+
// scrollback — we never emit ESC[3J) so the session opens at a clean top. We write this
|
|
122
|
+
// BEFORE render() so Ink paints its first frame at the top with no frame accounting to
|
|
123
|
+
// reset. Guarded on isTTY so piped/redirected/non-TTY runs (and tests) are not polluted.
|
|
124
|
+
if (stdout.isTTY) {
|
|
125
|
+
stdout.write(viewportBumpSequence(stdout.rows));
|
|
126
|
+
}
|
|
127
|
+
// Holder so `onResetFrame` can reach the not-yet-created render instance: on /clear the App
|
|
128
|
+
// writes the scroll/viewport-clear escapes, then calls this to make Ink forget its last
|
|
129
|
+
// frame so the re-render lands cleanly at the top (TUI-C12).
|
|
130
|
+
let resetFrame;
|
|
131
|
+
const instance = render(_jsx(App, { agent: tuiAgent, mode: sessionConfig.mode, modelDisplayName: config.modelDisplayName, readyMessage: sessionConfig.readyMessage, exitMessage: sessionConfig.exitMessage, initialMessage: message, subscribeStatus: bridge.subscribe, subscribeDebug: debugBridge.subscribe, onTurnComplete: logTurn, onResetFrame: () => resetFrame?.(), onExit: async () => {
|
|
110
132
|
await runner.cleanup();
|
|
111
133
|
stopSessionLogging();
|
|
112
134
|
} }));
|
|
135
|
+
resetFrame = () => instance.clear();
|
|
113
136
|
await instance.waitUntilExit();
|
|
114
137
|
}
|
|
115
138
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuiSessionModule.js","sourceRoot":"","sources":["../../src/tui/tuiSessionModule.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAmC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,GAAG,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"tuiSessionModule.js","sourceRoot":"","sources":["../../src/tui/tuiSessionModule.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAmC,UAAU,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AE,OAAO,EACvB,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,EAAE,EAClC,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;gBACvB,kBAAkB,EAAE,CAAC;YACvB,CAAC,GACD,CACH,CAAC;QACF,UAAU,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAEpC,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IACjC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACvB,kBAAkB,EAAE,CAAC;QACrB,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/tui/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentStreamEvent } from '@gaunt-sloth/core/core/types.js';
|
|
2
2
|
import type { TurnViewModel } from '#src/tui/viewModel.js';
|
|
3
|
+
import type { CommandNoticeTone } from '#src/tui/components/CommandNotice.js';
|
|
3
4
|
/**
|
|
4
5
|
* The minimal agent surface the Ink `<App>` drives. Decoupling the component from
|
|
5
6
|
* `GthAgentRunner` keeps the UI unit-testable with a scripted fake (a generator that
|
|
@@ -8,6 +9,12 @@ import type { TurnViewModel } from '#src/tui/viewModel.js';
|
|
|
8
9
|
export interface TuiAgent {
|
|
9
10
|
/** Run one user turn, yielding typed events; aborts when `signal` fires (Esc). */
|
|
10
11
|
runTurn(userInput: string, signal: AbortSignal): AsyncGenerator<AgentStreamEvent>;
|
|
12
|
+
/**
|
|
13
|
+
* Reset the agent's conversation thread so subsequent turns start from an empty model
|
|
14
|
+
* context — wired to the TUI's `/clear`, which only clears the on-screen transcript.
|
|
15
|
+
* Optional so the fixture agent (no real checkpointer thread) may omit it.
|
|
16
|
+
*/
|
|
17
|
+
resetThread?(): void;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
* One debug capture from the deep agent's `wrapModelCall` middleware. `kind: 'request'`
|
|
@@ -38,6 +45,12 @@ export type TranscriptItem = {
|
|
|
38
45
|
id: number;
|
|
39
46
|
level: string;
|
|
40
47
|
text: string;
|
|
48
|
+
} | {
|
|
49
|
+
kind: 'notice';
|
|
50
|
+
id: number;
|
|
51
|
+
title: string;
|
|
52
|
+
lines: string[];
|
|
53
|
+
tone: CommandNoticeTone;
|
|
41
54
|
};
|
|
42
55
|
/** Props for the root `<App>`; the real session wires these to a `GthAgentRunner`. */
|
|
43
56
|
export interface TuiAppProps {
|
|
@@ -61,6 +74,13 @@ export interface TuiAppProps {
|
|
|
61
74
|
subscribeDebug?: (cb: (capture: TuiDebugCapture) => void) => () => void;
|
|
62
75
|
/** Called once a turn finishes, with the user input and the final assistant text. */
|
|
63
76
|
onTurnComplete?: (userInput: string, assistantText: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Reset Ink's frame accounting after `/clear` has scrolled the viewport (production wires this
|
|
79
|
+
* to the `render()` instance's `clear()`). The app writes the scroll/clear escapes itself, then
|
|
80
|
+
* calls this so Ink forgets its last-rendered output and re-renders cleanly at the top — without
|
|
81
|
+
* it Ink would diff against a now-stale frame and leave artifacts. Optional (tests / fixtures).
|
|
82
|
+
*/
|
|
83
|
+
onResetFrame?: () => void;
|
|
64
84
|
/** Called on `exit`/`/exit` (or quit) for cleanup before the app unmounts. */
|
|
65
85
|
onExit?: () => void | Promise<void>;
|
|
66
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gaunt-sloth",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Andrew Kondratev",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"gth": "cli.js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@gaunt-sloth/agent": "2.0.0-alpha.
|
|
41
|
-
"@gaunt-sloth/core": "2.0.0-alpha.
|
|
42
|
-
"@gaunt-sloth/review": "2.0.0-alpha.
|
|
40
|
+
"@gaunt-sloth/agent": "2.0.0-alpha.1",
|
|
41
|
+
"@gaunt-sloth/core": "2.0.0-alpha.1",
|
|
42
|
+
"@gaunt-sloth/review": "2.0.0-alpha.1",
|
|
43
43
|
"@langchain/anthropic": "^1.5.0",
|
|
44
44
|
"@langchain/core": "^1.2.0",
|
|
45
45
|
"@langchain/deepseek": "^1.1.1",
|