@agi-fans/dsh-tui 0.21.0 → 0.23.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/LICENSE +26 -0
- package/lib/CHANGELOG.md +356 -1
- package/lib/chrome/box.d.ts +32 -18
- package/lib/chrome/box.js +131 -132
- package/lib/chrome/box.js.map +1 -1
- package/lib/chrome/code-highlight.d.ts +15 -0
- package/lib/chrome/code-highlight.js +61 -5
- package/lib/chrome/code-highlight.js.map +1 -1
- package/lib/chrome/command-output.d.ts +28 -2
- package/lib/chrome/command-output.js +106 -4
- package/lib/chrome/command-output.js.map +1 -1
- package/lib/chrome/goal-bar.js +1 -1
- package/lib/chrome/goal-bar.js.map +1 -1
- package/lib/chrome/main-screen-renderer.d.ts +16 -0
- package/lib/chrome/main-screen-renderer.js +57 -8
- package/lib/chrome/main-screen-renderer.js.map +1 -1
- package/lib/chrome/markdown.d.ts +3 -3
- package/lib/chrome/markdown.js +101 -32
- package/lib/chrome/markdown.js.map +1 -1
- package/lib/chrome/md-style.d.ts +5 -2
- package/lib/chrome/md-style.js +13 -4
- package/lib/chrome/md-style.js.map +1 -1
- package/lib/chrome/relative-time.d.ts +17 -0
- package/lib/chrome/relative-time.js +36 -0
- package/lib/chrome/relative-time.js.map +1 -1
- package/lib/chrome/renderer.d.ts +37 -1
- package/lib/chrome/renderer.js.map +1 -1
- package/lib/chrome/secret-mask.d.ts +35 -0
- package/lib/chrome/secret-mask.js +180 -0
- package/lib/chrome/secret-mask.js.map +1 -0
- package/lib/chrome/status-config.d.ts +161 -51
- package/lib/chrome/status-config.js +237 -126
- package/lib/chrome/status-config.js.map +1 -1
- package/lib/chrome/status-line.d.ts +6 -5
- package/lib/chrome/status-line.js +110 -68
- package/lib/chrome/status-line.js.map +1 -1
- package/lib/chrome/terminal-colors.d.ts +85 -0
- package/lib/chrome/terminal-colors.js +230 -0
- package/lib/chrome/terminal-colors.js.map +1 -0
- package/lib/chrome/terminal-images.d.ts +9 -1
- package/lib/chrome/terminal-images.js +27 -4
- package/lib/chrome/terminal-images.js.map +1 -1
- package/lib/chrome/theme.d.ts +38 -10
- package/lib/chrome/theme.js +537 -542
- package/lib/chrome/theme.js.map +1 -1
- package/lib/chrome/tool-renderers.js +69 -13
- package/lib/chrome/tool-renderers.js.map +1 -1
- package/lib/chrome/tools-list.d.ts +1 -4
- package/lib/chrome/tools-list.js +1 -41
- package/lib/chrome/tools-list.js.map +1 -1
- package/lib/commands/auth-account.d.ts +9 -0
- package/lib/commands/auth-account.js +202 -0
- package/lib/commands/auth-account.js.map +1 -0
- package/lib/commands/auth-ids.d.ts +25 -0
- package/lib/commands/auth-ids.js +27 -0
- package/lib/commands/auth-ids.js.map +1 -0
- package/lib/commands/auth-input.d.ts +34 -0
- package/lib/commands/auth-input.js +96 -0
- package/lib/commands/auth-input.js.map +1 -0
- package/lib/commands/auth-providers.d.ts +39 -0
- package/lib/commands/auth-providers.js +125 -0
- package/lib/commands/auth-providers.js.map +1 -0
- package/lib/commands/auth.d.ts +12 -20
- package/lib/commands/auth.js +264 -627
- package/lib/commands/auth.js.map +1 -1
- package/lib/commands/btw.d.ts +13 -1
- package/lib/commands/btw.js +37 -104
- package/lib/commands/btw.js.map +1 -1
- package/lib/commands/diff.js +23 -112
- package/lib/commands/diff.js.map +1 -1
- package/lib/commands/export.d.ts +0 -1
- package/lib/commands/export.js +98 -57
- package/lib/commands/export.js.map +1 -1
- package/lib/commands/files.d.ts +17 -1
- package/lib/commands/files.js +68 -114
- package/lib/commands/files.js.map +1 -1
- package/lib/commands/integrations.d.ts +12 -1
- package/lib/commands/integrations.js +120 -23
- package/lib/commands/integrations.js.map +1 -1
- package/lib/commands/jobs-browser.d.ts +3 -0
- package/lib/commands/jobs-browser.js +152 -0
- package/lib/commands/jobs-browser.js.map +1 -0
- package/lib/commands/jobs.d.ts +12 -8
- package/lib/commands/jobs.js +65 -14
- package/lib/commands/jobs.js.map +1 -1
- package/lib/commands/model.d.ts +3 -0
- package/lib/commands/model.js +223 -114
- package/lib/commands/model.js.map +1 -1
- package/lib/commands/open-external.d.ts +2 -0
- package/lib/commands/open-external.js +19 -0
- package/lib/commands/open-external.js.map +1 -0
- package/lib/commands/permission.js +70 -60
- package/lib/commands/permission.js.map +1 -1
- package/lib/commands/plugins.js +427 -68
- package/lib/commands/plugins.js.map +1 -1
- package/lib/commands/schedule-catalog.d.ts +12 -0
- package/lib/commands/schedule-catalog.js +41 -0
- package/lib/commands/schedule-catalog.js.map +1 -0
- package/lib/commands/schedule-history.d.ts +4 -0
- package/lib/commands/schedule-history.js +62 -0
- package/lib/commands/schedule-history.js.map +1 -0
- package/lib/commands/schedule.d.ts +16 -9
- package/lib/commands/schedule.js +226 -162
- package/lib/commands/schedule.js.map +1 -1
- package/lib/commands/session-configuration.d.ts +3 -0
- package/lib/commands/session-configuration.js +58 -32
- package/lib/commands/session-configuration.js.map +1 -1
- package/lib/commands/session.js +118 -97
- package/lib/commands/session.js.map +1 -1
- package/lib/commands/terminal.d.ts +14 -8
- package/lib/commands/terminal.js +32 -185
- package/lib/commands/terminal.js.map +1 -1
- package/lib/commands/trajectory.js +4 -1
- package/lib/commands/trajectory.js.map +1 -1
- package/lib/definition.d.ts +226 -29
- package/lib/definition.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/input/actions.d.ts +51 -0
- package/lib/input/actions.js +123 -0
- package/lib/input/actions.js.map +1 -0
- package/lib/input/composer-files.d.ts +2 -0
- package/lib/input/composer-files.js +13 -3
- package/lib/input/composer-files.js.map +1 -1
- package/lib/input/editor.d.ts +0 -10
- package/lib/input/editor.js +11 -9
- package/lib/input/editor.js.map +1 -1
- package/lib/input/image-paste.d.ts +12 -1
- package/lib/input/image-paste.js +86 -1
- package/lib/input/image-paste.js.map +1 -1
- package/lib/input/key-test.d.ts +5 -0
- package/lib/input/key-test.js +19 -0
- package/lib/input/key-test.js.map +1 -0
- package/lib/input/keybindings-config.d.ts +12 -5
- package/lib/input/keybindings-config.js +30 -57
- package/lib/input/keybindings-config.js.map +1 -1
- package/lib/input/keys.d.ts +18 -0
- package/lib/input/keys.js +42 -4
- package/lib/input/keys.js.map +1 -1
- package/lib/input/wheel-scroll.d.ts +46 -0
- package/lib/input/wheel-scroll.js +69 -0
- package/lib/input/wheel-scroll.js.map +1 -0
- package/lib/locale/index.d.ts +6 -0
- package/lib/locale/index.js +32 -0
- package/lib/locale/index.js.map +1 -0
- package/lib/locale/prompt.d.ts +4 -0
- package/lib/locale/prompt.js +24 -0
- package/lib/locale/prompt.js.map +1 -0
- package/lib/locale/zh.d.ts +1114 -0
- package/lib/locale/zh.js +1115 -0
- package/lib/locale/zh.js.map +1 -0
- package/lib/prompt-intents.d.ts +186 -0
- package/lib/prompt-intents.js +131 -0
- package/lib/prompt-intents.js.map +1 -0
- package/lib/runtime/account-settings.d.ts +18 -0
- package/lib/runtime/account-settings.js +241 -0
- package/lib/runtime/account-settings.js.map +1 -0
- package/lib/runtime/agent-profile.d.ts +3 -3
- package/lib/runtime/agent-profile.js +4 -4
- package/lib/runtime/agent-profile.js.map +1 -1
- package/lib/runtime/btw-policy.js +2 -1
- package/lib/runtime/btw-policy.js.map +1 -1
- package/lib/runtime/btw.js +1 -2
- package/lib/runtime/btw.js.map +1 -1
- package/lib/runtime/cancellable.d.ts +75 -0
- package/lib/runtime/cancellable.js +76 -0
- package/lib/runtime/cancellable.js.map +1 -0
- package/lib/runtime/composer-images.d.ts +2 -2
- package/lib/runtime/composer-images.js +7 -6
- package/lib/runtime/composer-images.js.map +1 -1
- package/lib/runtime/composer-shell.d.ts +17 -2
- package/lib/runtime/composer-shell.js +133 -41
- package/lib/runtime/composer-shell.js.map +1 -1
- package/lib/runtime/file-browser.d.ts +19 -0
- package/lib/runtime/file-browser.js +291 -0
- package/lib/runtime/file-browser.js.map +1 -0
- package/lib/runtime/file-recovery-review.d.ts +0 -1
- package/lib/runtime/file-recovery-review.js +29 -30
- package/lib/runtime/file-recovery-review.js.map +1 -1
- package/lib/runtime/file-recovery-store.js +5 -1
- package/lib/runtime/file-recovery-store.js.map +1 -1
- package/lib/runtime/file-review.d.ts +6 -9
- package/lib/runtime/file-review.js +92 -8
- package/lib/runtime/file-review.js.map +1 -1
- package/lib/runtime/help-reader.d.ts +12 -0
- package/lib/runtime/help-reader.js +50 -0
- package/lib/runtime/help-reader.js.map +1 -0
- package/lib/runtime/hook-settings.d.ts +2 -2
- package/lib/runtime/human-interaction.js +1 -1
- package/lib/runtime/human-interaction.js.map +1 -1
- package/lib/runtime/model-catalog-editor.d.ts +12 -0
- package/lib/runtime/model-catalog-editor.js +215 -0
- package/lib/runtime/model-catalog-editor.js.map +1 -0
- package/lib/runtime/model-settings.d.ts +11 -0
- package/lib/runtime/model-settings.js +404 -0
- package/lib/runtime/model-settings.js.map +1 -0
- package/lib/runtime/plain-tui.d.ts +2 -0
- package/lib/runtime/plain-tui.js +7 -1
- package/lib/runtime/plain-tui.js.map +1 -1
- package/lib/runtime/plugin-settings.d.ts +4 -1
- package/lib/runtime/plugin-settings.js +170 -92
- package/lib/runtime/plugin-settings.js.map +1 -1
- package/lib/runtime/prompt-browser.d.ts +9 -0
- package/lib/runtime/prompt-browser.js +19 -0
- package/lib/runtime/prompt-browser.js.map +1 -0
- package/lib/runtime/provider-local.d.ts +80 -38
- package/lib/runtime/provider-local.js +2280 -683
- package/lib/runtime/provider-local.js.map +1 -1
- package/lib/runtime/reference-reader.d.ts +15 -0
- package/lib/runtime/reference-reader.js +78 -0
- package/lib/runtime/reference-reader.js.map +1 -0
- package/lib/runtime/runner.js +42 -39
- package/lib/runtime/runner.js.map +1 -1
- package/lib/runtime/session-runtime.js +1 -1
- package/lib/runtime/session-runtime.js.map +1 -1
- package/lib/runtime/settings-draft.d.ts +21 -0
- package/lib/runtime/settings-draft.js +166 -0
- package/lib/runtime/settings-draft.js.map +1 -0
- package/lib/runtime/settings-preferences.js +1 -1
- package/lib/runtime/settings-preferences.js.map +1 -1
- package/lib/runtime/startup-notices.d.ts +0 -1
- package/lib/runtime/startup-notices.js +35 -4
- package/lib/runtime/startup-notices.js.map +1 -1
- package/lib/runtime/subagent-model-selection.js +2 -1
- package/lib/runtime/subagent-model-selection.js.map +1 -1
- package/lib/runtime/subagent-settings.d.ts +14 -0
- package/lib/runtime/subagent-settings.js +288 -0
- package/lib/runtime/subagent-settings.js.map +1 -0
- package/lib/runtime/terminal-modes.d.ts +47 -0
- package/lib/runtime/terminal-modes.js +86 -0
- package/lib/runtime/terminal-modes.js.map +1 -0
- package/lib/runtime/terminal-notifications.d.ts +6 -5
- package/lib/runtime/terminal-notifications.js +17 -16
- package/lib/runtime/terminal-notifications.js.map +1 -1
- package/lib/runtime/terminal-probe.d.ts +38 -0
- package/lib/runtime/terminal-probe.js +46 -0
- package/lib/runtime/terminal-probe.js.map +1 -0
- package/lib/runtime/terminal-session.d.ts +57 -0
- package/lib/runtime/terminal-session.js +164 -0
- package/lib/runtime/terminal-session.js.map +1 -0
- package/lib/runtime/tool-presentation.js.map +1 -1
- package/lib/runtime/tool-reader.d.ts +5 -0
- package/lib/runtime/tool-reader.js +27 -0
- package/lib/runtime/tool-reader.js.map +1 -0
- package/lib/runtime/web-settings.d.ts +14 -0
- package/lib/runtime/web-settings.js +339 -0
- package/lib/runtime/web-settings.js.map +1 -0
- package/lib/session/command-attachments.d.ts +17 -0
- package/lib/session/command-attachments.js +50 -0
- package/lib/session/command-attachments.js.map +1 -0
- package/lib/session/context-diagnostics.d.ts +16 -0
- package/lib/session/context-diagnostics.js +15 -0
- package/lib/session/context-diagnostics.js.map +1 -1
- package/lib/session/external-agents.d.ts +3 -1
- package/lib/session/external-agents.js +35 -10
- package/lib/session/external-agents.js.map +1 -1
- package/lib/session/generation-continuation.d.ts +11 -0
- package/lib/session/generation-continuation.js +34 -0
- package/lib/session/generation-continuation.js.map +1 -0
- package/lib/session/goal-controls.d.ts +5 -0
- package/lib/session/goal-controls.js +81 -0
- package/lib/session/goal-controls.js.map +1 -0
- package/lib/session/interaction-adapter.d.ts +7 -3
- package/lib/session/interaction-adapter.js +125 -54
- package/lib/session/interaction-adapter.js.map +1 -1
- package/lib/session/message-queue.d.ts +2 -0
- package/lib/session/message-queue.js +102 -17
- package/lib/session/message-queue.js.map +1 -1
- package/lib/session/package-metadata.d.ts +8 -0
- package/lib/session/package-metadata.js +8 -0
- package/lib/session/package-metadata.js.map +1 -1
- package/lib/session/pending-inputs.d.ts +30 -0
- package/lib/session/pending-inputs.js +183 -0
- package/lib/session/pending-inputs.js.map +1 -0
- package/lib/session/session-configuration.js +1 -1
- package/lib/session/session-configuration.js.map +1 -1
- package/lib/session/session-controller.d.ts +42 -24
- package/lib/session/session-controller.js +534 -106
- package/lib/session/session-controller.js.map +1 -1
- package/lib/session/session-tree.d.ts +2 -0
- package/lib/session/session-tree.js +2 -0
- package/lib/session/session-tree.js.map +1 -1
- package/lib/session/subagent-roster.d.ts +1 -0
- package/lib/session/subagent-roster.js +16 -5
- package/lib/session/subagent-roster.js.map +1 -1
- package/lib/session/subagent-tracker.d.ts +2 -0
- package/lib/session/subagent-tracker.js +18 -0
- package/lib/session/subagent-tracker.js.map +1 -1
- package/lib/session/tui-settings.d.ts +48 -15
- package/lib/session/tui-settings.js +75 -34
- package/lib/session/tui-settings.js.map +1 -1
- package/lib/session/workflow-projection.d.ts +2 -1
- package/lib/session/workflow-projection.js +34 -4
- package/lib/session/workflow-projection.js.map +1 -1
- package/lib/views/autocomplete.d.ts +28 -9
- package/lib/views/autocomplete.js +90 -70
- package/lib/views/autocomplete.js.map +1 -1
- package/lib/views/context-overview.d.ts +4 -0
- package/lib/views/context-overview.js +43 -0
- package/lib/views/context-overview.js.map +1 -0
- package/lib/views/copy-targets.d.ts +18 -15
- package/lib/views/copy-targets.js +35 -60
- package/lib/views/copy-targets.js.map +1 -1
- package/lib/views/document-reader.d.ts +10 -1
- package/lib/views/document-reader.js +76 -9
- package/lib/views/document-reader.js.map +1 -1
- package/lib/views/event-views.js +71 -17
- package/lib/views/event-views.js.map +1 -1
- package/lib/views/file-actions.js +21 -0
- package/lib/views/file-actions.js.map +1 -1
- package/lib/views/file-browser.d.ts +98 -0
- package/lib/views/file-browser.js +120 -0
- package/lib/views/file-browser.js.map +1 -0
- package/lib/views/history-search.js +19 -25
- package/lib/views/history-search.js.map +1 -1
- package/lib/views/hotkey-format.d.ts +3 -2
- package/lib/views/hotkey-format.js +4 -3
- package/lib/views/hotkey-format.js.map +1 -1
- package/lib/views/hotkeys.d.ts +7 -1
- package/lib/views/hotkeys.js +59 -37
- package/lib/views/hotkeys.js.map +1 -1
- package/lib/views/list-navigation.d.ts +62 -0
- package/lib/views/list-navigation.js +73 -0
- package/lib/views/list-navigation.js.map +1 -0
- package/lib/views/list-view.d.ts +99 -0
- package/lib/views/list-view.js +170 -0
- package/lib/views/list-view.js.map +1 -0
- package/lib/views/prompt-selector.d.ts +54 -4
- package/lib/views/prompt-selector.js +349 -162
- package/lib/views/prompt-selector.js.map +1 -1
- package/lib/views/session-files.d.ts +1 -2
- package/lib/views/session-files.js +1 -11
- package/lib/views/session-files.js.map +1 -1
- package/lib/views/settings-list.d.ts +16 -9
- package/lib/views/settings-list.js +171 -315
- package/lib/views/settings-list.js.map +1 -1
- package/lib/views/tool-actions.d.ts +16 -0
- package/lib/views/tool-actions.js +29 -0
- package/lib/views/tool-actions.js.map +1 -0
- package/lib/views/trajectory-timeline.d.ts +71 -0
- package/lib/views/trajectory-timeline.js +143 -0
- package/lib/views/trajectory-timeline.js.map +1 -0
- package/lib/views/trajectory.d.ts +36 -4
- package/lib/views/trajectory.js +842 -190
- package/lib/views/trajectory.js.map +1 -1
- package/lib/views/transcript-render.d.ts +132 -38
- package/lib/views/transcript-render.js +792 -260
- package/lib/views/transcript-render.js.map +1 -1
- package/lib/views/transcript-search.d.ts +39 -6
- package/lib/views/transcript-search.js +46 -11
- package/lib/views/transcript-search.js.map +1 -1
- package/lib/views/transcript-types.d.ts +64 -5
- package/lib/views/transcript-types.js +23 -11
- package/lib/views/transcript-types.js.map +1 -1
- package/lib/views/workflow.d.ts +16 -0
- package/lib/views/workflow.js +42 -0
- package/lib/views/workflow.js.map +1 -0
- package/package.json +74 -90
- package/lib/chrome/welcome-tips.d.ts +0 -11
- package/lib/chrome/welcome-tips.js +0 -44
- package/lib/chrome/welcome-tips.js.map +0 -1
- package/lib/commands/advisor.d.ts +0 -15
- package/lib/commands/advisor.js +0 -200
- package/lib/commands/advisor.js.map +0 -1
- package/lib/commands/loop.d.ts +0 -52
- package/lib/commands/loop.js +0 -307
- package/lib/commands/loop.js.map +0 -1
- package/lib/commands/rate.d.ts +0 -33
- package/lib/commands/rate.js +0 -212
- package/lib/commands/rate.js.map +0 -1
- package/lib/commands/steer.d.ts +0 -5
- package/lib/commands/steer.js +0 -24
- package/lib/commands/steer.js.map +0 -1
- package/lib/commands/worktree.d.ts +0 -5
- package/lib/commands/worktree.js +0 -103
- package/lib/commands/worktree.js.map +0 -1
- package/lib/runtime/terminal-reader.d.ts +0 -11
- package/lib/runtime/terminal-reader.js +0 -87
- package/lib/runtime/terminal-reader.js.map +0 -1
- package/lib/session/steering.d.ts +0 -3
- package/lib/session/steering.js +0 -9
- package/lib/session/steering.js.map +0 -1
- package/lib/views/agent-hub.d.ts +0 -32
- package/lib/views/agent-hub.js +0 -209
- package/lib/views/agent-hub.js.map +0 -1
- package/lib/views/copy-selector.d.ts +0 -54
- package/lib/views/copy-selector.js +0 -170
- package/lib/views/copy-selector.js.map +0 -1
|
@@ -1,159 +1,270 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Status-line customization shared by settings, persistence, and rendering.
|
|
3
|
+
*
|
|
4
|
+
* The footer is two rows of fixed copy. This module owns *which* parts of those
|
|
5
|
+
* rows appear and how much of each telemetry group is shown — nothing more.
|
|
6
|
+
*
|
|
7
|
+
* There used to be a layout engine here: twelve independently placed items, each
|
|
8
|
+
* with its own colour, its own column, and two levels of ordering, plus a legacy
|
|
9
|
+
* `metrics` colour slot for groups that had no colour of their own. That is a
|
|
10
|
+
* page of settings for a two-line footer, and it asked the reader to decide
|
|
11
|
+
* things the footer could decide better. The reader now picks a density, and can
|
|
12
|
+
* turn individual telemetry groups off when a terminal is narrow or a metric is
|
|
13
|
+
* not interesting to them.
|
|
14
|
+
*
|
|
3
15
|
* @module @agi-fans/dsh-tui/status-config
|
|
4
16
|
*/
|
|
5
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Telemetry groups on the second line, in the order they are shown.
|
|
19
|
+
*
|
|
20
|
+
* The order is fixed and follows the priority stated in `AGENTS.md`: cache,
|
|
21
|
+
* tokens, and latency first because they say how the turn is going; durations
|
|
22
|
+
* second; turn and step counts last, because they are the least actionable.
|
|
23
|
+
*/
|
|
6
24
|
export const STATUS_GROUP_IDS = ['context', 'cache', 'tokens', 'speed', 'durations', 'counts'];
|
|
7
25
|
/** First-line pieces: model, reasoning effort, workspace path, Git branch, and session title. */
|
|
8
26
|
export const STATUS_META_IDS = ['model', 'effort', 'path', 'git', 'session'];
|
|
9
|
-
/** Every
|
|
27
|
+
/** Every part of the footer a reader can show or hide. */
|
|
10
28
|
export const STATUS_ITEM_IDS = [...STATUS_META_IDS, ...STATUS_GROUP_IDS];
|
|
11
29
|
export const STATUS_LABEL_STYLES = ['compact', 'full'];
|
|
30
|
+
/** How context occupancy is written, which is a rendering choice, not a layout one. */
|
|
12
31
|
export const STATUS_CONTEXT_STYLES = ['percent', 'bar', 'tokens', 'detailed'];
|
|
13
32
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
33
|
+
* How much the footer says.
|
|
34
|
+
*
|
|
35
|
+
* A density is the whole vocabulary now: three whole-footer shapes a reader can
|
|
36
|
+
* recognize, instead of twelve items they have to assemble. Individual groups
|
|
37
|
+
* can still be hidden on top of one, which is the one per-item decision that
|
|
38
|
+
* survives — "I do not care about this number" is real, "put this number on the
|
|
39
|
+
* left in accent green" is chrome nobody asked for.
|
|
16
40
|
*/
|
|
17
|
-
export const
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
context
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
speed: 'left',
|
|
32
|
-
durations: 'right',
|
|
33
|
-
counts: 'right',
|
|
34
|
-
};
|
|
35
|
-
/** Legacy value accepted while existing settings documents migrate. */
|
|
36
|
-
export const STATUS_PRESETS = ['minimal', 'compact', 'full'];
|
|
37
|
-
export const DEFAULT_STATUS_GROUPS = STATUS_GROUP_IDS;
|
|
41
|
+
export const STATUS_DENSITIES = ['minimal', 'standard', 'verbose'];
|
|
42
|
+
/**
|
|
43
|
+
* Which telemetry row each group is drawn on.
|
|
44
|
+
*
|
|
45
|
+
* Two rows exist so the widest density can state everything without dropping
|
|
46
|
+
* anything: the first row is the window and the turn in flight, the second is
|
|
47
|
+
* what the session has accumulated. `minimal` and `standard` only fill the first
|
|
48
|
+
* row, so their footer stays two lines; the row is a property of the group, not
|
|
49
|
+
* of the density, so nothing moves between rows when the density changes.
|
|
50
|
+
*/
|
|
51
|
+
export const STATUS_ROWS = [
|
|
52
|
+
['context', 'cache', 'tokens', 'speed'],
|
|
53
|
+
['durations', 'counts'],
|
|
54
|
+
];
|
|
38
55
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
56
|
+
* Groups drawn against the left edge of their row.
|
|
57
|
+
*
|
|
58
|
+
* A row answers two questions from opposite edges, and each side keeps its
|
|
59
|
+
* meaning down the footer: occupancy and the time already spent read on the
|
|
60
|
+
* left, throughput and the count of work done on the right.
|
|
42
61
|
*/
|
|
43
|
-
export const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
export const STATUS_LEFT_GROUPS = ['context', 'cache', 'durations'];
|
|
63
|
+
/** Which telemetry row a group is drawn on; 0 is the row under the composer. */
|
|
64
|
+
export function statusGroupRow(id) {
|
|
65
|
+
const row = STATUS_ROWS.findIndex(groups => groups.includes(id));
|
|
66
|
+
return row < 0 ? 0 : row;
|
|
67
|
+
}
|
|
68
|
+
/** Which side of its row a group is drawn on. */
|
|
69
|
+
export function statusGroupSide(id) {
|
|
70
|
+
return STATUS_LEFT_GROUPS.includes(id) ? 'left' : 'right';
|
|
71
|
+
}
|
|
72
|
+
/** Which groups each density shows, in footer order. */
|
|
73
|
+
export const DENSITY_GROUPS = {
|
|
74
|
+
/** Occupancy only: how full the window is and how much of it came from cache. */
|
|
75
|
+
minimal: ['context', 'cache'],
|
|
76
|
+
/** Adds latency — the first number that says a turn feels slow rather than long. */
|
|
77
|
+
standard: ['context', 'cache', 'speed'],
|
|
78
|
+
/** Every group, with full labels and the detailed context form. */
|
|
79
|
+
verbose: [...STATUS_GROUP_IDS],
|
|
57
80
|
};
|
|
58
|
-
/**
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
/** Which first-line pieces each density shows. */
|
|
82
|
+
export const DENSITY_META = {
|
|
83
|
+
/** Where the model is and where the work is; the footer's original two facts. */
|
|
84
|
+
minimal: ['model', 'path'],
|
|
85
|
+
standard: ['model', 'effort', 'path', 'git'],
|
|
86
|
+
/** `session` joins at the widest setting; the terminal title shows it anyway. */
|
|
87
|
+
verbose: ['model', 'effort', 'path', 'git', 'session'],
|
|
88
|
+
};
|
|
89
|
+
/** The label style each density defaults to. */
|
|
90
|
+
export const DENSITY_LABELS = {
|
|
91
|
+
minimal: 'compact',
|
|
92
|
+
standard: 'compact',
|
|
93
|
+
verbose: 'full',
|
|
94
|
+
};
|
|
95
|
+
/** The context representation each density defaults to. */
|
|
96
|
+
export const DENSITY_CONTEXT = {
|
|
97
|
+
minimal: 'percent',
|
|
98
|
+
standard: 'percent',
|
|
99
|
+
verbose: 'detailed',
|
|
100
|
+
};
|
|
101
|
+
export const DEFAULT_STATUS_DENSITY = 'standard';
|
|
102
|
+
/** Earlier releases stored a three-value `statusPreset` beside the layout. */
|
|
103
|
+
export const STATUS_PRESETS = ['minimal', 'compact', 'full'];
|
|
104
|
+
/** Everything shown at the shipped density. */
|
|
105
|
+
export const DEFAULT_STATUS_GROUPS = DENSITY_GROUPS[DEFAULT_STATUS_DENSITY];
|
|
106
|
+
export const DEFAULT_STATUS_META = DENSITY_META[DEFAULT_STATUS_DENSITY];
|
|
107
|
+
function isStatusDensity(value) {
|
|
108
|
+
return typeof value === 'string' && STATUS_DENSITIES.includes(value);
|
|
73
109
|
}
|
|
74
|
-
function
|
|
75
|
-
return typeof value === 'string' &&
|
|
110
|
+
export function isStatusItemId(value) {
|
|
111
|
+
return typeof value === 'string' && STATUS_ITEM_IDS.includes(value);
|
|
76
112
|
}
|
|
77
113
|
export function isStatusMetaId(value) {
|
|
78
114
|
return typeof value === 'string' && STATUS_META_IDS.includes(value);
|
|
79
115
|
}
|
|
80
|
-
export function
|
|
81
|
-
return typeof value === 'string' &&
|
|
116
|
+
export function isStatusGroupId(value) {
|
|
117
|
+
return typeof value === 'string' && STATUS_GROUP_IDS.includes(value);
|
|
82
118
|
}
|
|
83
|
-
|
|
84
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Map a retired `statusPreset` onto a density.
|
|
121
|
+
*
|
|
122
|
+
* `minimal` meant "no second line"; that is now `minimal` density with telemetry
|
|
123
|
+
* hidden, which is the same footer the reader had. `full` meant long labels,
|
|
124
|
+
* which is what `verbose` says.
|
|
125
|
+
*/
|
|
126
|
+
function densityFromPreset(preset) {
|
|
127
|
+
if (preset === 'minimal')
|
|
128
|
+
return { density: 'minimal', enabled: false };
|
|
129
|
+
if (preset === 'full')
|
|
130
|
+
return { density: 'verbose', enabled: true };
|
|
131
|
+
return { density: DEFAULT_STATUS_DENSITY, enabled: true };
|
|
85
132
|
}
|
|
86
|
-
|
|
87
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Normalize persisted input at the single configuration seam.
|
|
135
|
+
*
|
|
136
|
+
* A document written by an earlier release described its layout item by item.
|
|
137
|
+
* Rather than fail it or resurrect the engine, the shape it asked for is reduced
|
|
138
|
+
* to the nearest density: what was visible decides the narrowing, and the retired
|
|
139
|
+
* per-item colour and column choices are dropped, because both shipped palettes
|
|
140
|
+
* already paint them the right way.
|
|
141
|
+
*/
|
|
142
|
+
export function resolveStatusBarConfig(config, legacyPreset) {
|
|
143
|
+
const fallback = densityFromPreset(legacyPreset);
|
|
144
|
+
if (config === undefined)
|
|
145
|
+
return expand(fallback.density, { enabled: fallback.enabled, hidden: [] });
|
|
146
|
+
const density = isStatusDensity(config.density) ? config.density : fallback.density;
|
|
147
|
+
/**
|
|
148
|
+
* A legacy document listed what it wanted shown; a current one lists what it
|
|
149
|
+
* wants hidden. Both cannot be read from `density`: the schema defaults that
|
|
150
|
+
* field, so an old document arrives here already looking current, while the
|
|
151
|
+
* layout arrays only exist on an old one.
|
|
152
|
+
*/
|
|
153
|
+
const enabled = typeof config.enabled === 'boolean' ? config.enabled : fallback.enabled;
|
|
154
|
+
return expand(density, { enabled, hidden: statusNarrowing(config, density), shown: statusAdditions(config) });
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* What a stored document asks to hide, relative to its density.
|
|
158
|
+
*
|
|
159
|
+
* Exported because writing the document back needs the same reading: a caller
|
|
160
|
+
* that reconstructed the narrowing from the *rendered* footer instead would turn
|
|
161
|
+
* every part its density happens to omit into a permanent hiding, and changing
|
|
162
|
+
* the density afterwards would no longer restore them.
|
|
163
|
+
*/
|
|
164
|
+
export function statusNarrowing(config, density) {
|
|
165
|
+
if (config === undefined)
|
|
166
|
+
return [];
|
|
167
|
+
const legacyLayout = config.groups !== undefined || config.meta !== undefined
|
|
168
|
+
|| config.order !== undefined || config.metaOrder !== undefined;
|
|
169
|
+
return legacyLayout
|
|
170
|
+
? legacyHidden(config, density)
|
|
171
|
+
: [...new Set((config.hidden ?? []).filter(isStatusItemId))];
|
|
88
172
|
}
|
|
89
|
-
|
|
90
|
-
|
|
173
|
+
/** What a stored document adds beyond its density. */
|
|
174
|
+
export function statusAdditions(config) {
|
|
175
|
+
return [...new Set((config?.shown ?? []).filter(isStatusItemId))];
|
|
91
176
|
}
|
|
92
|
-
|
|
93
|
-
|
|
177
|
+
/** What an earlier release's explicit lists hid, expressed as a narrowing. */
|
|
178
|
+
function legacyHidden(config, density) {
|
|
179
|
+
const shownGroups = config.groups === undefined ? DENSITY_GROUPS[density] : config.groups;
|
|
180
|
+
const shownMeta = config.meta === undefined ? DENSITY_META[density] : config.meta;
|
|
181
|
+
const hidden = [];
|
|
182
|
+
for (const id of STATUS_GROUP_IDS)
|
|
183
|
+
if (!shownGroups.includes(id))
|
|
184
|
+
hidden.push(id);
|
|
185
|
+
for (const id of STATUS_META_IDS)
|
|
186
|
+
if (!shownMeta.includes(id))
|
|
187
|
+
hidden.push(id);
|
|
188
|
+
return hidden;
|
|
94
189
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
190
|
+
/**
|
|
191
|
+
* True when a document has already been expanded.
|
|
192
|
+
*
|
|
193
|
+
* `resolveStatusBarConfig` is idempotent only if it can tell the two shapes
|
|
194
|
+
* apart: an expanded config carries `groups`/`meta`, which a stored document
|
|
195
|
+
* never does. Without this the renderer re-resolved its own input and silently
|
|
196
|
+
* dropped every narrowing, so a hidden group came back.
|
|
197
|
+
*/
|
|
198
|
+
export function isResolvedStatusBarConfig(config) {
|
|
199
|
+
return Array.isArray(config.groups)
|
|
200
|
+
&& Array.isArray(config.meta)
|
|
201
|
+
&& typeof config.enabled === 'boolean';
|
|
202
|
+
}
|
|
203
|
+
/** Expand one density plus its deltas into the renderer's view. */
|
|
204
|
+
function expand(density, options) {
|
|
205
|
+
const hidden = new Set(options.hidden);
|
|
206
|
+
const shown = new Set(options.shown ?? []);
|
|
207
|
+
// Catalog order, so a part the reader added sits where its family sits rather
|
|
208
|
+
// than at the end of the row where it would move every time it is toggled.
|
|
209
|
+
const visible = (catalog, base) => catalog.filter(id => (base.includes(id) || shown.has(id)) && !hidden.has(id));
|
|
210
|
+
return {
|
|
211
|
+
density,
|
|
212
|
+
enabled: options.enabled,
|
|
213
|
+
labels: DENSITY_LABELS[density],
|
|
214
|
+
contextStyle: DENSITY_CONTEXT[density],
|
|
215
|
+
groups: visible(STATUS_GROUP_IDS, DENSITY_GROUPS[density]),
|
|
216
|
+
meta: visible(STATUS_META_IDS, DENSITY_META[density]),
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The document a resolved config came from.
|
|
221
|
+
*
|
|
222
|
+
* Visibility cannot say which of two reasons a part is missing: the reader hid
|
|
223
|
+
* it, or the density never included it. Rebuilding the document from what the
|
|
224
|
+
* footer shows therefore has to keep them apart — a part the density omits must
|
|
225
|
+
* stay out of `hidden`, or raising the density would silently do nothing — and it
|
|
226
|
+
* is the only way a caller that holds the resolved form (the provider holds the
|
|
227
|
+
* footer it is drawing) can hand the document back without losing a choice.
|
|
228
|
+
*/
|
|
229
|
+
export function statusBarDocument(config) {
|
|
230
|
+
const densityHas = (id) => isStatusMetaId(id) ? DENSITY_META[config.density].includes(id) : DENSITY_GROUPS[config.density].includes(id);
|
|
231
|
+
const hidden = [];
|
|
232
|
+
const shown = [];
|
|
99
233
|
for (const id of STATUS_ITEM_IDS) {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const ordered = [...new Set(preferred.filter((id) => ids.includes(id)))];
|
|
108
|
-
return [...ordered, ...ids.filter(id => !ordered.includes(id))];
|
|
109
|
-
}
|
|
110
|
-
function resolveStatusColors(colors) {
|
|
111
|
-
const resolved = { ...DEFAULT_STATUS_COLORS };
|
|
112
|
-
if (colors === undefined)
|
|
113
|
-
return resolved;
|
|
114
|
-
for (const slot of STATUS_COLOR_SLOTS) {
|
|
115
|
-
const token = colors[slot];
|
|
116
|
-
if (isStatusColorToken(token))
|
|
117
|
-
resolved[slot] = token;
|
|
118
|
-
}
|
|
119
|
-
const legacyMetrics = resolved.metrics;
|
|
120
|
-
if (legacyMetrics !== 'default') {
|
|
121
|
-
for (const group of STATUS_GROUP_IDS) {
|
|
122
|
-
if (colors[group] === undefined)
|
|
123
|
-
resolved[group] = legacyMetrics;
|
|
124
|
-
}
|
|
234
|
+
const visible = statusItemVisible(config, id);
|
|
235
|
+
if (visible === densityHas(id))
|
|
236
|
+
continue;
|
|
237
|
+
if (visible)
|
|
238
|
+
shown.push(id);
|
|
239
|
+
else
|
|
240
|
+
hidden.push(id);
|
|
125
241
|
}
|
|
126
|
-
return
|
|
242
|
+
return { density: config.density, hidden, shown, enabled: config.enabled };
|
|
243
|
+
}
|
|
244
|
+
/** True when the footer shows this part at the current narrowing. */
|
|
245
|
+
export function statusItemVisible(config, id) {
|
|
246
|
+
return isStatusMetaId(id) ? config.meta.includes(id) : config.groups.includes(id);
|
|
127
247
|
}
|
|
128
248
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
249
|
+
* The same document with one part turned on or off.
|
|
250
|
+
*
|
|
251
|
+
* Both directions are deltas from the density, so a part the density omits can
|
|
252
|
+
* be added and a part it includes can be removed, without either one rewriting
|
|
253
|
+
* the other's state.
|
|
131
254
|
*/
|
|
132
|
-
export function
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
255
|
+
export function toggleStatusItem(config, id) {
|
|
256
|
+
const density = isStatusDensity(config.density) ? config.density : DEFAULT_STATUS_DENSITY;
|
|
257
|
+
const hidden = new Set((config.hidden ?? []).filter(isStatusItemId));
|
|
258
|
+
const shown = new Set((config.shown ?? []).filter(isStatusItemId));
|
|
259
|
+
const visible = statusItemVisible(expand(density, { enabled: true, hidden: [...hidden], shown: [...shown] }), id);
|
|
260
|
+
if (visible) {
|
|
261
|
+
hidden.add(id);
|
|
262
|
+
shown.delete(id);
|
|
140
263
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
: [...new Set(config.meta.filter(isStatusMetaId))];
|
|
147
|
-
return {
|
|
148
|
-
enabled: config.enabled ?? true,
|
|
149
|
-
labels: isStatusLabelStyle(config.labels) ? config.labels : 'compact',
|
|
150
|
-
contextStyle: STATUS_CONTEXT_STYLES.includes(config.contextStyle) ? config.contextStyle : 'percent',
|
|
151
|
-
groups,
|
|
152
|
-
order: completeOrder(STATUS_GROUP_IDS, config.order === undefined ? groups : config.order),
|
|
153
|
-
meta,
|
|
154
|
-
metaOrder: completeOrder(STATUS_META_IDS, config.metaOrder === undefined ? meta : config.metaOrder),
|
|
155
|
-
colors: resolveStatusColors(config.colors),
|
|
156
|
-
sides: resolveStatusSides(config.sides),
|
|
157
|
-
};
|
|
264
|
+
else {
|
|
265
|
+
shown.add(id);
|
|
266
|
+
hidden.delete(id);
|
|
267
|
+
}
|
|
268
|
+
return { ...config, hidden: [...hidden], shown: [...shown] };
|
|
158
269
|
}
|
|
159
270
|
//# sourceMappingURL=status-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-config.js","sourceRoot":"","sources":["../../src/chrome/status-config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"status-config.js","sourceRoot":"","sources":["../../src/chrome/status-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO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KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,CAAA;AAC9D,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Fixed two-line session footer rendered below the composer.
|
|
3
3
|
*
|
|
4
4
|
* The caller supplies one stable projection; this module owns copy,
|
|
5
|
-
* responsive group selection, color hierarchy, and terminal layout.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* responsive group selection, color hierarchy, and terminal layout. Footer
|
|
6
|
+
* labels stay English in every UI language so their widths and positions stay
|
|
7
|
+
* stable. User metadata is displayed verbatim.
|
|
8
8
|
* @module @agi-fans/dsh-tui/status-line
|
|
9
9
|
*/
|
|
10
10
|
import type { TuiLoopStatus, TuiSessionControls, TuiSessionStats } from '../definition.ts';
|
|
11
|
-
import { type
|
|
11
|
+
import { type ResolvedStatusBarConfig, type StatusBarInput, type StatusItemId } from './status-config.ts';
|
|
12
12
|
import type { Theme } from './theme.ts';
|
|
13
13
|
/** Context needed to render the fixed session footer. */
|
|
14
14
|
export interface StatusFooterOptions {
|
|
@@ -21,7 +21,8 @@ export interface StatusFooterOptions {
|
|
|
21
21
|
pwd?: string;
|
|
22
22
|
branch?: string;
|
|
23
23
|
stats?: TuiSessionStats;
|
|
24
|
-
|
|
24
|
+
/** A resolved layout, or the stored document it resolves from. */
|
|
25
|
+
config: ResolvedStatusBarConfig | StatusBarInput;
|
|
25
26
|
width: number;
|
|
26
27
|
/** Settings preview: underline the focused item. */
|
|
27
28
|
focus?: StatusItemId;
|