dexto 1.5.7 → 1.6.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.
Files changed (178) hide show
  1. package/README.md +3 -3
  2. package/dist/agents/agent-template.yml +2 -2
  3. package/dist/agents/coding-agent/README.md +10 -10
  4. package/dist/agents/coding-agent/coding-agent.yml +81 -80
  5. package/dist/agents/default-agent.yml +32 -47
  6. package/dist/agents/explore-agent/explore-agent.yml +3 -6
  7. package/dist/agents/image-editor-agent/image-editor-agent.yml +1 -1
  8. package/dist/agents/nano-banana-agent/nano-banana-agent.yml +1 -1
  9. package/dist/agents/podcast-agent/podcast-agent.yml +1 -1
  10. package/dist/agents/product-name-researcher/product-name-researcher.yml +1 -1
  11. package/dist/agents/sora-video-agent/sora-video-agent.yml +4 -6
  12. package/dist/agents/triage-demo/triage-agent.yml +1 -1
  13. package/dist/analytics/events.d.ts +2 -2
  14. package/dist/analytics/events.d.ts.map +1 -1
  15. package/dist/api/mcp/tool-aggregation-handler.d.ts +2 -2
  16. package/dist/api/server-hono.d.ts +2 -2
  17. package/dist/api/server-hono.d.ts.map +1 -1
  18. package/dist/api/server-hono.js +37 -60
  19. package/dist/cli/approval/cli-approval-handler.d.ts +10 -3
  20. package/dist/cli/approval/cli-approval-handler.d.ts.map +1 -1
  21. package/dist/cli/approval/cli-approval-handler.js +1 -1
  22. package/dist/cli/auth/constants.d.ts +4 -0
  23. package/dist/cli/auth/constants.d.ts.map +1 -1
  24. package/dist/cli/auth/constants.js +4 -0
  25. package/dist/cli/commands/auth/logout.js +2 -2
  26. package/dist/cli/commands/billing/status.d.ts +3 -1
  27. package/dist/cli/commands/billing/status.d.ts.map +1 -1
  28. package/dist/cli/commands/billing/status.js +23 -1
  29. package/dist/cli/commands/create-app.d.ts +1 -11
  30. package/dist/cli/commands/create-app.d.ts.map +1 -1
  31. package/dist/cli/commands/create-app.js +21 -545
  32. package/dist/cli/commands/create-image.d.ts.map +1 -1
  33. package/dist/cli/commands/create-image.js +54 -53
  34. package/dist/cli/commands/image.d.ts +52 -0
  35. package/dist/cli/commands/image.d.ts.map +1 -0
  36. package/dist/cli/commands/image.js +118 -0
  37. package/dist/cli/commands/index.d.ts +2 -1
  38. package/dist/cli/commands/index.d.ts.map +1 -1
  39. package/dist/cli/commands/index.js +3 -1
  40. package/dist/cli/commands/init-app.d.ts +4 -8
  41. package/dist/cli/commands/init-app.d.ts.map +1 -1
  42. package/dist/cli/commands/init-app.js +37 -161
  43. package/dist/cli/commands/interactive-commands/command-parser.d.ts +2 -0
  44. package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
  45. package/dist/cli/commands/interactive-commands/commands.d.ts +1 -1
  46. package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
  47. package/dist/cli/commands/interactive-commands/commands.js +2 -2
  48. package/dist/cli/commands/interactive-commands/general-commands.js +2 -2
  49. package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
  50. package/dist/cli/commands/interactive-commands/prompt-commands.js +13 -2
  51. package/dist/cli/commands/interactive-commands/session/index.d.ts +2 -1
  52. package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
  53. package/dist/cli/commands/interactive-commands/session/index.js +2 -1
  54. package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +2 -2
  55. package/dist/cli/commands/interactive-commands/session/session-commands.js +2 -2
  56. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
  57. package/dist/cli/commands/interactive-commands/system/system-commands.js +7 -29
  58. package/dist/cli/commands/list-agents.d.ts.map +1 -1
  59. package/dist/cli/commands/list-agents.js +3 -2
  60. package/dist/cli/commands/plugin.d.ts +4 -4
  61. package/dist/cli/commands/setup.d.ts +5 -5
  62. package/dist/cli/commands/setup.d.ts.map +1 -1
  63. package/dist/cli/commands/setup.js +766 -207
  64. package/dist/cli/commands/sync-agents.d.ts +2 -12
  65. package/dist/cli/commands/sync-agents.d.ts.map +1 -1
  66. package/dist/cli/commands/sync-agents.js +2 -50
  67. package/dist/cli/ink-cli/InkCLIRefactored.d.ts +7 -1
  68. package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
  69. package/dist/cli/ink-cli/InkCLIRefactored.js +17 -7
  70. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +2 -2
  71. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
  72. package/dist/cli/ink-cli/components/ApprovalPrompt.js +15 -14
  73. package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts +18 -0
  74. package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts.map +1 -0
  75. package/dist/cli/ink-cli/components/BackgroundTasksPanel.js +48 -0
  76. package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
  77. package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -1
  78. package/dist/cli/ink-cli/components/Footer.js +5 -6
  79. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
  80. package/dist/cli/ink-cli/components/ResourceAutocomplete.js +150 -41
  81. package/dist/cli/ink-cli/components/StatusBar.d.ts +3 -1
  82. package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
  83. package/dist/cli/ink-cli/components/StatusBar.js +27 -7
  84. package/dist/cli/ink-cli/components/TodoPanel.js +1 -1
  85. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
  86. package/dist/cli/ink-cli/components/chat/MessageItem.js +9 -5
  87. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +1 -1
  88. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +3 -1
  89. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -1
  90. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +3 -2
  91. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +3 -1
  92. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -1
  93. package/dist/cli/ink-cli/components/modes/StaticCLI.js +3 -2
  94. package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.js +1 -1
  95. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -1
  96. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +8 -4
  97. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +1 -1
  98. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +1 -1
  99. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +1 -0
  100. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
  101. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +144 -41
  102. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +2 -1
  103. package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -1
  104. package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +286 -44
  105. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +9 -1
  106. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -1
  107. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +35 -9
  108. package/dist/cli/ink-cli/constants/tips.js +1 -1
  109. package/dist/cli/ink-cli/containers/InputContainer.d.ts +4 -0
  110. package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
  111. package/dist/cli/ink-cli/containers/InputContainer.js +30 -8
  112. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +2 -0
  113. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
  114. package/dist/cli/ink-cli/containers/OverlayContainer.js +215 -59
  115. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
  116. package/dist/cli/ink-cli/hooks/useAgentEvents.js +73 -13
  117. package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -1
  118. package/dist/cli/ink-cli/hooks/useCLIState.js +3 -0
  119. package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -1
  120. package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +8 -0
  121. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -1
  122. package/dist/cli/ink-cli/hooks/useTokenCounter.js +7 -4
  123. package/dist/cli/ink-cli/services/CommandService.d.ts +1 -1
  124. package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
  125. package/dist/cli/ink-cli/services/CommandService.js +2 -2
  126. package/dist/cli/ink-cli/services/processStream.d.ts +2 -2
  127. package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -1
  128. package/dist/cli/ink-cli/services/processStream.js +55 -8
  129. package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
  130. package/dist/cli/ink-cli/state/initialState.js +3 -0
  131. package/dist/cli/ink-cli/state/types.d.ts +11 -2
  132. package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
  133. package/dist/cli/ink-cli/utils/llm-provider-display.d.ts +3 -0
  134. package/dist/cli/ink-cli/utils/llm-provider-display.d.ts.map +1 -0
  135. package/dist/cli/ink-cli/utils/llm-provider-display.js +22 -0
  136. package/dist/cli/ink-cli/utils/messageFormatting.d.ts +13 -9
  137. package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
  138. package/dist/cli/ink-cli/utils/messageFormatting.js +106 -151
  139. package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -1
  140. package/dist/cli/ink-cli/utils/toolUtils.js +2 -9
  141. package/dist/cli/utils/config-validation.d.ts +11 -11
  142. package/dist/cli/utils/config-validation.d.ts.map +1 -1
  143. package/dist/cli/utils/config-validation.js +56 -290
  144. package/dist/cli/utils/dexto-auth-check.d.ts +7 -7
  145. package/dist/cli/utils/dexto-auth-check.d.ts.map +1 -1
  146. package/dist/cli/utils/dexto-auth-check.js +16 -16
  147. package/dist/cli/utils/image-store.d.ts +16 -0
  148. package/dist/cli/utils/image-store.d.ts.map +1 -0
  149. package/dist/cli/utils/image-store.js +289 -0
  150. package/dist/cli/utils/options.js +1 -1
  151. package/dist/cli/utils/provider-setup.d.ts +2 -2
  152. package/dist/cli/utils/provider-setup.d.ts.map +1 -1
  153. package/dist/cli/utils/provider-setup.js +10 -2
  154. package/dist/cli/utils/scaffolding-utils.d.ts +5 -0
  155. package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -1
  156. package/dist/cli/utils/scaffolding-utils.js +46 -4
  157. package/dist/cli/utils/template-engine.d.ts +28 -16
  158. package/dist/cli/utils/template-engine.d.ts.map +1 -1
  159. package/dist/cli/utils/template-engine.js +339 -479
  160. package/dist/config/cli-overrides.d.ts +4 -3
  161. package/dist/config/cli-overrides.d.ts.map +1 -1
  162. package/dist/config/cli-overrides.js +8 -10
  163. package/dist/config/effective-llm.d.ts +4 -4
  164. package/dist/config/effective-llm.d.ts.map +1 -1
  165. package/dist/config/effective-llm.js +4 -4
  166. package/dist/index-main.d.ts +2 -0
  167. package/dist/index-main.d.ts.map +1 -0
  168. package/dist/index-main.js +1554 -0
  169. package/dist/index.js +2 -1580
  170. package/dist/utils/session-logger-factory.d.ts +3 -0
  171. package/dist/utils/session-logger-factory.d.ts.map +1 -0
  172. package/dist/utils/session-logger-factory.js +19 -0
  173. package/dist/webui/assets/{index-Dl3mj53P.js → index-DwtueA8l.js} +231 -231
  174. package/dist/webui/index.html +1 -1
  175. package/package.json +10 -7
  176. package/dist/cli/cli-subscriber.d.ts +0 -45
  177. package/dist/cli/cli-subscriber.d.ts.map +0 -1
  178. package/dist/cli/cli-subscriber.js +0 -204
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, } from 'react';
3
3
  import { Box, Text } from 'ink';
