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
@@ -9,25 +9,15 @@ export interface SyncAgentsCommandOptions {
9
9
  /** Minimal output - used when called from startup prompt */
10
10
  quiet?: boolean;
11
11
  }
12
- /**
13
- * Mark sync as dismissed for current version
14
- */
15
- export declare function markSyncDismissed(currentVersion: string): Promise<void>;
16
- /**
17
- * Clear sync dismissed state (called after successful sync)
18
- */
19
- export declare function clearSyncDismissed(): Promise<void>;
20
12
  /**
21
13
  * Quick check if any installed agents have updates available
22
14
  *
23
15
  * Used at CLI startup to prompt for sync without full command output.
24
- * Returns true if at least one installed agent differs from bundled
25
- * AND the user hasn't dismissed the prompt for this version.
16
+ * Returns true if at least one installed agent differs from bundled.
26
17
  *
27
- * @param currentVersion Current CLI version to check dismissal state
28
18
  * @returns true if should prompt for sync
29
19
  */
30
- export declare function shouldPromptForSync(currentVersion: string): Promise<boolean>;
20
+ export declare function shouldPromptForSync(): Promise<boolean>;
31
21
  /**
32
22
  * Main handler for the sync-agents command
33
23
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sync-agents.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sync-agents.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAgND;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAS7E;AAED;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAWxD;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA8BlF;AAoDD;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiO9F"}
1
+ {"version":3,"file":"sync-agents.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sync-agents.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AA6LD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAyB5D;AAoDD;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiO9F"}
@@ -160,64 +160,16 @@ async function getAgentStatus(agentId, agentEntry) {
160
160
  };
161
161
  }
162
162
  }
163
- // Store sync dismissed state in cache directory
164
- const SYNC_DISMISSED_PATH = getDextoGlobalPath('cache', 'sync-dismissed.json');
165
- /**
166
- * Check if sync was dismissed for current version
167
- */
168
- async function wasSyncDismissed(currentVersion) {
169
- try {
170
- const content = await fs.readFile(SYNC_DISMISSED_PATH, 'utf-8');
171
- const data = JSON.parse(content);
172
- return data.version === currentVersion;
173
- }
174
- catch (error) {
175
- logger.debug(`Could not read sync dismissed state: ${error instanceof Error ? error.message : String(error)}`);
176
- return false;
177
- }
178
- }
179
- /**
180
- * Mark sync as dismissed for current version
181
- */
182
- export async function markSyncDismissed(currentVersion) {
183
- try {
184
- await fs.mkdir(path.dirname(SYNC_DISMISSED_PATH), { recursive: true });
185
- await fs.writeFile(SYNC_DISMISSED_PATH, JSON.stringify({ version: currentVersion }));
186
- }
187
- catch (error) {
188
- logger.debug(`Could not save sync dismissed state: ${error instanceof Error ? error.message : String(error)}`);
189
- }
190
- }
191
- /**
192
- * Clear sync dismissed state (called after successful sync)
193
- */
194
- export async function clearSyncDismissed() {
195
- try {
196
- await fs.unlink(SYNC_DISMISSED_PATH);
197
- }
198
- catch (error) {
199
- // File might not exist - only log if it's a different error
200
- if (error.code !== 'ENOENT') {
201
- logger.debug(`Could not clear sync dismissed state: ${error instanceof Error ? error.message : String(error)}`);
202
- }
203
- }
204
- }
205
163
  /**
206
164
  * Quick check if any installed agents have updates available
207
165
  *
208
166
  * Used at CLI startup to prompt for sync without full command output.
209
- * Returns true if at least one installed agent differs from bundled
210
- * AND the user hasn't dismissed the prompt for this version.
167
+ * Returns true if at least one installed agent differs from bundled.
211
168
  *
212
- * @param currentVersion Current CLI version to check dismissal state
213
169
  * @returns true if should prompt for sync
214
170
  */
