@pellux/goodvibes-agent 1.4.4 → 1.5.1

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.
Files changed (230) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +52 -7
  3. package/dist/package/main.js +7491 -12253
  4. package/docs/README.md +2 -2
  5. package/docs/channels-remote-and-api.md +1 -1
  6. package/docs/getting-started.md +2 -2
  7. package/docs/release-and-publishing.md +1 -1
  8. package/docs/tools-and-commands.md +5 -5
  9. package/package.json +4 -2
  10. package/release/live-verification/live-verification.json +13 -13
  11. package/release/live-verification/live-verification.md +15 -15
  12. package/release/performance-snapshot.json +2 -2
  13. package/release/release-notes.md +5 -7
  14. package/release/release-readiness.json +6 -6
  15. package/src/agent/behavior-discovery-summary.ts +4 -18
  16. package/src/agent/calendar-registry.ts +322 -0
  17. package/src/agent/competitive-feature-inventory.ts +268 -130
  18. package/src/agent/document-registry.ts +5 -1
  19. package/src/agent/email/email-service.ts +350 -0
  20. package/src/agent/email/imap-client.ts +596 -0
  21. package/src/agent/email/smtp-client.ts +453 -0
  22. package/src/agent/ics-calendar.ts +662 -0
  23. package/src/agent/ics-timezone.ts +172 -0
  24. package/src/agent/markdown-frontmatter.ts +31 -0
  25. package/src/agent/memory-safety.ts +1 -1
  26. package/src/agent/note-registry.ts +3 -9
  27. package/src/agent/persona-discovery.ts +3 -15
  28. package/src/agent/persona-registry.ts +1 -10
  29. package/src/agent/research-source-registry.ts +5 -1
  30. package/src/agent/routine-discovery.ts +3 -15
  31. package/src/agent/runtime-profile.ts +3 -0
  32. package/src/agent/skill-discovery.ts +3 -15
  33. package/src/agent/skill-draft-proposer.ts +203 -0
  34. package/src/agent/skill-draft-runner.ts +201 -0
  35. package/src/agent/skill-registry.ts +36 -1
  36. package/src/agent/skill-standard.ts +99 -0
  37. package/src/agent/vibe-file.ts +7 -22
  38. package/src/cli/completion.ts +1 -1
  39. package/src/cli/config-overrides.ts +10 -1
  40. package/src/cli/redaction.ts +17 -5
  41. package/src/config/provider-model.ts +2 -1
  42. package/src/config/secret-config.ts +13 -6
  43. package/src/core/activity-feed.ts +97 -0
  44. package/src/core/away-digest.ts +161 -0
  45. package/src/core/conversation-rendering.ts +7 -3
  46. package/src/core/conversation.ts +22 -15
  47. package/src/core/hardware-profile.ts +362 -0
  48. package/src/core/last-seen-store.ts +78 -0
  49. package/src/core/plain-language.ts +52 -0
  50. package/src/core/setup-incomplete-hint.ts +90 -0
  51. package/src/core/system-message-router.ts +38 -87
  52. package/src/input/agent-workspace-basic-command-editor-submission.ts +60 -220
  53. package/src/input/agent-workspace-basic-command-editors.ts +39 -141
  54. package/src/input/agent-workspace-categories.ts +40 -125
  55. package/src/input/agent-workspace-command-editor.ts +4 -0
  56. package/src/input/agent-workspace-host-category.ts +0 -5
  57. package/src/input/agent-workspace-local-editor-submission.ts +3 -1
  58. package/src/input/agent-workspace-navigation.ts +10 -3
  59. package/src/input/agent-workspace-onboarding-actions.ts +132 -0
  60. package/src/input/agent-workspace-onboarding-categories.ts +29 -26
  61. package/src/input/agent-workspace-onboarding-finish.ts +11 -4
  62. package/src/input/agent-workspace-onboarding-state.ts +111 -0
  63. package/src/input/agent-workspace-profile-editor-submission.ts +260 -0
  64. package/src/input/agent-workspace-profile-editors.ts +155 -0
  65. package/src/input/agent-workspace-subscription-editor.ts +7 -0
  66. package/src/input/agent-workspace-types.ts +5 -1
  67. package/src/input/agent-workspace.ts +65 -39
  68. package/src/input/command-registry.ts +18 -5
  69. package/src/input/commands/agent-runtime-profile-runtime.ts +2 -1
  70. package/src/input/commands/agent-skills-runtime.ts +60 -3
  71. package/src/input/commands/calendar-runtime.ts +209 -0
  72. package/src/input/commands/channels-runtime.ts +1 -0
  73. package/src/input/commands/command-error.ts +9 -0
  74. package/src/input/commands/compat-runtime.ts +1 -0
  75. package/src/input/commands/config.ts +1 -0
  76. package/src/input/commands/conversation-runtime.ts +1 -1
  77. package/src/input/commands/delegation-runtime.ts +5 -6
  78. package/src/input/commands/email-runtime.ts +387 -0
  79. package/src/input/commands/experience-runtime.ts +17 -4
  80. package/src/input/commands/guidance-runtime.ts +1 -1
  81. package/src/input/commands/health-runtime.ts +6 -1
  82. package/src/input/commands/knowledge-format.ts +73 -0
  83. package/src/input/commands/knowledge.ts +9 -74
  84. package/src/input/commands/local-provider-runtime.ts +2 -1
  85. package/src/input/commands/local-runtime.ts +10 -4
  86. package/src/input/commands/mcp-runtime.ts +7 -0
  87. package/src/input/commands/notify-runtime.ts +17 -1
  88. package/src/input/commands/onboarding-runtime.ts +1 -0
  89. package/src/input/commands/operator-actions-runtime.ts +1 -0
  90. package/src/input/commands/operator-runtime.ts +3 -0
  91. package/src/input/commands/personas-runtime.ts +1 -0
  92. package/src/input/commands/platform-access-runtime.ts +40 -17
  93. package/src/input/commands/product-runtime.ts +6 -1
  94. package/src/input/commands/provider-accounts-runtime.ts +3 -2
  95. package/src/input/commands/qrcode-runtime.ts +1 -0
  96. package/src/input/commands/routines-runtime.ts +1 -0
  97. package/src/input/commands/runtime-services.ts +0 -13
  98. package/src/input/commands/security-runtime.ts +1 -0
  99. package/src/input/commands/session-content.ts +1 -0
  100. package/src/input/commands/shell-core.ts +5 -2
  101. package/src/input/commands/subscription-runtime.ts +33 -9
  102. package/src/input/commands/support-bundle-runtime.ts +8 -1
  103. package/src/input/commands/tasks-runtime.ts +1 -0
  104. package/src/input/commands/tts-runtime.ts +1 -0
  105. package/src/input/commands/vibe-runtime.ts +1 -0
  106. package/src/input/commands.ts +4 -0
  107. package/src/input/feed-context-factory.ts +3 -12
  108. package/src/input/handler-command-route.ts +7 -60
  109. package/src/input/handler-feed-routes.ts +0 -194
  110. package/src/input/handler-feed.ts +2 -54
  111. package/src/input/handler-interactions.ts +0 -2
  112. package/src/input/handler-modal-stack.ts +0 -9
  113. package/src/input/handler-picker-routes.ts +24 -1
  114. package/src/input/handler-shortcuts.ts +11 -40
  115. package/src/input/handler-ui-state.ts +13 -0
  116. package/src/input/handler.ts +8 -35
  117. package/src/input/keybindings.ts +40 -17
  118. package/src/input/model-picker-local-fit.ts +130 -0
  119. package/src/input/shell-passthrough.ts +58 -0
  120. package/src/input/submission-router.ts +0 -5
  121. package/src/main.ts +129 -90
  122. package/src/renderer/activity-sidebar.ts +186 -0
  123. package/src/renderer/agent-workspace-context-lines.ts +5 -48
  124. package/src/renderer/agent-workspace-style.ts +1 -1
  125. package/src/renderer/agent-workspace.ts +14 -2
  126. package/src/renderer/compositor.ts +37 -125
  127. package/src/renderer/conversation-overlays.ts +3 -3
  128. package/src/renderer/help-overlay.ts +7 -5
  129. package/src/renderer/model-workspace.ts +101 -86
  130. package/src/{panels → renderer}/polish.ts +3 -3
  131. package/src/renderer/shell-surface.ts +4 -5
  132. package/src/renderer/status-token.ts +31 -11
  133. package/src/renderer/tab-strip.ts +1 -1
  134. package/src/renderer/tool-call.ts +7 -8
  135. package/src/renderer/tool-labels.ts +92 -0
  136. package/src/renderer/ui-factory.ts +48 -96
  137. package/src/runtime/bootstrap-command-context.ts +0 -5
  138. package/src/runtime/bootstrap-command-parts.ts +6 -15
  139. package/src/runtime/bootstrap-core.ts +34 -13
  140. package/src/runtime/bootstrap-hook-bridge.ts +3 -1
  141. package/src/runtime/bootstrap-shell.ts +3 -50
  142. package/src/runtime/bootstrap.ts +3 -4
  143. package/src/runtime/context.ts +1 -1
  144. package/src/runtime/diagnostics/panels/index.ts +0 -1
  145. package/src/runtime/diagnostics/panels/policy.ts +1 -1
  146. package/src/runtime/execution-ledger.ts +16 -1
  147. package/src/runtime/index.ts +6 -1
  148. package/src/runtime/onboarding/index.ts +1 -0
  149. package/src/runtime/onboarding/onboarding-state.ts +200 -0
  150. package/src/{panels → runtime}/provider-account-snapshot.ts +5 -2
  151. package/src/runtime/services.ts +16 -4
  152. package/src/runtime/terminal-output-guard.ts +7 -0
  153. package/src/runtime/tool-permission-safety.ts +1 -1
  154. package/src/runtime/ui/model-picker/data-provider.ts +1 -1
  155. package/src/runtime/ui/model-picker/health-enrichment.ts +2 -2
  156. package/src/runtime/ui/model-picker/types.ts +2 -2
  157. package/src/runtime/ui/provider-health/data-provider.ts +3 -3
  158. package/src/runtime/ui/provider-health/types.ts +2 -2
  159. package/src/runtime/ui-services.ts +0 -2
  160. package/src/shell/agent-workspace-fullscreen.ts +0 -1
  161. package/src/shell/autonomy-surfacing.ts +272 -0
  162. package/src/shell/session-continuity-hints.ts +0 -6
  163. package/src/shell/startup-wiring.ts +221 -0
  164. package/src/shell/ui-openers.ts +18 -29
  165. package/src/tools/agent-context-policy.ts +1 -1
  166. package/src/tools/agent-harness-background-processes.ts +4 -4
  167. package/src/tools/agent-harness-browser-cockpit-route.ts +3 -3
  168. package/src/tools/agent-harness-command-runner.ts +6 -1
  169. package/src/tools/agent-harness-document-ops.ts +26 -53
  170. package/src/tools/agent-harness-execution-history.ts +1 -13
  171. package/src/tools/agent-harness-execution-posture.ts +0 -15
  172. package/src/tools/agent-harness-keybinding-metadata.ts +28 -29
  173. package/src/tools/agent-harness-local-model-cookbook.ts +24 -1
  174. package/src/tools/agent-harness-metadata.ts +16 -0
  175. package/src/tools/agent-harness-mode-catalog.ts +2 -9
  176. package/src/tools/agent-harness-provider-account-metadata.ts +2 -2
  177. package/src/tools/agent-harness-setup-posture-utils.ts +1 -1
  178. package/src/tools/agent-harness-tool-schema.ts +13 -14
  179. package/src/tools/agent-harness-tool.ts +27 -23
  180. package/src/tools/agent-harness-ui-surface-metadata.ts +10 -20
  181. package/src/tools/agent-harness-workspace-action-runner.ts +3 -4
  182. package/src/tools/agent-workspace-tool.ts +2 -33
  183. package/src/utils/terminal-width.ts +9 -3
  184. package/src/version.ts +1 -1
  185. package/src/input/agent-workspace-panel-route.ts +0 -44
  186. package/src/input/panel-integration-actions.ts +0 -26
  187. package/src/panels/approval-panel.ts +0 -149
  188. package/src/panels/automation-control-panel.ts +0 -212
  189. package/src/panels/base-panel.ts +0 -254
  190. package/src/panels/builtin/agent.ts +0 -58
  191. package/src/panels/builtin/knowledge.ts +0 -26
  192. package/src/panels/builtin/operations.ts +0 -121
  193. package/src/panels/builtin/session.ts +0 -138
  194. package/src/panels/builtin/shared.ts +0 -275
  195. package/src/panels/builtin/usage.ts +0 -21
  196. package/src/panels/builtin-panels.ts +0 -23
  197. package/src/panels/confirm-state.ts +0 -61
  198. package/src/panels/context-visualizer-panel.ts +0 -204
  199. package/src/panels/cost-tracker-panel.ts +0 -444
  200. package/src/panels/docs-panel.ts +0 -285
  201. package/src/panels/index.ts +0 -25
  202. package/src/panels/knowledge-panel.ts +0 -417
  203. package/src/panels/memory-panel.ts +0 -226
  204. package/src/panels/panel-list-panel.ts +0 -464
  205. package/src/panels/panel-manager.ts +0 -570
  206. package/src/panels/provider-accounts-panel.ts +0 -233
  207. package/src/panels/provider-health-domains.ts +0 -208
  208. package/src/panels/provider-health-panel.ts +0 -720
  209. package/src/panels/provider-health-tracker.ts +0 -115
  210. package/src/panels/provider-stats-panel.ts +0 -366
  211. package/src/panels/qr-panel.ts +0 -207
  212. package/src/panels/schedule-panel.ts +0 -321
  213. package/src/panels/scrollable-list-panel.ts +0 -491
  214. package/src/panels/search-focus.ts +0 -32
  215. package/src/panels/security-panel.ts +0 -295
  216. package/src/panels/session-browser-panel.ts +0 -395
  217. package/src/panels/session-maintenance.ts +0 -125
  218. package/src/panels/subscription-panel.ts +0 -263
  219. package/src/panels/system-messages-panel.ts +0 -230
  220. package/src/panels/tasks-panel.ts +0 -344
  221. package/src/panels/thinking-panel.ts +0 -304
  222. package/src/panels/token-budget-panel.ts +0 -475
  223. package/src/panels/tool-inspector-panel.ts +0 -436
  224. package/src/panels/types.ts +0 -54
  225. package/src/renderer/panel-composite.ts +0 -158
  226. package/src/renderer/panel-tab-bar.ts +0 -69
  227. package/src/renderer/panel-workspace-bar.ts +0 -42
  228. package/src/runtime/diagnostics/panels/panel-resources.ts +0 -118
  229. package/src/tools/agent-harness-panel-metadata.ts +0 -211
  230. /package/src/runtime/perf/{panel-health-monitor.ts → component-health.ts} +0 -0