4
+ import path from 'path';
5
+ import { centerTruncatePath } from '../utils/messageFormatting.js';
4
6
  /**
5
7
  * Get match score for resource: 0 = no match, 1 = description/URI match, 2 = name includes, 3 = name starts with
6
8
  * Prioritizes name matches over description/URI matches
@@ -11,7 +13,7 @@ function getResourceMatchScore(resource, query) {
11
13
  const lowerQuery = query.toLowerCase();
12
14
  const name = (resource.name || '').toLowerCase();
13
15
  const uri = resource.uri.toLowerCase();
14
- const uriFilename = uri.split('/').pop()?.toLowerCase() || '';
16
+ const uriFilename = uri.split(/[\\/]/).pop()?.toLowerCase() || '';
15
17
  const description = (resource.description || '').toLowerCase();
16
18
  // Highest priority: name starts with query
17
19
  if (name.startsWith(lowerQuery)) {
@@ -139,27 +141,127 @@ const ResourceAutocompleteInner = forwardRef(function ResourceAutocomplete({ isV
139
141
  }
140
142
  return '';
141
143
  }, [searchQuery]);
142
- // Filter and sort resources (no limit - scrolling handles it)
143
- const filteredResources = useMemo(() => {
144
- const matched = resources.filter((r) => matchesQuery(r, mentionQuery));
145
- return sortResources(matched, mentionQuery);
144
+ // Extract directories and create display items (hybrid search)
145
+ const displayItems = useMemo(() => {
146
+ const items = [];
147
+ const directories = new Set();
148
+ // Process each resource to extract paths and directories
149
+ resources.forEach((resource) => {
150
+ // Convert URI to relative path
151
+ let relativePath = resource.uri;
152
+ const rawUri = relativePath.replace(/^(fs|file):\/\//, '');
153
+ if (path.isAbsolute(rawUri)) {
154
+ try {
155
+ const relPath = path.relative(process.cwd(), rawUri);
156
+ if (relPath && !relPath.startsWith('..')) {
157
+ relativePath = relPath;
158
+ }
159
+ else {
160
+ // Outside cwd, use name as fallback
161
+ const uriParts = resource.uri.split(/[\\/]/);
162
+ relativePath =
163
+ resource.name || uriParts[uriParts.length - 1] || resource.uri;
164
+ }
165
+ }
166
+ catch {
167
+ return; // Skip if path conversion fails
168
+ }
169
+ }
170
+ // Add file item
171
+ items.push({
172
+ path: relativePath,
173
+ isDirectory: false,
174
+ resource,
175
+ });
176
+ // Extract all parent directories (1-2 levels deep)
177
+ const segments = relativePath.split(path.sep).filter(Boolean);
178
+ for (let i = 0; i < Math.min(segments.length - 1, 2); i++) {
179
+ const dirPath = segments.slice(0, i + 1).join(path.sep) + path.sep;
180
+ directories.add(dirPath);
181
+ }
182
+ });
183
+ // Add directory items
184
+ directories.forEach((dirPath) => {
185
+ items.push({
186
+ path: dirPath,
187
+ isDirectory: true,
188
+ });
189
+ });
190
+ // Filter by query
191
+ const filtered = items.filter((item) => {
192
+ if (!mentionQuery)
193
+ return true; // Show all when no query
194
+ const lowerQuery = mentionQuery.toLowerCase();
195
+ const lowerPath = item.path.toLowerCase();
196
+ const pathParts = item.path.split(path.sep).filter(Boolean);
197
+ const lastSegment = pathParts[pathParts.length - 1]?.toLowerCase() || '';
198
+ // Match against filename/dirname or full path
199
+ if (lastSegment.includes(lowerQuery) || lowerPath.includes(lowerQuery)) {
200
+ return true;
201
+ }
202
+ // Also match against resource name and description (for files)
203
+ if (item.resource) {
204
+ const lowerName = (item.resource.name || '').toLowerCase();
205
+ const lowerDescription = (item.resource.description || '').toLowerCase();
206
+ if (lowerName.includes(lowerQuery) || lowerDescription.includes(lowerQuery)) {
207
+ return true;
208
+ }
209
+ }
210
+ return false;
211
+ });
212
+ // Sort by relevance
213
+ return filtered.sort((a, b) => {
214
+ if (!mentionQuery) {
215
+ // No query: directories first, then alphabetically
216
+ if (a.isDirectory !== b.isDirectory) {
217
+ return a.isDirectory ? -1 : 1;
218
+ }
219
+ return a.path.localeCompare(b.path);
220
+ }
221
+ const lowerQuery = mentionQuery.toLowerCase();
222
+ const aPathParts = a.path.split(path.sep).filter(Boolean);
223
+ const bPathParts = b.path.split(path.sep).filter(Boolean);
224
+ const aLastSegment = aPathParts[aPathParts.length - 1]?.toLowerCase() || '';
225
+ const bLastSegment = bPathParts[bPathParts.length - 1]?.toLowerCase() || '';
226
+ // Score by match quality
227
+ const aStartsWith = aLastSegment.startsWith(lowerQuery);
228
+ const bStartsWith = bLastSegment.startsWith(lowerQuery);
229
+ const aIncludes = aLastSegment.includes(lowerQuery);
230
+ const bIncludes = bLastSegment.includes(lowerQuery);
231
+ // Priority 1: Prefix matches
232
+ if (aStartsWith && !bStartsWith)
233
+ return -1;
234
+ if (!aStartsWith && bStartsWith)
235
+ return 1;
236
+ // Priority 2: Substring matches
237
+ if (aIncludes && !bIncludes)
238
+ return -1;
239
+ if (!aIncludes && bIncludes)
240
+ return 1;
241
+ // Priority 3: Shallower paths first
242
+ const depthDiff = aPathParts.length - bPathParts.length;
243
+ if (depthDiff !== 0)
244
+ return depthDiff;
245
+ // Priority 4: Alphabetically
246
+ return a.path.localeCompare(b.path);
247
+ });
146
248
  }, [resources, mentionQuery]);
147
249
  // Track items length for reset detection
148
- const prevItemsLengthRef = useRef(filteredResources.length);
149
- const itemsChanged = filteredResources.length !== prevItemsLengthRef.current;
250
+ const prevItemsLengthRef = useRef(displayItems.length);
251
+ const itemsChanged = displayItems.length !== prevItemsLengthRef.current;
150
252
  // Derive clamped selection values during render (always valid, no setState needed)
151
253
  // This prevents the double-render that was causing flickering
152
254
  const selectedIndex = itemsChanged
153
255
  ? 0
154
- : Math.min(selection.index, Math.max(0, filteredResources.length - 1));
256
+ : Math.min(selection.index, Math.max(0, displayItems.length - 1));
155
257
  const scrollOffset = itemsChanged
156
258
  ? 0
157
- : Math.min(selection.offset, Math.max(0, filteredResources.length - MAX_VISIBLE_ITEMS));
259
+ : Math.min(selection.offset, Math.max(0, displayItems.length - MAX_VISIBLE_ITEMS));
158
260
  // Sync state only when items actually changed AND state differs
159
261
  // This effect runs AFTER render, updating state for next user interaction
160
262
  useEffect(() => {
161
263
  if (itemsChanged) {
162
- prevItemsLengthRef.current = filteredResources.length;
264
+ prevItemsLengthRef.current = displayItems.length;
163
265
  // Only setState if values actually differ (prevents unnecessary re-render)
164
266
  if (selection.index !== 0 || selection.offset !== 0) {
165
267
  selectedIndexRef.current = 0;
@@ -169,11 +271,11 @@ const ResourceAutocompleteInner = forwardRef(function ResourceAutocomplete({ isV
169
271
  selectedIndexRef.current = 0;
170
272
  }
171
273
  }
172
- }, [itemsChanged, filteredResources.length, selection.index, selection.offset]);
274
+ }, [itemsChanged, displayItems.length, selection.index, selection.offset]);
173
275
  // Calculate visible items based on scroll offset
174
276
  const visibleResources = useMemo(() => {
175
- return filteredResources.slice(scrollOffset, scrollOffset + MAX_VISIBLE_ITEMS);
176
- }, [filteredResources, scrollOffset, MAX_VISIBLE_ITEMS]);
277
+ return displayItems.slice(scrollOffset, scrollOffset + MAX_VISIBLE_ITEMS);
278
+ }, [displayItems, scrollOffset, MAX_VISIBLE_ITEMS]);
177
279
  // Expose handleInput method via ref
178
280
  useImperativeHandle(ref, () => ({
179
281
  handleInput: (_input, key) => {
@@ -184,7 +286,7 @@ const ResourceAutocompleteInner = forwardRef(function ResourceAutocomplete({ isV
184
286
  onClose();
185
287
  return true;
186
288
  }
187
- const itemsLength = filteredResources.length;
289
+ const itemsLength = displayItems.length;
188
290
  if (itemsLength === 0)
189
291
  return false;
190
292
  if (key.upArrow) {
@@ -195,41 +297,50 @@ const ResourceAutocompleteInner = forwardRef(function ResourceAutocomplete({ isV
195
297
  updateSelection((prev) => (prev + 1) % itemsLength);
196
298
  return true;
197
299
  }
198
- // Tab to load into input (for editing before selection)
300
+ // Tab to load into input (for editing/browsing)
199
301
  if (key.tab) {
200
- const resource = filteredResources[selectedIndexRef.current];
201
- if (!resource)
302
+ const item = displayItems[selectedIndexRef.current];
303
+ if (!item)
202
304
  return false;
203
- // Get the @ position and construct the text to load
204
305
  const atIndex = searchQuery.lastIndexOf('@');
306
+ const reference = item.path; // Already a relative path
205
307
  if (atIndex >= 0) {
206
308
  const before = searchQuery.slice(0, atIndex + 1);
207
- const uriParts = resource.uri.split('/');
208
- const reference = resource.name || uriParts[uriParts.length - 1] || resource.uri;
209
309
  onLoadIntoInput?.(`${before}${reference}`);
210
310
  }
211
311
  else {
212
- // Fallback: just append @resource
213
- const uriParts = resource.uri.split('/');
214
- const reference = resource.name || uriParts[uriParts.length - 1] || resource.uri;
215
312
  onLoadIntoInput?.(`${searchQuery}@${reference}`);
216
313
  }
217
314
  return true;
218
315
  }
219
- // Enter to select
316
+ // Enter to select (directories drill down, files select)
220
317
  if (key.return) {
221
- const resource = filteredResources[selectedIndexRef.current];
222
- if (resource) {
223
- onSelectResource(resource);
224
- return true;
318
+ const item = displayItems[selectedIndexRef.current];
319
+ if (!item)
320
+ return false;
321
+ if (item.isDirectory) {
322
+ // Drill down into directory
323
+ const atIndex = searchQuery.lastIndexOf('@');
324
+ if (atIndex >= 0) {
325
+ const before = searchQuery.slice(0, atIndex + 1);
326
+ onLoadIntoInput?.(`${before}${item.path}`);
327
+ }
328
+ else {
329
+ onLoadIntoInput?.(`${searchQuery}@${item.path}`);
330
+ }
225
331
  }
332
+ else if (item.resource) {
333
+ // Select the file resource
334
+ onSelectResource(item.resource);
335
+ }
336
+ return true;
226
337
  }
227
338
  // Don't consume other keys (typing, backspace, etc.)
228
339
  return false;
229
340
  },
230
341
  }), [
231
342
  isVisible,
232
- filteredResources,
343
+ displayItems,
233
344
  selectedIndexRef,
234
345
  searchQuery,
235
346
  onClose,
@@ -242,22 +353,20 @@ const ResourceAutocompleteInner = forwardRef(function ResourceAutocomplete({ isV
242
353
  if (isLoading) {
243
354
  return (_jsx(Box, { paddingX: 0, paddingY: 0, children: _jsx(Text, { color: "gray", children: "Loading resources..." }) }));
244
355
  }
245
- if (filteredResources.length === 0) {
356
+ if (displayItems.length === 0) {
246
357
  return (_jsx(Box, { paddingX: 0, paddingY: 0, children: _jsx(Text, { color: "gray", children: mentionQuery
247
358
  ? `No resources match "${mentionQuery}"`
248
359
  : 'No resources available. Connect an MCP server or enable internal resources.' }) }));
249
360
  }
250
- const totalItems = filteredResources.length;
251
- return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { paddingX: 0, paddingY: 0, children: _jsxs(Text, { color: "yellowBright", bold: true, children: ["Resources (", selectedIndex + 1, "/", totalItems, ") - \u2191\u2193 navigate, Tab load, Enter select, Esc close"] }) }), visibleResources.map((resource, visibleIndex) => {
252
- const actualIndex = scrollOffset + visibleIndex;
253
- const isSelected = actualIndex === selectedIndex;
254
- const uriParts = resource.uri.split('/');
255
- const displayName = resource.name || uriParts[uriParts.length - 1] || resource.uri;
256
- const isImage = (resource.mimeType || '').startsWith('image/');
257
- // Truncate URI for display (show last 40 chars with ellipsis)
258
- const truncatedUri = resource.uri.length > 50 ? '…' + resource.uri.slice(-49) : resource.uri;
259
- return (_jsxs(Box, { children: [isImage && _jsx(Text, { color: isSelected ? 'cyan' : 'gray', children: "\uD83D\uDDBC\uFE0F " }), _jsx(Text, { color: isSelected ? 'cyan' : 'white', bold: isSelected, children: displayName }), resource.serverName && (_jsxs(Text, { color: "gray", children: [" [", resource.serverName, "]"] })), _jsxs(Text, { color: "gray", children: [" ", truncatedUri] })] }, resource.uri));
260
- })] }));
361
+ return (_jsx(Box, { flexDirection: "column", paddingLeft: 2, children: visibleResources.map((item, visibleIndex) => {
362
+ const actualIndex = scrollOffset + visibleIndex;
363
+ const isSelected = actualIndex === selectedIndex;
364
+ // Use center truncation for long paths
365
+ const displayPath = centerTruncatePath(item.path, 60);
366
+ // Check if it's an image file
367
+ const isImage = item.resource?.mimeType?.startsWith('image/');
368
+ return (_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? 'cyan' : 'gray', children: isSelected ? '❯ ' : ' ' }), _jsxs(Text, { color: isSelected ? 'cyan' : 'white', bold: isSelected, children: [isImage && '🖼️ ', displayPath, item.resource?.serverName && ` [${item.resource.serverName}]`] })] }, item.path));
369
+ }) }));
261
370
  });
262
371
  /**
263
372
  * Export with React.memo to prevent unnecessary re-renders from parent
@@ -25,6 +25,8 @@ interface StatusBarProps {
25
25
  planModeActive?: boolean;
26
26
  /** Whether accept all edits mode is active */
