moderado 0.4.34 → 0.4.46
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/chat.d.ts +7 -70
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +279 -453
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/chat_meta.d.ts +36 -0
- package/dist/commands/chat_meta.d.ts.map +1 -0
- package/dist/commands/chat_meta.js +102 -0
- package/dist/commands/chat_meta.js.map +1 -0
- package/dist/commands/chat_outcome.d.ts +31 -0
- package/dist/commands/chat_outcome.d.ts.map +1 -0
- package/dist/commands/chat_outcome.js +70 -0
- package/dist/commands/chat_outcome.js.map +1 -0
- package/dist/commands/chat_search.d.ts +24 -0
- package/dist/commands/chat_search.d.ts.map +1 -0
- package/dist/commands/chat_search.js +61 -0
- package/dist/commands/chat_search.js.map +1 -0
- package/dist/commands/chat_slash.d.ts +17 -0
- package/dist/commands/chat_slash.d.ts.map +1 -0
- package/dist/commands/chat_slash.js +108 -0
- package/dist/commands/chat_slash.js.map +1 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +25 -1
- package/dist/commands/run.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +18 -2
- package/dist/config.js.map +1 -1
- package/dist/diagnostic_log.d.ts.map +1 -1
- package/dist/diagnostic_log.js +1 -0
- package/dist/diagnostic_log.js.map +1 -1
- package/dist/sessions.d.ts.map +1 -1
- package/dist/sessions.js +5 -1
- package/dist/sessions.js.map +1 -1
- package/dist/transcript.d.ts +19 -0
- package/dist/transcript.d.ts.map +1 -0
- package/dist/transcript.js +76 -0
- package/dist/transcript.js.map +1 -0
- package/dist/turn_summary.d.ts +76 -0
- package/dist/turn_summary.d.ts.map +1 -0
- package/dist/turn_summary.js +305 -0
- package/dist/turn_summary.js.map +1 -0
- package/dist/ui/box.d.ts +19 -0
- package/dist/ui/box.d.ts.map +1 -1
- package/dist/ui/box.js +119 -12
- package/dist/ui/box.js.map +1 -1
- package/dist/ui/chart.d.ts +2 -0
- package/dist/ui/chart.d.ts.map +1 -0
- package/dist/ui/chart.js +97 -0
- package/dist/ui/chart.js.map +1 -0
- package/dist/ui/composer.d.ts +80 -0
- package/dist/ui/composer.d.ts.map +1 -0
- package/dist/ui/composer.js +762 -0
- package/dist/ui/composer.js.map +1 -0
- package/dist/ui/help_content.d.ts +1 -1
- package/dist/ui/help_content.d.ts.map +1 -1
- package/dist/ui/help_content.js +4 -2
- package/dist/ui/help_content.js.map +1 -1
- package/dist/ui/model_selector.d.ts +1 -0
- package/dist/ui/model_selector.d.ts.map +1 -1
- package/dist/ui/model_selector.js +61 -18
- package/dist/ui/model_selector.js.map +1 -1
- package/dist/ui/popup.d.ts.map +1 -1
- package/dist/ui/popup.js +7 -0
- package/dist/ui/popup.js.map +1 -1
- package/dist/ui/provider_connect.d.ts +8 -0
- package/dist/ui/provider_connect.d.ts.map +1 -1
- package/dist/ui/provider_connect.js +81 -23
- package/dist/ui/provider_connect.js.map +1 -1
- package/dist/ui/renderer.d.ts +49 -4
- package/dist/ui/renderer.d.ts.map +1 -1
- package/dist/ui/renderer.js +167 -31
- package/dist/ui/renderer.js.map +1 -1
- package/dist/ui/terminal_approval.d.ts +21 -0
- package/dist/ui/terminal_approval.d.ts.map +1 -1
- package/dist/ui/terminal_approval.js +145 -47
- package/dist/ui/terminal_approval.js.map +1 -1
- package/dist/ui/welcome.d.ts +223 -68
- package/dist/ui/welcome.d.ts.map +1 -1
- package/dist/ui/welcome.js +564 -687
- package/dist/ui/welcome.js.map +1 -1
- package/dist/vendor/providers/presets.d.ts +16 -0
- package/dist/vendor/providers/presets.d.ts.map +1 -1
- package/dist/vendor/providers/presets.js +13 -0
- package/dist/vendor/providers/presets.js.map +1 -1
- package/dist/vendor/tools/checkpoints.js +5 -5
- package/dist/vendor/tools/checkpoints.js.map +1 -1
- package/dist/vendor/tools/jail.d.ts +8 -0
- package/dist/vendor/tools/jail.d.ts.map +1 -1
- package/dist/vendor/tools/jail.js +13 -2
- package/dist/vendor/tools/jail.js.map +1 -1
- package/dist/vendor/tools/tools/apply_patch.d.ts.map +1 -1
- package/dist/vendor/tools/tools/apply_patch.js +6 -3
- package/dist/vendor/tools/tools/apply_patch.js.map +1 -1
- package/dist/vendor/tools/tools/git_diff.d.ts.map +1 -1
- package/dist/vendor/tools/tools/git_diff.js +5 -3
- package/dist/vendor/tools/tools/git_diff.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/welcome.d.ts
CHANGED
|
@@ -15,6 +15,14 @@ export interface WelcomeLayoutOptions {
|
|
|
15
15
|
/** When set, render the full chat window (question row 1 + answer) instead of the logo header. */
|
|
16
16
|
chatQuestion?: string;
|
|
17
17
|
chatAnswer?: string;
|
|
18
|
+
/** Rows the answer is scrolled up from its tail; 0 is the live view. */
|
|
19
|
+
chatAnswerOffset?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Live activity for this turn. When set, the status row carries the current
|
|
22
|
+
* phase and the transcript below it starts with the activity log, so a full
|
|
23
|
+
* frame repaint shows the same thing the incremental paints do.
|
|
24
|
+
*/
|
|
25
|
+
chatActivity?: ChatActivityBlock;
|
|
18
26
|
chatThoughtTime?: number;
|
|
19
27
|
/** Settled turn completed successfully — render the "✔ Done" status marker. */
|
|
20
28
|
chatTaskDone?: boolean;
|
|
@@ -31,8 +39,25 @@ export interface WelcomeLayoutOptions {
|
|
|
31
39
|
export declare const MODERADO_ASCII_LOGO: string[];
|
|
32
40
|
export declare const COMMAND_HINT = "\u001B[38;5;242mUse \u001B[38;5;75m/\u001B[38;5;242m for slash commands, \u001B[38;5;75m@\u001B[38;5;242m for file mentions\u001B[0m";
|
|
33
41
|
export declare function stripAnsi(str: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* SGR mouse report, e.g. "\x1b[<0;12;5M" for a primary-button press on column 12
|
|
44
|
+
* of row 5. readline splits that escape into several keypress events ("0", ";",
|
|
45
|
+
* "5", "M"), so the raw data chunk is parsed instead of the derived keystrokes.
|
|
46
|
+
*
|
|
47
|
+
* These live here rather than in the composer because enabling and disabling
|
|
48
|
+
* mouse reporting is terminal state: `exitCleanly` has to turn it off too.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MOUSE_REPORT_PATTERN: RegExp;
|
|
51
|
+
export declare const MOUSE_REPORT_ON = "\u001B[?1000h\u001B[?1006h";
|
|
52
|
+
export declare const MOUSE_REPORT_OFF = "\u001B[?1000l\u001B[?1006l";
|
|
53
|
+
export declare function composerInputWindow(input: string, caret: number, width: number): {
|
|
54
|
+
text: string;
|
|
55
|
+
caretColumn: number;
|
|
56
|
+
};
|
|
34
57
|
/** Card width: nearly full terminal width, like OpenCode/Cline. */
|
|
35
58
|
export declare function getWelcomeCardWidth(width?: number): number;
|
|
59
|
+
/** Chat fills the available columns; the startup Welcome card keeps its own width. */
|
|
60
|
+
export declare function getChatCardWidth(width?: number): number;
|
|
36
61
|
/** Left indent that centers a block of `blockWidth` visible columns on the terminal. */
|
|
37
62
|
export declare function getWelcomeIndent(blockWidth: number, width?: number): number;
|
|
38
63
|
/**
|
|
@@ -47,6 +72,59 @@ export declare function getChatAnswerArea(width?: number): {
|
|
|
47
72
|
startColumn: number;
|
|
48
73
|
wrapWidth: number;
|
|
49
74
|
};
|
|
75
|
+
/** The chat header is a single compact brand row. */
|
|
76
|
+
export declare const CHAT_HEADER_ROWS = 1;
|
|
77
|
+
/** Rows the composer card occupies: blank surface, input, blank surface, mode, workspace. */
|
|
78
|
+
export declare const CHAT_COMPOSER_ROWS = 5;
|
|
79
|
+
export interface ChatLayout {
|
|
80
|
+
area: ReturnType<typeof getChatAnswerArea>;
|
|
81
|
+
questionTop: number;
|
|
82
|
+
questionRows: number;
|
|
83
|
+
statusRow: number;
|
|
84
|
+
answerTop: number;
|
|
85
|
+
answerRows: number;
|
|
86
|
+
composerTop: number;
|
|
87
|
+
/** Real viewport width used to size the chat card. */
|
|
88
|
+
terminalWidth: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Fixed row geometry for the chat window. The answer area is bounded by the
|
|
92
|
+
* composer: a long answer is windowed instead of pushing the input card, the
|
|
93
|
+
* mode row, and the workspace row off screen (or painting over them).
|
|
94
|
+
*/
|
|
95
|
+
export declare function getChatLayout(width?: number, height?: number, question?: string, composerRows?: number): ChatLayout;
|
|
96
|
+
/** Rows the composer card occupies for a given layout, including any queued-commands box. */
|
|
97
|
+
export declare function getChatComposerRows(options: WelcomeLayoutOptions): number;
|
|
98
|
+
/**
|
|
99
|
+
* Wrap an answer for the card, marking the turn summary as it goes.
|
|
100
|
+
*
|
|
101
|
+
* The fence has to be resolved *before* wrapping, not after: a summary line that
|
|
102
|
+
* wraps would lose its marker on the continuation, and a block whose opening
|
|
103
|
+
* marker scrolled off the top would stop being styled exactly when it is
|
|
104
|
+
* longest. Every wrapped line inside the fence carries `SUMMARY_MARK`, so the
|
|
105
|
+
* renderer can tint any row on its own.
|
|
106
|
+
*/
|
|
107
|
+
export declare function wrapAnswerLines(text: string, textWidth: number): string[];
|
|
108
|
+
/**
|
|
109
|
+
* Window the answer around an offset, measured in rows scrolled up from the
|
|
110
|
+
* tail. `offset = 0` is the live view (newest rows). One row is reserved for the
|
|
111
|
+
* "earlier lines hidden" note whenever anything is above the window.
|
|
112
|
+
*/
|
|
113
|
+
export declare function windowChatAnswerAt(text: string, maxRows: number, textWidth: number, offsetFromBottom?: number): {
|
|
114
|
+
lines: string[];
|
|
115
|
+
hiddenAbove: number;
|
|
116
|
+
hiddenBelow: number;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Style one answer row.
|
|
120
|
+
*
|
|
121
|
+
* Inside the turn-summary fence every row becomes a band: a rail in the accent
|
|
122
|
+
* colour, a tinted background that reaches the right edge of the card, and
|
|
123
|
+
* headings in warm bold. This is what makes the report read as a different kind
|
|
124
|
+
* of thing from the prose above it, rather than three more paragraphs.
|
|
125
|
+
*/
|
|
126
|
+
export declare function renderAnswerLine(line: string, textWidth: number): string;
|
|
127
|
+
export declare function chatAnswerOverflowNote(hidden: number): string;
|
|
50
128
|
export declare function renderQueuedCommandsBox(commands: readonly string[], width: number): string[];
|
|
51
129
|
export declare function renderWelcomeCard(options: WelcomeLayoutOptions): string;
|
|
52
130
|
export interface SlashCommand {
|
|
@@ -59,6 +137,8 @@ export declare function selectCommandCandidate(input: string, currentIndex: numb
|
|
|
59
137
|
export declare function renderSuggestionsBox(commands: SlashCommand[], width?: number, selectedIndex?: number): string[];
|
|
60
138
|
export declare function renderMentionSuggestionsBox(files: string[], selectedIndex?: number, width?: number): string[];
|
|
61
139
|
export declare function renderModeradoHeader(width?: number): string;
|
|
140
|
+
/** Compact wordmark used after the welcome screen transitions into chat. */
|
|
141
|
+
export declare function renderChatHeader(width?: number): string;
|
|
62
142
|
/** Word-wrap plain text to `maxWidth` visible columns, hard-breaking long words. */
|
|
63
143
|
export declare function wrapText(text: string, maxWidth: number): string[];
|
|
64
144
|
/**
|
|
@@ -67,8 +147,12 @@ export declare function wrapText(text: string, maxWidth: number): string[];
|
|
|
67
147
|
* same input card as the welcome window at the bottom.
|
|
68
148
|
*/
|
|
69
149
|
export declare function renderChatScreen(options: WelcomeLayoutOptions, height?: number): string;
|
|
70
|
-
/**
|
|
71
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Place the terminal cursor on the input row. Passing the layout's
|
|
152
|
+
* `composerTop` addresses the row absolutely, which stays correct when a
|
|
153
|
+
* queued-commands box grows the card; the relative form is the legacy path.
|
|
154
|
+
*/
|
|
155
|
+
export declare function renderChatComposerCursor(options: Pick<WelcomeLayoutOptions, 'width'>, inputLength: number, composerTop?: number): string;
|
|
72
156
|
export declare function navigateQuestionHistory(history: string[], direction: -1 | 1, index: number, draft: string): {
|
|
73
157
|
input: string;
|
|
74
158
|
index: number;
|
|
@@ -77,30 +161,154 @@ export declare function navigateQuestionHistory(history: string[], direction: -1
|
|
|
77
161
|
export interface ChatActivity {
|
|
78
162
|
/** Leading glyph: a spinner frame while the turn runs, a check when it settles. */
|
|
79
163
|
glyph: string;
|
|
80
|
-
/** What the agent is doing right now, for example `
|
|
164
|
+
/** What the agent is doing right now, for example `Editing src/app.ts`. */
|
|
165
|
+
label: string;
|
|
166
|
+
/**
|
|
167
|
+
* The newest reasoning text, already collapsed to one line. Only the tail is
|
|
168
|
+
* painted — enough to show the model is working through something, without
|
|
169
|
+
* turning the status row into a transcript.
|
|
170
|
+
*/
|
|
171
|
+
reasoning?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Replaces the turn clock on the row. Used while waiting on the model, where
|
|
174
|
+
* "no output for 30s" says more than the total turn time.
|
|
175
|
+
*/
|
|
176
|
+
elapsedLabel?: string;
|
|
177
|
+
}
|
|
178
|
+
/** Silence before the row admits it is waiting on the model. */
|
|
179
|
+
export declare const WAIT_NOTICE_AFTER_MS = 10000;
|
|
180
|
+
/** How often that notice is refreshed while the wait continues. */
|
|
181
|
+
export declare const WAIT_NOTICE_REPEAT_MS = 20000;
|
|
182
|
+
export interface WaitNotice {
|
|
183
|
+
/** Phase label for the row. */
|
|
81
184
|
label: string;
|
|
185
|
+
/** Clock replacement; only set once the wait has been re-announced. */
|
|
186
|
+
elapsedLabel?: string;
|
|
82
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* What to say while the model has produced nothing.
|
|
190
|
+
*
|
|
191
|
+
* Silent for the first ten seconds — that is normal inference. After that the
|
|
192
|
+
* row says it is waiting, and re-announces every twenty seconds with the length
|
|
193
|
+
* of the silence, so a long wait never looks like a hung process. The bucket is
|
|
194
|
+
* quantised so the line changes on that cadence instead of every second.
|
|
195
|
+
*/
|
|
196
|
+
export declare function describeWait(silentForMs: number): WaitNotice | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* Elapsed time as a short label: `8s`, `1m 04s`.
|
|
199
|
+
*
|
|
200
|
+
* This replaced the step counter. `Step 1/25` was true for minutes at a time
|
|
201
|
+
* while one inference ran, so it measured the engine's internal loop rather
|
|
202
|
+
* than anything the person waiting could act on.
|
|
203
|
+
*/
|
|
204
|
+
export declare function formatElapsed(seconds: number): string;
|
|
205
|
+
/**
|
|
206
|
+
* Shorten the middle of a label, keeping the head (the verb) and the tail (the
|
|
207
|
+
* filename, which is the part a person actually reads). Measured in terminal
|
|
208
|
+
* cells, not code units, so a CJK path cannot overflow the card.
|
|
209
|
+
*/
|
|
210
|
+
export declare function elideMiddle(text: string, max: number): string;
|
|
211
|
+
/**
|
|
212
|
+
* Shorten the engine's progress sentence into a phase the user can follow.
|
|
213
|
+
*
|
|
214
|
+
* The status row is the only thing moving during a long, silent inference — the
|
|
215
|
+
* reasoning stream is deliberately not displayed — so it names what the agent is
|
|
216
|
+
* doing instead of repeating the step counter.
|
|
217
|
+
*/
|
|
218
|
+
export declare function describeActivity(status: string): string;
|
|
219
|
+
/**
|
|
220
|
+
* Name the work a tool call is about to do, from its parameters.
|
|
221
|
+
*
|
|
222
|
+
* `Running read_file` told the person nothing they could not already see; the
|
|
223
|
+
* path does. This is the part of the status row that keeps moving during a long
|
|
224
|
+
* coding turn, so it carries the real target.
|
|
225
|
+
*/
|
|
226
|
+
export declare function describeToolActivity(toolName: string, parameters?: Record<string, unknown>): string;
|
|
83
227
|
/**
|
|
84
228
|
* Update the fixed chat elapsed-time row without repainting the terminal.
|
|
85
229
|
* With an activity, the row is a live "still running" indicator that stays
|
|
86
230
|
* visible after text starts streaming and during silent tool execution.
|
|
87
231
|
*/
|
|
88
|
-
export declare function renderChatThoughtTimeUpdate(thoughtTime: number,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
232
|
+
export declare function renderChatThoughtTimeUpdate(thoughtTime: number, width?: number, activity?: ChatActivity, row?: number): string;
|
|
233
|
+
/** One tool call in the live activity log. */
|
|
234
|
+
export interface ActivityEntry {
|
|
235
|
+
/** `⠼` while running, `✔` done, `✖` failed, `⊘` denied. */
|
|
236
|
+
glyph: string;
|
|
237
|
+
/** Already humanised: `Reading src/ui/welcome.ts`, not `read_file`. */
|
|
238
|
+
label: string;
|
|
239
|
+
tone: 'active' | 'done' | 'failed';
|
|
240
|
+
}
|
|
241
|
+
/** Everything the live activity block needs for one frame. */
|
|
242
|
+
export interface ChatActivityBlock {
|
|
243
|
+
glyph: string;
|
|
244
|
+
label: string;
|
|
245
|
+
/** Newest reasoning tail, wrapped over as many rows as it can fill. */
|
|
246
|
+
reasoning?: string;
|
|
247
|
+
/** Replaces the turn clock while waiting on the model. */
|
|
248
|
+
elapsedLabel?: string;
|
|
249
|
+
/** Oldest first; the newest entry sits closest to the current phase. */
|
|
250
|
+
history?: ActivityEntry[];
|
|
95
251
|
}
|
|
96
252
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
253
|
+
* Cells the transcript may use on this layout.
|
|
254
|
+
*
|
|
255
|
+
* The card has a 70-column floor, the terminal does not: on a narrow window the
|
|
256
|
+
* transcript still has to stop at the screen edge, not at the card's. Wrapping
|
|
257
|
+
* to the card width and painting anyway is what let a long row spill past the
|
|
258
|
+
* right border of the frame, so the wrap width is the narrower of the two and
|
|
259
|
+
* every row is clamped to it.
|
|
260
|
+
*/
|
|
261
|
+
export declare function getChatTranscriptWidth(layout: ChatLayout): number;
|
|
262
|
+
/**
|
|
263
|
+
* Rows of the live turn transcript: the activity log first, the answer after.
|
|
264
|
+
*
|
|
265
|
+
* This is the Cline model. Cline keeps one scrollable list where every action
|
|
266
|
+
* and every message is a row, the newest pinned to the bottom and the rest
|
|
267
|
+
* reachable by scrolling. Merging the two here is what fixes "the output
|
|
268
|
+
* becomes one line again": the activity log used to be a separate block that
|
|
269
|
+
* handed its rows back the moment the first token streamed, so a long fix
|
|
270
|
+
* explanation left nothing on screen but a single clipped status row — exactly
|
|
271
|
+
* when there was most to read.
|
|
272
|
+
*
|
|
273
|
+
* The log and the answer now share the window, so the record of what the agent
|
|
274
|
+
* did and the answer it produced are read in one place and scroll together.
|
|
275
|
+
*/
|
|
276
|
+
export declare function buildChatTranscriptRows(activity: ChatActivityBlock | undefined, answer: string, textWidth: number): {
|
|
277
|
+
rows: string[];
|
|
278
|
+
answerStart: number;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Window the transcript around an offset, measured in rows scrolled up from the
|
|
282
|
+
* tail. `offset = 0` is the live view (newest rows). One row is reserved for
|
|
283
|
+
* the "earlier lines hidden" note whenever anything is above the window.
|
|
100
284
|
*/
|
|
101
|
-
export declare function
|
|
102
|
-
|
|
285
|
+
export declare function windowChatTranscriptAt(rows: readonly string[], maxRows: number, offsetFromBottom?: number): {
|
|
286
|
+
lines: string[];
|
|
287
|
+
hiddenAbove: number;
|
|
288
|
+
hiddenBelow: number;
|
|
103
289
|
};
|
|
290
|
+
/** Rows the transcript occupies for a layout; 0 when the viewport is tiny. */
|
|
291
|
+
export declare function getChatTranscriptRows(layout: ChatLayout): number;
|
|
292
|
+
/**
|
|
293
|
+
* Paint the pinned phase header on the status row.
|
|
294
|
+
*
|
|
295
|
+
* One row, always: the phase and its clock. Everything it used to squeeze into
|
|
296
|
+
* that row now lives in the transcript below it.
|
|
297
|
+
*/
|
|
298
|
+
export declare function renderChatTranscriptHeader(activity: ChatActivityBlock, layout: ChatLayout, thoughtTime: number): string;
|
|
299
|
+
/**
|
|
300
|
+
* Repaint the transcript in place: exactly the rows the layout reserves,
|
|
301
|
+
* between the status row and the composer. The window scrolls (oldest rows
|
|
302
|
+
* leave first) instead of writing over the composer, so a long turn can never
|
|
303
|
+
* damage the bottom rows. The cursor is saved and restored, so the caller keeps
|
|
304
|
+
* its position on the input line.
|
|
305
|
+
*
|
|
306
|
+
* Unlike the answer window it replaced, this never gives its rows up: the log
|
|
307
|
+
* and the answer are one list, so the newest rows stay on screen and the rest
|
|
308
|
+
* is one PgUp away. Every row is clamped to the card in terminal cells, so a
|
|
309
|
+
* wide CJK glyph or a long path cannot push a row past the right border.
|
|
310
|
+
*/
|
|
311
|
+
export declare function renderChatTranscriptWindow(activity: ChatActivityBlock | undefined, answer: string, layout: ChatLayout, offsetFromBottom?: number): string;
|
|
104
312
|
export declare function renderFullWelcomeScreen(options: WelcomeLayoutOptions, height?: number): string;
|
|
105
313
|
/** Keep the initial welcome screen centered as the terminal viewport changes. */
|
|
106
314
|
export declare function getWelcomeBottomPadding(options: WelcomeLayoutOptions, height?: number): number;
|
|
@@ -128,59 +336,6 @@ export declare function renderExitMessage(message: string): string;
|
|
|
128
336
|
* settles so callers stop while the event loop drains.
|
|
129
337
|
*/
|
|
130
338
|
export declare function exitCleanly(message: string): Promise<never>;
|
|
131
|
-
export interface InteractiveTurnResult {
|
|
132
|
-
text: string;
|
|
133
|
-
mode: 'Plan' | 'Execute';
|
|
134
|
-
autoApprove: boolean;
|
|
135
|
-
workflowAction?: 'build';
|
|
136
|
-
}
|
|
137
|
-
export interface PromptInteractiveTurnOptions {
|
|
138
|
-
model: string;
|
|
139
|
-
getProviderName?: () => string | undefined;
|
|
140
|
-
tokens: number;
|
|
141
|
-
cost: string;
|
|
142
|
-
usageAvailable?: boolean;
|
|
143
|
-
usageEstimated?: boolean;
|
|
144
|
-
workspace: string;
|
|
145
|
-
version?: string;
|
|
146
|
-
initialMode?: 'Plan' | 'Execute';
|
|
147
|
-
initialAutoApprove?: boolean;
|
|
148
|
-
isFirstTurn?: boolean;
|
|
149
|
-
signal?: AbortSignal;
|
|
150
|
-
/** Previous turn's question/answer — when question is set, render the full chat window (no logo). */
|
|
151
|
-
chatQuestion?: string;
|
|
152
|
-
chatAnswer?: string;
|
|
153
|
-
chatThoughtTime?: number;
|
|
154
|
-
chatTaskDone?: boolean;
|
|
155
|
-
outputTokenRate?: number;
|
|
156
|
-
tokenUsage?: UsageEvent;
|
|
157
|
-
questionHistory?: string[];
|
|
158
|
-
/**
|
|
159
|
-
* Called when user selects a model via /model. Receives a `drawFrame`
|
|
160
|
-
* callback that composites popup content as a floating layer on top of the
|
|
161
|
-
* main TUI window (background stays as-is). The callback owns the selection
|
|
162
|
-
* UI and returns the new model id, or undefined if cancelled.
|
|
163
|
-
*/
|
|
164
|
-
onModelSelect?: (drawFrame: (popupLines: string[]) => void) => Promise<string | undefined>;
|
|
165
|
-
/** Returns a queued prompt that should start immediately after a popup closes. */
|
|
166
|
-
takeAutoContinuePrompt?: () => string | undefined;
|
|
167
|
-
/** Called when user issues /connect. Returns the model label to display. */
|
|
168
|
-
onConnect?: (drawFrame: (popupLines: string[]) => void) => Promise<string | undefined>;
|
|
169
|
-
/** Called when user issues /clear so caller can reset conversation history. */
|
|
170
|
-
onClear?: () => void;
|
|
171
|
-
onExit?: () => string;
|
|
172
|
-
onMcp?: (command: string, drawFrame: (popupLines: string[]) => void) => Promise<void>;
|
|
173
|
-
onSession?: (command: string, drawFrame: (popupLines: string[]) => void) => Promise<void>;
|
|
174
|
-
onQueue?: (command: string, drawFrame: (popupLines: string[]) => void) => Promise<void>;
|
|
175
|
-
onBtw?: (command: string, drawFrame: (popupLines: string[], options?: {
|
|
176
|
-
waitDismiss?: boolean;
|
|
177
|
-
}) => void | Promise<void>, signal?: AbortSignal) => Promise<void>;
|
|
178
|
-
onWorkflow?: (command: string, drawFrame: (popupLines: string[]) => void) => Promise<'build' | undefined>;
|
|
179
|
-
onInit?: (drawFrame: (popupLines: string[]) => void) => Promise<void>;
|
|
180
|
-
onMentionComplete?: (token: string) => Promise<string[]>;
|
|
181
|
-
queuedCommands?: readonly string[];
|
|
182
|
-
}
|
|
183
|
-
export declare function promptInteractiveTurn(options: PromptInteractiveTurnOptions): Promise<InteractiveTurnResult>;
|
|
184
339
|
/** A cumulative task snapshot; a request ending does not mean the task ended. */
|
|
185
340
|
export declare function formatTokenUsage(event: UsageEvent): string;
|
|
186
341
|
/** Update only the chat status row, preserving the answer/composer cursor. */
|
package/dist/ui/welcome.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"welcome.d.ts","sourceRoot":"","sources":["../../src/ui/welcome.ts"],"names":[],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