@@ -1,285 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // DocsPanel — tool list, model capabilities, and keyboard shortcut reference.
3
- // ---------------------------------------------------------------------------
4
-
5
- import type { Line } from '../types/grid.ts';
6
- import { BasePanel } from './base-panel.ts';
7
- import { buildPanelLine, buildPanelWorkspace, buildSearchInputLine, resolveScrollablePanelSection, DEFAULT_PANEL_PALETTE } from './polish.ts';
8
- import type { ProviderModelCatalogQuery, ToolCatalogQuery } from '../runtime/ui-service-queries.ts';
9
- import {
10
- getPanelSearchFocusTransition,
11
- isPanelSearchBackspace,
12
- isPanelSearchCancel,
13
- isPanelSearchCommit,
14
- isPanelSearchPrintable,
15
- } from './search-focus.ts';
16
-
17
- const C = {
18
- headerBg: '#1a1a2e',
19
- headerFg: '#ffffff',
20
- statusBar: '#222233',
21
- statusFg: '#aaaaaa',
22
- sectionFg: '#00ffff',
23
- sectionBg: '#0d1a2a',
24
- toolFg: '#88ccff',
25
- descFg: '#aaaaaa',
26
- keyFg: '#ffcc44',
27
- valueFg: '#ccccdd',
28
- dimFg: '#555566',
29
- selected: '#00ffff',
30
- selectedBg: '#1a2a3a',
31
- searchFg: '#ffffff',
32
- } as const;
33
-
34
- // ---------------------------------------------------------------------------
35
- // Hardcoded keyboard shortcut reference
36
- // ---------------------------------------------------------------------------
37
- const SHORTCUTS: Array<{ key: string; desc: string }> = [
38
- { key: 'Ctrl+C', desc: 'Cancel generation / exit (double)' },
39
- { key: 'Ctrl+P', desc: 'Open Agent operator workspace' },
40
- { key: 'Ctrl+F', desc: 'Search conversation' },
41
- { key: 'Ctrl+K', desc: 'Copy last response to clipboard' },
42
- { key: 'Ctrl+L', desc: 'Clear screen' },
43
- { key: 'Ctrl+Z', desc: 'Undo input' },
44
- { key: 'Alt+Enter', desc: 'Insert newline in prompt' },
45
- { key: 'PageUp/Down', desc: 'Scroll conversation' },
46
- { key: 'Alt+PgUp/Dn', desc: 'Scroll active workspace surface' },
47
- { key: 'Tab', desc: 'Path completion / workspace focus' },
48
- { key: '@path', desc: 'Attach bounded file/folder/URL context in composer' },
49
- { key: '!@path', desc: 'Inject raw file contents in composer' },
50
- { key: '/', desc: 'Start slash command' },
51
- { key: 'Enter', desc: 'Submit prompt' },
52
- { key: 'Esc', desc: 'Close overlay / cancel search' },
53
- { key: 'Up/Down', desc: 'Scroll history / navigate list' },
54
- { key: 'Alt+Up/Down', desc: 'Move cursor in multi-line input' },
55
- { key: 'Ctrl+A/E', desc: 'Jump to start/end of line' },
56
- { key: 'Ctrl+W', desc: 'Delete word backward' },
57
- { key: 'Ctrl+U', desc: 'Clear line' },
58
- { key: 'F1', desc: 'Toggle help overlay' },
59
- { key: 'F2', desc: 'Toggle shortcuts overlay' },
60
- ];
61
-
62
- type DocSection = 'tools' | 'models' | 'shortcuts';
63
-
64
- interface FlatRow {
65
- kind: 'header' | 'item' | 'detail' | 'empty';
66
- text: string;
67
- fg: string;
68
- bg: string;
69
- bold?: boolean;
70
- }
71
-
72
- function renderRow(width: number, row: FlatRow, isCursor: boolean): Line {
73
- const bg = isCursor ? C.selectedBg : row.bg;
74
- return buildPanelLine(width, [
75
- [isCursor ? '▸' : ' ', C.selected, bg],
76
- [row.text, isCursor ? C.selected : row.fg, bg],
77
- ]);
78
- }
79
-
80
- export class DocsPanel extends BasePanel {
81
- private toolRegistry: ToolCatalogQuery | null = null;
82
- private providerRegistry: ProviderModelCatalogQuery | null = null;
83
- private section: DocSection = 'tools';
84
- private searchQuery = '';
85
- private searching = false;
86
- private rows: FlatRow[] = [];
87
- private cursorIndex = 0;
88
- private scrollOffset = 0;
89
-
90
- constructor(toolRegistry?: ToolCatalogQuery, providerRegistry?: ProviderModelCatalogQuery) {
91
- super('docs', 'Docs', '?', 'session');
92
- this.toolRegistry = toolRegistry ?? null;
93
- this.providerRegistry = providerRegistry ?? null;
94
- }
95
-
96
- override onActivate(): void {
97
- this.needsRender = true;
98
- this._buildRows();
99
- }
100
-
101
- handleInput(key: string): boolean {
102
- if (this.searching) {
103
- const transition = getPanelSearchFocusTransition(key, { selectedIndex: this.cursorIndex, itemCount: this.rows.length });
104
- if (transition === 'focus-list') {
105
- this.searching = false;
106
- this.cursorIndex = 0;
107
- this.markDirty();
108
- return true;
109
- }
110
- if (isPanelSearchCancel(key) || isPanelSearchCommit(key)) {
111
- this.searching = false;
112
- this._buildRows();
113
- return true;
114
- }
115
- if (isPanelSearchBackspace(key)) {
116
- this.searchQuery = this.searchQuery.slice(0, -1);
117
- this._buildRows();
118
- return true;
119
- }
120
- if (isPanelSearchPrintable(key)) {
121
- this.searchQuery += key;
122
- this._buildRows();
123
- return true;
124
- }
125
- return false;
126
- }
127
-
128
- const transition = getPanelSearchFocusTransition(key, { selectedIndex: this.cursorIndex, itemCount: this.rows.length });
129
- if (transition === 'focus-search') {
130
- this._startSearch();
131
- return true;
132
- }
133
-
134
- switch (key) {
135
- case 'up': this._move(-1); return true;
136
- case 'down': this._move(1); return true;
137
- case 'pageup': this._move(-10); return true;
138
- case 'pagedown': this._move(10); return true;
139
- case 't': this._setSection('tools'); return true;
140
- case 'm': this._setSection('models'); return true;
141
- case 'k': this._setSection('shortcuts'); return true;
142
- default: return false;
143
- }
144
- }
145
-
146
- render(width: number, height: number): Line[] {
147
- if (height <= 0 || width <= 0) return [];
148
- const sectionLabel = this.section === 'tools' ? 'Tools' : this.section === 'models' ? 'Models' : 'Shortcuts';
149
- const searchLine = this.searching
150
- ? ` Search: ${this.searchQuery}\u258a`
151
- : this.searchQuery
152
- ? ` Filter: ${this.searchQuery} (/ or up at top to edit)`
153
- : ` / or up at top to search`;
154
- this.cursorIndex = Math.max(0, Math.min(this.cursorIndex, Math.max(0, this.rows.length - 1)));
155
- const controlsSection = {
156
- title: 'Controls',
157
- lines: [
158
- buildPanelLine(width, [
159
- [' t', DEFAULT_PANEL_PALETTE.info], [' tools', DEFAULT_PANEL_PALETTE.dim],
160
- [' m', DEFAULT_PANEL_PALETTE.info], [' models', DEFAULT_PANEL_PALETTE.dim],
161
- [' k', DEFAULT_PANEL_PALETTE.info], [' shortcuts', DEFAULT_PANEL_PALETTE.dim],
162
- [' /', DEFAULT_PANEL_PALETTE.info], [' search', DEFAULT_PANEL_PALETTE.dim],
163
- ]),
164
- buildSearchInputLine(width, '', searchLine.trimStart(), DEFAULT_PANEL_PALETTE, { active: this.searching }),
165
- ],
166
- } as const;
167
- const sectionWindow = resolveScrollablePanelSection(width, height, {
168
- intro: 'Browse built-in tool docs, available models, and keyboard shortcuts from one shared reference surface.',
169
- palette: DEFAULT_PANEL_PALETTE,
170
- beforeSections: [controlsSection],
171
- section: {
172
- title: sectionLabel,
173
- scrollableLines: this.rows.map((row, absIdx) => {
174
- const isCursor = absIdx === this.cursorIndex && row.kind !== 'header' && row.kind !== 'empty';
175
- return renderRow(width, row, isCursor);
176
- }),
177
- selectedIndex: this.cursorIndex,
178
- scrollOffset: this.scrollOffset,
179
- minRows: 8,
180
- },
181
- });
182
- this.scrollOffset = sectionWindow.scrollOffset;
183
-
184
- return buildPanelWorkspace(width, height, {
185
- title: ` Docs / ${sectionLabel}`,
186
- intro: 'Browse built-in tool docs, available models, and keyboard shortcuts from one shared reference surface.',
187
- sections: [
188
- controlsSection,
189
- sectionWindow.section.lines.length > 0 ? sectionWindow.section : { title: sectionLabel, lines: [buildPanelLine(width, [[' No matching docs', DEFAULT_PANEL_PALETTE.dim]])] },
190
- ],
191
- palette: DEFAULT_PANEL_PALETTE,
192
- });
193
- }
194
-
195
- private _setSection(section: DocSection): void {
196
- this.section = section;
197
- this.searchQuery = '';
198
- this.cursorIndex = 0;
199
- this.scrollOffset = 0;
200
- this._buildRows();
201
- }
202
-
203
- private _startSearch(): void {
204
- this.searching = true;
205
- this.markDirty();
206
- }
207
-
208
- private _move(delta: number): void {
209
- if (this.rows.length === 0) return;
210
- this.cursorIndex = Math.max(0, Math.min(this.rows.length - 1, this.cursorIndex + delta));
211
- this.markDirty();
212
- }
213
-
214
- private _buildRows(): void {
215
- const q = this.searchQuery.trim().toLowerCase();
216
- const rows: FlatRow[] = [];
217
-
218
- if (this.section === 'tools') {
219
- const tools = this.toolRegistry?.list() ?? [];
220
- const filtered = q ? tools.filter(t => t.definition.name.toLowerCase().includes(q) || (t.definition.description ?? '').toLowerCase().includes(q)) : tools;
221
- if (filtered.length === 0) {
222
- rows.push({ kind: 'empty', text: ' No tools match.', fg: C.dimFg, bg: '' });
223
- } else {
224
- rows.push({ kind: 'header', text: ` Tools (${filtered.length})`, fg: C.sectionFg, bg: C.sectionBg, bold: true });
225
- for (const tool of filtered) {
226
- rows.push({ kind: 'item', text: ` ${tool.definition.name}`, fg: C.toolFg, bg: '', bold: true });
227
- if (tool.definition.description) {
228
- rows.push({ kind: 'detail', text: ` ${tool.definition.description}`, fg: C.descFg, bg: '' });
229
- }
230
- const metadata: string[] = [];
231
- if (tool.definition.sideEffects && tool.definition.sideEffects.length > 0) {
232
- metadata.push(`effects: ${tool.definition.sideEffects.join(', ')}`);
233
- }
234
- if (tool.definition.concurrency) {
235
- metadata.push(`concurrency: ${tool.definition.concurrency}`);
236
- }
237
- if (tool.definition.supportsProgress) {
238
- metadata.push('progress');
239
- }
240
- if (tool.definition.supportsStreamingOutput) {
241
- metadata.push('streaming');
242
- }
243
- if (metadata.length > 0) {
244
- rows.push({ kind: 'detail', text: ` ${metadata.join(' | ')}`, fg: C.dimFg, bg: '' });
245
- }
246
- }
247
- }
248
- } else if (this.section === 'models') {
249
- const models = this.providerRegistry?.listModels() ?? [];
250
- const filtered = q ? models.filter(m => m.id.toLowerCase().includes(q) || m.displayName.toLowerCase().includes(q) || m.provider.toLowerCase().includes(q)) : models;
251
- if (filtered.length === 0) {
252
- rows.push({ kind: 'empty', text: ' No models match.', fg: C.dimFg, bg: '' });
253
- } else {
254
- // Group by provider
255
- const byProvider = new Map<string, typeof filtered>();
256
- for (const m of filtered) {
257
- let arr = byProvider.get(m.provider);
258
- if (!arr) { arr = []; byProvider.set(m.provider, arr); }
259
- arr.push(m);
260
- }
261
- for (const [provider, pModels] of byProvider) {
262
- rows.push({ kind: 'header', text: ` ${provider} (${pModels.length})`, fg: C.sectionFg, bg: C.sectionBg, bold: true });
263
- for (const m of pModels) {
264
- const ctxK = m.contextWindow > 0 ? `${(m.contextWindow / 1000).toFixed(0)}k` : '?';
265
- const caps = [m.contextWindow > 0 ? `ctx:${ctxK}` : ''].filter(Boolean).join(' ');
266
- rows.push({ kind: 'item', text: ` ${m.displayName} ${caps}`, fg: C.toolFg, bg: '' });
267
- rows.push({ kind: 'detail', text: ` ${m.id}`, fg: C.descFg, bg: '' });
268
- }
269
- }
270
- }
271
- } else {
272
- // Shortcuts
273
- const filtered = q ? SHORTCUTS.filter(s => s.key.toLowerCase().includes(q) || s.desc.toLowerCase().includes(q)) : SHORTCUTS;
274
- rows.push({ kind: 'header', text: ' Keyboard Shortcuts', fg: C.sectionFg, bg: C.sectionBg, bold: true });
275
- for (const s of filtered) {
276
- const key = s.key.padEnd(16);
277
- rows.push({ kind: 'item', text: ` ${key} ${s.desc}`, fg: C.valueFg, bg: '' });
278
- }
279
- }
280
-
281
- this.rows = rows;
282
- this.cursorIndex = Math.min(this.cursorIndex, Math.max(0, rows.length - 1));
283
- this.markDirty();
284
- }
285
- }
@@ -1,25 +0,0 @@
1
- export type { Panel, PanelCategory, PanelRegistration } from './types.ts';
2
- export type { Pane } from './panel-manager.ts';
3
- export { BasePanel } from './base-panel.ts';
4
- export { PanelManager } from './panel-manager.ts';
5
- export { TokenBudgetPanel } from './token-budget-panel.ts';
6
- export { CostTrackerPanel } from './cost-tracker-panel.ts';
7
- export { ProviderHealthPanel } from './provider-health-panel.ts';
8
- export { ProviderHealthTracker } from './provider-health-tracker.ts';
9
- export type { ProviderHealth, ProviderStatus } from './provider-health-tracker.ts';
10
- export { ProviderStatsPanel } from './provider-stats-panel.ts';
11
- export { SessionBrowserPanel } from './session-browser-panel.ts';
12
- export { DocsPanel } from './docs-panel.ts';
13
- export { ThinkingPanel } from './thinking-panel.ts';
14
- export { ToolInspectorPanel } from './tool-inspector-panel.ts';
15
- export { ContextVisualizerPanel } from './context-visualizer-panel.ts';
16
- export { registerBuiltinPanels } from './builtin-panels.ts';
17
- export type { BuiltinPanelDeps } from './builtin-panels.ts';
18
- export { TasksPanel } from './tasks-panel.ts';
19
- export { SubscriptionPanel } from './subscription-panel.ts';
20
- export { SecurityPanel } from './security-panel.ts';
21
- export { ApprovalPanel } from './approval-panel.ts';
22
- export { KnowledgePanel } from './knowledge-panel.ts';
23
- export { SystemMessagesPanel } from './system-messages-panel.ts';
24
- export { PanelListPanel } from './panel-list-panel.ts';
25
- export type { SystemMessageEntry, SystemMessagePriority } from './system-messages-panel.ts';