27
27
  autoApproveEdits?: boolean;
28
+ /** Number of running background tasks */
29
+ backgroundTasksRunning?: number;
28
30
  }
29
31
  /**
30
32
  * Status bar that shows processing state above input area
@@ -34,6 +36,6 @@ interface StatusBarProps {
34
36
  * - Hide spinner during approval wait (user is reviewing, not waiting)
35
37
  * - Only show elapsed time after 30s (avoid visual noise for fast operations)
36
38
  */
37
- export declare function StatusBar({ agent, isProcessing, isThinking, isCompacting, approvalQueueCount, copyModeEnabled, isAwaitingApproval, todoExpanded, hasTodos, planModeActive, autoApproveEdits, }: StatusBarProps): import("react/jsx-runtime").JSX.Element | null;
39
+ export declare function StatusBar({ agent, isProcessing, isThinking, isCompacting, approvalQueueCount, copyModeEnabled, isAwaitingApproval, todoExpanded, hasTodos, planModeActive, autoApproveEdits, backgroundTasksRunning, }: StatusBarProps): import("react/jsx-runtime").JSX.Element | null;
38
40
  export {};
39
41
  //# sourceMappingURL=StatusBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,UAAU,cAAc;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,eAAuB,EACvB,kBAA0B,EAC1B,YAAmB,EACnB,QAAgB,EAChB,cAAsB,EACtB,gBAAwB,GAC3B,EAAE,cAAc,kDAuHhB"}