215
- export async function shouldPromptForSync(currentVersion) {
171
+ export async function shouldPromptForSync() {
216
172
  try {
217
- // Check if user already dismissed for this version
218
- if (await wasSyncDismissed(currentVersion)) {
219
- return false;
220
- }
221
173
  const bundledAgents = loadBundledRegistryAgents();
222
174
  const installedAgentIds = await getInstalledAgentIds();
223
175
  for (const agentId of installedAgentIds) {
@@ -13,8 +13,10 @@ import type { SoundNotificationService } from './utils/soundNotification.js';
13
13
  interface InkCLIProps {
14
14
  agent: DextoAgent;
15
15
  initialSessionId: string | null;
16
+ initialPrompt?: string | undefined;
16
17
  startupInfo: StartupInfo;
17
18
  soundService: SoundNotificationService | null;
19
+ configFilePath: string | null;
18
20
  }
19
21
  /**
20
22
  * Modern CLI interface using React Ink
@@ -24,7 +26,7 @@ interface InkCLIProps {
24
26
  * - KeypressProvider for unified keyboard input
25
27
  * - MouseProvider (only in alternate buffer mode)
26
28
  */
27
- export declare function InkCLIRefactored({ agent, initialSessionId, startupInfo, soundService, }: InkCLIProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function InkCLIRefactored({ agent, initialSessionId, initialPrompt, startupInfo, soundService, configFilePath, }: InkCLIProps): import("react/jsx-runtime").JSX.Element;
28
30
  /**
29
31
  * Options for starting the Ink CLI
30
32
  */
@@ -37,6 +39,10 @@ export interface InkCLIOptions {
37
39
  } | undefined;
38
40
  /** True if installed agents differ from bundled and user should sync */
39
41
  needsAgentSync?: boolean | undefined;
42
+ /** Source agent config file path (if available) */
43
+ configFilePath?: string | null | undefined;
44
+ /** If provided, auto-submits this prompt once the UI is ready */
45
+ initialPrompt?: string | undefined;
40
46
  }
41
47
  /**
42
48
  * Start the modern Ink-based CLI
@@ -1 +1 @@
1
- {"version":3,"file":"InkCLIRefactored.d.ts","sourceRoot":"","sources":["../../../src/cli/ink-cli/InkCLIRefactored.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAWpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAiB7E,UAAU,WAAW;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACjD;AA6CD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAY,GACf,EAAE,WAAW,2CAgBb;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,kDAAkD;IAClD,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACpF,wEAAwE;IACxE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACvC,KAAK,EAAE,UAAU,EACjB,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,OAAO,GAAE,aAAkB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAuEf"}
1
+ {"version":3,"file":"InkCLIRefactored.d.ts","sourceRoot":"","sources":["../../../src/cli/ink-cli/InkCLIRefactored.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAWpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAiB7E,UAAU,WAAW;IACjB,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,YAAY,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC9C,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAwDD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,GACjB,EAAE,WAAW,2CAkBb;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,kDAAkD;IAClD,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACpF,wEAAwE;IACxE,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACrC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACvC,KAAK,EAAE,UAAU,EACjB,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAC/B,OAAO,GAAE,aAAkB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAwFf"}
@@ -28,7 +28,7 @@ const USE_ALTERNATE_BUFFER = false;
28
28
  /**
29
29
  * Inner component that wraps the mode-specific component with providers
30
30
  */
31
- function InkCLIInner({ agent, initialSessionId, startupInfo, soundService }) {
31
+ function InkCLIInner({ agent, initialSessionId, initialPrompt, startupInfo, soundService, configFilePath, }) {
32
32
  // Selection hint callback for alternate buffer mode
33
33
  const [, setSelectionHintShown] = useState(false);
34
34
  // Streaming mode - can be toggled via /stream command
@@ -37,10 +37,10 @@ function InkCLIInner({ agent, initialSessionId, startupInfo, soundService }) {
37
37
  setSelectionHintShown(true);
38
38
  }, []);
39
39
  if (USE_ALTERNATE_BUFFER) {
40
- return (_jsx(SoundProvider, { soundService: soundService, children: _jsx(ScrollProvider, { onSelectionAttempt: handleSelectionAttempt, children: _jsx(AlternateBufferCLI, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo, onSelectionAttempt: handleSelectionAttempt, useStreaming: streaming }) }) }));
40
+ return (_jsx(SoundProvider, { soundService: soundService, children: _jsx(ScrollProvider, { onSelectionAttempt: handleSelectionAttempt, children: _jsx(AlternateBufferCLI, { agent: agent, initialSessionId: initialSessionId, initialPrompt: initialPrompt, startupInfo: startupInfo, onSelectionAttempt: handleSelectionAttempt, useStreaming: streaming, configFilePath: configFilePath }) }) }));
41
41
  }
42
42
  // Static mode - no ScrollProvider needed
43
- return (_jsx(SoundProvider, { soundService: soundService, children: _jsx(StaticCLI, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo, useStreaming: streaming }) }));
43
+ return (_jsx(SoundProvider, { soundService: soundService, children: _jsx(StaticCLI, { agent: agent, initialSessionId: initialSessionId, initialPrompt: initialPrompt, startupInfo: startupInfo, useStreaming: streaming, configFilePath: configFilePath }) }));
44
44
  }
45
45
  /**
46
46
  * Modern CLI interface using React Ink
@@ -50,8 +50,8 @@ function InkCLIInner({ agent, initialSessionId, startupInfo, soundService }) {
50
50
  * - KeypressProvider for unified keyboard input
51
51
  * - MouseProvider (only in alternate buffer mode)
52
52
  */
53
- export function InkCLIRefactored({ agent, initialSessionId, startupInfo, soundService, }) {
54
- return (_jsx(ErrorBoundary, { children: _jsx(KeypressProvider, { children: _jsx(MouseProvider, { mouseEventsEnabled: USE_ALTERNATE_BUFFER, children: _jsx(InkCLIInner, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo, soundService: soundService }) }) }) }));
53
+ export function InkCLIRefactored({ agent, initialSessionId, initialPrompt, startupInfo, soundService, configFilePath, }) {
54
+ return (_jsx(ErrorBoundary, { children: _jsx(KeypressProvider, { children: _jsx(MouseProvider, { mouseEventsEnabled: USE_ALTERNATE_BUFFER, children: _jsx(InkCLIInner, { agent: agent, initialSessionId: initialSessionId, initialPrompt: initialPrompt, startupInfo: startupInfo, soundService: soundService, configFilePath: configFilePath }) }) }) }));
55
55
  }
56
56
  /**
57
57
  * Start the modern Ink-based CLI
@@ -70,7 +70,7 @@ export async function startInkCliRefactored(agent, initialSessionId, options = {
70
70
  };
71
71
  // Initialize sound service from preferences
72
72
  const { SoundNotificationService } = await import('./utils/soundNotification.js');
73
- const { globalPreferencesExist, loadGlobalPreferences } = await import('@dexto/agent-management');
73
+ const { globalPreferencesExist, loadGlobalPreferences, agentPreferencesExist, loadAgentPreferences, } = await import('@dexto/agent-management');
74
74
  let soundService = null;
75
75
  // Initialize sound config with defaults (enabled by default even without preferences file)
76
76
  let soundConfig = {
@@ -97,7 +97,17 @@ export async function startInkCliRefactored(agent, initialSessionId, options = {
97
97
  if (soundConfig.enabled) {
98
98
  soundService = new SoundNotificationService(soundConfig);
99
99
  }
100
- const inkApp = render(_jsx(InkCLIRefactored, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo, soundService: soundService }), {
100
+ // Initialize tool preferences (per-agent)
101
+ if (agentPreferencesExist(agent.config.agentId)) {
102
+ try {
103
+ const preferences = await loadAgentPreferences(agent.config.agentId);
104
+ agent.setGlobalDisabledTools(preferences.tools?.disabled ?? []);
105
+ }
106
+ catch (error) {
107
+ agent.logger.debug(`Agent tool preferences could not be loaded: ${error instanceof Error ? error.message : String(error)}`);
108
+ }
109
+ }
110
+ const inkApp = render(_jsx(InkCLIRefactored, { agent: agent, initialSessionId: initialSessionId, initialPrompt: options.initialPrompt, startupInfo: startupInfo, soundService: soundService, configFilePath: options.configFilePath ?? null }), {
101
111
  exitOnCtrlC: false,
102
112
  alternateBuffer: USE_ALTERNATE_BUFFER,
103
113
  // Incremental rendering works better with VirtualizedList
@@ -17,7 +17,7 @@ export interface ApprovalPromptHandle {
17
17
  export interface ApprovalOptions {
18
18
  /** Remember this tool for the entire session (approves ALL uses) */
19
19
  rememberChoice?: boolean;
20
- /** Remember a specific command pattern for bash (e.g., "git *") */
20
+ /** Remember an approval pattern (e.g., "git *") */
21
21
  rememberPattern?: string;
22
22
  /** Form data for elicitation requests */
23
23
  formData?: Record<string, unknown>;
@@ -36,7 +36,7 @@ interface ApprovalPromptProps {
36
36
  * Compact approval prompt component that displays above the input area
37
37
  * Shows options based on approval type:
38
38
  * - Tool confirmation: Yes, Yes (Session), No
39
- * - Bash with patterns: Yes (once), pattern options, Yes (all bash), No
39
+ * - Tool with patterns: Yes (once), pattern options, Yes (session), No
40
40
  * - Elicitation: Form with input fields
41
41
  */
42
42
  export declare const ApprovalPrompt: React.ForwardRefExoticComponent<ApprovalPromptProps & React.RefAttributes<ApprovalPromptHandle>>;
@@ -1 +1 @@
1
- {"version":3,"file":"ApprovalPrompt.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/ApprovalPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAM5D,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,UAAU,mBAAmB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAgBD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,kGAkY1B,CAAC"}
1
+ {"version":3,"file":"ApprovalPrompt.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/ApprovalPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAM5D,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,UAAU,mBAAmB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAgBD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,kGAiY1B,CAAC"}
@@ -9,7 +9,7 @@ import { formatToolHeader } from '../utils/messageFormatting.js';
9
9
  * Compact approval prompt component that displays above the input area
10
10
  * Shows options based on approval type:
11
11
  * - Tool confirmation: Yes, Yes (Session), No
12
- * - Bash with patterns: Yes (once), pattern options, Yes (all bash), No
12
+ * - Tool with patterns: Yes (once), pattern options, Yes (session), No
13
13
  * - Elicitation: Form with input fields
14
14
  */
15
15
  export const ApprovalPrompt = forwardRef(({ approval, onApprove, onDeny, onCancel }, ref) => {
@@ -19,21 +19,24 @@ export const ApprovalPrompt = forwardRef(({ approval, onApprove, onDeny, onCance
19
19
  // Extract tool metadata
20
20
  const toolName = approval.metadata.toolName;
21
21
  const toolArgs = approval.metadata.args || {};
22
+ const toolDisplayName = approval.metadata.toolDisplayName;
22
23
  // Check if this is a plan_review tool (shows custom approval options)
23
- const isPlanReview = toolName === 'custom--plan_review' ||
24
- toolName === 'internal--plan_review' ||
25
- toolName === 'plan_review';
26
- // Extract suggested patterns for bash tools
24
+ const isPlanReview = toolName === 'plan_review';
25
+ // Extract suggested patterns for tools that support pattern-based approvals
27
26
  const suggestedPatterns = approval.metadata.suggestedPatterns ?? [];
28
- const hasBashPatterns = suggestedPatterns.length > 0;
27
+ const hasSuggestedPatterns = suggestedPatterns.length > 0;
29
28
  // Check if this is an edit/write file tool
30
29
  const isEditOrWriteTool = isEditWriteTool(toolName);
31
30
  // Format tool header using shared utility (same format as tool messages)
32
31
  const formattedTool = useMemo(() => {
33
32
  if (!toolName)
34
33
  return null;
35
- return formatToolHeader(toolName, toolArgs);
36
- }, [toolName, toolArgs]);
34
+ return formatToolHeader({
35
+ toolName,
36
+ args: toolArgs,
37
+ ...(toolDisplayName !== undefined && { toolDisplayName }),
38
+ });
39
+ }, [toolName, toolDisplayName, toolArgs]);
37
40
  const [selectedIndex, setSelectedIndex] = useState(0);
38
41
  // State for plan review feedback input
39
42
  const [showFeedbackInput, setShowFeedbackInput] = useState(false);
@@ -50,8 +53,8 @@ export const ApprovalPrompt = forwardRef(({ approval, onApprove, onDeny, onCance
50
53
  options.push({ id: 'plan-approve-accept-edits', label: 'Approve + Accept All Edits' });
51
54
  // Third "option" is the feedback input (handled specially in render)
52
55
  }
53
- else if (hasBashPatterns) {
54
- // Bash tool with pattern suggestions
56
+ else if (hasSuggestedPatterns) {
57
+ // Tool with pattern suggestions
55
58
  options.push({ id: 'yes', label: 'Yes (once)' });
56
59
  suggestedPatterns.forEach((pattern, i) => {
57
60
  options.push({
@@ -59,7 +62,7 @@ export const ApprovalPrompt = forwardRef(({ approval, onApprove, onDeny, onCance
59
62
  label: `Yes, allow "${pattern}"`,
60
63
  });
61
64
  });
62
- options.push({ id: 'yes-session', label: 'Yes, allow all bash' });
65
+ options.push({ id: 'yes-session', label: 'Yes, allow this tool (session)' });
63
66
  options.push({ id: 'no', label: 'No' });
64
67
  }
65
68
  else if (isCommandConfirmation) {
@@ -223,9 +226,7 @@ export const ApprovalPrompt = forwardRef(({ approval, onApprove, onDeny, onCance
223
226
  return null;
224
227
  switch (displayPreview.type) {
225
228
  case 'diff': {
226
- const isOverwrite = toolName === 'custom--write_file' ||
227
- toolName === 'internal--write_file' ||
228
- toolName === 'write_file';
229
+ const isOverwrite = toolName === 'write_file';
229
230
  return (_jsx(DiffPreview, { data: displayPreview, headerType: isOverwrite ? 'overwrite' : 'edit' }));
230
231
  }
231
232
  case 'shell':
@@ -0,0 +1,18 @@
1
+ /**
2
+ * BackgroundTasksPanel Component
3
+ *
4
+ * Displays background task status in a compact table.
5
+ */
6
+ interface BackgroundTaskItem {
7
+ taskId: string;
8
+ status: 'running' | 'completed' | 'failed' | 'cancelled';
9
+ description?: string;
10
+ }
11
+ interface BackgroundTasksPanelProps {
12
+ tasks: BackgroundTaskItem[];
13
+ isExpanded: boolean;
14
+ isProcessing?: boolean;
15
+ }
16
+ export declare function BackgroundTasksPanel({ tasks, isExpanded, isProcessing, }: BackgroundTasksPanelProps): import("react/jsx-runtime").JSX.Element | null;
17
+ export {};
18
+ //# sourceMappingURL=BackgroundTasksPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackgroundTasksPanel.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/BackgroundTasksPanel.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,UAAU,kBAAkB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,yBAAyB;IAC/B,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAsBD,wBAAgB,oBAAoB,CAAC,EACjC,KAAK,EACL,UAAU,EACV,YAAoB,GACvB,EAAE,yBAAyB,kDA+E3B"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ function padText(value, width) {
4
+ if (value.length >= width)
5
+ return value.slice(0, width - 1) + '…';
6
+ return value.padEnd(width, ' ');
7
+ }
8
+ function formatStatus(status) {
9
+ switch (status) {
10
+ case 'running':
11
+ return 'running';
12
+ case 'completed':
13
+ return 'done';
14
+ case 'failed':
15
+ return 'failed';
16
+ case 'cancelled':
17
+ return 'cancelled';
18
+ default:
19
+ return status;
20
+ }
21
+ }
22
+ export function BackgroundTasksPanel({ tasks, isExpanded, isProcessing = false, }) {
23
+ if (!isExpanded)
24
+ return null;
25
+ const sortedTasks = [...tasks].sort((a, b) => {
26
+ if (a.status === b.status)
27
+ return 0;
28
+ if (a.status === 'running')
29
+ return -1;
30
+ if (b.status === 'running')
31
+ return 1;
32
+ return a.status.localeCompare(b.status);
33
+ });
34
+ const runningCount = tasks.filter((task) => task.status === 'running').length;
35
+ const totalCount = tasks.length;
36
+ const headerText = `🧵 Background Tasks (${runningCount}/${totalCount} running)`;
37
+ if (totalCount === 0) {
38
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: isProcessing ? undefined : 'round', borderColor: "gray", paddingX: 1, marginX: 1, marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: headerText }), _jsx(Text, { color: "gray", dimColor: true, children: "No background tasks" })] }));
39
+ }
40
+ const statusWidth = 10;
41
+ const idWidth = 14;
42
+ const descWidth = 48;
43
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: isProcessing ? undefined : 'round', borderColor: "gray", paddingX: 1, marginX: 1, marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, color: "cyan", children: headerText }), _jsxs(Text, { color: "gray", dimColor: true, children: [' ', "\u00B7 ctrl+b to hide bg tasks"] })] }), _jsx(Box, { children: _jsxs(Text, { color: "gray", children: [padText('status', statusWidth), padText('task id', idWidth), padText('description', descWidth)] }) }), sortedTasks.map((task) => {
44
+ const status = formatStatus(task.status);
45
+ const desc = task.description ?? '';
46
+ return (_jsx(Box, { children: _jsxs(Text, { color: task.status === 'running' ? 'yellow' : 'gray', children: [padText(status, statusWidth), padText(task.taskId, idWidth), padText(desc, descWidth)] }) }, task.taskId));
47
+ })] }));
48
+ }
@@ -22,7 +22,7 @@ export class ErrorBoundary extends React.Component {
22
22
  }
23
23
  render() {
24
24
  if (this.state.hasError) {
25
- return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "red", children: [_jsx(Text, { color: "red", bold: true, children: "\u274C CLI Error" }), _jsx(Text, { color: "red", children: this.state.error?.message || 'Unknown error' }), _jsx(Text, { color: "yellowBright", children: "Press Ctrl+C to exit" })] }));
25
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "red", children: [_jsx(Text, { color: "red", bold: true, children: "CLI Error" }), _jsx(Text, { color: "red", children: this.state.error?.message || 'Unknown error' }), _jsx(Text, { color: "yellowBright", children: "Press Ctrl+C to exit" })] }));
26
26
  }
