@simon_he/vue-tui 0.0.8 → 1.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 +142 -30
- package/dist/TSelect-BwJJbuTt.js +6089 -0
- package/dist/TTree-DK_DQBYm.js +6480 -0
- package/dist/agent.cjs +39416 -0
- package/dist/agent.d.cts +44 -0
- package/dist/agent.d.ts +44 -0
- package/dist/agent.js +828 -0
- package/dist/ansi-palette-CNXqFciC.js +57 -0
- package/dist/ansi-styles.d.ts +200 -0
- package/dist/block-source-CKUOnkgT.js +1663 -0
- package/dist/cli/headless-renderer.d.ts +29 -0
- package/dist/cli/input.d.ts +49 -0
- package/dist/cli/node-file-writers.d.ts +13 -0
- package/dist/cli/node-module.d.ts +2 -0
- package/dist/cli/parse-kitty.d.ts +2 -0
- package/dist/cli/parse-mouse.d.ts +2 -0
- package/dist/cli/parse-utils.d.ts +14 -0
- package/dist/cli/parse-xterm.d.ts +2 -0
- package/dist/cli/path-provider-types.d.ts +1 -0
- package/dist/cli/path-provider.d.ts +4 -0
- package/dist/cli/path-suggest-core.d.ts +1 -0
- package/dist/cli/path-suggest.d.ts +15 -0
- package/dist/cli/recording.d.ts +4 -0
- package/dist/cli/stdin-buffer.d.ts +33 -0
- package/dist/cli.cjs +11061 -0
- package/dist/cli.d.cts +23 -0
- package/dist/cli.d.ts +23 -0
- package/dist/cli.js +9875 -0
- package/dist/core/ansi/capability.d.ts +20 -0
- package/dist/core/ansi/colors.d.ts +41 -0
- package/dist/core/ansi/sgr.d.ts +7 -0
- package/dist/core/ansi/theme.d.ts +6 -0
- package/dist/core/ansi-palette.d.ts +14 -0
- package/dist/core/buffer/buffer.d.ts +54 -0
- package/dist/core/buffer/width.d.ts +4 -0
- package/dist/core/debug-logger.d.ts +18 -0
- package/dist/core/hyperlink.d.ts +9 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/path-provider-types.d.ts +24 -0
- package/dist/core/path-suggest.d.ts +35 -0
- package/dist/core/render-plane.d.ts +3 -0
- package/dist/core/terminal/create-terminal.d.ts +8 -0
- package/dist/core/terminal/emitter.d.ts +7 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/core.cjs +3153 -0
- package/dist/core.d.cts +14 -0
- package/dist/core.d.ts +14 -0
- package/dist/core.js +424 -0
- package/dist/create-terminal-C2oiWFJU.js +1434 -0
- package/dist/create-terminal-app.d.ts +36 -0
- package/dist/dom-renderer-BqGijQID.js +1173 -0
- package/dist/env-Cl8qmNFN.js +19 -0
- package/dist/events/index.d.ts +6 -0
- package/dist/events/manager/cli-event-manager.d.ts +22 -0
- package/dist/events/manager/event-manager.d.ts +30 -0
- package/dist/events/manager/selection-suppression.d.ts +3 -0
- package/dist/events/manager/types.d.ts +108 -0
- package/dist/events/recording.d.ts +44 -0
- package/dist/experimental.cjs +4412 -1641
- package/dist/experimental.d.cts +42 -0
- package/dist/experimental.d.ts +42 -825
- package/dist/experimental.js +31 -7392
- package/dist/frame-perf-C6Xfg85O.js +24 -0
- package/dist/hyperlink-Bn02UXJb.js +419 -0
- package/dist/index.cjs +14765 -17582
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +35 -1528
- package/dist/index.js +17 -20026
- package/dist/linkify-D_gzn9Xq.js +562 -0
- package/dist/markdown.cjs +9321 -7623
- package/dist/markdown.d.cts +11 -0
- package/dist/markdown.d.ts +11 -112
- package/dist/markdown.js +36 -1427
- package/dist/observability/cli-latency-node.d.ts +3 -0
- package/dist/observability/cli-latency-types.d.ts +41 -0
- package/dist/observability/cli-latency.d.ts +3 -0
- package/dist/observability/frame-perf-store.d.ts +18 -0
- package/dist/observability/frame-perf.d.ts +40 -0
- package/dist/observability/perf-sink.d.ts +56 -0
- package/dist/observability/trace.d.ts +40 -0
- package/dist/observability/tui-profiler.d.ts +33 -0
- package/dist/observability.cjs +221 -0
- package/dist/observability.d.cts +8 -0
- package/dist/observability.d.ts +8 -0
- package/dist/observability.js +4 -0
- package/dist/path-mnSgEpCm.js +81 -0
- package/dist/path-suggest-BNqcuE3-.js +274 -0
- package/dist/path-suggest-Dk9TRLh5.js +3 -0
- package/dist/{path-suggest-DmrmeueH.js → path-suggest-bvR9SY6Q.js} +86 -18
- package/dist/renderer/capabilities.d.ts +13 -0
- package/dist/renderer/cli/index.d.ts +2 -0
- package/dist/renderer/cli/stdout-metrics.d.ts +18 -0
- package/dist/renderer/cli/stdout-renderer.d.ts +48 -0
- package/dist/renderer/dom/dom-renderer.d.ts +157 -0
- package/dist/renderer/dom/index.d.ts +2 -0
- package/dist/renderer/index.d.ts +2 -0
- package/dist/renderer-dom.cjs +1505 -0
- package/dist/renderer-dom.d.cts +4 -0
- package/dist/renderer-dom.d.ts +4 -0
- package/dist/renderer-dom.js +7 -0
- package/dist/runtime/index.d.ts +36 -0
- package/dist/runtime/osc52.d.ts +9 -0
- package/dist/runtime-rfcZCyJq.js +1197 -0
- package/dist/runtime.cjs +1698 -0
- package/dist/runtime.d.cts +9 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.js +4 -0
- package/dist/selection/terminal-selection.d.ts +123 -0
- package/dist/sgr-BmzxEjAO.js +304 -0
- package/dist/terminal-selection-DBinO6p5.js +330 -0
- package/dist/tlog-theme-qPBt5rge.js +9254 -0
- package/dist/trace-CjzYeIxN.js +182 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/grapheme.d.ts +5 -0
- package/dist/utils/newlines.d.ts +1 -0
- package/dist/utils/path.d.ts +7 -0
- package/dist/utils/url-safety.d.ts +2 -0
- package/dist/vue/agent/view-models.d.ts +98 -0
- package/dist/vue/components/TAnchor.d.ts +108 -0
- package/dist/vue/components/TBox.d.ts +144 -0
- package/dist/vue/components/TCommandPalette.d.ts +587 -0
- package/dist/vue/components/TDataTable.d.ts +367 -0
- package/dist/vue/components/TDebugOverlay.d.ts +43 -0
- package/dist/vue/components/TDialog.d.ts +255 -0
- package/dist/vue/components/TFeedback.d.ts +635 -0
- package/dist/vue/components/TFlow.d.ts +85 -0
- package/dist/vue/components/TForm.d.ts +1230 -0
- package/dist/vue/components/TInput.d.ts +545 -0
- package/dist/vue/components/TInputBox.d.ts +158 -0
- package/dist/vue/components/TJsonEditor.d.ts +165 -0
- package/dist/vue/components/TLink.d.ts +239 -0
- package/dist/vue/components/TLinkifyText.d.ts +141 -0
- package/dist/vue/components/TList.d.ts +119 -0
- package/dist/vue/components/TLogLinksPanel.d.ts +238 -0
- package/dist/vue/components/TLogMinimap.d.ts +263 -0
- package/dist/vue/components/TLogScrollbar.d.ts +236 -0
- package/dist/vue/components/TLogSearchBar.d.ts +267 -0
- package/dist/vue/components/TLogSearchPager.d.ts +162 -0
- package/dist/vue/components/TLogSearchResults.d.ts +200 -0
- package/dist/vue/components/TLogView.d.ts +536 -0
- package/dist/vue/components/TLogVirtualLinksPanel.d.ts +141 -0
- package/dist/vue/components/TLogVirtualSearchResults.d.ts +146 -0
- package/dist/vue/components/TMarkdownText.d.ts +134 -0
- package/dist/vue/components/TMultilineModal.d.ts +62 -0
- package/dist/vue/components/TNavigation.d.ts +324 -0
- package/dist/vue/components/TOverlay.d.ts +366 -0
- package/dist/vue/components/TPanels.d.ts +244 -0
- package/dist/vue/components/TPathPicker.d.ts +213 -0
- package/dist/vue/components/TRenderLayer.d.ts +16 -0
- package/dist/vue/components/TRenderPlane.d.ts +17 -0
- package/dist/vue/components/TSelect.d.ts +335 -0
- package/dist/vue/components/TTable.d.ts +317 -0
- package/dist/vue/components/TText.d.ts +116 -0
- package/dist/vue/components/TThinkingView.d.ts +233 -0
- package/dist/vue/components/TToolCallView.d.ts +384 -0
- package/dist/vue/components/TTranscriptView.d.ts +221 -0
- package/dist/vue/components/TTransition.d.ts +83 -0
- package/dist/vue/components/TTree.d.ts +200 -0
- package/dist/vue/components/TUserMessageView.d.ts +344 -0
- package/dist/vue/components/TView.d.ts +127 -0
- package/dist/vue/components/TVirtualList.d.ts +182 -0
- package/dist/vue/components/TVirtualMarkdown.d.ts +168 -0
- package/dist/vue/components/TVirtualRows.d.ts +247 -0
- package/dist/vue/components/TerminalProvider.d.ts +218 -0
- package/dist/vue/components/input/host.d.ts +17 -0
- package/dist/vue/components/input/plugins/hostPlugin.d.ts +7 -0
- package/dist/vue/components/input/plugins/hostPlugin.node.d.ts +15 -0
- package/dist/vue/components/input/plugins/mentionUtils.d.ts +17 -0
- package/dist/vue/components/input/plugins/nodeMentionPathProvider.d.ts +2 -0
- package/dist/vue/components/input/plugins/promptMentionPlugin.d.ts +8 -0
- package/dist/vue/components/input/plugins/promptMentionState.d.ts +98 -0
- package/dist/vue/components/input/plugins/restrictText.d.ts +27 -0
- package/dist/vue/components/input/plugins/types.d.ts +90 -0
- package/dist/vue/components/input/utils/inlineText.d.ts +57 -0
- package/dist/vue/components/input/utils/inlineTextTokens.d.ts +34 -0
- package/dist/vue/components/input/utils/primitives.d.ts +3 -0
- package/dist/vue/components/input/utils/wordNavigation.d.ts +6 -0
- package/dist/vue/components/link/host.d.ts +15 -0
- package/dist/vue/components/list/list-geometry.d.ts +16 -0
- package/dist/vue/components/list/list-paint.d.ts +1 -0
- package/dist/vue/components/list/scroll-state.d.ts +25 -0
- package/dist/vue/components/list/selection-state.d.ts +6 -0
- package/dist/vue/components/simple-utils.d.ts +5 -0
- package/dist/vue/components/terminal-provider/copy-toast.d.ts +6 -0
- package/dist/vue/components/terminal-provider/portals.d.ts +17 -0
- package/dist/vue/components/terminal-provider/scheduler.d.ts +29 -0
- package/dist/vue/components/terminal-provider/selection-config.d.ts +15 -0
- package/dist/vue/components/terminal-provider/utils.d.ts +5 -0
- package/dist/vue/composables/use-layout.d.ts +2 -0
- package/dist/vue/composables/use-render-node.d.ts +19 -0
- package/dist/vue/composables/use-render-stack.d.ts +3 -0
- package/dist/vue/composables/use-runtime.d.ts +5 -0
- package/dist/vue/composables/use-terminal-node.d.ts +14 -0
- package/dist/vue/composables/use-terminal.d.ts +2 -0
- package/dist/vue/composables/use-visibility.d.ts +12 -0
- package/dist/vue/context.d.ts +153 -0
- package/dist/vue/index.d.ts +69 -0
- package/dist/vue/injection-key.d.ts +2 -0
- package/dist/vue/linkify.d.ts +11 -0
- package/dist/vue/log/append-only-log-store.d.ts +2 -0
- package/dist/vue/log/tlog-keymap.d.ts +28 -0
- package/dist/vue/log/tlog-plugins.d.ts +144 -0
- package/dist/vue/log/tlog-session.d.ts +81 -0
- package/dist/vue/log/tlog-theme.d.ts +68 -0
- package/dist/vue/log/types.d.ts +43 -0
- package/dist/vue/log/use-tlog-link-controller.d.ts +31 -0
- package/dist/vue/log/use-tlog-retained-index.d.ts +26 -0
- package/dist/vue/log/use-tlog-search-controller.d.ts +51 -0
- package/dist/vue/log/use-tlog-search-results-page.d.ts +31 -0
- package/dist/vue/log/use-tlog-virtual-search-results.d.ts +22 -0
- package/dist/vue/markdown/ast.d.ts +3 -0
- package/dist/vue/markdown/block-source.d.ts +22 -0
- package/dist/vue/markdown/document.d.ts +20 -0
- package/dist/vue/markdown/layout.d.ts +21 -0
- package/dist/vue/markdown/parser.d.ts +11 -0
- package/dist/vue/markdown/render.d.ts +10 -0
- package/dist/vue/markdown/theme.d.ts +186 -0
- package/dist/vue/markdown/types.d.ts +59 -0
- package/dist/vue/overlay.d.ts +27 -0
- package/dist/vue/render/context.d.ts +3 -0
- package/dist/vue/render/render-manager.d.ts +94 -0
- package/dist/vue/router/RouterView.d.ts +25 -0
- package/dist/vue/router/composables.d.ts +4 -0
- package/dist/vue/router/context.d.ts +4 -0
- package/dist/vue/router/router.d.ts +7 -0
- package/dist/vue/router/types.d.ts +29 -0
- package/dist/vue/scheduler/frame-mailbox.d.ts +55 -0
- package/dist/vue/scheduler/frame-scheduler.d.ts +51 -0
- package/dist/vue/theme.d.ts +48 -0
- package/dist/vue/transcript/hit-regions.d.ts +2 -0
- package/dist/vue/transcript/layout.d.ts +20 -0
- package/dist/vue/transcript/plain-text.d.ts +2 -0
- package/dist/vue/transcript/types.d.ts +122 -0
- package/dist/vue/utils/frame-task.d.ts +6 -0
- package/dist/vue/utils/rect.d.ts +4 -0
- package/dist/vue/utils/row-scroll.d.ts +25 -0
- package/dist/vue/utils/style-cache.d.ts +3 -0
- package/dist/vue/utils/text.d.ts +27 -0
- package/dist/vue/utils/wheel-scroll.d.ts +18 -0
- package/dist/vue.cjs +23668 -0
- package/dist/vue.d.cts +1 -0
- package/dist/vue.d.ts +1 -0
- package/dist/vue.js +3957 -0
- package/dist/{wheel-scroll-CiNsasLf.js → wheel-scroll-vBRaQ7p-.js} +404 -405
- package/package.json +185 -35
- package/dist/path-suggest-BeV6n7m-.js +0 -3
- package/dist/sgr-Tko2EQ0U.js +0 -484
- package/dist/theme-Bsm65g8k.d.ts +0 -32
- package/dist/types-ClIV2h1o.d.ts +0 -103
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { computed, ref, shallowReactive } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/observability/perf-sink.ts
|
|
4
|
+
let installedTuiPerf = {
|
|
5
|
+
enabled: false,
|
|
6
|
+
sink: null
|
|
7
|
+
};
|
|
8
|
+
function shouldSample(rate) {
|
|
9
|
+
if (rate <= 0) return false;
|
|
10
|
+
if (rate >= 1) return true;
|
|
11
|
+
return Math.random() < rate;
|
|
12
|
+
}
|
|
13
|
+
function normalizeSampleRate(value) {
|
|
14
|
+
const n = Number(value);
|
|
15
|
+
if (!Number.isFinite(n)) return 1;
|
|
16
|
+
return Math.max(0, Math.min(1, n));
|
|
17
|
+
}
|
|
18
|
+
function createJsonlPerfSink(options = {}) {
|
|
19
|
+
const sampleRate = normalizeSampleRate(options.sampleRate);
|
|
20
|
+
const includeComponents = options.includeComponents ?? true;
|
|
21
|
+
const includeEvents = options.includeEvents ?? false;
|
|
22
|
+
function emit(value) {
|
|
23
|
+
const line = JSON.stringify(value);
|
|
24
|
+
if (options.file && options.fileWriter?.appendFileSync) options.fileWriter.appendFileSync(options.file, `${line}\n`);
|
|
25
|
+
options.write?.(line);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
onFramePerf(sample) {
|
|
29
|
+
if (!shouldSample(sampleRate)) return;
|
|
30
|
+
emit({
|
|
31
|
+
type: "frame",
|
|
32
|
+
...sample
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
onComponentPerf(sample) {
|
|
36
|
+
if (!includeComponents || !shouldSample(sampleRate)) return;
|
|
37
|
+
emit({
|
|
38
|
+
type: "component",
|
|
39
|
+
...sample
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
onEvent(event) {
|
|
43
|
+
if (!includeEvents || !shouldSample(sampleRate)) return;
|
|
44
|
+
emit({
|
|
45
|
+
type: "event",
|
|
46
|
+
eventType: event.type,
|
|
47
|
+
ts: event.ts ?? Date.now(),
|
|
48
|
+
component: event.component,
|
|
49
|
+
id: event.id,
|
|
50
|
+
data: event.data
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function installTuiPerf(options = {}) {
|
|
56
|
+
const previous = installedTuiPerf;
|
|
57
|
+
const previousDebugPerf = globalThis.__VT_DEBUG_PERF__;
|
|
58
|
+
const current = {
|
|
59
|
+
enabled: options.enabled ?? Boolean(options.sink),
|
|
60
|
+
sink: options.sink ?? null
|
|
61
|
+
};
|
|
62
|
+
installedTuiPerf = current;
|
|
63
|
+
if (options.debugOverlay != null) globalThis.__VT_DEBUG_PERF__ = Boolean(options.debugOverlay);
|
|
64
|
+
return () => {
|
|
65
|
+
current.sink?.dispose?.();
|
|
66
|
+
if (installedTuiPerf === current) installedTuiPerf = previous;
|
|
67
|
+
if (previousDebugPerf === void 0) delete globalThis.__VT_DEBUG_PERF__;
|
|
68
|
+
else globalThis.__VT_DEBUG_PERF__ = previousDebugPerf;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function getInstalledTuiPerf() {
|
|
72
|
+
return installedTuiPerf;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/observability/frame-perf-store.ts
|
|
77
|
+
function createFramePerfStore(limit = 120, opts) {
|
|
78
|
+
const max = Math.max(1, Math.floor(limit));
|
|
79
|
+
const installed = getInstalledTuiPerf();
|
|
80
|
+
const manualEnabled = ref(Boolean(opts?.enabled ?? installed.enabled));
|
|
81
|
+
const leaseCount = ref(0);
|
|
82
|
+
const enabled = computed({
|
|
83
|
+
get: () => manualEnabled.value || leaseCount.value > 0,
|
|
84
|
+
set: (next) => {
|
|
85
|
+
manualEnabled.value = Boolean(next);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const samples = [];
|
|
89
|
+
const sinks = [];
|
|
90
|
+
if (installed.sink) sinks.push(installed.sink);
|
|
91
|
+
const configuredSink = opts?.sink;
|
|
92
|
+
if (Array.isArray(configuredSink)) sinks.push(...configuredSink);
|
|
93
|
+
else if (configuredSink) sinks.push(configuredSink);
|
|
94
|
+
function emitToSinks(fn) {
|
|
95
|
+
for (const sink of sinks) try {
|
|
96
|
+
fn(sink);
|
|
97
|
+
} catch {}
|
|
98
|
+
}
|
|
99
|
+
function acquire(_reason) {
|
|
100
|
+
leaseCount.value++;
|
|
101
|
+
let released = false;
|
|
102
|
+
return () => {
|
|
103
|
+
if (released) return;
|
|
104
|
+
released = true;
|
|
105
|
+
leaseCount.value = Math.max(0, leaseCount.value - 1);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function push(sample) {
|
|
109
|
+
if (!enabled.value) return;
|
|
110
|
+
samples.push(sample);
|
|
111
|
+
if (samples.length > max) samples.splice(0, samples.length - max);
|
|
112
|
+
emitToSinks((sink) => sink.onFramePerf(sample));
|
|
113
|
+
}
|
|
114
|
+
function recordComponent(sample) {
|
|
115
|
+
if (!enabled.value) return;
|
|
116
|
+
emitToSinks((sink) => sink.onComponentPerf?.(sample));
|
|
117
|
+
}
|
|
118
|
+
function recordEvent(event) {
|
|
119
|
+
if (!enabled.value) return;
|
|
120
|
+
emitToSinks((sink) => sink.onEvent?.(event));
|
|
121
|
+
}
|
|
122
|
+
function addSink(sink) {
|
|
123
|
+
sinks.push(sink);
|
|
124
|
+
let disposed = false;
|
|
125
|
+
return () => {
|
|
126
|
+
if (disposed) return;
|
|
127
|
+
disposed = true;
|
|
128
|
+
const index = sinks.indexOf(sink);
|
|
129
|
+
if (index >= 0) sinks.splice(index, 1);
|
|
130
|
+
sink.dispose?.();
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function latest() {
|
|
134
|
+
return samples.length > 0 ? samples[samples.length - 1] : null;
|
|
135
|
+
}
|
|
136
|
+
function list() {
|
|
137
|
+
return samples.slice();
|
|
138
|
+
}
|
|
139
|
+
function clear() {
|
|
140
|
+
samples.length = 0;
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
enabled,
|
|
144
|
+
acquire,
|
|
145
|
+
push,
|
|
146
|
+
recordComponent,
|
|
147
|
+
recordEvent,
|
|
148
|
+
addSink,
|
|
149
|
+
latest,
|
|
150
|
+
list,
|
|
151
|
+
clear
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/observability/trace.ts
|
|
157
|
+
function createTraceStore(opts) {
|
|
158
|
+
const enabled = ref(Boolean(opts?.enabled));
|
|
159
|
+
const records = shallowReactive([]);
|
|
160
|
+
const max = Math.max(10, Math.floor(opts?.max ?? 400));
|
|
161
|
+
function push(record) {
|
|
162
|
+
if (!enabled.value) return;
|
|
163
|
+
records.push(record);
|
|
164
|
+
if (records.length > max) records.splice(0, records.length - max);
|
|
165
|
+
}
|
|
166
|
+
function clear() {
|
|
167
|
+
records.splice(0, records.length);
|
|
168
|
+
}
|
|
169
|
+
function snapshot() {
|
|
170
|
+
return records.slice();
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
enabled,
|
|
174
|
+
records,
|
|
175
|
+
push,
|
|
176
|
+
clear,
|
|
177
|
+
snapshot
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
//#endregion
|
|
182
|
+
export { createFramePerfStore, createJsonlPerfSink, createTraceStore, installTuiPerf };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function firstNonEmptyEnv(env: Readonly<Record<string, unknown>> | undefined, primary: string, legacy?: string): unknown;
|
|
2
|
+
export declare function envFlag(env: Readonly<Record<string, unknown>> | undefined, primary: string, legacy?: string): boolean;
|
|
3
|
+
export declare function envString(env: Readonly<Record<string, unknown>> | undefined, primary: string, legacy: string | undefined, fallback?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeNewlines(text: string): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type PathStyle = "posix";
|
|
2
|
+
export declare function isAbsolutePath(path: string): boolean;
|
|
3
|
+
export declare function stripTrailingSlash(path: string): string;
|
|
4
|
+
export declare function joinPath(base: string, next: string): string;
|
|
5
|
+
export declare function dirname(path: string): string;
|
|
6
|
+
export declare function normalizePath(path: string): string;
|
|
7
|
+
export declare function resolvePath(baseAbs: string, input: string): string;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { Style } from "../../core/types.js";
|
|
2
|
+
import type { TToolCallStatus, TToolCallViewSegment, TToolCallViewStyles } from "../components/TToolCallView.js";
|
|
3
|
+
export type TUserMessageSegment = Readonly<{
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
href?: string;
|
|
7
|
+
style?: Style;
|
|
8
|
+
meta?: unknown;
|
|
9
|
+
}>;
|
|
10
|
+
export type TUserMessageViewModel = Readonly<{
|
|
11
|
+
indent: number;
|
|
12
|
+
headerText: string;
|
|
13
|
+
header: Style;
|
|
14
|
+
content: Style;
|
|
15
|
+
segment: Style;
|
|
16
|
+
headerSegments: readonly Readonly<{
|
|
17
|
+
start: number;
|
|
18
|
+
end: number;
|
|
19
|
+
text: string;
|
|
20
|
+
style: Style;
|
|
21
|
+
}>[];
|
|
22
|
+
rows: readonly Readonly<{
|
|
23
|
+
text: string;
|
|
24
|
+
start: number;
|
|
25
|
+
end: number;
|
|
26
|
+
segments: readonly TUserMessageSegment[];
|
|
27
|
+
}>[];
|
|
28
|
+
}>;
|
|
29
|
+
export declare function resolveTUserMessageViewModel(opts: Readonly<{
|
|
30
|
+
w: number;
|
|
31
|
+
label: string;
|
|
32
|
+
prefix?: string;
|
|
33
|
+
meta?: string;
|
|
34
|
+
content: string;
|
|
35
|
+
indent?: number;
|
|
36
|
+
topBlank?: boolean;
|
|
37
|
+
bottomBlank?: boolean;
|
|
38
|
+
segments?: readonly TUserMessageSegment[];
|
|
39
|
+
style?: Style;
|
|
40
|
+
headerStyle?: Style;
|
|
41
|
+
prefixStyle?: Style;
|
|
42
|
+
labelStyle?: Style;
|
|
43
|
+
contentStyle?: Style;
|
|
44
|
+
segmentStyle?: Style;
|
|
45
|
+
}>): TUserMessageViewModel;
|
|
46
|
+
export type TThinkingViewModel = Readonly<{
|
|
47
|
+
headerText: string;
|
|
48
|
+
bodyRows: readonly string[];
|
|
49
|
+
styles: Readonly<{
|
|
50
|
+
header: Style;
|
|
51
|
+
body: Style;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
export declare function resolveTThinkingViewModel(opts: Readonly<{
|
|
55
|
+
w: number;
|
|
56
|
+
title: string;
|
|
57
|
+
content: string;
|
|
58
|
+
collapsed: boolean;
|
|
59
|
+
pulseFrame?: number | null;
|
|
60
|
+
style?: Style;
|
|
61
|
+
headerStyle?: Style;
|
|
62
|
+
markerStyle?: Style;
|
|
63
|
+
titleStyle?: Style;
|
|
64
|
+
bodyStyle?: Style;
|
|
65
|
+
}>): TThinkingViewModel;
|
|
66
|
+
export type TToolCallViewModel = Readonly<{
|
|
67
|
+
styles: TToolCallViewStyles;
|
|
68
|
+
marker: string;
|
|
69
|
+
suffix: string;
|
|
70
|
+
preview: string;
|
|
71
|
+
previewPrefix: string;
|
|
72
|
+
headerSegments: readonly TToolCallViewSegment[];
|
|
73
|
+
previewSegments: readonly TToolCallViewSegment[];
|
|
74
|
+
}>;
|
|
75
|
+
export declare function resolveTToolCallViewModel(opts: Readonly<{
|
|
76
|
+
w: number;
|
|
77
|
+
title: string;
|
|
78
|
+
collapsed: boolean;
|
|
79
|
+
selected?: boolean;
|
|
80
|
+
nested?: boolean;
|
|
81
|
+
status?: TToolCallStatus;
|
|
82
|
+
suffix?: string;
|
|
83
|
+
preview?: string;
|
|
84
|
+
markerCollapsed?: string;
|
|
85
|
+
markerExpanded?: string;
|
|
86
|
+
statusDot?: string;
|
|
87
|
+
previewPrefix?: string;
|
|
88
|
+
style?: Style;
|
|
89
|
+
mutedStyle?: Style;
|
|
90
|
+
headerStyle?: Style;
|
|
91
|
+
collapsedStyle?: Style;
|
|
92
|
+
expandedStyle?: Style;
|
|
93
|
+
markerStyle?: Style;
|
|
94
|
+
statusStyle?: Style;
|
|
95
|
+
titleStyle?: Style;
|
|
96
|
+
suffixStyle?: Style;
|
|
97
|
+
previewStyle?: Style;
|
|
98
|
+
}>): TToolCallViewModel;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare const TAnchor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
left: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: undefined;
|
|
5
|
+
};
|
|
6
|
+
top: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
right: {
|
|
11
|
+
type: NumberConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
bottom: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
w: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
h: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
26
|
+
zIndex: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
focusable: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
selectable: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "dblclick" | "pointerdown" | "pointerup" | "pointermove" | "wheel" | "keydown" | "keyup" | "focus" | "blur" | "clickCapture" | "dblclickCapture" | "pointerdownCapture" | "pointerupCapture" | "pointermoveCapture" | "wheelCapture" | "keydownCapture" | "keyupCapture" | "focusCapture" | "blurCapture")[], "click" | "dblclick" | "pointerdown" | "pointerup" | "pointermove" | "wheel" | "keydown" | "keyup" | "focus" | "blur" | "clickCapture" | "dblclickCapture" | "pointerdownCapture" | "pointerupCapture" | "pointermoveCapture" | "wheelCapture" | "keydownCapture" | "keyupCapture" | "focusCapture" | "blurCapture", (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps), Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
left: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
top: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
right: {
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
bottom: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
w: {
|
|
58
|
+
type: NumberConstructor;
|
|
59
|
+
default: undefined;
|
|
60
|
+
};
|
|
61
|
+
h: {
|
|
62
|
+
type: NumberConstructor;
|
|
63
|
+
default: undefined;
|
|
64
|
+
};
|
|
65
|
+
zIndex: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: number;
|
|
68
|
+
};
|
|
69
|
+
focusable: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
selectable: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
}>> & Readonly<{
|
|
78
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
79
|
+
onDblclick?: ((...args: any[]) => any) | undefined;
|
|
80
|
+
onPointerdown?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
onPointerup?: ((...args: any[]) => any) | undefined;
|
|
82
|
+
onPointermove?: ((...args: any[]) => any) | undefined;
|
|
83
|
+
onWheel?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
86
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
87
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
88
|
+
onClickCapture?: ((...args: any[]) => any) | undefined;
|
|
89
|
+
onDblclickCapture?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
onPointerdownCapture?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
onPointerupCapture?: ((...args: any[]) => any) | undefined;
|
|
92
|
+
onPointermoveCapture?: ((...args: any[]) => any) | undefined;
|
|
93
|
+
onWheelCapture?: ((...args: any[]) => any) | undefined;
|
|
94
|
+
onKeydownCapture?: ((...args: any[]) => any) | undefined;
|
|
95
|
+
onKeyupCapture?: ((...args: any[]) => any) | undefined;
|
|
96
|
+
onFocusCapture?: ((...args: any[]) => any) | undefined;
|
|
97
|
+
onBlurCapture?: ((...args: any[]) => any) | undefined;
|
|
98
|
+
}>, {
|
|
99
|
+
w: number;
|
|
100
|
+
h: number;
|
|
101
|
+
zIndex: number;
|
|
102
|
+
focusable: boolean;
|
|
103
|
+
selectable: boolean;
|
|
104
|
+
left: number;
|
|
105
|
+
top: number;
|
|
106
|
+
bottom: number;
|
|
107
|
+
right: number;
|
|
108
|
+
}, {}>;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { PropType } from "vue";
|
|
2
|
+
import type { Style } from "../../core/types.js";
|
|
3
|
+
export declare const TBox: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
x: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
y: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
w: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
h: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
zIndex: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
border: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
title: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
padding: {
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
default: number;
|
|
35
|
+
};
|
|
36
|
+
scrollX: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
default: number;
|
|
39
|
+
};
|
|
40
|
+
scrollY: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
style: {
|
|
45
|
+
type: PropType<Style>;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
titleStyle: {
|
|
49
|
+
type: PropType<Style>;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
clear: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("pointerenter" | "pointerleave" | "pointerenterCapture" | "pointerleaveCapture")[], "pointerenter" | "pointerleave" | "pointerenterCapture" | "pointerleaveCapture", (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps), Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
x: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
y: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
w: {
|
|
68
|
+
type: NumberConstructor;
|
|
69
|
+
required: true;
|
|
70
|
+
};
|
|
71
|
+
h: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
zIndex: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
border: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
title: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
padding: {
|
|
88
|
+
type: NumberConstructor;
|
|
89
|
+
default: number;
|
|
90
|
+
};
|
|
91
|
+
scrollX: {
|
|
92
|
+
type: NumberConstructor;
|
|
93
|
+
default: number;
|
|
94
|
+
};
|
|
95
|
+
scrollY: {
|
|
96
|
+
type: NumberConstructor;
|
|
97
|
+
default: number;
|
|
98
|
+
};
|
|
99
|
+
style: {
|
|
100
|
+
type: PropType<Style>;
|
|
101
|
+
default: undefined;
|
|
102
|
+
};
|
|
103
|
+
titleStyle: {
|
|
104
|
+
type: PropType<Style>;
|
|
105
|
+
default: undefined;
|
|
106
|
+
};
|
|
107
|
+
clear: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
}>> & Readonly<{
|
|
112
|
+
onPointerenter?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
onPointerleave?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
onPointerenterCapture?: ((...args: any[]) => any) | undefined;
|
|
115
|
+
onPointerleaveCapture?: ((...args: any[]) => any) | undefined;
|
|
116
|
+
}>, {
|
|
117
|
+
style: Readonly<{
|
|
118
|
+
fg?: string;
|
|
119
|
+
bg?: string;
|
|
120
|
+
bold?: boolean;
|
|
121
|
+
dim?: boolean;
|
|
122
|
+
italic?: boolean;
|
|
123
|
+
underline?: boolean;
|
|
124
|
+
inverse?: boolean;
|
|
125
|
+
href?: string;
|
|
126
|
+
}>;
|
|
127
|
+
title: string;
|
|
128
|
+
zIndex: number;
|
|
129
|
+
clear: boolean;
|
|
130
|
+
border: boolean;
|
|
131
|
+
padding: number;
|
|
132
|
+
scrollX: number;
|
|
133
|
+
scrollY: number;
|
|
134
|
+
titleStyle: Readonly<{
|
|
135
|
+
fg?: string;
|
|
136
|
+
bg?: string;
|
|
137
|
+
bold?: boolean;
|
|
138
|
+
dim?: boolean;
|
|
139
|
+
italic?: boolean;
|
|
140
|
+
underline?: boolean;
|
|
141
|
+
inverse?: boolean;
|
|
142
|
+
href?: string;
|
|
143
|
+
}>;
|
|
144
|
+
}, {}>;
|