1
+ {"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,UAAU,cAAc;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yCAAyC;IACzC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,eAAuB,EACvB,kBAA0B,EAC1B,YAAmB,EACnB,QAAgB,EAChB,cAAsB,EACtB,gBAAwB,EACxB,sBAA0B,GAC7B,EAAE,cAAc,kDA8IhB"}
@@ -21,13 +21,17 @@ import { useTokenCounter } from '../hooks/useTokenCounter.js';
21
21
  * - Hide spinner during approval wait (user is reviewing, not waiting)
22
22
  * - Only show elapsed time after 30s (avoid visual noise for fast operations)
23
23
  */
24
- export function StatusBar({ agent, isProcessing, isThinking, isCompacting, approvalQueueCount, copyModeEnabled = false, isAwaitingApproval = false, todoExpanded = true, hasTodos = false, planModeActive = false, autoApproveEdits = false, }) {
24
+ export function StatusBar({ agent, isProcessing, isThinking, isCompacting, approvalQueueCount, copyModeEnabled = false, isAwaitingApproval = false, todoExpanded = true, hasTodos = false, planModeActive = false, autoApproveEdits = false, backgroundTasksRunning = 0, }) {
25
+ const animationsActive = isProcessing && !isAwaitingApproval && !copyModeEnabled;
25
26
  // Cycle through witty phrases while processing (not during compacting)
26
- const { phrase } = usePhraseCycler({ isActive: isProcessing && !isCompacting });
27
+ const { phrase } = usePhraseCycler({ isActive: animationsActive && !isCompacting });
27
28
  // Track elapsed time during processing
28
- const { formatted: elapsedTime, elapsedMs } = useElapsedTime({ isActive: isProcessing });
29
+ const { formatted: elapsedTime, elapsedMs } = useElapsedTime({
30
+ isActive: animationsActive,
31
+ intervalMs: 1000,
32
+ });
29
33
  // Track token usage during processing
30
- const { formatted: tokenCount } = useTokenCounter({ agent, isActive: isProcessing });
34
+ const { formatted: tokenCount } = useTokenCounter({ agent, isActive: animationsActive });
31
35
  // Only show time after 30 seconds
32
36
  const showTime = elapsedMs >= 30000;
33
37
  // Show copy mode warning (highest priority)
@@ -42,17 +46,23 @@ export function StatusBar({ agent, isProcessing, isThinking, isCompacting, appro
42
46
  if (isAwaitingApproval) {
43
47
  return null;
44
48
  }
45
- // Build the task toggle hint based on state
49
+ // Build the todo toggle hint based on state
46
50
  const todoHint = hasTodos
47
51
  ? todoExpanded
48
- ? 'ctrl+t to hide tasks'
49
- : 'ctrl+t to show tasks'
52
+ ? 'ctrl+t to hide todos'
53
+ : 'ctrl+t to show todos'
50
54
  : null;
55
+ const backgroundHint = backgroundTasksRunning > 0 ? 'ctrl+b to view bg tasks' : null;
51
56
  // Show compacting state - yellow/orange color to indicate context management
52
57
  if (isCompacting) {
53
58
  const metaParts = [];
54
59
  if (showTime)
55
60
  metaParts.push(`(${elapsedTime})`);
61
+ if (backgroundTasksRunning > 0) {
62
+ metaParts.push(`${backgroundTasksRunning} bg task${backgroundTasksRunning > 1 ? 's' : ''}`);
63
+ }
64
+ if (backgroundHint)
65
+ metaParts.push(backgroundHint);
56
66
  metaParts.push('Esc to cancel');
57
67
  if (todoHint)
58
68
  metaParts.push(todoHint);
@@ -68,6 +78,11 @@ export function StatusBar({ agent, isProcessing, isThinking, isCompacting, appro
68
78
  metaParts.push(`(${elapsedTime})`);
69
79
  if (tokenCount)
70
80
  metaParts.push(tokenCount);
81
+ if (backgroundTasksRunning > 0) {
82
+ metaParts.push(`${backgroundTasksRunning} bg task${backgroundTasksRunning > 1 ? 's' : ''}`);
83
+ }
84
+ if (backgroundHint)
85
+ metaParts.push(backgroundHint);
71
86
  metaParts.push('Esc to cancel');
72
87
  if (todoHint)
73
88
  metaParts.push(todoHint);
@@ -82,6 +97,11 @@ export function StatusBar({ agent, isProcessing, isThinking, isCompacting, appro
82
97
  metaParts.push(`(${elapsedTime})`);
83
98
  if (tokenCount)
84
99
  metaParts.push(tokenCount);
100
+ if (backgroundTasksRunning > 0) {
101
+ metaParts.push(`${backgroundTasksRunning} bg task${backgroundTasksRunning > 1 ? 's' : ''}`);
102
+ }
103
+ if (backgroundHint)
104
+ metaParts.push(backgroundHint);
85
105
  metaParts.push('Esc to cancel');
86
106
  if (todoHint)
87
107
  metaParts.push(todoHint);
@@ -36,7 +36,7 @@ export function TodoPanel({ todos, isExpanded, isProcessing = false }) {
36
36
  // Expanded + idle = boxed format
37
37
  const completedCount = todos.filter((t) => t.status === 'completed').length;
38
38
  const totalCount = todos.length;
39
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, marginX: 1, marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { bold: true, color: "cyan", children: ["\uD83D\uDCCB Tasks", ' '] }), _jsxs(Text, { color: "gray", children: ["(", completedCount, "/", totalCount, ")"] }), _jsxs(Text, { color: "gray", dimColor: true, children: [' ', "\u00B7 ctrl+t to hide tasks"] })] }), _jsx(Box, { flexDirection: "column", children: sortedTodos.map((todo) => {
39
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, marginX: 1, marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { bold: true, color: "cyan", children: ["\uD83D\uDCCB Todo", ' '] }), _jsxs(Text, { color: "gray", children: ["(", completedCount, "/", totalCount, ")"] }), _jsxs(Text, { color: "gray", dimColor: true, children: [' ', "\u00B7 ctrl+t to hide todo list"] })] }), _jsx(Box, { flexDirection: "column", children: sortedTodos.map((todo) => {
40
40
  const { icon, color } = getStatusIndicator(todo.status);
41
41
  const isCompleted = todo.status === 'completed';
42
42
  const isInProgress = todo.status === 'in_progress';
@@ -1 +1 @@
1
- {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/MessageItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACR,OAAO,EAUV,MAAM,sBAAsB,CAAC;AAmD9B,UAAU,gBAAgB;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,mEACc,gBAAgB,6CA+NrD,CAAC"}
1
+ {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/MessageItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACR,OAAO,EAUV,MAAM,sBAAsB,CAAC;AAoD9B,UAAU,gBAAgB;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,mEACc,gBAAgB,6CAyOrD,CAAC"}
@@ -11,6 +11,7 @@ import { ConfigBox, StatsBox, HelpBox, SessionListBox, SessionHistoryBox, LogCon
11
11
  import { ToolResultRenderer } from '../renderers/index.js';
12
12
  import { MarkdownText } from '../shared/MarkdownText.js';
13
13
  import { ToolIcon } from './ToolIcon.js';
14
+ import { formatToolResultPreview } from '../../utils/messageFormatting.js';
14
15
  /**
15
16
  * Strip <plan-mode>...</plan-mode> tags from content.
16
17
  * Plan mode instructions are injected for the LLM but should not be shown in the UI.
@@ -120,10 +121,13 @@ export const MessageItem = memo(({ message, terminalWidth = 80 }) => {
120
121
  const isPending = message.toolStatus === 'pending' || message.toolStatus === 'pending_approval';
121
122
  // Check for sub-agent progress data
122
123
  const subAgentProgress = message.subAgentProgress;
124
+ const contentLines = message.content.split('\n');
125
+ const headerLine = contentLines[0] ?? '';
126
+ const subHeaderLine = contentLines.length > 1 ? contentLines[1] : '';
123
127
  // Parse tool name and args for bold formatting: "ToolName(args)" → bold name + normal args
124
- const parenIndex = message.content.indexOf('(');
125
- const toolName = parenIndex > 0 ? message.content.slice(0, parenIndex) : message.content;
126
- const toolArgs = parenIndex > 0 ? message.content.slice(parenIndex) : '';
128
+ const parenIndex = headerLine.indexOf('(');
129
+ const toolName = parenIndex > 0 ? headerLine.slice(0, parenIndex) : headerLine;
130
+ const toolArgs = parenIndex > 0 ? headerLine.slice(parenIndex) : '';
127
131
  // Build the full tool header text for wrapping
128
132
  // Don't include status suffix if we have sub-agent progress (it shows its own status)
129
133
  const statusSuffix = subAgentProgress
@@ -143,10 +147,10 @@ export const MessageItem = memo(({ message, terminalWidth = 80 }) => {
143
147
  trim: false,
144
148
  });
145
149
  const toolLines = wrappedToolText.split('\n');
146
- return (_jsxs(Box, { flexDirection: "column", marginTop: 1, width: terminalWidth, children: [toolLines.map((line, i) => (_jsxs(Box, { flexDirection: "row", children: [i === 0 ? (_jsx(ToolIcon, { status: message.toolStatus || 'finished', isError: message.isError ?? false })) : (_jsx(Text, { children: ' ' })), _jsx(Text, { children: i === 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { bold: true, children: line.slice(0, toolName.length) }), _jsx(Text, { children: line.slice(toolName.length) })] })) : (line) })] }, i))), subAgentProgress && isRunning && (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { color: "gray", children: ["\u2514\u2500 ", subAgentProgress.toolsCalled, " tool", subAgentProgress.toolsCalled !== 1 ? 's' : '', " called | Current:", ' ', subAgentProgress.currentTool, subAgentProgress.tokenUsage &&
150
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, width: terminalWidth, children: [toolLines.map((line, i) => (_jsxs(Box, { flexDirection: "row", children: [i === 0 ? (_jsx(ToolIcon, { status: message.toolStatus || 'finished', isError: message.isError ?? false })) : (_jsx(Text, { children: ' ' })), _jsx(Text, { children: i === 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { bold: true, children: line.slice(0, toolName.length) }), _jsx(Text, { children: line.slice(toolName.length) })] })) : (line) })] }, i))), subHeaderLine && (_jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "gray", children: subHeaderLine }) })), subAgentProgress && isRunning && (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { color: "gray", children: ["\u2514\u2500 ", subAgentProgress.toolsCalled, " tool", subAgentProgress.toolsCalled !== 1 ? 's' : '', " called | Current:", ' ', subAgentProgress.currentTool, subAgentProgress.tokenUsage &&
147
151
  subAgentProgress.tokenUsage.total > 0
148
152
  ? ` | ${subAgentProgress.tokenUsage.total.toLocaleString()} tokens`
149
- : ''] }) })), hasStructuredDisplay ? (_jsx(ToolResultRenderer, { display: message.toolDisplayData, content: message.toolContent })) : (message.toolResult && (_jsx(Box, { flexDirection: "column", children: _jsxs(Text, { color: "gray", children: [" \u23BF ", message.toolResult] }) })))] }));
153
+ : ''] }) })), hasStructuredDisplay ? (_jsx(ToolResultRenderer, { display: message.toolDisplayData, content: message.toolContent })) : (message.toolResult && (_jsx(Box, { flexDirection: "column", children: _jsxs(Text, { color: "gray", children: ["\u23BF ", formatToolResultPreview(message.toolResult)] }) })))] }));
150
154
  }
151
155
  // System message: Compact gray text
152
156
  return (_jsx(Box, { flexDirection: "column", marginBottom: 1, width: terminalWidth, children: _jsx(Text, { color: "gray", children: message.content }) }));
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text } from 'ink';
3
3
  import { StyledBox, StyledSection, StyledRow } from './StyledBox.js';
4
4
  export function ConfigBox({ data }) {
5
- return (_jsxs(StyledBox, { title: "Runtime Configuration", titleColor: "cyan", children: [data.configFilePath && (_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: "Agent config: " }), _jsx(Text, { color: "blue", children: data.configFilePath })] })), _jsxs(StyledSection, { title: "LLM", children: [_jsx(StyledRow, { label: "Provider", value: data.provider }), _jsx(StyledRow, { label: "Model", value: data.model }), data.maxTokens !== null && (_jsx(StyledRow, { label: "Max Tokens", value: data.maxTokens.toString() })), data.temperature !== null && (_jsx(StyledRow, { label: "Temperature", value: data.temperature.toString() }))] }), _jsx(StyledSection, { title: "Tool Confirmation", children: _jsx(StyledRow, { label: "Mode", value: data.toolConfirmationMode }) }), _jsxs(StyledSection, { title: "Sessions", children: [_jsx(StyledRow, { label: "Max Sessions", value: data.maxSessions }), _jsx(StyledRow, { label: "Session TTL", value: data.sessionTTL })] }), _jsx(StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? (data.mcpServers.map((server) => (_jsx(Box, { children: _jsx(Text, { color: "cyan", children: server }) }, server)))) : (_jsx(Text, { color: "gray", children: "No MCP servers configured" })) }), data.promptsCount > 0 && (_jsx(StyledSection, { title: "Prompts", children: _jsxs(Text, { color: "gray", children: [data.promptsCount, " prompt(s) configured"] }) })), data.pluginsEnabled.length > 0 && (_jsx(StyledSection, { title: "Plugins", children: data.pluginsEnabled.map((plugin) => (_jsx(Box, { children: _jsx(Text, { color: "green", children: plugin }) }, plugin))) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })] }));
5
+ return (_jsxs(StyledBox, { title: "Runtime Configuration", titleColor: "cyan", children: [data.configFilePath && (_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: "Agent config: " }), _jsx(Text, { color: "blue", children: data.configFilePath })] })), _jsxs(StyledSection, { title: "LLM", children: [_jsx(StyledRow, { label: "Provider", value: data.provider }), _jsx(StyledRow, { label: "Model", value: data.model }), data.maxTokens !== null && (_jsx(StyledRow, { label: "Max Tokens", value: data.maxTokens.toString() })), data.temperature !== null && (_jsx(StyledRow, { label: "Temperature", value: data.temperature.toString() }))] }), _jsx(StyledSection, { title: "Permissions", children: _jsx(StyledRow, { label: "Mode", value: data.permissionsMode }) }), _jsxs(StyledSection, { title: "Sessions", children: [_jsx(StyledRow, { label: "Max Sessions", value: data.maxSessions }), _jsx(StyledRow, { label: "Session TTL", value: data.sessionTTL })] }), _jsx(StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? (data.mcpServers.map((server) => (_jsx(Box, { children: _jsx(Text, { color: "cyan", children: server }) }, server)))) : (_jsx(Text, { color: "gray", children: "No MCP servers configured" })) }), data.promptsCount > 0 && (_jsx(StyledSection, { title: "Prompts", children: _jsxs(Text, { color: "gray", children: [data.promptsCount, " prompt(s) configured"] }) })), data.hooksEnabled.length > 0 && (_jsx(StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => (_jsx(Box, { children: _jsx(Text, { color: "green", children: hook }) }, hook))) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })] }));
6
6
  }
@@ -14,12 +14,14 @@ import type { StartupInfo } from '../../state/types.js';
14
14
  interface AlternateBufferCLIProps {
15
15
  agent: DextoAgent;
16
16
  initialSessionId: string | null;
17
+ initialPrompt?: string | undefined;
17
18
  startupInfo: StartupInfo;
19
+ configFilePath: string | null;
18
20
  /** Callback when user attempts to select text (drag without Option key) */
19
21
  onSelectionAttempt?: () => void;
20
22
  /** Whether to stream chunks or wait for complete response */
21
23
  useStreaming?: boolean;
22
24
  }
23
- export declare function AlternateBufferCLI({ agent, initialSessionId, startupInfo, onSelectionAttempt, useStreaming, }: AlternateBufferCLIProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function AlternateBufferCLI({ agent, initialSessionId, initialPrompt, startupInfo, configFilePath, onSelectionAttempt, useStreaming, }: AlternateBufferCLIProps): import("react/jsx-runtime").JSX.Element;
24
26
  export {};
25
27
  //# sourceMappingURL=AlternateBufferCLI.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlternateBufferCLI.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/modes/AlternateBufferCLI.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA6BjE,UAAU,uBAAuB;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,YAAmB,GACtB,EAAE,uBAAuB,2CAiVzB"}
1
+ {"version":3,"file":"AlternateBufferCLI.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/modes/AlternateBufferCLI.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA8BjE,UAAU,uBAAuB;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,YAAmB,GACtB,EAAE,uBAAuB,2CA4VzB"}
@@ -25,11 +25,12 @@ import { StatusBar } from '../StatusBar.js';
25
25
  import { HistorySearchBar } from '../HistorySearchBar.js';
26
26
  import { Footer } from '../Footer.js';
27
27
  import { TodoPanel } from '../TodoPanel.js';
28
+ import { BackgroundTasksPanel } from '../BackgroundTasksPanel.js';
28
29
  import { VirtualizedList, SCROLL_TO_ITEM_END, } from '../shared/VirtualizedList.js';
29
30
  // Containers
30
31
  import { InputContainer } from '../../containers/InputContainer.js';
31
32
  import { OverlayContainer } from '../../containers/OverlayContainer.js';
32
- export function AlternateBufferCLI({ agent, initialSessionId, startupInfo, onSelectionAttempt, useStreaming = true, }) {
33
+ export function AlternateBufferCLI({ agent, initialSessionId, initialPrompt, startupInfo, configFilePath, onSelectionAttempt, useStreaming = true, }) {
33
34
  // Refs for VirtualizedList
34
35
  const listRef = useRef(null);
35
36
  const listContainerRef = useRef(null);
@@ -175,5 +176,5 @@ export function AlternateBufferCLI({ agent, initialSessionId, startupInfo, onSel
175
176
  return 'header';
176
177
  return item.message.id;
177
178
  }, []);
178
- return (_jsxs(Box, { flexDirection: "column", height: terminalHeight, children: [_jsx(Box, { ref: listContainerRef, flexGrow: 1, flexShrink: 1, minHeight: 0, children: _jsx(VirtualizedList, { ref: listRef, data: listData, renderItem: renderListItem, estimatedItemHeight: estimateItemHeight, keyExtractor: getItemKey, initialScrollIndex: SCROLL_TO_ITEM_END, initialScrollOffsetInIndex: SCROLL_TO_ITEM_END }) }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsx(StatusBar, { agent: agent, isProcessing: ui.isProcessing, isThinking: ui.isThinking, isCompacting: ui.isCompacting, approvalQueueCount: approvalQueue.length, copyModeEnabled: ui.copyModeEnabled, isAwaitingApproval: approval !== null, todoExpanded: ui.todoExpanded, hasTodos: todos.some((t) => t.status !== 'completed'), planModeActive: ui.planModeActive, autoApproveEdits: ui.autoApproveEdits }), _jsx(TodoPanel, { todos: todos, isExpanded: ui.todoExpanded, isProcessing: ui.isProcessing }), selectionHintVisible && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "yellowBright", children: "\uD83D\uDCA1 Tip: Hold Option (\u2325) and click to select text, or press Ctrl+S to toggle copy mode" }) })), _jsx(QueuedMessagesDisplay, { messages: queuedMessages }), _jsx(InputContainer, { ref: inputContainerRef, buffer: buffer, input: input, ui: ui, session: session, approval: approval, queuedMessages: queuedMessages, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setPendingMessages: setPendingMessages, setDequeuedBuffer: setDequeuedBuffer, setQueuedMessages: setQueuedMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, setTodos: setTodos, agent: agent, inputService: inputService, onKeyboardScroll: handleKeyboardScroll, useStreaming: useStreaming }), _jsx(OverlayContainer, { ref: overlayContainerRef, ui: ui, input: input, session: session, approval: approval, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, agent: agent, inputService: inputService, buffer: buffer, onSubmitPromptCommand: handleSubmitPromptCommand }), ui.exitWarningShown && (_jsxs(Box, { paddingX: 1, children: [_jsx(Text, { color: "yellowBright", bold: true, children: "\u26A0 Press Ctrl+C again to exit" }), _jsx(Text, { color: "gray", children: " (or press any key to cancel)" })] })), _jsx(Footer, { agent: agent, sessionId: session.id, modelName: session.modelName, cwd: process.cwd(), ...(branchName ? { branchName } : {}), autoApproveEdits: ui.autoApproveEdits, planModeActive: ui.planModeActive, isShellMode: buffer.text.startsWith('!') }), ui.historySearch.isActive && (_jsx(HistorySearchBar, { query: ui.historySearch.query, hasMatch: historySearchHasMatch }))] })] }));
179
+ return (_jsxs(Box, { flexDirection: "column", height: terminalHeight, children: [_jsx(Box, { ref: listContainerRef, flexGrow: 1, flexShrink: 1, minHeight: 0, children: _jsx(VirtualizedList, { ref: listRef, data: listData, renderItem: renderListItem, estimatedItemHeight: estimateItemHeight, keyExtractor: getItemKey, initialScrollIndex: SCROLL_TO_ITEM_END, initialScrollOffsetInIndex: SCROLL_TO_ITEM_END }) }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsx(StatusBar, { agent: agent, isProcessing: ui.isProcessing, isThinking: ui.isThinking, isCompacting: ui.isCompacting, approvalQueueCount: approvalQueue.length, copyModeEnabled: ui.copyModeEnabled, isAwaitingApproval: approval !== null, todoExpanded: ui.todoExpanded, hasTodos: todos.some((t) => t.status !== 'completed'), planModeActive: ui.planModeActive, autoApproveEdits: ui.autoApproveEdits, backgroundTasksRunning: ui.backgroundTasksRunning }), _jsx(BackgroundTasksPanel, { tasks: ui.backgroundTasks, isExpanded: ui.backgroundTasksExpanded, isProcessing: ui.isProcessing }), _jsx(TodoPanel, { todos: todos, isExpanded: ui.todoExpanded, isProcessing: ui.isProcessing }), selectionHintVisible && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "yellowBright", children: "\uD83D\uDCA1 Tip: Hold Option (\u2325) and click to select text, or press Ctrl+S to toggle copy mode" }) })), _jsx(QueuedMessagesDisplay, { messages: queuedMessages }), _jsx(InputContainer, { ref: inputContainerRef, buffer: buffer, input: input, ui: ui, session: session, initialPrompt: initialPrompt, approval: approval, queuedMessages: queuedMessages, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setPendingMessages: setPendingMessages, setDequeuedBuffer: setDequeuedBuffer, setQueuedMessages: setQueuedMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, setTodos: setTodos, agent: agent, inputService: inputService, onKeyboardScroll: handleKeyboardScroll, useStreaming: useStreaming, configFilePath: configFilePath }), _jsx(OverlayContainer, { ref: overlayContainerRef, ui: ui, input: input, session: session, approval: approval, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, agent: agent, inputService: inputService, buffer: buffer, onSubmitPromptCommand: handleSubmitPromptCommand, configFilePath: configFilePath }), ui.exitWarningShown && (_jsxs(Box, { paddingX: 1, children: [_jsx(Text, { color: "yellowBright", bold: true, children: "\u26A0 Press Ctrl+C again to exit" }), _jsx(Text, { color: "gray", children: " (or press any key to cancel)" })] })), _jsx(Footer, { agent: agent, sessionId: session.id, modelName: session.modelName, cwd: process.cwd(), ...(branchName ? { branchName } : {}), autoApproveEdits: ui.autoApproveEdits, planModeActive: ui.planModeActive, isShellMode: buffer.text.startsWith('!') }), ui.historySearch.isActive && (_jsx(HistorySearchBar, { query: ui.historySearch.query, hasMatch: historySearchHasMatch }))] })] }));
179
180
  }
