@linxiraos/pi-tui 1.4.13 → 1.5.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/CHANGELOG.md +17 -34
- package/dist/types/chat/messages.d.ts +2 -0
- package/dist/types/chat/spotlight.d.ts +8 -3
- package/dist/types/chat/transcript-render-helpers.d.ts +5 -0
- package/dist/types/components/editor.d.ts +4 -1
- package/dist/types/html-form/data.d.ts +56 -0
- package/dist/types/html-form/dialog.d.ts +51 -0
- package/dist/types/html-form/media.d.ts +28 -0
- package/dist/types/html-form/paginate.d.ts +43 -0
- package/dist/types/html-form/parse.d.ts +99 -0
- package/dist/types/overlays/ask-dialog.d.ts +11 -6
- package/dist/types/overlays/copy-targets.d.ts +8 -6
- package/dist/types/overlays/hook-editor.d.ts +3 -1
- package/dist/types/overlays/hub-frame.d.ts +2 -0
- package/dist/types/overlays/model-hub.d.ts +2 -0
- package/dist/types/overlays/team-hub.d.ts +150 -0
- package/dist/types/render/row-moves.d.ts +41 -0
- package/dist/types/status-line/component.d.ts +5 -0
- package/dist/types/status-line/host.d.ts +2 -2
- package/dist/types/status-line/schema.d.ts +1 -1
- package/dist/types/status-line/types.d.ts +8 -0
- package/dist/types/tools/ask.d.ts +11 -49
- package/dist/types/tools/autoresearch.d.ts +2 -2
- package/dist/types/tools/eval.d.ts +4 -0
- package/dist/types/tools/grouped-file-output.d.ts +2 -0
- package/dist/types/tools/shell-viz.d.ts +6 -2
- package/dist/types/tools/xd-url.d.ts +6 -0
- package/dist/types/windows-input-mode.d.ts +8 -0
- package/package.json +9 -9
- package/src/charts/table-data.ts +18 -5
- package/src/chat/chat-transcript-builder.ts +27 -10
- package/src/chat/image-loading.ts +55 -0
- package/src/chat/messages.d.ts +2 -0
- package/src/chat/messages.ts +3 -0
- package/src/chat/spotlight.d.ts +8 -3
- package/src/chat/spotlight.ts +23 -11
- package/src/chat/tool-execution.ts +5 -0
- package/src/chat/transcript-render-helpers.d.ts +5 -0
- package/src/chat/transcript-render-helpers.ts +13 -0
- package/src/chrome/transcript-container.ts +1 -1
- package/src/components/editor.d.ts +4 -1
- package/src/components/editor.ts +3 -2
- package/src/components/markdown.ts +70 -12
- package/src/html-form/data.d.ts +56 -0
- package/src/html-form/data.ts +177 -0
- package/src/html-form/dialog.ts +1450 -0
- package/src/html-form/media.ts +105 -0
- package/src/html-form/paginate.ts +99 -0
- package/src/html-form/parse.d.ts +99 -0
- package/src/html-form/parse.ts +568 -0
- package/src/lang-from-path.ts +1 -0
- package/src/latex-block.ts +3 -3
- package/src/latex-to-unicode.ts +18 -5
- package/src/overlays/ask-dialog.ts +69 -52
- package/src/overlays/copy-targets.d.ts +8 -6
- package/src/overlays/copy-targets.ts +25 -46
- package/src/overlays/hook-editor.ts +16 -15
- package/src/overlays/hub-frame.ts +8 -1
- package/src/overlays/model-hub.ts +12 -2
- package/src/overlays/spotlight-sheet.ts +18 -18
- package/src/overlays/team-hub.ts +901 -0
- package/src/render/row-moves.d.ts +41 -0
- package/src/render/row-moves.ts +109 -0
- package/src/setup/wizard-overlay.ts +7 -3
- package/src/status-line/component.ts +19 -0
- package/src/status-line/footer.ts +2 -2
- package/src/status-line/host.ts +2 -2
- package/src/status-line/presets.ts +6 -6
- package/src/status-line/schema.ts +2 -1
- package/src/status-line/segments.ts +31 -4
- package/src/status-line/startup.ts +1 -1
- package/src/status-line/types.ts +8 -0
- package/src/stdin-buffer.ts +15 -1
- package/src/terminal-capabilities.ts +12 -3
- package/src/terminal.ts +41 -3
- package/src/tools/ask.d.ts +11 -49
- package/src/tools/ask.ts +201 -606
- package/src/tools/autoresearch.ts +2 -2
- package/src/tools/debug.ts +31 -38
- package/src/tools/eval.d.ts +4 -0
- package/src/tools/eval.ts +4 -0
- package/src/tools/grep.ts +38 -16
- package/src/tools/grouped-file-output.d.ts +2 -0
- package/src/tools/grouped-file-output.ts +5 -0
- package/src/tools/shell-viz-render.ts +37 -6
- package/src/tools/shell-viz.d.ts +6 -2
- package/src/tools/shell-viz.ts +19 -6
- package/src/tools/xd-url.d.ts +6 -0
- package/src/tools/xd-url.ts +19 -1
- package/src/tui.ts +129 -1
- package/src/windows-input-mode.d.ts +8 -0
- package/src/windows-input-mode.ts +13 -0
package/src/tools/ask.d.ts
CHANGED
|
@@ -1,74 +1,36 @@
|
|
|
1
1
|
import type { NativeToolView, ToolRenderResult } from "./renderer";
|
|
2
2
|
import { type Component } from "../index";
|
|
3
3
|
import type { RenderResultOptions } from "./renderer";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
id: string;
|
|
8
|
-
question: string;
|
|
9
|
-
options: string[];
|
|
10
|
-
multi: boolean;
|
|
11
|
-
selectedOptions: string[];
|
|
12
|
-
customInput?: string;
|
|
13
|
-
/** Optional note attached to the selected answer in the rich ask dialog. */
|
|
14
|
-
note?: string;
|
|
15
|
-
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
16
|
-
noteOption?: string;
|
|
17
|
-
/** True when the answer was auto-selected because the dialog timed out. */
|
|
18
|
-
timedOut?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/** Answers and redirect metadata displayed for an ask tool result. */
|
|
4
|
+
import type { Theme } from "../theme/theme";
|
|
5
|
+
import { type FormAnswer } from "../html-form/data";
|
|
6
|
+
/** Answers displayed for an ask tool result. */
|
|
21
7
|
export interface AskToolDetails {
|
|
22
|
-
question
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
selectedOptions?: string[];
|
|
26
|
-
customInput?: string;
|
|
27
|
-
/** Optional note attached to the selected answer in the rich ask dialog. */
|
|
28
|
-
note?: string;
|
|
29
|
-
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
30
|
-
noteOption?: string;
|
|
31
|
-
/** True when the answer was auto-selected because the dialog timed out. */
|
|
8
|
+
/** Each named field's question and answer text, in form order (from `formAnswers`). */
|
|
9
|
+
answers: FormAnswer[];
|
|
10
|
+
/** The deadline submitted the form's current values instead of the user. */
|
|
32
11
|
timedOut?: boolean;
|
|
33
|
-
/** Multi-part question mode */
|
|
34
|
-
results?: QuestionResult[];
|
|
35
|
-
/** Chat redirect: the user chose "Chat about this" instead of answering. */
|
|
36
|
-
chatRedirect?: boolean;
|
|
37
|
-
/** Questions surfaced when chatRedirect is true. */
|
|
38
|
-
questions?: string[];
|
|
39
|
-
}
|
|
40
|
-
interface AskRenderOption {
|
|
41
|
-
label: string;
|
|
42
|
-
description?: string;
|
|
43
12
|
}
|
|
44
13
|
interface AskRenderArgs {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
multi?: boolean;
|
|
48
|
-
questions?: Array<{
|
|
49
|
-
id: string;
|
|
50
|
-
question: string;
|
|
51
|
-
options: AskRenderOption[];
|
|
52
|
-
multi?: boolean;
|
|
53
|
-
}>;
|
|
14
|
+
/** The form the model asks with; streams in partially. */
|
|
15
|
+
html?: string;
|
|
54
16
|
}
|
|
55
17
|
/**
|
|
56
18
|
* Marker glyph for a question option. Single-choice questions render circular radio
|
|
57
19
|
* buttons (pick one); multi-select questions render rectangular checkboxes (pick many).
|
|
58
20
|
*/
|
|
59
21
|
export declare function optionMarker(uiTheme: Theme, multi: boolean | undefined, selected: boolean): string;
|
|
60
|
-
/** Render question forms and their
|
|
22
|
+
/** Render HTML question forms and their submitted answers. */
|
|
61
23
|
export declare const askToolRenderer: {
|
|
62
24
|
describeCall(args: AskRenderArgs): NativeToolView | undefined;
|
|
63
25
|
describeResult(result: ToolRenderResult<AskToolDetails>, _options?: RenderResultOptions, args?: AskRenderArgs): NativeToolView | undefined;
|
|
64
26
|
mergeCallAndResult: true;
|
|
65
|
-
renderCall(args: AskRenderArgs,
|
|
27
|
+
renderCall(args: AskRenderArgs, options: RenderResultOptions, uiTheme: Theme): Component;
|
|
66
28
|
renderResult(result: {
|
|
67
29
|
content: Array<{
|
|
68
30
|
type: string;
|
|
69
31
|
text?: string;
|
|
70
32
|
}>;
|
|
71
33
|
details?: AskToolDetails;
|
|
72
|
-
},
|
|
34
|
+
}, options: RenderResultOptions, uiTheme: Theme, args?: AskRenderArgs): Component;
|
|
73
35
|
};
|
|
74
36
|
export {};
|