27
27
  return this.props.children;
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/Footer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAGnE,UAAU,WAAW;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAOD;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACnB,KAAK,EACL,SAAS,EACT,SAAS,EACT,GAAG,EACH,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,GACd,EAAE,WAAW,2CAkHb"}
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/Footer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAGnE,UAAU,WAAW;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAOD;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACnB,KAAK,EACL,SAAS,EACT,SAAS,EACT,GAAG,EACH,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,GACd,EAAE,WAAW,2CAgHb"}
@@ -7,7 +7,7 @@ import { useEffect, useState } from 'react';
7
7
  import path from 'node:path';
8
8
  import { Box, Text } from 'ink';
9
9
  import { getModelDisplayName } from '@dexto/core';
10
- import { isDextoAuthEnabled } from '@dexto/agent-management';
10
+ import { getLLMProviderDisplayName } from '../utils/llm-provider-display.js';
11
11
  function getDirectoryName(cwd) {
12
12
  const base = path.basename(cwd);
13
13
  return base || cwd;
@@ -20,8 +20,8 @@ export function Footer({ agent, sessionId, modelName, cwd, branchName, autoAppro
20
20
  const displayModelName = getModelDisplayName(modelName);
21
21
  const [contextLeft, setContextLeft] = useState(null);
22
22
  // Provider is session-scoped because /model can switch LLM per session.
23
- const viaDexto = isDextoAuthEnabled() &&
24
- agent.getCurrentLLMConfig(sessionId ?? undefined).provider === 'dexto';
23
+ const provider = sessionId ? agent.getCurrentLLMConfig(sessionId).provider : null;
24
+ const providerLabel = provider ? getLLMProviderDisplayName(provider) : null;
25
25
  useEffect(() => {
26
26
  if (!sessionId) {
27
27
  setContextLeft(null);
@@ -47,7 +47,6 @@ export function Footer({ agent, sessionId, modelName, cwd, branchName, autoAppro
47
47
  }
48
48
  };
49
49
  refreshContext();
50
- const bus = agent.agentEventBus;
51
50
  const controller = new AbortController();
52
51
  const { signal } = controller;
53
52
  const sessionEvents = [
@@ -64,7 +63,7 @@ export function Footer({ agent, sessionId, modelName, cwd, branchName, autoAppro
64
63
  refreshContext();
65
64
  };
66
65
  for (const eventName of sessionEvents) {
67
- bus.on(eventName, handleEvent, { signal });
66
+ agent.on(eventName, handleEvent, { signal });
68
67
  }
69
68
  return () => {
70
69
  cancelled = true;
@@ -73,5 +72,5 @@ export function Footer({ agent, sessionId, modelName, cwd, branchName, autoAppro
73
72
  }, [agent, sessionId]);
74
73
  // Shell mode changes the path color to yellow as indicator
75
74
  const pathColor = isShellMode ? 'yellow' : 'blue';
76
- return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", children: [_jsxs(Box, { children: [_jsx(Text, { color: pathColor, children: displayPath }), branchName && _jsxs(Text, { color: "gray", children: [" (", branchName, ")"] })] }), _jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: displayModelName }), viaDexto && _jsx(Text, { color: "gray", children: " via Dexto" })] })] }), contextLeft && (_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [contextLeft.percentLeft, "% context left"] }) })), isShellMode && (_jsxs(Box, { children: [_jsx(Text, { color: "yellow", bold: true, children: "!" }), _jsx(Text, { color: "gray", children: " for shell mode" })] })), planModeActive && !isShellMode && (_jsxs(Box, { children: [_jsx(Text, { color: "magentaBright", children: "plan mode" }), _jsx(Text, { color: "gray", children: " (shift + tab to cycle)" })] })), autoApproveEdits && !planModeActive && !isShellMode && (_jsxs(Box, { children: [_jsx(Text, { color: "yellowBright", children: "accept edits" }), _jsx(Text, { color: "gray", children: " (shift + tab to cycle)" })] }))] }));
75
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", children: [_jsxs(Box, { children: [_jsx(Text, { color: pathColor, children: displayPath }), branchName && _jsxs(Text, { color: "gray", children: [" (", branchName, ")"] })] }), _jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: displayModelName }), providerLabel && _jsxs(Text, { color: "gray", children: [" (", providerLabel, ")"] })] })] }), contextLeft && (_jsx(Box, { children: _jsxs(Text, { color: "gray", children: [contextLeft.percentLeft, "% context left"] }) })), isShellMode && (_jsxs(Box, { children: [_jsx(Text, { color: "yellow", bold: true, children: "!" }), _jsx(Text, { color: "gray", children: " for shell mode" })] })), planModeActive && !isShellMode && (_jsxs(Box, { children: [_jsx(Text, { color: "magentaBright", children: "plan mode" }), _jsx(Text, { color: "gray", children: " (shift + tab to cycle)" })] })), autoApproveEdits && !planModeActive && !isShellMode && (_jsxs(Box, { children: [_jsx(Text, { color: "yellowBright", children: "accept edits" }), _jsx(Text, { color: "gray", children: " (shift + tab to cycle)" })] }))] }));
77
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceAutocomplete.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/ResourceAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED,UAAU,yBAAyB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;CACrB;AA6ED;;GAEG;AACH,QAAA,MAAM,yBAAyB,8GAoQ9B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,oBAAoB,EAErB,OAAO,yBAAyB,CAAC;AAEtC,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"ResourceAutocomplete.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/ResourceAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED,UAAU,yBAAyB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;CACrB;AAsFD;;GAEG;AACH,QAAA,MAAM,yBAAyB,8GA6W9B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,oBAAoB,EAErB,OAAO,yBAAyB,CAAC;AAEtC,eAAe,oBAAoB,CAAC"}