@@ -18,10 +18,12 @@ import type { StartupInfo } from '../../state/types.js';
18
18
  interface StaticCLIProps {
19
19
  agent: DextoAgent;
20
20
  initialSessionId: string | null;
21
+ initialPrompt?: string | undefined;
21
22
  startupInfo: StartupInfo;
23
+ configFilePath: string | null;
22
24
  /** Whether to stream chunks or wait for complete response */
23
25
  useStreaming?: boolean;
24
26
  }
25
- export declare function StaticCLI({ agent, initialSessionId, startupInfo, useStreaming, }: StaticCLIProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function StaticCLI({ agent, initialSessionId, initialPrompt, startupInfo, configFilePath, useStreaming, }: StaticCLIProps): import("react/jsx-runtime").JSX.Element;
26
28
  export {};
27
29
  //# sourceMappingURL=StaticCLI.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StaticCLI.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/modes/StaticCLI.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAoBxD,UAAU,cAAc;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAmB,GACtB,EAAE,cAAc,2CA2OhB"}
1
+ {"version":3,"file":"StaticCLI.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/modes/StaticCLI.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAqBxD,UAAU,cAAc;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAmB,GACtB,EAAE,cAAc,2CAsPhB"}
@@ -30,10 +30,11 @@ import { StatusBar } from '../StatusBar.js';
30
30
  import { HistorySearchBar } from '../HistorySearchBar.js';
31
31
  import { Footer } from '../Footer.js';
32
32
  import { TodoPanel } from '../TodoPanel.js';
33
+ import { BackgroundTasksPanel } from '../BackgroundTasksPanel.js';
33
34
  // Containers
34
35
  import { InputContainer } from '../../containers/InputContainer.js';
35
36
  import { OverlayContainer } from '../../containers/OverlayContainer.js';
36
- export function StaticCLI({ agent, initialSessionId, startupInfo, useStreaming = true, }) {
37
+ export function StaticCLI({ agent, initialSessionId, initialPrompt, startupInfo, configFilePath, useStreaming = true, }) {
37
38
  // Use shared CLI state (no keyboard scroll in Static mode)
38
39
  const { messages, setMessages, pendingMessages, setPendingMessages, dequeuedBuffer, setDequeuedBuffer, queuedMessages, setQueuedMessages, todos, setTodos, ui, setUi, input, setInput, session, setSession, approval, setApproval, approvalQueue, setApprovalQueue, inputService, buffer, overlayContainerRef, visibleMessages, } = useCLIState({
39
40
  agent,
@@ -102,5 +103,5 @@ export function StaticCLI({ agent, initialSessionId, startupInfo, useStreaming =
102
103
  startupInfo,
103
104
  terminalWidth,
104
105
  ]);
105
- return (_jsxs(Box, { flexDirection: "column", width: terminalWidth, children: [_jsx(Static, { items: staticItems, children: (item) => item }, staticRemountKey), pendingMessages.map((message) => (_jsx(MessageItem, { message: message, terminalWidth: terminalWidth }, message.id))), dequeuedBuffer.map((message) => (_jsx(MessageItem, { message: message, terminalWidth: terminalWidth }, message.id))), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsx(StatusBar, { agent: agent, isProcessing: ui.isProcessing, isThinking: ui.isThinking, isCompacting: ui.isCompacting, approvalQueueCount: approvalQueue.length, copyModeEnabled: ui.copyModeEnabled, isAwaitingApproval: approval !== null, todoExpanded: ui.todoExpanded, hasTodos: todos.some((t) => t.status !== 'completed'), planModeActive: ui.planModeActive, autoApproveEdits: ui.autoApproveEdits }), _jsx(TodoPanel, { todos: todos, isExpanded: ui.todoExpanded, isProcessing: ui.isProcessing }), _jsx(QueuedMessagesDisplay, { messages: queuedMessages }), _jsx(InputContainer, { ref: inputContainerRef, buffer: buffer, input: input, ui: ui, session: session, approval: approval, queuedMessages: queuedMessages, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setPendingMessages: setPendingMessages, setDequeuedBuffer: setDequeuedBuffer, setQueuedMessages: setQueuedMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, setTodos: setTodos, agent: agent, inputService: inputService, useStreaming: useStreaming }), _jsx(OverlayContainer, { ref: overlayContainerRef, ui: ui, input: input, session: session, approval: approval, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, agent: agent, inputService: inputService, buffer: buffer, refreshStatic: refreshStatic, onSubmitPromptCommand: handleSubmitPromptCommand }), ui.exitWarningShown && (_jsxs(Box, { paddingX: 1, children: [_jsx(Text, { color: "yellowBright", bold: true, children: "\u26A0 Press Ctrl+C again to exit" }), _jsx(Text, { color: "gray", children: " (or press any key to cancel)" })] })), _jsx(Footer, { agent: agent, sessionId: session.id, modelName: session.modelName, cwd: process.cwd(), ...(branchName ? { branchName } : {}), autoApproveEdits: ui.autoApproveEdits, planModeActive: ui.planModeActive, isShellMode: buffer.text.startsWith('!') }), ui.historySearch.isActive && (_jsx(HistorySearchBar, { query: ui.historySearch.query, hasMatch: historySearchHasMatch }))] })] }));
106
+ return (_jsxs(Box, { flexDirection: "column", width: terminalWidth, children: [_jsx(Static, { items: staticItems, children: (item) => item }, staticRemountKey), pendingMessages.map((message) => (_jsx(MessageItem, { message: message, terminalWidth: terminalWidth }, message.id))), dequeuedBuffer.map((message) => (_jsx(MessageItem, { message: message, terminalWidth: terminalWidth }, message.id))), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsx(StatusBar, { agent: agent, isProcessing: ui.isProcessing, isThinking: ui.isThinking, isCompacting: ui.isCompacting, approvalQueueCount: approvalQueue.length, copyModeEnabled: ui.copyModeEnabled, isAwaitingApproval: approval !== null, todoExpanded: ui.todoExpanded, hasTodos: todos.some((t) => t.status !== 'completed'), planModeActive: ui.planModeActive, autoApproveEdits: ui.autoApproveEdits, backgroundTasksRunning: ui.backgroundTasksRunning }), _jsx(BackgroundTasksPanel, { tasks: ui.backgroundTasks, isExpanded: ui.backgroundTasksExpanded, isProcessing: ui.isProcessing }), _jsx(TodoPanel, { todos: todos, isExpanded: ui.todoExpanded, isProcessing: ui.isProcessing }), _jsx(QueuedMessagesDisplay, { messages: queuedMessages }), _jsx(InputContainer, { ref: inputContainerRef, buffer: buffer, input: input, ui: ui, session: session, initialPrompt: initialPrompt, approval: approval, queuedMessages: queuedMessages, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setPendingMessages: setPendingMessages, setDequeuedBuffer: setDequeuedBuffer, setQueuedMessages: setQueuedMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, setTodos: setTodos, agent: agent, inputService: inputService, useStreaming: useStreaming, configFilePath: configFilePath }), _jsx(OverlayContainer, { ref: overlayContainerRef, ui: ui, input: input, session: session, approval: approval, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, agent: agent, inputService: inputService, buffer: buffer, refreshStatic: refreshStatic, onSubmitPromptCommand: handleSubmitPromptCommand, configFilePath: configFilePath }), ui.exitWarningShown && (_jsxs(Box, { paddingX: 1, children: [_jsx(Text, { color: "yellowBright", bold: true, children: "\u26A0 Press Ctrl+C again to exit" }), _jsx(Text, { color: "gray", children: " (or press any key to cancel)" })] })), _jsx(Footer, { agent: agent, sessionId: session.id, modelName: session.modelName, cwd: process.cwd(), ...(branchName ? { branchName } : {}), autoApproveEdits: ui.autoApproveEdits, planModeActive: ui.planModeActive, isShellMode: buffer.text.startsWith('!') }), ui.historySearch.isActive && (_jsx(HistorySearchBar, { query: ui.historySearch.query, hasMatch: historySearchHasMatch }))] })] }));
106
107
  }
