zidane 4.1.9 → 5.0.0
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/README.md +11 -2
- package/dist/{agent-CMIhYhDz.d.ts → agent-JhicgLOV.d.ts} +78 -4
- package/dist/agent-JhicgLOV.d.ts.map +1 -0
- package/dist/chat.d.ts +336 -6
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/{index-DAaKyadO.d.ts → index-2yLUyTbc.d.ts} +34 -4
- package/dist/{index-DAaKyadO.d.ts.map → index-2yLUyTbc.d.ts.map} +1 -1
- package/dist/{index-D6Dd6Kc0.d.ts → index-t_W9i7Ql.d.ts} +8 -3
- package/dist/index-t_W9i7Ql.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/{interpolate-BydkV1eT.js → interpolate-Ck970-61.js} +9 -2
- package/dist/{interpolate-BydkV1eT.js.map → interpolate-Ck970-61.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/presets-BRFH2qsQ.js +90 -0
- package/dist/presets-BRFH2qsQ.js.map +1 -0
- package/dist/presets.d.ts +3 -2
- package/dist/presets.js +2 -2
- package/dist/providers.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +28 -13
- package/dist/session/sqlite.js.map +1 -1
- package/dist/{session-B1RN0uoi.js → session-791hhrFa.js} +24 -1
- package/dist/session-791hhrFa.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +1 -1
- package/dist/skills.d.ts +2 -2
- package/dist/skills.js +1 -1
- package/dist/theme-pJv47erq.d.ts +1202 -0
- package/dist/theme-pJv47erq.d.ts.map +1 -0
- package/dist/{tools-BdQENveS.js → tools-CLazLRb4.js} +81 -21
- package/dist/tools-CLazLRb4.js.map +1 -0
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +1 -1
- package/dist/tui.d.ts +258 -30
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +2957 -499
- package/dist/tui.js.map +1 -1
- package/dist/turn-operations-5aQu4dJg.js +3587 -0
- package/dist/turn-operations-5aQu4dJg.js.map +1 -0
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/agent-CMIhYhDz.d.ts.map +0 -1
- package/dist/index-D6Dd6Kc0.d.ts.map +0 -1
- package/dist/presets-4zCJzCYw.js +0 -39
- package/dist/presets-4zCJzCYw.js.map +0 -1
- package/dist/session-B1RN0uoi.js.map +0 -1
- package/dist/theme-Caf4AvTO.d.ts +0 -637
- package/dist/theme-Caf4AvTO.d.ts.map +0 -1
- package/dist/theme-context-DQM2lx4U.js +0 -1853
- package/dist/theme-context-DQM2lx4U.js.map +0 -1
- package/dist/tools-BdQENveS.js.map +0 -1
package/dist/tools.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { A as
|
|
1
|
+
import { _ as ToolContext, v as ToolDef, y as ToolMap } from "./agent-JhicgLOV.js";
|
|
2
|
+
import { A as listFiles, C as SkillsRunScriptToolOptions, D as shell, E as createSkillsReadTool, F as edit, M as createInteractionTool, N as grep, O as readFile, P as glob, S as createSkillsUseTool, T as SkillsReadToolOptions, _ as ChildAgent, b as createSpawnTool, d as writeFile, f as ValidationResult, g as createToolSearchTool, h as ToolSearchToolOptions, j as InteractionToolOptions, k as multiEdit, m as LazyToolEntry, p as validateToolArgs, v as SpawnToolOptions, w as createSkillsRunScriptTool, x as SkillsUseToolOptions, y as SpawnToolState } from "./index-2yLUyTbc.js";
|
|
3
3
|
export { ChildAgent, InteractionToolOptions, LazyToolEntry, SkillsReadToolOptions, SkillsRunScriptToolOptions, SkillsUseToolOptions, SpawnToolOptions, SpawnToolState, ToolContext, ToolDef, ToolMap, ToolSearchToolOptions, ValidationResult, createInteractionTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, glob, grep, listFiles, multiEdit, readFile, shell, validateToolArgs, writeFile };
|
package/dist/tools.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as multiEdit, c as grep, f as createToolSearchTool, g as validateToolArgs, h as createSkillsReadTool, i as readFile, l as glob, m as createSkillsRunScriptTool, n as createSpawnTool, o as listFiles, p as createSkillsUseTool, r as shell, s as createInteractionTool, t as writeFile, u as edit } from "./tools-
|
|
1
|
+
import { a as multiEdit, c as grep, f as createToolSearchTool, g as validateToolArgs, h as createSkillsReadTool, i as readFile, l as glob, m as createSkillsRunScriptTool, n as createSpawnTool, o as listFiles, p as createSkillsUseTool, r as shell, s as createInteractionTool, t as writeFile, u as edit } from "./tools-CLazLRb4.js";
|
|
2
2
|
export { createInteractionTool, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolSearchTool, edit, glob, grep, listFiles, multiEdit, readFile, shell, validateToolArgs, writeFile };
|
package/dist/tui.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as SkillConfig } from "./agent-JhicgLOV.js";
|
|
2
|
+
import { $ as Settings, C as DiscoveredMcp, Dt as AgentAccent, N as ResolvedConfig, O as EnabledAllowlistKey, Q as SessionMeta, S as splitPromptSegments, _t as ModelInfo, at as CompletionReference, b as PromptSegment, c as ThemeColors, et as StreamEvent, it as CompletionProvider, j as ChatOptions, kt as AgentRegistry, m as ApprovalRequest, ot as CompletionState, p as ApprovalDecision, pt as ProviderAuth, s as Theme, x as PromptSegmentRef } from "./theme-pJv47erq.js";
|
|
2
3
|
import * as _$react from "react";
|
|
3
4
|
import { ReactNode } from "react";
|
|
4
5
|
import { SyntaxStyle } from "@opentui/core";
|
|
@@ -51,6 +52,41 @@ declare function App({
|
|
|
51
52
|
config: ResolvedConfig;
|
|
52
53
|
}): _$react.ReactNode;
|
|
53
54
|
//#endregion
|
|
55
|
+
//#region src/tui/completion-popup.d.ts
|
|
56
|
+
/**
|
|
57
|
+
* Popover above the textarea showing the active provider's items. Provider-
|
|
58
|
+
* agnostic — reads `label` + `description` off each `CompletionItem`. The
|
|
59
|
+
* TUI hosts can pass any `CompletionState<TItem>`; the popup never needs
|
|
60
|
+
* to know what `TItem` is.
|
|
61
|
+
*
|
|
62
|
+
* Geometry: 1 row of chrome + min(N, visibleRows) item rows + 1 hint row.
|
|
63
|
+
* `flexShrink: 0` pins the height so a long transcript can't squeeze it.
|
|
64
|
+
*
|
|
65
|
+
* The popup is invisible (`null`-rendered) when `state.active` is null or
|
|
66
|
+
* `state.items` is empty — the prompt block keeps its layout calm.
|
|
67
|
+
*
|
|
68
|
+
* Solid `backgroundColor: SURFACE.modal` is load-bearing: in `PromptBlock`
|
|
69
|
+
* the popup floats over the transcript via `position: absolute`, and a
|
|
70
|
+
* transparent fill would let the transcript text bleed through. Pairs
|
|
71
|
+
* with the modal panel surface so floating UI shares one visual identity.
|
|
72
|
+
*
|
|
73
|
+
* Title overlays are painted on the top border (same trick as
|
|
74
|
+
* `PromptHints`): provider label on the left in the chip-id's accent
|
|
75
|
+
* color, match count on the right in dim text. Both ride absolute
|
|
76
|
+
* positions so they take no flow space; the popup's height comes
|
|
77
|
+
* entirely from the bordered body. The accent reuses
|
|
78
|
+
* `resolveChipColor(...).bg` (foreground only, no background pill) so
|
|
79
|
+
* the picker title still reads as "this is the X provider" without
|
|
80
|
+
* carrying the chip pill's heavy visual weight.
|
|
81
|
+
*/
|
|
82
|
+
declare function CompletionPopup({
|
|
83
|
+
state,
|
|
84
|
+
/** Cap on visible rows. 6 keeps the popover compact even with long catalogs. */visibleRows
|
|
85
|
+
}: {
|
|
86
|
+
state: CompletionState<unknown>;
|
|
87
|
+
visibleRows?: number;
|
|
88
|
+
}): ReactNode;
|
|
89
|
+
//#endregion
|
|
54
90
|
//#region src/tui/components.d.ts
|
|
55
91
|
/**
|
|
56
92
|
* `@opentui/react` extends `React.JSX.IntrinsicElements`, so `onSubmit` on `<input>`
|
|
@@ -62,51 +98,70 @@ declare function onInputSubmit(handler: (value: string) => void): never;
|
|
|
62
98
|
interface Hint {
|
|
63
99
|
key: string;
|
|
64
100
|
label: string;
|
|
101
|
+
/** Optional override for the key color. Defaults to `COLOR.warn`. */
|
|
102
|
+
keyColor?: string;
|
|
103
|
+
/** Optional override for the label color. Defaults to `COLOR.dim`. */
|
|
104
|
+
labelColor?: string;
|
|
65
105
|
}
|
|
66
106
|
interface ContextUsage {
|
|
67
107
|
used: number;
|
|
68
108
|
max: number;
|
|
69
109
|
}
|
|
70
110
|
/**
|
|
71
|
-
* Footer status bar. Renders as a single row when the terminal is wide
|
|
72
|
-
* otherwise stacks
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* length estimates of each segment — close enough since the segments are
|
|
76
|
-
* ASCII-heavy and worst case we under-estimate the breakpoint by a few cells.
|
|
77
|
-
*
|
|
78
|
-
* Agent badge is **always rendered first** so the active profile (Build /
|
|
79
|
-
* Plan / host-custom) is the anchor on the left edge of every layout tier.
|
|
111
|
+
* Footer status bar. Renders as a single row when the terminal is wide
|
|
112
|
+
* enough, otherwise stacks the context indicator beneath the hint row.
|
|
113
|
+
* Width tiering is driven by plain-text length estimates — close enough
|
|
114
|
+
* since the segments are ASCII-heavy.
|
|
80
115
|
*/
|
|
81
116
|
declare function Footer({
|
|
82
117
|
hints,
|
|
83
|
-
picked,
|
|
84
|
-
agent,
|
|
85
118
|
context
|
|
86
119
|
}: {
|
|
87
120
|
hints: Hint[];
|
|
88
|
-
picked: Picked | null;
|
|
89
|
-
/**
|
|
90
|
-
* Active agent profile. When set, renders as the colored leading badge
|
|
91
|
-
* on the bottom bar so the current mode is the first thing the eye lands
|
|
92
|
-
* on. Pass `null` to hide entirely (single-profile registries, or
|
|
93
|
-
* non-chat screens where switching is meaningless).
|
|
94
|
-
*/
|
|
95
|
-
agent: AgentProfile | null;
|
|
96
121
|
context: ContextUsage | null;
|
|
97
|
-
}):
|
|
122
|
+
}): ReactNode;
|
|
123
|
+
/**
|
|
124
|
+
* Pure renderer for a list of {@link Hint}s as colored spans —
|
|
125
|
+
* `<key1> <label1> · <key2> <label2> · …` with warn/dim/mute colors.
|
|
126
|
+
*
|
|
127
|
+
* Returns spans only (no enclosing `<text>`, no leading / trailing
|
|
128
|
+
* whitespace) so the caller can wrap it in whichever container fits
|
|
129
|
+
* their surface: the bottom-bar footer uses a single-row `<text>`, the
|
|
130
|
+
* prompt-box overlay wraps it with leading + trailing spaces so the
|
|
131
|
+
* outermost cells punch through the border like a native title would.
|
|
132
|
+
*
|
|
133
|
+
* Pattern matches `renderRefSpans` below — pure function over an opaque
|
|
134
|
+
* `ThemeColors`, no internal hook calls so it composes inside any
|
|
135
|
+
* `<text>` regardless of where the parent grabbed its palette.
|
|
136
|
+
*/
|
|
137
|
+
declare function renderHintSpans(hints: readonly Hint[], COLOR: ThemeColors): ReactNode;
|
|
138
|
+
/**
|
|
139
|
+
* Plain-text width estimate for a list of {@link Hint}s rendered via
|
|
140
|
+
* `renderHintSpans` — `<key> <label> · <key> <label> · …`. Exported so
|
|
141
|
+
* the prompt-box overlay (in `screens.tsx`) can run the same responsive
|
|
142
|
+
* math as the bottom-bar footer when deciding whether trigger hints
|
|
143
|
+
* fit. Pure / total.
|
|
144
|
+
*/
|
|
145
|
+
declare function hintsLength(hints: readonly Hint[]): number;
|
|
98
146
|
declare function Spinner({
|
|
99
147
|
label
|
|
100
148
|
}: {
|
|
101
149
|
label: string;
|
|
102
|
-
}):
|
|
150
|
+
}): ReactNode;
|
|
103
151
|
declare function Transcript({
|
|
104
152
|
events,
|
|
105
|
-
settings
|
|
153
|
+
settings,
|
|
154
|
+
selectedTurnId
|
|
106
155
|
}: {
|
|
107
156
|
events: StreamEvent[];
|
|
108
157
|
settings: Settings;
|
|
109
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Turn id whose events should render with the selection accent bar. `null`
|
|
160
|
+
* leaves every event unhighlighted (normal mode). Events without a turnId
|
|
161
|
+
* (synthetic markers) are never highlighted.
|
|
162
|
+
*/
|
|
163
|
+
selectedTurnId?: string | null;
|
|
164
|
+
}): ReactNode;
|
|
110
165
|
/**
|
|
111
166
|
* Per-event visibility — filters honor user toggles and the
|
|
112
167
|
* `hideSubagentOutput` setting. When subagent output is hidden:
|
|
@@ -141,6 +196,23 @@ declare function isVisible(event: StreamEvent, settings: Settings): boolean;
|
|
|
141
196
|
*/
|
|
142
197
|
declare function marginTopFor(event: StreamEvent, previous: StreamEvent | undefined): number;
|
|
143
198
|
//#endregion
|
|
199
|
+
//#region src/tui/mcps-settings.d.ts
|
|
200
|
+
/**
|
|
201
|
+
* List + toggle modal for MCP servers discovered from `.{prefix}/mcps.json`
|
|
202
|
+
* / `.agents/mcps.json` (project + user). State machine lives in
|
|
203
|
+
* `<ToggleListModal>` (shared with the Skills picker); this file supplies
|
|
204
|
+
* the transport/command detail column and the empty-state copy.
|
|
205
|
+
*
|
|
206
|
+
* Toggling does NOT restart the active agent — the change applies on the
|
|
207
|
+
* next session activation (the app rebuilds the agent there), keeping
|
|
208
|
+
* current runs stable.
|
|
209
|
+
*/
|
|
210
|
+
declare function McpsSettingsModal({
|
|
211
|
+
catalog
|
|
212
|
+
}: {
|
|
213
|
+
catalog: readonly DiscoveredMcp[];
|
|
214
|
+
}): _$react.ReactNode;
|
|
215
|
+
//#endregion
|
|
144
216
|
//#region src/tui/modal.d.ts
|
|
145
217
|
interface ModalApi {
|
|
146
218
|
open: (node: ReactNode) => void;
|
|
@@ -165,33 +237,70 @@ declare function useModal(): ModalApi;
|
|
|
165
237
|
declare function useModalAwareFocus(preferred?: boolean): boolean;
|
|
166
238
|
interface ModalProps {
|
|
167
239
|
title?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Secondary label rendered on the bottom border, right-aligned. Use it
|
|
242
|
+
* for status / counter info that complements the top title (e.g.
|
|
243
|
+
* "3 before · 6 after" on the turn-details modal). Kept short — long
|
|
244
|
+
* strings collide with the bottom-right corner glyph.
|
|
245
|
+
*/
|
|
246
|
+
bottomTitle?: string;
|
|
168
247
|
/** Called when the user presses esc. Defaults to `useModal().close()` if available. */
|
|
169
248
|
onClose?: () => void;
|
|
249
|
+
/**
|
|
250
|
+
* When true, Modal's built-in Esc-to-close handler is suppressed for
|
|
251
|
+
* this render. The child stays free to register its own `useKeyboard`
|
|
252
|
+
* and handle Esc however it wants (cancel a pending confirmation,
|
|
253
|
+
* block dismissal mid-async, …). `@opentui/react`'s `useKeyboard`
|
|
254
|
+
* registers independent listeners with no propagation, so a child's
|
|
255
|
+
* `return` inside its own handler can't stop this Modal's default
|
|
256
|
+
* handler from firing on the same keystroke — `disableEscape` is the
|
|
257
|
+
* declarative escape hatch that closes that race.
|
|
258
|
+
*/
|
|
259
|
+
disableEscape?: boolean;
|
|
170
260
|
children: ReactNode;
|
|
171
261
|
/** Preferred width in columns. Modal grows to this when the terminal allows. */
|
|
172
262
|
maxWidth?: number;
|
|
173
263
|
/** Floor on the width, so content stays minimally legible. */
|
|
174
264
|
minWidth?: number;
|
|
265
|
+
/**
|
|
266
|
+
* Hard cap on the modal's height in rows. When set, the modal grows
|
|
267
|
+
* to this size when the terminal allows and shrinks down to fit on
|
|
268
|
+
* smaller screens. Without it, the modal grows to fit its children
|
|
269
|
+
* (uncapped) — fine for picker-style modals, problematic for
|
|
270
|
+
* unbounded content (long turn previews, etc.) where the modal could
|
|
271
|
+
* exceed the viewport and bury its esc-hint footer.
|
|
272
|
+
*/
|
|
273
|
+
maxHeight?: number;
|
|
175
274
|
/** Columns of breathing room kept on each side of the modal. */
|
|
176
275
|
horizontalMargin?: number;
|
|
276
|
+
/** Rows of breathing room kept above + below the modal when `maxHeight` is set. */
|
|
277
|
+
verticalMargin?: number;
|
|
177
278
|
}
|
|
178
279
|
/**
|
|
179
|
-
* Responsive modal — picks a width based on the
|
|
280
|
+
* Responsive modal — picks a width (and optionally a height) based on the
|
|
281
|
+
* live terminal size.
|
|
180
282
|
*
|
|
181
283
|
* - On a wide terminal, the modal grows to `maxWidth` so descriptions sit on
|
|
182
284
|
* one line and don't wrap.
|
|
183
285
|
* - On a narrow terminal, the modal shrinks down to `minWidth`, keeping a
|
|
184
286
|
* small horizontal margin from the screen edges. Text inside wraps naturally.
|
|
287
|
+
* - When `maxHeight` is set, the same tier logic applies on the vertical
|
|
288
|
+
* axis — anything beyond is the consumer's job (typically a `scrollbox`
|
|
289
|
+
* child for long content).
|
|
185
290
|
*
|
|
186
291
|
* Uses `useTerminalDimensions()` so it reflows on `SIGWINCH` without remount.
|
|
187
292
|
*/
|
|
188
293
|
declare function Modal({
|
|
189
294
|
title,
|
|
295
|
+
bottomTitle,
|
|
190
296
|
onClose,
|
|
297
|
+
disableEscape,
|
|
191
298
|
children,
|
|
192
299
|
maxWidth,
|
|
193
300
|
minWidth,
|
|
194
|
-
|
|
301
|
+
maxHeight,
|
|
302
|
+
horizontalMargin,
|
|
303
|
+
verticalMargin
|
|
195
304
|
}: ModalProps): ReactNode;
|
|
196
305
|
//#endregion
|
|
197
306
|
//#region src/tui/model-picker.d.ts
|
|
@@ -222,13 +331,42 @@ declare function AuthScreen({
|
|
|
222
331
|
declare function SessionsScreen({
|
|
223
332
|
sessions,
|
|
224
333
|
currentId,
|
|
334
|
+
focusedSessionId,
|
|
225
335
|
onPick,
|
|
226
|
-
onCreate
|
|
336
|
+
onCreate,
|
|
337
|
+
onFocusChange,
|
|
338
|
+
showAllProjects,
|
|
339
|
+
currentProjectRoot
|
|
227
340
|
}: {
|
|
228
341
|
sessions: SessionMeta[];
|
|
342
|
+
/**
|
|
343
|
+
* Identity of the row the parent considers focused. Drives the row
|
|
344
|
+
* cursor so the highlight follows the SESSION (not its slot) when the
|
|
345
|
+
* list reorders. `null` lands the cursor on the first session row, or
|
|
346
|
+
* on "+ new" if there are no sessions yet.
|
|
347
|
+
*/
|
|
348
|
+
focusedSessionId: string | null;
|
|
229
349
|
currentId: string | null;
|
|
230
350
|
onPick: (id: string) => void;
|
|
231
351
|
onCreate: () => void;
|
|
352
|
+
/**
|
|
353
|
+
* Notified as the user navigates between rows. Receives the session id
|
|
354
|
+
* of the focused row, or `null` when "+ new" is focused (no session to
|
|
355
|
+
* act on). Parents use this to wire `ctrl+x` against the live focus.
|
|
356
|
+
*/
|
|
357
|
+
onFocusChange?: (id: string | null) => void;
|
|
358
|
+
/**
|
|
359
|
+
* When `true`, render each session's project label under the title.
|
|
360
|
+
* Off by default — when the list is already filtered to one project
|
|
361
|
+
* the label would just repeat that project on every row.
|
|
362
|
+
*/
|
|
363
|
+
showAllProjects?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* Current project root, used to label "this project" on rows that
|
|
366
|
+
* belong to it when `showAllProjects` is on. Untagged (legacy)
|
|
367
|
+
* sessions render as "untagged".
|
|
368
|
+
*/
|
|
369
|
+
currentProjectRoot?: string;
|
|
232
370
|
}): ReactNode;
|
|
233
371
|
declare function ChatScreen({
|
|
234
372
|
events,
|
|
@@ -237,15 +375,52 @@ declare function ChatScreen({
|
|
|
237
375
|
onSubmit,
|
|
238
376
|
session,
|
|
239
377
|
pending,
|
|
240
|
-
onApproval
|
|
378
|
+
onApproval,
|
|
379
|
+
completionProviders,
|
|
380
|
+
onPopupOpenChange,
|
|
381
|
+
selectedTurnId,
|
|
382
|
+
promptTriggerHints
|
|
241
383
|
}: {
|
|
242
384
|
events: StreamEvent[];
|
|
243
385
|
busy: boolean;
|
|
244
386
|
settings: Settings;
|
|
245
|
-
|
|
387
|
+
/**
|
|
388
|
+
* Submit handler — receives the raw prompt text and the parsed references
|
|
389
|
+
* (skills, files, …) so the App can act on them (e.g. activate the
|
|
390
|
+
* referenced skill before `agent.run()`).
|
|
391
|
+
*/
|
|
392
|
+
onSubmit: (prompt: string, references: readonly CompletionReference<unknown>[]) => void;
|
|
246
393
|
session: SessionMeta | null; /** Head of the safe-mode approval queue, or `null` when nothing is pending. */
|
|
247
394
|
pending: ApprovalRequest | null; /** Resolve the active prompt with the user's pick. */
|
|
248
395
|
onApproval: (decision: ApprovalDecision) => void;
|
|
396
|
+
/**
|
|
397
|
+
* Optional autocomplete providers. When passed, `PromptBlock` shows a
|
|
398
|
+
* popup above the textarea and intercepts navigation keys while it's
|
|
399
|
+
* visible. Providers are typed by their item payload (e.g.
|
|
400
|
+
* `CompletionProvider<SkillConfig>`).
|
|
401
|
+
*/
|
|
402
|
+
completionProviders?: readonly CompletionProvider<unknown>[];
|
|
403
|
+
/**
|
|
404
|
+
* Notified whenever the popup opens / closes. The App uses this to gate
|
|
405
|
+
* the esc-abort handler so esc dismisses the popup instead of aborting
|
|
406
|
+
* the run when both could fire.
|
|
407
|
+
*/
|
|
408
|
+
onPopupOpenChange?: (open: boolean) => void;
|
|
409
|
+
/**
|
|
410
|
+
* Active turn id when the user is in select-turn mode. `null` = normal
|
|
411
|
+
* mode. Drives the transcript highlight and unfocuses the textarea so
|
|
412
|
+
* up/down/return reach the parent's keyboard handler instead of being
|
|
413
|
+
* consumed by the input.
|
|
414
|
+
*/
|
|
415
|
+
selectedTurnId?: string | null;
|
|
416
|
+
/**
|
|
417
|
+
* Optional trigger affordances (e.g. `@ files`, `/ skills`) appended
|
|
418
|
+
* to the prompt-box overlay's hint row when there's room. Caller
|
|
419
|
+
* filters by provider availability (don't include `/ skills` if the
|
|
420
|
+
* skills catalog is empty, etc.) — the prompt overlay drops the
|
|
421
|
+
* triggers entirely on narrow terminals.
|
|
422
|
+
*/
|
|
423
|
+
promptTriggerHints?: readonly Hint[];
|
|
249
424
|
}): ReactNode;
|
|
250
425
|
//#endregion
|
|
251
426
|
//#region src/tui/settings-modal.d.ts
|
|
@@ -256,6 +431,15 @@ interface SettingsActions {
|
|
|
256
431
|
* "Re-configure providers" row to the modal.
|
|
257
432
|
*/
|
|
258
433
|
onReauth?: () => void;
|
|
434
|
+
/**
|
|
435
|
+
* Open the Skills list + toggle modal. Adds a "Skills" row when wired.
|
|
436
|
+
*/
|
|
437
|
+
onOpenSkills?: () => void;
|
|
438
|
+
/**
|
|
439
|
+
* Open the MCP servers list + toggle modal. Adds an "MCP servers" row
|
|
440
|
+
* when wired.
|
|
441
|
+
*/
|
|
442
|
+
onOpenMcps?: () => void;
|
|
259
443
|
}
|
|
260
444
|
declare function SettingsModal({
|
|
261
445
|
actions
|
|
@@ -263,6 +447,18 @@ declare function SettingsModal({
|
|
|
263
447
|
actions?: SettingsActions;
|
|
264
448
|
}): _$react.ReactNode;
|
|
265
449
|
//#endregion
|
|
450
|
+
//#region src/tui/skills-settings.d.ts
|
|
451
|
+
/**
|
|
452
|
+
* List + toggle modal for discovered skills. State machine + keyboard +
|
|
453
|
+
* row geometry live in `<ToggleListModal>`; this file just supplies the
|
|
454
|
+
* skill-specific column (description) and the empty-state hint.
|
|
455
|
+
*/
|
|
456
|
+
declare function SkillsSettingsModal({
|
|
457
|
+
catalog
|
|
458
|
+
}: {
|
|
459
|
+
catalog: readonly SkillConfig[];
|
|
460
|
+
}): _$react.ReactNode;
|
|
461
|
+
//#endregion
|
|
266
462
|
//#region src/tui/theme.d.ts
|
|
267
463
|
/**
|
|
268
464
|
* Convert the renderer-agnostic `Theme.syntax` map (hex strings + plain
|
|
@@ -284,6 +480,38 @@ declare function buildMdStyle(theme: Theme): SyntaxStyle;
|
|
|
284
480
|
*/
|
|
285
481
|
declare function useMdStyle(): SyntaxStyle;
|
|
286
482
|
//#endregion
|
|
483
|
+
//#region src/tui/toggle-list-modal.d.ts
|
|
484
|
+
/**
|
|
485
|
+
* Generic list-with-checkboxes modal. Powers both the Skills and MCP
|
|
486
|
+
* server pickers — same state machine, same keyboard map, same row
|
|
487
|
+
* geometry. Per-feature variance flows in through props:
|
|
488
|
+
*
|
|
489
|
+
* - `keyOf` — extract the persisted identity (skill name, server name).
|
|
490
|
+
* - `settingKey` — `'enabledSkills'` | `'enabledMcps'`.
|
|
491
|
+
* - `renderDetail` — appended to each row in mute color (descriptions,
|
|
492
|
+
* transports, …). Optional.
|
|
493
|
+
* - `emptyState` — replacement content when `catalog` is empty.
|
|
494
|
+
*
|
|
495
|
+
* Renderer-agnostic state machine lives in `useEnabledToggleSet`
|
|
496
|
+
* (chat layer) — a GUI shell can build its own toggle list against the
|
|
497
|
+
* same hook without pulling OpenTUI.
|
|
498
|
+
*/
|
|
499
|
+
declare function ToggleListModal<T>({
|
|
500
|
+
catalog,
|
|
501
|
+
keyOf,
|
|
502
|
+
settingKey,
|
|
503
|
+
title,
|
|
504
|
+
renderDetail,
|
|
505
|
+
emptyState
|
|
506
|
+
}: {
|
|
507
|
+
catalog: readonly T[];
|
|
508
|
+
keyOf: (entry: T) => string;
|
|
509
|
+
settingKey: EnabledAllowlistKey; /** Modal title stem — rendered as `${title} · N / M enabled` in non-empty mode. */
|
|
510
|
+
title: string; /** Mute-colored trailing copy for each row (description, transport, …). */
|
|
511
|
+
renderDetail?: (entry: T) => ReactNode; /** What to render when `catalog` is empty (hint about where to drop config). */
|
|
512
|
+
emptyState: ReactNode;
|
|
513
|
+
}): ReactNode;
|
|
514
|
+
//#endregion
|
|
287
515
|
//#region src/tui/index.d.ts
|
|
288
516
|
/**
|
|
289
517
|
* Boot a full chat TUI with sensible defaults. **Does not return** under
|
|
@@ -327,5 +555,5 @@ declare function useMdStyle(): SyntaxStyle;
|
|
|
327
555
|
*/
|
|
328
556
|
declare function runTui(options?: Partial<ChatOptions>): Promise<never>;
|
|
329
557
|
//#endregion
|
|
330
|
-
export { AgentPickerModal, App, AuthScreen, ChatScreen, type ContextUsage, Footer, type Hint, Modal, type ModalProps, ModalRoot, ModelPickerModal, SessionsScreen, type SettingsActions, SettingsModal, Spinner, Transcript, accentColor, buildMdStyle, isVisible, marginTopFor, onInputSubmit, runTui, useMdStyle, useModal, useModalAwareFocus };
|
|
558
|
+
export { AgentPickerModal, App, AuthScreen, ChatScreen, CompletionPopup, type ContextUsage, Footer, type Hint, McpsSettingsModal, Modal, type ModalProps, ModalRoot, ModelPickerModal, type PromptSegment, type PromptSegmentRef, SessionsScreen, type SettingsActions, SettingsModal, SkillsSettingsModal, Spinner, ToggleListModal, Transcript, accentColor, buildMdStyle, hintsLength, isVisible, marginTopFor, onInputSubmit, renderHintSpans, runTui, splitPromptSegments, useMdStyle, useModal, useModalAwareFocus };
|
|
331
559
|
//# sourceMappingURL=tui.d.ts.map
|
package/dist/tui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.d.ts","names":[],"sources":["../src/tui/agent-picker.tsx","../src/tui/app.tsx","../src/tui/components.tsx","../src/tui/modal.tsx","../src/tui/model-picker.tsx","../src/tui/screens.tsx","../src/tui/settings-modal.tsx","../src/tui/theme.ts","../src/tui/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tui.d.ts","names":[],"sources":["../src/tui/agent-picker.tsx","../src/tui/app.tsx","../src/tui/completion-popup.tsx","../src/tui/components.tsx","../src/tui/mcps-settings.tsx","../src/tui/modal.tsx","../src/tui/model-picker.tsx","../src/tui/screens.tsx","../src/tui/settings-modal.tsx","../src/tui/skills-settings.tsx","../src/tui/theme.ts","../src/tui/toggle-list-modal.tsx","../src/tui/index.tsx"],"mappings":";;;;;;;;;;;;;AAoBA;;;;;iBAAgB,gBAAA,CAAA;EACd,MAAA;EACA,cAAA;EACA;AAAA;EAEA,MAAA,EAAQ,aAAA;EACR,cAAA;EACA,MAAA,GAAS,EAAA;AAAA,IAFY,OAAA,CAGtB,SAAA;;;;;;iBAkFe,WAAA,CACd,MAAA,EAAQ,WAAA,cACR,KAAA;EAAS,KAAA;EAAe,MAAA;EAAgB,IAAA;EAAc,KAAA;AAAA;;;;;;;;;;AA5FxD;iBC6DgB,GAAA,CAAA;EAAM;AAAA;EAAY,MAAA,EAAQ,cAAA;AAAA,IAAc,OAAA,CAAE,SAAA;;;;;;;;AD7D1D;;;;;;;;;;;;;;;;;;;;;iBEYgB,eAAA,CAAA;EACd,KAAA;kFAEA;AAAA;EAEA,KAAA,EAAO,eAAA;EACP,WAAA;AAAA,IACD,SAAA;;;;;;;;AFnBD;iBG4DgB,aAAA,CA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