@@ -184,7 +184,7 @@ const ContextStatsOverlay = forwardRef(function ContextStatsOverlay({ isVisible,
184
184
  }
185
185
  // Error state
186
186
  if (error) {
187
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 2, paddingY: 1, children: [_jsx(Text, { color: "red", bold: true, children: "\u274C Error" }), _jsx(Text, { color: "gray", children: error }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, children: "Press Esc to close" }) })] }));
187
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 2, paddingY: 1, children: [_jsx(Text, { color: "red", bold: true, children: "Error" }), _jsx(Text, { color: "gray", children: error }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, children: "Press Esc to close" }) })] }));
188
188
  }
189
189
  if (!stats)
190
190
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomModelWizard.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/CustomModelWizard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAIH,KAAK,WAAW,EAMnB,MAAM,yBAAyB,CAAC;AAmBjC,UAAU,sBAAsB;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uEAAuE;IACvE,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;;GAGG;AACH,QAAA,MAAM,iBAAiB,wGAwYtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"CustomModelWizard.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/CustomModelWizard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAGH,KAAK,WAAW,EAMnB,MAAM,yBAAyB,CAAC;AAoBjC,UAAU,sBAAsB;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uEAAuE;IACvE,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;;GAGG;AACH,QAAA,MAAM,iBAAiB,wGA4YtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}