@involvex/super-agent-cli 0.0.39 → 0.0.46

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 (140) hide show
  1. package/bunfig.toml +43 -0
  2. package/dist/index.js +1190 -319
  3. package/dist/super-agent-cli.exe +0 -0
  4. package/package.json +4 -1
  5. package/.grok/settings.json +0 -3
  6. package/.super-agent/settings.json +0 -23
  7. package/dist/agent/grok-agent.d.ts +0 -54
  8. package/dist/agent/grok-agent.js +0 -638
  9. package/dist/agent/grok-agent.js.map +0 -1
  10. package/dist/agent/index.d.ts +0 -14
  11. package/dist/agent/index.js +0 -139
  12. package/dist/agent/index.js.map +0 -1
  13. package/dist/agent/super-agent.d.ts +0 -54
  14. package/dist/agent/super-agent.js +0 -638
  15. package/dist/agent/super-agent.js.map +0 -1
  16. package/dist/commands/mcp.d.ts +0 -2
  17. package/dist/commands/mcp.js +0 -247
  18. package/dist/commands/mcp.js.map +0 -1
  19. package/dist/core/client.d.ts +0 -49
  20. package/dist/core/client.js +0 -81
  21. package/dist/core/client.js.map +0 -1
  22. package/dist/core/tools.d.ts +0 -8
  23. package/dist/core/tools.js +0 -351
  24. package/dist/core/tools.js.map +0 -1
  25. package/dist/grok/client.d.ts +0 -49
  26. package/dist/grok/client.js +0 -81
  27. package/dist/grok/client.js.map +0 -1
  28. package/dist/grok/tools.d.ts +0 -8
  29. package/dist/grok/tools.js +0 -351
  30. package/dist/grok/tools.js.map +0 -1
  31. package/dist/hooks/use-enhanced-input.d.ts +0 -37
  32. package/dist/hooks/use-enhanced-input.js +0 -228
  33. package/dist/hooks/use-enhanced-input.js.map +0 -1
  34. package/dist/hooks/use-input-handler.d.ts +0 -34
  35. package/dist/hooks/use-input-handler.js +0 -607
  36. package/dist/hooks/use-input-handler.js.map +0 -1
  37. package/dist/hooks/use-input-history.d.ts +0 -9
  38. package/dist/hooks/use-input-history.js +0 -62
  39. package/dist/hooks/use-input-history.js.map +0 -1
  40. package/dist/index.d.ts +0 -2
  41. package/dist/index.js.map +0 -1
  42. package/dist/mcp/client.d.ts +0 -29
  43. package/dist/mcp/client.js +0 -127
  44. package/dist/mcp/client.js.map +0 -1
  45. package/dist/mcp/config.d.ts +0 -13
  46. package/dist/mcp/config.js +0 -45
  47. package/dist/mcp/config.js.map +0 -1
  48. package/dist/mcp/transports.d.ts +0 -51
  49. package/dist/mcp/transports.js +0 -229
  50. package/dist/mcp/transports.js.map +0 -1
  51. package/dist/tools/bash.d.ts +0 -10
  52. package/dist/tools/bash.js +0 -76
  53. package/dist/tools/bash.js.map +0 -1
  54. package/dist/tools/confirmation-tool.d.ts +0 -16
  55. package/dist/tools/confirmation-tool.js +0 -77
  56. package/dist/tools/confirmation-tool.js.map +0 -1
  57. package/dist/tools/index.d.ts +0 -6
  58. package/dist/tools/index.js +0 -7
  59. package/dist/tools/index.js.map +0 -1
  60. package/dist/tools/morph-editor.d.ts +0 -36
  61. package/dist/tools/morph-editor.js +0 -324
  62. package/dist/tools/morph-editor.js.map +0 -1
  63. package/dist/tools/search.d.ts +0 -69
  64. package/dist/tools/search.js +0 -307
  65. package/dist/tools/search.js.map +0 -1
  66. package/dist/tools/text-editor.d.ts +0 -26
  67. package/dist/tools/text-editor.js +0 -583
  68. package/dist/tools/text-editor.js.map +0 -1
  69. package/dist/tools/todo-tool.d.ts +0 -20
  70. package/dist/tools/todo-tool.js +0 -134
  71. package/dist/tools/todo-tool.js.map +0 -1
  72. package/dist/types/index.d.ts +0 -30
  73. package/dist/types/index.js +0 -2
  74. package/dist/types/index.js.map +0 -1
  75. package/dist/ui/app.d.ts +0 -6
  76. package/dist/ui/app.js +0 -76
  77. package/dist/ui/app.js.map +0 -1
  78. package/dist/ui/components/api-key-input.d.ts +0 -6
  79. package/dist/ui/components/api-key-input.js +0 -70
  80. package/dist/ui/components/api-key-input.js.map +0 -1
  81. package/dist/ui/components/chat-history.d.ts +0 -7
  82. package/dist/ui/components/chat-history.js +0 -136
  83. package/dist/ui/components/chat-history.js.map +0 -1
  84. package/dist/ui/components/chat-input.d.ts +0 -8
  85. package/dist/ui/components/chat-input.js +0 -47
  86. package/dist/ui/components/chat-input.js.map +0 -1
  87. package/dist/ui/components/chat-interface.d.ts +0 -7
  88. package/dist/ui/components/chat-interface.js +0 -213
  89. package/dist/ui/components/chat-interface.js.map +0 -1
  90. package/dist/ui/components/command-suggestions.d.ts +0 -16
  91. package/dist/ui/components/command-suggestions.js +0 -18
  92. package/dist/ui/components/command-suggestions.js.map +0 -1
  93. package/dist/ui/components/confirmation-dialog.d.ts +0 -10
  94. package/dist/ui/components/confirmation-dialog.js +0 -70
  95. package/dist/ui/components/confirmation-dialog.js.map +0 -1
  96. package/dist/ui/components/diff-renderer.d.ts +0 -13
  97. package/dist/ui/components/diff-renderer.js +0 -200
  98. package/dist/ui/components/diff-renderer.js.map +0 -1
  99. package/dist/ui/components/loading-spinner.d.ts +0 -7
  100. package/dist/ui/components/loading-spinner.js +0 -52
  101. package/dist/ui/components/loading-spinner.js.map +0 -1
  102. package/dist/ui/components/mcp-status.d.ts +0 -4
  103. package/dist/ui/components/mcp-status.js +0 -37
  104. package/dist/ui/components/mcp-status.js.map +0 -1
  105. package/dist/ui/components/model-selection.d.ts +0 -11
  106. package/dist/ui/components/model-selection.js +0 -9
  107. package/dist/ui/components/model-selection.js.map +0 -1
  108. package/dist/ui/shared/max-sized-box.d.ts +0 -8
  109. package/dist/ui/shared/max-sized-box.js +0 -6
  110. package/dist/ui/shared/max-sized-box.js.map +0 -1
  111. package/dist/ui/utils/code-colorizer.d.ts +0 -2
  112. package/dist/ui/utils/code-colorizer.js +0 -7
  113. package/dist/ui/utils/code-colorizer.js.map +0 -1
  114. package/dist/ui/utils/colors.d.ts +0 -14
  115. package/dist/ui/utils/colors.js +0 -15
  116. package/dist/ui/utils/colors.js.map +0 -1
  117. package/dist/ui/utils/markdown-renderer.d.ts +0 -3
  118. package/dist/ui/utils/markdown-renderer.js +0 -23
  119. package/dist/ui/utils/markdown-renderer.js.map +0 -1
  120. package/dist/utils/confirmation-service.d.ts +0 -33
  121. package/dist/utils/confirmation-service.js +0 -110
  122. package/dist/utils/confirmation-service.js.map +0 -1
  123. package/dist/utils/custom-instructions.d.ts +0 -1
  124. package/dist/utils/custom-instructions.js +0 -23
  125. package/dist/utils/custom-instructions.js.map +0 -1
  126. package/dist/utils/model-config.d.ts +0 -28
  127. package/dist/utils/model-config.js +0 -42
  128. package/dist/utils/model-config.js.map +0 -1
  129. package/dist/utils/settings-manager.d.ts +0 -99
  130. package/dist/utils/settings-manager.js +0 -286
  131. package/dist/utils/settings-manager.js.map +0 -1
  132. package/dist/utils/settings.d.ts +0 -1
  133. package/dist/utils/settings.js +0 -4
  134. package/dist/utils/settings.js.map +0 -1
  135. package/dist/utils/text-utils.d.ts +0 -80
  136. package/dist/utils/text-utils.js +0 -191
  137. package/dist/utils/text-utils.js.map +0 -1
  138. package/dist/utils/token-counter.d.ts +0 -33
  139. package/dist/utils/token-counter.js +0 -79
  140. package/dist/utils/token-counter.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,17 +1,39 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ {return entry;}
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ {__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));}
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
3
20
  var __export = (target, all) => {
4
21
  for (var name in all)
5
- __defProp(target, name, {
22
+ {__defProp(target, name, {
6
23
  get: all[name],
7
24
  enumerable: true,
8
25
  configurable: true,
9
26
  set: (newValue) => all[name] = () => newValue
10
- });
27
+ });}
11
28
  };
12
29
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
13
30
 
14
31
  // src/utils/settings-manager.ts
32
+ var exports_settings_manager = {};
33
+ __export(exports_settings_manager, {
34
+ getSettingsManager: () => getSettingsManager,
35
+ SettingsManager: () => SettingsManager
36
+ });
15
37
  import * as path from "path";
16
38
  import * as os from "os";
17
39
  import * as fs from "fs";
@@ -349,6 +371,70 @@ class ConfirmationService extends EventEmitter {
349
371
  // src/index.ts
350
372
  init_settings_manager();
351
373
 
374
+ // src/utils/file-utils.ts
375
+ import * as fs2 from "fs-extra";
376
+ import * as path2 from "path";
377
+ async function listFilesRecursive(dir, baseDir = dir, maxDepth = 3) {
378
+ const result = [];
379
+ try {
380
+ const entries = await fs2.readdir(dir, { withFileTypes: true });
381
+ for (const entry of entries) {
382
+ const fullPath = path2.join(dir, entry.name);
383
+ const relativePath = path2.relative(baseDir, fullPath);
384
+ const isIgnored = [
385
+ "node_modules",
386
+ ".git",
387
+ "dist",
388
+ "build",
389
+ ".next",
390
+ "target",
391
+ "vendor"
392
+ ].includes(entry.name);
393
+ if (isIgnored) {
394
+ continue;
395
+ }
396
+ if (entry.name.startsWith(".") && entry.name !== ".env") {
397
+ continue;
398
+ }
399
+ result.push({
400
+ name: entry.name,
401
+ path: relativePath,
402
+ isDirectory: entry.isDirectory()
403
+ });
404
+ if (entry.isDirectory() && maxDepth > 0) {
405
+ const subFiles = await listFilesRecursive(fullPath, baseDir, maxDepth - 1);
406
+ result.push(...subFiles);
407
+ }
408
+ }
409
+ } catch (error) {}
410
+ return result;
411
+ }
412
+ function filterFileEntries(entries, query) {
413
+ if (!query) {
414
+ return entries.slice(0, 20);
415
+ }
416
+ const lowerQuery = query.toLowerCase();
417
+ return entries.filter((e) => e.path.toLowerCase().includes(lowerQuery)).sort((a, b) => {
418
+ const aLower = a.name.toLowerCase();
419
+ const bLower = b.name.toLowerCase();
420
+ if (aLower === lowerQuery && bLower !== lowerQuery) {
421
+ return -1;
422
+ }
423
+ if (bLower === lowerQuery && aLower !== lowerQuery) {
424
+ return 1;
425
+ }
426
+ const aPathLower = a.path.toLowerCase();
427
+ const bPathLower = b.path.toLowerCase();
428
+ if (aPathLower.startsWith(lowerQuery) && !bPathLower.startsWith(lowerQuery)) {
429
+ return -1;
430
+ }
431
+ if (bPathLower.startsWith(lowerQuery) && !aPathLower.startsWith(lowerQuery)) {
432
+ return 1;
433
+ }
434
+ return a.path.length - b.path.length;
435
+ }).slice(0, 20);
436
+ }
437
+
352
438
  // src/utils/text-utils.ts
353
439
  function isWordBoundary(char) {
354
440
  if (!char) {
@@ -514,7 +600,7 @@ function useInputHistory() {
514
600
  }
515
601
 
516
602
  // src/hooks/use-enhanced-input.ts
517
- import { useState as useState2, useCallback as useCallback2, useRef } from "react";
603
+ import { useCallback as useCallback2, useRef, useState as useState2 } from "react";
518
604
  function useEnhancedInput({
519
605
  onSubmit,
520
606
  onEscape,
@@ -570,7 +656,7 @@ function useEnhancedInput({
570
656
  setOriginalInput("");
571
657
  return;
572
658
  }
573
- if (onSpecialKey?.(key)) {
659
+ if (onSpecialKey?.(inputChar, key)) {
574
660
  return;
575
661
  }
576
662
  if (key.escape) {
@@ -745,7 +831,18 @@ function CommandSuggestions({
745
831
  return /* @__PURE__ */ jsxDEV(Box, {
746
832
  marginTop: 1,
747
833
  flexDirection: "column",
834
+ borderStyle: "round",
835
+ borderColor: "magenta",
836
+ paddingX: 1,
748
837
  children: [
838
+ /* @__PURE__ */ jsxDEV(Box, {
839
+ marginBottom: 1,
840
+ children: /* @__PURE__ */ jsxDEV(Text, {
841
+ color: "magenta",
842
+ bold: true,
843
+ children: "Commands (/):"
844
+ }, undefined, false, undefined, this)
845
+ }, undefined, false, undefined, this),
749
846
  filteredSuggestions.map((suggestion, index) => /* @__PURE__ */ jsxDEV(Box, {
750
847
  paddingLeft: 1,
751
848
  children: [
@@ -791,6 +888,7 @@ function updateCurrentModel(modelName) {
791
888
 
792
889
  // src/hooks/use-input-handler.ts
793
890
  init_settings_manager();
891
+ import * as fs3 from "fs-extra";
794
892
  function useInputHandler({
795
893
  agent,
796
894
  chatHistory,
@@ -813,11 +911,41 @@ function useInputHandler({
813
911
  const sessionFlags = confirmationService.getSessionFlags();
814
912
  return sessionFlags.allOperations;
815
913
  });
816
- const handleSpecialKey = (key) => {
914
+ const [agentMode, setAgentMode] = useState3("code");
915
+ const [showMentionSuggestions, setShowMentionSuggestions] = useState3(false);
916
+ const [mentionSuggestions, setMentionSuggestions] = useState3([]);
917
+ const [mentionQuery, setMentionQuery] = useState3("");
918
+ const [selectedMentionIndex, setSelectedMentionIndex] = useState3(0);
919
+ const [showCommandPalette, setShowCommandPalette] = useState3(false);
920
+ const [commandPaletteQuery, setCommandPaletteQuery] = useState3("");
921
+ const [selectedPaletteIndex, setSelectedPaletteIndex] = useState3(0);
922
+ const [showProviderSelection, setShowProviderSelection] = useState3(false);
923
+ const [selectedProviderIndex, setSelectedProviderIndex] = useState3(0);
924
+ const [showConfigViewer, setShowConfigViewer] = useState3(false);
925
+ useEffect(() => {
926
+ listFilesRecursive(process.cwd()).then(setMentionSuggestions);
927
+ }, []);
928
+ const handleSpecialKey = (char, key) => {
817
929
  if (isConfirmationActive) {
818
930
  return true;
819
931
  }
820
932
  if (key.shift && key.tab) {
933
+ const modeCycle = ["plan", "code", "debug"];
934
+ const currentIndex = modeCycle.indexOf(agentMode);
935
+ const nextMode = modeCycle[(currentIndex + 1) % modeCycle.length];
936
+ setAgentMode(nextMode);
937
+ setChatHistory((prev) => [
938
+ ...prev,
939
+ {
940
+ type: "assistant",
941
+ content: `⏺ Switched mode to: ${nextMode.toUpperCase()}`,
942
+ timestamp: new Date
943
+ }
944
+ ]);
945
+ return true;
946
+ }
947
+ const isCtrlY = char === "\x19" || key.ctrl && (char === "y" || char === "Y");
948
+ if (isCtrlY) {
821
949
  const newAutoEditState = !autoEditEnabled;
822
950
  setAutoEditEnabled(newAutoEditState);
823
951
  const confirmationService = ConfirmationService.getInstance();
@@ -826,6 +954,105 @@ function useInputHandler({
826
954
  } else {
827
955
  confirmationService.resetSession();
828
956
  }
957
+ setChatHistory((prev) => [
958
+ ...prev,
959
+ {
960
+ type: "assistant",
961
+ content: `\uD83D\uDE80 YOLO Mode: ${newAutoEditState ? "ENABLED" : "DISABLED"}`,
962
+ timestamp: new Date
963
+ }
964
+ ]);
965
+ return true;
966
+ }
967
+ const isShellTrigger = char === "!" && input === "";
968
+ if (isShellTrigger) {
969
+ const newInput = "!";
970
+ setInput(newInput);
971
+ setCursorPosition(newInput.length);
972
+ return true;
973
+ }
974
+ const isCtrlP = char === "\x10" || key.ctrl && (char === "p" || char === "P");
975
+ if (isCtrlP) {
976
+ setShowCommandPalette(true);
977
+ setCommandPaletteQuery("");
978
+ setSelectedPaletteIndex(0);
979
+ return true;
980
+ }
981
+ if (showCommandPalette) {
982
+ const filtered = filterFileEntries(mentionSuggestions, commandPaletteQuery);
983
+ if (key.upArrow) {
984
+ setSelectedPaletteIndex((prev) => prev === 0 ? Math.max(0, filtered.length - 1) : prev - 1);
985
+ return true;
986
+ }
987
+ if (key.downArrow) {
988
+ setSelectedPaletteIndex((prev) => (prev + 1) % Math.max(1, filtered.length));
989
+ return true;
990
+ }
991
+ if (key.return) {
992
+ if (filtered.length > 0) {
993
+ const selected = filtered[selectedPaletteIndex];
994
+ const newInput = input + " @" + selected.path + " ";
995
+ setInput(newInput);
996
+ setCursorPosition(newInput.length);
997
+ }
998
+ setShowCommandPalette(false);
999
+ return true;
1000
+ }
1001
+ if (key.escape) {
1002
+ setShowCommandPalette(false);
1003
+ return true;
1004
+ }
1005
+ if (char && char.length === 1 && !key.ctrl && !key.meta && !key.escape && !key.return && !key.tab && !key.upArrow && !key.downArrow) {
1006
+ setCommandPaletteQuery((prev) => prev + char);
1007
+ setSelectedPaletteIndex(0);
1008
+ return true;
1009
+ }
1010
+ if (key.backspace) {
1011
+ setCommandPaletteQuery((prev) => prev.slice(0, -1));
1012
+ setSelectedPaletteIndex(0);
1013
+ return true;
1014
+ }
1015
+ return true;
1016
+ }
1017
+ if (showProviderSelection) {
1018
+ const manager = getSettingsManager();
1019
+ const settings = manager.loadUserSettings();
1020
+ const providers = Object.keys(settings.providers || {});
1021
+ if (key.upArrow) {
1022
+ setSelectedProviderIndex((prev) => prev === 0 ? Math.max(0, providers.length - 1) : prev - 1);
1023
+ return true;
1024
+ }
1025
+ if (key.downArrow) {
1026
+ setSelectedProviderIndex((prev) => (prev + 1) % Math.max(1, providers.length));
1027
+ return true;
1028
+ }
1029
+ if (key.return || key.tab) {
1030
+ if (providers.length > 0) {
1031
+ const selectedProviderId = providers[selectedProviderIndex];
1032
+ manager.updateUserSetting("active_provider", selectedProviderId);
1033
+ setChatHistory((prev) => [
1034
+ ...prev,
1035
+ {
1036
+ type: "assistant",
1037
+ content: `✓ Switched active provider to: ${selectedProviderId}`,
1038
+ timestamp: new Date
1039
+ }
1040
+ ]);
1041
+ }
1042
+ setShowProviderSelection(false);
1043
+ return true;
1044
+ }
1045
+ if (key.escape) {
1046
+ setShowProviderSelection(false);
1047
+ return true;
1048
+ }
1049
+ return true;
1050
+ }
1051
+ if (showConfigViewer) {
1052
+ if (key.escape) {
1053
+ setShowConfigViewer(false);
1054
+ return true;
1055
+ }
829
1056
  return true;
830
1057
  }
831
1058
  if (key.escape) {
@@ -901,6 +1128,31 @@ function useInputHandler({
901
1128
  return true;
902
1129
  }
903
1130
  }
1131
+ if (showMentionSuggestions) {
1132
+ const filtered = filterFileEntries(mentionSuggestions, mentionQuery);
1133
+ if (filtered.length === 0) {
1134
+ setShowMentionSuggestions(false);
1135
+ return false;
1136
+ }
1137
+ if (key.upArrow) {
1138
+ setSelectedMentionIndex((prev) => prev === 0 ? filtered.length - 1 : prev - 1);
1139
+ return true;
1140
+ }
1141
+ if (key.downArrow) {
1142
+ setSelectedMentionIndex((prev) => (prev + 1) % filtered.length);
1143
+ return true;
1144
+ }
1145
+ if (key.tab || key.return) {
1146
+ const selected = filtered[selectedMentionIndex];
1147
+ const lastAtIndex = input.lastIndexOf("@");
1148
+ const newInput = input.slice(0, lastAtIndex) + "@" + selected.path + " ";
1149
+ setInput(newInput);
1150
+ setCursorPosition(newInput.length);
1151
+ setShowMentionSuggestions(false);
1152
+ setSelectedMentionIndex(0);
1153
+ return true;
1154
+ }
1155
+ }
904
1156
  return false;
905
1157
  };
906
1158
  const handleInputSubmit = async (userInput) => {
@@ -920,7 +1172,14 @@ function useInputHandler({
920
1172
  setSelectedCommandIndex(0);
921
1173
  } else {
922
1174
  setShowCommandSuggestions(false);
923
- setSelectedCommandIndex(0);
1175
+ }
1176
+ const mentionMatch = newInput.match(/@([\w\-\./]*)$/);
1177
+ if (mentionMatch) {
1178
+ setShowMentionSuggestions(true);
1179
+ setMentionQuery(mentionMatch[1]);
1180
+ setSelectedMentionIndex(0);
1181
+ } else {
1182
+ setShowMentionSuggestions(false);
924
1183
  }
925
1184
  };
926
1185
  const {
@@ -933,10 +1192,32 @@ function useInputHandler({
933
1192
  handleInput
934
1193
  } = useEnhancedInput({
935
1194
  onSubmit: handleInputSubmit,
936
- onSpecialKey: handleSpecialKey,
1195
+ onEscape: () => {
1196
+ if (showCommandSuggestions) {
1197
+ setShowCommandSuggestions(false);
1198
+ setSelectedCommandIndex(0);
1199
+ } else if (showModelSelection) {
1200
+ setShowModelSelection(false);
1201
+ setSelectedModelIndex(0);
1202
+ } else if (showMentionSuggestions) {
1203
+ setShowMentionSuggestions(false);
1204
+ } else if (showCommandPalette) {
1205
+ setShowCommandPalette(false);
1206
+ } else if (isProcessing || isStreaming) {
1207
+ agent.abortCurrentOperation();
1208
+ setIsProcessing(false);
1209
+ setIsStreaming(false);
1210
+ setTokenCount(0);
1211
+ setProcessingTime(0);
1212
+ processingStartTime.current = 0;
1213
+ }
1214
+ },
937
1215
  disabled: isConfirmationActive
938
1216
  });
939
1217
  useInput((inputChar, key) => {
1218
+ if (handleSpecialKey(inputChar, key)) {
1219
+ return;
1220
+ }
940
1221
  handleInput(inputChar, key);
941
1222
  });
942
1223
  useEffect(() => {
@@ -1008,41 +1289,13 @@ Config Commands:
1008
1289
  process.exit(0);
1009
1290
  }
1010
1291
  if (trimmedInput === "/config") {
1011
- const manager = getSettingsManager();
1012
- const settings = manager.loadUserSettings();
1013
- const activeProvider = settings.active_provider;
1014
- const activeConfig = settings.providers[activeProvider];
1015
- const content = `Current Configuration:
1016
- - Active Provider: ${activeProvider}
1017
- - API Key: ${activeConfig?.api_key ? "********" : "(not set)"}
1018
- - Base URL: ${activeConfig?.base_url || "(default)"}
1019
- - Model: ${activeConfig?.model || "(default)"}
1020
- - Theme: ${settings.ui.theme}
1021
-
1022
- Use '/provider' to see all providers.
1023
- Use '/provider use <id>' to switch.
1024
- `;
1025
- setChatHistory((prev) => [
1026
- ...prev,
1027
- { type: "assistant", content, timestamp: new Date }
1028
- ]);
1292
+ setShowConfigViewer(true);
1029
1293
  clearInput();
1030
1294
  return true;
1031
1295
  }
1032
1296
  if (trimmedInput === "/provider") {
1033
- const manager = getSettingsManager();
1034
- const settings = manager.loadUserSettings();
1035
- const providers = Object.keys(settings.providers || {});
1036
- const active = settings.active_provider;
1037
- const content = `Configured Providers:
1038
- ${providers.map((p) => `- ${p} ${p === active ? "(active)" : ""}`).join(`
1039
- `)}
1040
-
1041
- Use '/provider use <id>' to switch provider.`;
1042
- setChatHistory((prev) => [
1043
- ...prev,
1044
- { type: "assistant", content, timestamp: new Date }
1045
- ]);
1297
+ setShowProviderSelection(true);
1298
+ setSelectedProviderIndex(0);
1046
1299
  clearInput();
1047
1300
  return true;
1048
1301
  }
@@ -1274,6 +1527,46 @@ ${commitMessage}`
1274
1527
  clearInput();
1275
1528
  return true;
1276
1529
  }
1530
+ if (trimmedInput.startsWith("!")) {
1531
+ const command = trimmedInput.slice(1).trim();
1532
+ if (!command) {
1533
+ clearInput();
1534
+ return true;
1535
+ }
1536
+ const userEntry = {
1537
+ type: "user",
1538
+ content: trimmedInput,
1539
+ timestamp: new Date
1540
+ };
1541
+ setChatHistory((prev) => [...prev, userEntry]);
1542
+ try {
1543
+ const result = await agent.executeBashCommand(command);
1544
+ const commandEntry = {
1545
+ type: "tool_result",
1546
+ content: result.success ? result.output || "Command completed" : result.error || "Command failed",
1547
+ timestamp: new Date,
1548
+ toolCall: {
1549
+ id: `bash_${Date.now()}`,
1550
+ type: "function",
1551
+ function: {
1552
+ name: "bash",
1553
+ arguments: JSON.stringify({ command })
1554
+ }
1555
+ },
1556
+ toolResult: result
1557
+ };
1558
+ setChatHistory((prev) => [...prev, commandEntry]);
1559
+ } catch (error) {
1560
+ const errorEntry = {
1561
+ type: "assistant",
1562
+ content: `Error executing command: ${error.message}`,
1563
+ timestamp: new Date
1564
+ };
1565
+ setChatHistory((prev) => [...prev, errorEntry]);
1566
+ }
1567
+ clearInput();
1568
+ return true;
1569
+ }
1277
1570
  const directBashCommands = [
1278
1571
  "ls",
1279
1572
  "pwd",
@@ -1327,6 +1620,42 @@ ${commitMessage}`
1327
1620
  return false;
1328
1621
  };
1329
1622
  const processUserMessage = async (userInput) => {
1623
+ let resolvedInput = userInput;
1624
+ const mentionMatches = userInput.match(/@([\w\-\./]+)/g);
1625
+ if (mentionMatches) {
1626
+ for (const mention of mentionMatches) {
1627
+ const filePath = mention.slice(1);
1628
+ try {
1629
+ const stats = await fs3.stat(filePath);
1630
+ if (stats.isFile()) {
1631
+ const content = await fs3.readFile(filePath, "utf-8");
1632
+ resolvedInput = resolvedInput.replace(mention, `
1633
+
1634
+ --- FILE: ${filePath} ---
1635
+ ${content}
1636
+ --- END FILE ---
1637
+
1638
+ `);
1639
+ } else if (stats.isDirectory()) {
1640
+ const tree = await listFilesRecursive(filePath, process.cwd(), 1);
1641
+ const structure = tree.map((t) => `${t.isDirectory ? "\uD83D\uDCC1" : "\uD83D\uDCC4"} ${t.path}`).join(`
1642
+ `);
1643
+ resolvedInput = resolvedInput.replace(mention, `
1644
+
1645
+ --- DIRECTORY: ${filePath} ---
1646
+ ${structure}
1647
+ --- END DIRECTORY ---
1648
+
1649
+ `);
1650
+ }
1651
+ } catch (e) {}
1652
+ }
1653
+ }
1654
+ if (agentMode === "plan") {
1655
+ resolvedInput = `[MODE: PLAN] ${resolvedInput}`;
1656
+ } else if (agentMode === "debug") {
1657
+ resolvedInput = `[MODE: DEBUG] ${resolvedInput}`;
1658
+ }
1330
1659
  const userEntry = {
1331
1660
  type: "user",
1332
1661
  content: userInput,
@@ -1338,7 +1667,7 @@ ${commitMessage}`
1338
1667
  try {
1339
1668
  setIsStreaming(true);
1340
1669
  let streamingEntry = null;
1341
- for await (const chunk of agent.processUserMessageStream(userInput)) {
1670
+ for await (const chunk of agent.processUserMessageStream(resolvedInput)) {
1342
1671
  switch (chunk.type) {
1343
1672
  case "content":
1344
1673
  if (chunk.content) {
@@ -1429,21 +1758,194 @@ ${commitMessage}`
1429
1758
  selectedModelIndex,
1430
1759
  commandSuggestions,
1431
1760
  availableModels,
1432
- agent,
1433
- autoEditEnabled
1761
+ autoEditEnabled,
1762
+ setInput,
1763
+ setCursorPosition,
1764
+ clearInput,
1765
+ resetHistory,
1766
+ handleInput,
1767
+ agentMode,
1768
+ showMentionSuggestions,
1769
+ selectedMentionIndex,
1770
+ mentionSuggestions,
1771
+ mentionQuery,
1772
+ showCommandPalette,
1773
+ commandPaletteQuery,
1774
+ selectedPaletteIndex,
1775
+ showProviderSelection,
1776
+ selectedProviderIndex,
1777
+ showConfigViewer
1434
1778
  };
1435
1779
  }
1436
1780
 
1781
+ // src/ui/components/mention-suggestions.tsx
1782
+ import { useMemo as useMemo3 } from "react";
1783
+ import { Box as Box2, Text as Text2 } from "ink";
1784
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
1785
+ function MentionSuggestions({
1786
+ suggestions,
1787
+ query,
1788
+ selectedIndex,
1789
+ isVisible
1790
+ }) {
1791
+ if (!isVisible) {
1792
+ return null;
1793
+ }
1794
+ const filteredSuggestions = useMemo3(() => filterFileEntries(suggestions, query), [suggestions, query]);
1795
+ const displayedSuggestions = filteredSuggestions.slice(0, 8);
1796
+ return /* @__PURE__ */ jsxDEV2(Box2, {
1797
+ flexDirection: "column",
1798
+ borderStyle: "round",
1799
+ borderColor: "cyan",
1800
+ paddingX: 1,
1801
+ width: process.stdout.columns ? Math.min(100, process.stdout.columns - 4) : 100,
1802
+ children: [
1803
+ /* @__PURE__ */ jsxDEV2(Box2, {
1804
+ marginBottom: 1,
1805
+ children: /* @__PURE__ */ jsxDEV2(Text2, {
1806
+ color: "cyan",
1807
+ bold: true,
1808
+ children: "Mention file or folder (@):"
1809
+ }, undefined, false, undefined, this)
1810
+ }, undefined, false, undefined, this),
1811
+ displayedSuggestions.map((suggestion, index) => /* @__PURE__ */ jsxDEV2(Box2, {
1812
+ paddingLeft: 1,
1813
+ children: [
1814
+ /* @__PURE__ */ jsxDEV2(Box2, {
1815
+ width: 3,
1816
+ children: /* @__PURE__ */ jsxDEV2(Text2, {
1817
+ children: index === selectedIndex ? "❯" : " "
1818
+ }, undefined, false, undefined, this)
1819
+ }, undefined, false, undefined, this),
1820
+ /* @__PURE__ */ jsxDEV2(Text2, {
1821
+ color: index === selectedIndex ? "black" : suggestion.isDirectory ? "blue" : "white",
1822
+ backgroundColor: index === selectedIndex ? "cyan" : undefined,
1823
+ children: [
1824
+ suggestion.isDirectory ? "\uD83D\uDCC1" : "\uD83D\uDCC4",
1825
+ " ",
1826
+ suggestion.path
1827
+ ]
1828
+ }, undefined, true, undefined, this)
1829
+ ]
1830
+ }, index, true, undefined, this)),
1831
+ filteredSuggestions.length > 8 && /* @__PURE__ */ jsxDEV2(Box2, {
1832
+ paddingLeft: 1,
1833
+ children: /* @__PURE__ */ jsxDEV2(Text2, {
1834
+ color: "gray",
1835
+ children: [
1836
+ "... and ",
1837
+ filteredSuggestions.length - 8,
1838
+ " more"
1839
+ ]
1840
+ }, undefined, true, undefined, this)
1841
+ }, undefined, false, undefined, this),
1842
+ /* @__PURE__ */ jsxDEV2(Box2, {
1843
+ marginTop: 1,
1844
+ children: /* @__PURE__ */ jsxDEV2(Text2, {
1845
+ color: "gray",
1846
+ dimColor: true,
1847
+ children: "↑↓ navigate • Enter/Tab select • Esc cancel"
1848
+ }, undefined, false, undefined, this)
1849
+ }, undefined, false, undefined, this)
1850
+ ]
1851
+ }, undefined, true, undefined, this);
1852
+ }
1853
+
1854
+ // src/ui/components/provider-selection.tsx
1855
+ import { Box as Box3, Text as Text3 } from "ink";
1856
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
1857
+ function ProviderSelection({
1858
+ providers,
1859
+ selectedIndex,
1860
+ isVisible
1861
+ }) {
1862
+ if (!isVisible) {
1863
+ return null;
1864
+ }
1865
+ return /* @__PURE__ */ jsxDEV3(Box3, {
1866
+ flexDirection: "column",
1867
+ borderStyle: "round",
1868
+ borderColor: "cyan",
1869
+ paddingX: 1,
1870
+ width: process.stdout.columns ? Math.min(80, process.stdout.columns - 4) : 80,
1871
+ children: [
1872
+ /* @__PURE__ */ jsxDEV3(Box3, {
1873
+ marginBottom: 1,
1874
+ children: /* @__PURE__ */ jsxDEV3(Text3, {
1875
+ color: "cyan",
1876
+ bold: true,
1877
+ children: "\uD83D\uDD0C Select AI Provider"
1878
+ }, undefined, false, undefined, this)
1879
+ }, undefined, false, undefined, this),
1880
+ /* @__PURE__ */ jsxDEV3(Box3, {
1881
+ flexDirection: "column",
1882
+ children: providers.map((provider, index) => /* @__PURE__ */ jsxDEV3(Box3, {
1883
+ paddingLeft: 1,
1884
+ children: [
1885
+ /* @__PURE__ */ jsxDEV3(Box3, {
1886
+ width: 3,
1887
+ children: /* @__PURE__ */ jsxDEV3(Text3, {
1888
+ children: index === selectedIndex ? "❯" : " "
1889
+ }, undefined, false, undefined, this)
1890
+ }, undefined, false, undefined, this),
1891
+ /* @__PURE__ */ jsxDEV3(Text3, {
1892
+ color: index === selectedIndex ? "white" : "white",
1893
+ backgroundColor: index === selectedIndex ? "cyan" : undefined,
1894
+ bold: index === selectedIndex,
1895
+ children: [
1896
+ provider.id,
1897
+ provider.isActive && " ★"
1898
+ ]
1899
+ }, undefined, true, undefined, this),
1900
+ /* @__PURE__ */ jsxDEV3(Box3, {
1901
+ marginLeft: 2,
1902
+ children: /* @__PURE__ */ jsxDEV3(Text3, {
1903
+ color: "gray",
1904
+ children: [
1905
+ provider.hasApiKey ? "✓" : "✗",
1906
+ " API Key",
1907
+ provider.model ? ` | ${provider.model}` : ""
1908
+ ]
1909
+ }, undefined, true, undefined, this)
1910
+ }, undefined, false, undefined, this)
1911
+ ]
1912
+ }, provider.id, true, undefined, this))
1913
+ }, undefined, false, undefined, this),
1914
+ providers.length === 0 && /* @__PURE__ */ jsxDEV3(Box3, {
1915
+ padding: 1,
1916
+ children: /* @__PURE__ */ jsxDEV3(Text3, {
1917
+ color: "gray",
1918
+ italic: true,
1919
+ children: "No providers configured. Check ~/.super-agent/settings.json"
1920
+ }, undefined, false, undefined, this)
1921
+ }, undefined, false, undefined, this),
1922
+ /* @__PURE__ */ jsxDEV3(Box3, {
1923
+ marginTop: 1,
1924
+ borderStyle: "single",
1925
+ borderTop: true,
1926
+ borderBottom: false,
1927
+ borderLeft: false,
1928
+ borderRight: false,
1929
+ children: /* @__PURE__ */ jsxDEV3(Text3, {
1930
+ color: "gray",
1931
+ dimColor: true,
1932
+ children: "↑↓ navigate • Enter select • Esc cancel"
1933
+ }, undefined, false, undefined, this)
1934
+ }, undefined, false, undefined, this)
1935
+ ]
1936
+ }, undefined, true, undefined, this);
1937
+ }
1938
+
1437
1939
  // src/ui/shared/max-sized-box.tsx
1438
- import { Box as Box2 } from "ink";
1439
- import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
1940
+ import { Box as Box4 } from "ink";
1941
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
1440
1942
  var MaxSizedBox = ({
1441
1943
  maxHeight,
1442
1944
  maxWidth,
1443
1945
  children,
1444
1946
  ...props
1445
1947
  }) => {
1446
- return /* @__PURE__ */ jsxDEV2(Box2, {
1948
+ return /* @__PURE__ */ jsxDEV4(Box4, {
1447
1949
  flexDirection: "column",
1448
1950
  ...props,
1449
1951
  children
@@ -1464,9 +1966,9 @@ var Colors = {
1464
1966
  };
1465
1967
 
1466
1968
  // src/ui/components/diff-renderer.tsx
1467
- import { Box as Box3, Text as Text2 } from "ink";
1969
+ import { Box as Box5, Text as Text4 } from "ink";
1468
1970
  import crypto from "crypto";
1469
- import { jsxDEV as jsxDEV3, Fragment } from "react/jsx-dev-runtime";
1971
+ import { jsxDEV as jsxDEV5, Fragment } from "react/jsx-dev-runtime";
1470
1972
  function parseDiffWithLineNumbers(diffContent) {
1471
1973
  const lines = diffContent.split(`
1472
1974
  `);
@@ -1530,7 +2032,7 @@ var DiffRenderer = ({
1530
2032
  terminalWidth = 80
1531
2033
  }) => {
1532
2034
  if (!diffContent || typeof diffContent !== "string") {
1533
- return /* @__PURE__ */ jsxDEV3(Text2, {
2035
+ return /* @__PURE__ */ jsxDEV5(Text4, {
1534
2036
  color: Colors.AccentYellow,
1535
2037
  children: "No diff content."
1536
2038
  }, undefined, false, undefined, this);
@@ -1545,13 +2047,13 @@ var DiffRenderer = ({
1545
2047
  }
1546
2048
  const parsedLines = parseDiffWithLineNumbers(actualDiffContent);
1547
2049
  if (parsedLines.length === 0) {
1548
- return /* @__PURE__ */ jsxDEV3(Text2, {
2050
+ return /* @__PURE__ */ jsxDEV5(Text4, {
1549
2051
  dimColor: true,
1550
2052
  children: "No changes detected."
1551
2053
  }, undefined, false, undefined, this);
1552
2054
  }
1553
2055
  const renderedOutput = renderDiffContent(parsedLines, filename, tabWidth, availableTerminalHeight, terminalWidth);
1554
- return /* @__PURE__ */ jsxDEV3(Fragment, {
2056
+ return /* @__PURE__ */ jsxDEV5(Fragment, {
1555
2057
  children: renderedOutput
1556
2058
  }, undefined, false, undefined, this);
1557
2059
  };
@@ -1562,7 +2064,7 @@ var renderDiffContent = (parsedLines, filename, tabWidth = DEFAULT_TAB_WIDTH, av
1562
2064
  }));
1563
2065
  const displayableLines = normalizedLines.filter((l) => l.type !== "hunk" && l.type !== "other");
1564
2066
  if (displayableLines.length === 0) {
1565
- return /* @__PURE__ */ jsxDEV3(Text2, {
2067
+ return /* @__PURE__ */ jsxDEV5(Text4, {
1566
2068
  dimColor: true,
1567
2069
  children: "No changes detected."
1568
2070
  }, undefined, false, undefined, this);
@@ -1582,7 +2084,7 @@ var renderDiffContent = (parsedLines, filename, tabWidth = DEFAULT_TAB_WIDTH, av
1582
2084
  const key = filename ? `diff-box-${filename}` : `diff-box-${crypto.createHash("sha1").update(JSON.stringify(parsedLines)).digest("hex")}`;
1583
2085
  let lastLineNumber = null;
1584
2086
  const MAX_CONTEXT_LINES_WITHOUT_GAP = 5;
1585
- return /* @__PURE__ */ jsxDEV3(MaxSizedBox, {
2087
+ return /* @__PURE__ */ jsxDEV5(MaxSizedBox, {
1586
2088
  maxHeight: availableTerminalHeight,
1587
2089
  maxWidth: terminalWidth,
1588
2090
  children: displayableLines.reduce((acc, line, index) => {
@@ -1593,8 +2095,8 @@ var renderDiffContent = (parsedLines, filename, tabWidth = DEFAULT_TAB_WIDTH, av
1593
2095
  relevantLineNumberForGapCalc = line.oldLine ?? null;
1594
2096
  }
1595
2097
  if (lastLineNumber !== null && relevantLineNumberForGapCalc !== null && relevantLineNumberForGapCalc > lastLineNumber + MAX_CONTEXT_LINES_WITHOUT_GAP + 1) {
1596
- acc.push(/* @__PURE__ */ jsxDEV3(Box3, {
1597
- children: /* @__PURE__ */ jsxDEV3(Text2, {
2098
+ acc.push(/* @__PURE__ */ jsxDEV5(Box5, {
2099
+ children: /* @__PURE__ */ jsxDEV5(Text4, {
1598
2100
  wrap: "truncate",
1599
2101
  children: "═".repeat(terminalWidth)
1600
2102
  }, undefined, false, undefined, this)
@@ -1630,15 +2132,15 @@ var renderDiffContent = (parsedLines, filename, tabWidth = DEFAULT_TAB_WIDTH, av
1630
2132
  return acc;
1631
2133
  }
1632
2134
  const displayContent = line.content.substring(baseIndentation);
1633
- acc.push(/* @__PURE__ */ jsxDEV3(Box3, {
2135
+ acc.push(/* @__PURE__ */ jsxDEV5(Box5, {
1634
2136
  flexDirection: "row",
1635
2137
  children: [
1636
- /* @__PURE__ */ jsxDEV3(Text2, {
2138
+ /* @__PURE__ */ jsxDEV5(Text4, {
1637
2139
  color: Colors.Gray,
1638
2140
  dimColor: dim,
1639
2141
  children: gutterNumStr.padEnd(4)
1640
2142
  }, undefined, false, undefined, this),
1641
- /* @__PURE__ */ jsxDEV3(Text2, {
2143
+ /* @__PURE__ */ jsxDEV5(Text4, {
1642
2144
  color: backgroundColor ? "#000000" : undefined,
1643
2145
  backgroundColor,
1644
2146
  dimColor: !backgroundColor && dim,
@@ -1647,7 +2149,7 @@ var renderDiffContent = (parsedLines, filename, tabWidth = DEFAULT_TAB_WIDTH, av
1647
2149
  " "
1648
2150
  ]
1649
2151
  }, undefined, true, undefined, this),
1650
- /* @__PURE__ */ jsxDEV3(Text2, {
2152
+ /* @__PURE__ */ jsxDEV5(Text4, {
1651
2153
  color: backgroundColor ? "#000000" : undefined,
1652
2154
  backgroundColor,
1653
2155
  dimColor: !backgroundColor && dim,
@@ -1662,9 +2164,9 @@ var renderDiffContent = (parsedLines, filename, tabWidth = DEFAULT_TAB_WIDTH, av
1662
2164
  };
1663
2165
 
1664
2166
  // src/ui/components/confirmation-dialog.tsx
1665
- import { Box as Box4, Text as Text3, useInput as useInput2 } from "ink";
2167
+ import { Box as Box6, Text as Text5, useInput as useInput2 } from "ink";
1666
2168
  import { useState as useState4 } from "react";
1667
- import { jsxDEV as jsxDEV4, Fragment as Fragment2 } from "react/jsx-dev-runtime";
2169
+ import { jsxDEV as jsxDEV6, Fragment as Fragment2 } from "react/jsx-dev-runtime";
1668
2170
  function ConfirmationDialog({
1669
2171
  operation,
1670
2172
  filename,
@@ -1728,32 +2230,32 @@ function ConfirmationDialog({
1728
2230
  }
1729
2231
  });
1730
2232
  if (feedbackMode) {
1731
- return /* @__PURE__ */ jsxDEV4(Box4, {
2233
+ return /* @__PURE__ */ jsxDEV6(Box6, {
1732
2234
  flexDirection: "column",
1733
2235
  padding: 1,
1734
2236
  children: [
1735
- /* @__PURE__ */ jsxDEV4(Box4, {
2237
+ /* @__PURE__ */ jsxDEV6(Box6, {
1736
2238
  flexDirection: "column",
1737
2239
  marginBottom: 1,
1738
- children: /* @__PURE__ */ jsxDEV4(Text3, {
2240
+ children: /* @__PURE__ */ jsxDEV6(Text5, {
1739
2241
  color: "gray",
1740
2242
  children: "Type your feedback and press Enter, or press Escape to go back."
1741
2243
  }, undefined, false, undefined, this)
1742
2244
  }, undefined, false, undefined, this),
1743
- /* @__PURE__ */ jsxDEV4(Box4, {
2245
+ /* @__PURE__ */ jsxDEV6(Box6, {
1744
2246
  borderStyle: "round",
1745
2247
  borderColor: "yellow",
1746
2248
  paddingX: 1,
1747
2249
  marginTop: 1,
1748
2250
  children: [
1749
- /* @__PURE__ */ jsxDEV4(Text3, {
2251
+ /* @__PURE__ */ jsxDEV6(Text5, {
1750
2252
  color: "gray",
1751
2253
  children: "❯ "
1752
2254
  }, undefined, false, undefined, this),
1753
- /* @__PURE__ */ jsxDEV4(Text3, {
2255
+ /* @__PURE__ */ jsxDEV6(Text5, {
1754
2256
  children: [
1755
2257
  feedback,
1756
- /* @__PURE__ */ jsxDEV4(Text3, {
2258
+ /* @__PURE__ */ jsxDEV6(Text5, {
1757
2259
  color: "white",
1758
2260
  children: "█"
1759
2261
  }, undefined, false, undefined, this)
@@ -1764,18 +2266,18 @@ function ConfirmationDialog({
1764
2266
  ]
1765
2267
  }, undefined, true, undefined, this);
1766
2268
  }
1767
- return /* @__PURE__ */ jsxDEV4(Box4, {
2269
+ return /* @__PURE__ */ jsxDEV6(Box6, {
1768
2270
  flexDirection: "column",
1769
2271
  children: [
1770
- /* @__PURE__ */ jsxDEV4(Box4, {
2272
+ /* @__PURE__ */ jsxDEV6(Box6, {
1771
2273
  marginTop: 1,
1772
- children: /* @__PURE__ */ jsxDEV4(Box4, {
2274
+ children: /* @__PURE__ */ jsxDEV6(Box6, {
1773
2275
  children: [
1774
- /* @__PURE__ */ jsxDEV4(Text3, {
2276
+ /* @__PURE__ */ jsxDEV6(Text5, {
1775
2277
  color: "magenta",
1776
2278
  children: "⏺"
1777
2279
  }, undefined, false, undefined, this),
1778
- /* @__PURE__ */ jsxDEV4(Text3, {
2280
+ /* @__PURE__ */ jsxDEV6(Text5, {
1779
2281
  color: "white",
1780
2282
  children: [
1781
2283
  " ",
@@ -1788,24 +2290,24 @@ function ConfirmationDialog({
1788
2290
  ]
1789
2291
  }, undefined, true, undefined, this)
1790
2292
  }, undefined, false, undefined, this),
1791
- /* @__PURE__ */ jsxDEV4(Box4, {
2293
+ /* @__PURE__ */ jsxDEV6(Box6, {
1792
2294
  marginLeft: 2,
1793
2295
  flexDirection: "column",
1794
2296
  children: [
1795
- /* @__PURE__ */ jsxDEV4(Text3, {
2297
+ /* @__PURE__ */ jsxDEV6(Text5, {
1796
2298
  color: "gray",
1797
2299
  children: "⎿ Requesting user confirmation"
1798
2300
  }, undefined, false, undefined, this),
1799
- showVSCodeOpen && /* @__PURE__ */ jsxDEV4(Box4, {
2301
+ showVSCodeOpen && /* @__PURE__ */ jsxDEV6(Box6, {
1800
2302
  marginTop: 1,
1801
- children: /* @__PURE__ */ jsxDEV4(Text3, {
2303
+ children: /* @__PURE__ */ jsxDEV6(Text5, {
1802
2304
  color: "gray",
1803
2305
  children: "⎿ Opened changes in Visual Studio Code ⧉"
1804
2306
  }, undefined, false, undefined, this)
1805
2307
  }, undefined, false, undefined, this),
1806
- content && /* @__PURE__ */ jsxDEV4(Fragment2, {
2308
+ content && /* @__PURE__ */ jsxDEV6(Fragment2, {
1807
2309
  children: [
1808
- /* @__PURE__ */ jsxDEV4(Text3, {
2310
+ /* @__PURE__ */ jsxDEV6(Text5, {
1809
2311
  color: "gray",
1810
2312
  children: [
1811
2313
  "⎿ ",
@@ -1813,10 +2315,10 @@ function ConfirmationDialog({
1813
2315
  `)[0]
1814
2316
  ]
1815
2317
  }, undefined, true, undefined, this),
1816
- /* @__PURE__ */ jsxDEV4(Box4, {
2318
+ /* @__PURE__ */ jsxDEV6(Box6, {
1817
2319
  marginLeft: 4,
1818
2320
  flexDirection: "column",
1819
- children: /* @__PURE__ */ jsxDEV4(DiffRenderer, {
2321
+ children: /* @__PURE__ */ jsxDEV6(DiffRenderer, {
1820
2322
  diffContent: content,
1821
2323
  filename,
1822
2324
  terminalWidth: 80
@@ -1826,21 +2328,21 @@ function ConfirmationDialog({
1826
2328
  }, undefined, true, undefined, this)
1827
2329
  ]
1828
2330
  }, undefined, true, undefined, this),
1829
- /* @__PURE__ */ jsxDEV4(Box4, {
2331
+ /* @__PURE__ */ jsxDEV6(Box6, {
1830
2332
  flexDirection: "column",
1831
2333
  marginTop: 1,
1832
2334
  children: [
1833
- /* @__PURE__ */ jsxDEV4(Box4, {
2335
+ /* @__PURE__ */ jsxDEV6(Box6, {
1834
2336
  marginBottom: 1,
1835
- children: /* @__PURE__ */ jsxDEV4(Text3, {
2337
+ children: /* @__PURE__ */ jsxDEV6(Text5, {
1836
2338
  children: "Do you want to proceed with this operation?"
1837
2339
  }, undefined, false, undefined, this)
1838
2340
  }, undefined, false, undefined, this),
1839
- /* @__PURE__ */ jsxDEV4(Box4, {
2341
+ /* @__PURE__ */ jsxDEV6(Box6, {
1840
2342
  flexDirection: "column",
1841
- children: options.map((option, index) => /* @__PURE__ */ jsxDEV4(Box4, {
2343
+ children: options.map((option, index) => /* @__PURE__ */ jsxDEV6(Box6, {
1842
2344
  paddingLeft: 1,
1843
- children: /* @__PURE__ */ jsxDEV4(Text3, {
2345
+ children: /* @__PURE__ */ jsxDEV6(Text5, {
1844
2346
  color: selectedOption === index ? "black" : "white",
1845
2347
  backgroundColor: selectedOption === index ? "cyan" : undefined,
1846
2348
  children: [
@@ -1851,9 +2353,9 @@ function ConfirmationDialog({
1851
2353
  }, undefined, true, undefined, this)
1852
2354
  }, index, false, undefined, this))
1853
2355
  }, undefined, false, undefined, this),
1854
- /* @__PURE__ */ jsxDEV4(Box4, {
2356
+ /* @__PURE__ */ jsxDEV6(Box6, {
1855
2357
  marginTop: 1,
1856
- children: /* @__PURE__ */ jsxDEV4(Text3, {
2358
+ children: /* @__PURE__ */ jsxDEV6(Text5, {
1857
2359
  color: "gray",
1858
2360
  dimColor: true,
1859
2361
  children: "↑↓ navigate • Enter select • Esc cancel"
@@ -1869,8 +2371,8 @@ function ConfirmationDialog({
1869
2371
  import { useEffect as useEffect4, useRef as useRef2, useState as useState8 } from "react";
1870
2372
 
1871
2373
  // src/ui/components/model-selection.tsx
1872
- import { Box as Box5, Text as Text4 } from "ink";
1873
- import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
2374
+ import { Box as Box7, Text as Text6 } from "ink";
2375
+ import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
1874
2376
  function ModelSelection({
1875
2377
  models,
1876
2378
  selectedIndex,
@@ -1880,14 +2382,18 @@ function ModelSelection({
1880
2382
  if (!isVisible) {
1881
2383
  return null;
1882
2384
  }
1883
- return /* @__PURE__ */ jsxDEV5(Box5, {
2385
+ return /* @__PURE__ */ jsxDEV7(Box7, {
1884
2386
  marginTop: 1,
1885
2387
  flexDirection: "column",
2388
+ borderStyle: "round",
2389
+ borderColor: "cyan",
2390
+ paddingX: 1,
1886
2391
  children: [
1887
- /* @__PURE__ */ jsxDEV5(Box5, {
2392
+ /* @__PURE__ */ jsxDEV7(Box7, {
1888
2393
  marginBottom: 1,
1889
- children: /* @__PURE__ */ jsxDEV5(Text4, {
2394
+ children: /* @__PURE__ */ jsxDEV7(Text6, {
1890
2395
  color: "cyan",
2396
+ bold: true,
1891
2397
  children: [
1892
2398
  "Select Super Agent Model (current: ",
1893
2399
  currentModel,
@@ -1895,17 +2401,17 @@ function ModelSelection({
1895
2401
  ]
1896
2402
  }, undefined, true, undefined, this)
1897
2403
  }, undefined, false, undefined, this),
1898
- models.map((modelOption, index) => /* @__PURE__ */ jsxDEV5(Box5, {
2404
+ models.map((modelOption, index) => /* @__PURE__ */ jsxDEV7(Box7, {
1899
2405
  paddingLeft: 1,
1900
- children: /* @__PURE__ */ jsxDEV5(Text4, {
2406
+ children: /* @__PURE__ */ jsxDEV7(Text6, {
1901
2407
  color: index === selectedIndex ? "black" : "white",
1902
2408
  backgroundColor: index === selectedIndex ? "cyan" : undefined,
1903
2409
  children: modelOption.model
1904
2410
  }, undefined, false, undefined, this)
1905
2411
  }, index, false, undefined, this)),
1906
- /* @__PURE__ */ jsxDEV5(Box5, {
2412
+ /* @__PURE__ */ jsxDEV7(Box7, {
1907
2413
  marginTop: 1,
1908
- children: /* @__PURE__ */ jsxDEV5(Text4, {
2414
+ children: /* @__PURE__ */ jsxDEV7(Text6, {
1909
2415
  color: "gray",
1910
2416
  dimColor: true,
1911
2417
  children: "↑↓ navigate • Enter/Tab select • Esc cancel"
@@ -1974,8 +2480,8 @@ function createTokenCounter(model) {
1974
2480
 
1975
2481
  // src/ui/components/loading-spinner.tsx
1976
2482
  import { useState as useState5, useEffect as useEffect2 } from "react";
1977
- import { Box as Box6, Text as Text5 } from "ink";
1978
- import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
2483
+ import { Box as Box8, Text as Text7 } from "ink";
2484
+ import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
1979
2485
  var loadingTexts = [
1980
2486
  "Thinking...",
1981
2487
  "Computing...",
@@ -2023,10 +2529,10 @@ function LoadingSpinner({
2023
2529
  return null;
2024
2530
  }
2025
2531
  const spinnerFrames = ["/", "-", "\\", "|"];
2026
- return /* @__PURE__ */ jsxDEV6(Box6, {
2532
+ return /* @__PURE__ */ jsxDEV8(Box8, {
2027
2533
  marginTop: 1,
2028
2534
  children: [
2029
- /* @__PURE__ */ jsxDEV6(Text5, {
2535
+ /* @__PURE__ */ jsxDEV8(Text7, {
2030
2536
  color: "cyan",
2031
2537
  children: [
2032
2538
  spinnerFrames[spinnerFrame],
@@ -2035,7 +2541,7 @@ function LoadingSpinner({
2035
2541
  " "
2036
2542
  ]
2037
2543
  }, undefined, true, undefined, this),
2038
- /* @__PURE__ */ jsxDEV6(Text5, {
2544
+ /* @__PURE__ */ jsxDEV8(Text7, {
2039
2545
  color: "gray",
2040
2546
  children: [
2041
2547
  "(",
@@ -2049,11 +2555,259 @@ function LoadingSpinner({
2049
2555
  }, undefined, true, undefined, this);
2050
2556
  }
2051
2557
 
2558
+ // src/ui/components/command-palette.tsx
2559
+ import { useMemo as useMemo4 } from "react";
2560
+ import { Box as Box9, Text as Text8 } from "ink";
2561
+ import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
2562
+ function CommandPalette({
2563
+ files,
2564
+ query,
2565
+ selectedIndex,
2566
+ isVisible
2567
+ }) {
2568
+ if (!isVisible) {
2569
+ return null;
2570
+ }
2571
+ const filteredFiles = useMemo4(() => filterFileEntries(files, query), [files, query]);
2572
+ const displayedFiles = filteredFiles.slice(0, 10);
2573
+ return /* @__PURE__ */ jsxDEV9(Box9, {
2574
+ flexDirection: "column",
2575
+ borderStyle: "round",
2576
+ borderColor: "magenta",
2577
+ paddingX: 1,
2578
+ width: process.stdout.columns ? Math.min(80, process.stdout.columns - 4) : 80,
2579
+ children: [
2580
+ /* @__PURE__ */ jsxDEV9(Box9, {
2581
+ marginBottom: 1,
2582
+ justifyContent: "space-between",
2583
+ children: [
2584
+ /* @__PURE__ */ jsxDEV9(Text8, {
2585
+ color: "cyan",
2586
+ bold: true,
2587
+ children: "\uD83D\uDD0D Command Palette / File Search"
2588
+ }, undefined, false, undefined, this),
2589
+ /* @__PURE__ */ jsxDEV9(Text8, {
2590
+ color: "gray",
2591
+ children: [
2592
+ filteredFiles.length,
2593
+ " files found"
2594
+ ]
2595
+ }, undefined, true, undefined, this)
2596
+ ]
2597
+ }, undefined, true, undefined, this),
2598
+ /* @__PURE__ */ jsxDEV9(Box9, {
2599
+ marginBottom: 1,
2600
+ borderStyle: "single",
2601
+ borderColor: "gray",
2602
+ paddingX: 1,
2603
+ children: [
2604
+ /* @__PURE__ */ jsxDEV9(Text8, {
2605
+ color: "gray",
2606
+ children: "Query: "
2607
+ }, undefined, false, undefined, this),
2608
+ /* @__PURE__ */ jsxDEV9(Text8, {
2609
+ color: "white",
2610
+ bold: true,
2611
+ children: query || "Search files..."
2612
+ }, undefined, false, undefined, this)
2613
+ ]
2614
+ }, undefined, true, undefined, this),
2615
+ /* @__PURE__ */ jsxDEV9(Box9, {
2616
+ flexDirection: "column",
2617
+ children: displayedFiles.map((file, index) => /* @__PURE__ */ jsxDEV9(Box9, {
2618
+ paddingLeft: 1,
2619
+ children: [
2620
+ /* @__PURE__ */ jsxDEV9(Box9, {
2621
+ width: 3,
2622
+ children: /* @__PURE__ */ jsxDEV9(Text8, {
2623
+ children: index === selectedIndex ? "❯" : " "
2624
+ }, undefined, false, undefined, this)
2625
+ }, undefined, false, undefined, this),
2626
+ /* @__PURE__ */ jsxDEV9(Text8, {
2627
+ color: index === selectedIndex ? "white" : file.isDirectory ? "blue" : "white",
2628
+ backgroundColor: index === selectedIndex ? "magenta" : undefined,
2629
+ bold: index === selectedIndex,
2630
+ children: [
2631
+ file.isDirectory ? "\uD83D\uDCC1" : "\uD83D\uDCC4",
2632
+ " ",
2633
+ file.path
2634
+ ]
2635
+ }, undefined, true, undefined, this)
2636
+ ]
2637
+ }, index, true, undefined, this))
2638
+ }, undefined, false, undefined, this),
2639
+ filteredFiles.length === 0 && /* @__PURE__ */ jsxDEV9(Box9, {
2640
+ padding: 1,
2641
+ children: /* @__PURE__ */ jsxDEV9(Text8, {
2642
+ color: "gray",
2643
+ italic: true,
2644
+ children: [
2645
+ 'No files found matching "',
2646
+ query,
2647
+ '"'
2648
+ ]
2649
+ }, undefined, true, undefined, this)
2650
+ }, undefined, false, undefined, this),
2651
+ /* @__PURE__ */ jsxDEV9(Box9, {
2652
+ marginTop: 1,
2653
+ borderStyle: "single",
2654
+ borderTop: true,
2655
+ borderBottom: false,
2656
+ borderLeft: false,
2657
+ borderRight: false,
2658
+ children: /* @__PURE__ */ jsxDEV9(Text8, {
2659
+ color: "gray",
2660
+ dimColor: true,
2661
+ children: "↑↓ navigate • Enter select • Esc cancel"
2662
+ }, undefined, false, undefined, this)
2663
+ }, undefined, false, undefined, this)
2664
+ ]
2665
+ }, undefined, true, undefined, this);
2666
+ }
2667
+
2668
+ // src/ui/components/config-viewer.tsx
2669
+ import { Box as Box10, Text as Text9 } from "ink";
2670
+ import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
2671
+ function ConfigViewer({ config, isVisible }) {
2672
+ if (!isVisible) {
2673
+ return null;
2674
+ }
2675
+ return /* @__PURE__ */ jsxDEV10(Box10, {
2676
+ flexDirection: "column",
2677
+ borderStyle: "round",
2678
+ borderColor: "magenta",
2679
+ paddingX: 1,
2680
+ width: process.stdout.columns ? Math.min(80, process.stdout.columns - 4) : 80,
2681
+ children: [
2682
+ /* @__PURE__ */ jsxDEV10(Box10, {
2683
+ marginBottom: 1,
2684
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2685
+ color: "magenta",
2686
+ bold: true,
2687
+ children: "⚙️ Current Configuration"
2688
+ }, undefined, false, undefined, this)
2689
+ }, undefined, false, undefined, this),
2690
+ /* @__PURE__ */ jsxDEV10(Box10, {
2691
+ flexDirection: "column",
2692
+ paddingX: 1,
2693
+ children: [
2694
+ /* @__PURE__ */ jsxDEV10(Box10, {
2695
+ marginBottom: 1,
2696
+ children: [
2697
+ /* @__PURE__ */ jsxDEV10(Box10, {
2698
+ width: 20,
2699
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2700
+ color: "cyan",
2701
+ bold: true,
2702
+ children: "Active Provider:"
2703
+ }, undefined, false, undefined, this)
2704
+ }, undefined, false, undefined, this),
2705
+ /* @__PURE__ */ jsxDEV10(Text9, {
2706
+ color: "white",
2707
+ children: config.activeProvider
2708
+ }, undefined, false, undefined, this)
2709
+ ]
2710
+ }, undefined, true, undefined, this),
2711
+ /* @__PURE__ */ jsxDEV10(Box10, {
2712
+ marginBottom: 1,
2713
+ children: [
2714
+ /* @__PURE__ */ jsxDEV10(Box10, {
2715
+ width: 20,
2716
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2717
+ color: "cyan",
2718
+ bold: true,
2719
+ children: "API Key:"
2720
+ }, undefined, false, undefined, this)
2721
+ }, undefined, false, undefined, this),
2722
+ /* @__PURE__ */ jsxDEV10(Text9, {
2723
+ color: config.apiKeySet ? "green" : "red",
2724
+ children: config.apiKeySet ? "✓ Set (hidden)" : "✗ Not set"
2725
+ }, undefined, false, undefined, this)
2726
+ ]
2727
+ }, undefined, true, undefined, this),
2728
+ /* @__PURE__ */ jsxDEV10(Box10, {
2729
+ marginBottom: 1,
2730
+ children: [
2731
+ /* @__PURE__ */ jsxDEV10(Box10, {
2732
+ width: 20,
2733
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2734
+ color: "cyan",
2735
+ bold: true,
2736
+ children: "Base URL:"
2737
+ }, undefined, false, undefined, this)
2738
+ }, undefined, false, undefined, this),
2739
+ /* @__PURE__ */ jsxDEV10(Text9, {
2740
+ color: "white",
2741
+ children: config.baseUrl || "(default)"
2742
+ }, undefined, false, undefined, this)
2743
+ ]
2744
+ }, undefined, true, undefined, this),
2745
+ /* @__PURE__ */ jsxDEV10(Box10, {
2746
+ marginBottom: 1,
2747
+ children: [
2748
+ /* @__PURE__ */ jsxDEV10(Box10, {
2749
+ width: 20,
2750
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2751
+ color: "cyan",
2752
+ bold: true,
2753
+ children: "Model:"
2754
+ }, undefined, false, undefined, this)
2755
+ }, undefined, false, undefined, this),
2756
+ /* @__PURE__ */ jsxDEV10(Text9, {
2757
+ color: "white",
2758
+ children: config.model || "(default)"
2759
+ }, undefined, false, undefined, this)
2760
+ ]
2761
+ }, undefined, true, undefined, this),
2762
+ /* @__PURE__ */ jsxDEV10(Box10, {
2763
+ children: [
2764
+ /* @__PURE__ */ jsxDEV10(Box10, {
2765
+ width: 20,
2766
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2767
+ color: "cyan",
2768
+ bold: true,
2769
+ children: "Theme:"
2770
+ }, undefined, false, undefined, this)
2771
+ }, undefined, false, undefined, this),
2772
+ /* @__PURE__ */ jsxDEV10(Text9, {
2773
+ color: "white",
2774
+ children: config.theme
2775
+ }, undefined, false, undefined, this)
2776
+ ]
2777
+ }, undefined, true, undefined, this)
2778
+ ]
2779
+ }, undefined, true, undefined, this),
2780
+ /* @__PURE__ */ jsxDEV10(Box10, {
2781
+ marginTop: 1,
2782
+ paddingX: 1,
2783
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2784
+ color: "gray",
2785
+ italic: true,
2786
+ children: "Use /provider to switch providers • /models to change model"
2787
+ }, undefined, false, undefined, this)
2788
+ }, undefined, false, undefined, this),
2789
+ /* @__PURE__ */ jsxDEV10(Box10, {
2790
+ marginTop: 1,
2791
+ borderStyle: "single",
2792
+ borderTop: true,
2793
+ borderBottom: false,
2794
+ borderLeft: false,
2795
+ borderRight: false,
2796
+ children: /* @__PURE__ */ jsxDEV10(Text9, {
2797
+ color: "gray",
2798
+ dimColor: true,
2799
+ children: "Esc to close"
2800
+ }, undefined, false, undefined, this)
2801
+ }, undefined, false, undefined, this)
2802
+ ]
2803
+ }, undefined, true, undefined, this);
2804
+ }
2805
+
2052
2806
  // src/ui/utils/markdown-renderer.tsx
2053
2807
  import TerminalRenderer from "marked-terminal";
2054
2808
  import { marked } from "marked";
2055
- import { Text as Text6 } from "ink";
2056
- import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
2809
+ import { Text as Text10 } from "ink";
2810
+ import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
2057
2811
  marked.setOptions({
2058
2812
  renderer: new TerminalRenderer
2059
2813
  });
@@ -2061,24 +2815,24 @@ function MarkdownRenderer({ content }) {
2061
2815
  try {
2062
2816
  const result = marked.parse(content);
2063
2817
  const rendered = typeof result === "string" ? result : content;
2064
- return /* @__PURE__ */ jsxDEV7(Text6, {
2818
+ return /* @__PURE__ */ jsxDEV11(Text10, {
2065
2819
  children: rendered
2066
2820
  }, undefined, false, undefined, this);
2067
2821
  } catch (error) {
2068
2822
  console.error("Markdown rendering error:", error);
2069
- return /* @__PURE__ */ jsxDEV7(Text6, {
2823
+ return /* @__PURE__ */ jsxDEV11(Text10, {
2070
2824
  children: content
2071
2825
  }, undefined, false, undefined, this);
2072
2826
  }
2073
2827
  }
2074
2828
 
2075
2829
  // src/ui/components/chat-history.tsx
2076
- import { Box as Box7, Text as Text7 } from "ink";
2077
- import React4 from "react";
2078
- import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
2079
- var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2830
+ import { Box as Box11, Text as Text11 } from "ink";
2831
+ import React3 from "react";
2832
+ import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
2833
+ var MemoizedChatEntry = React3.memo(({ entry, index }) => {
2080
2834
  const renderDiff = (diffContent, filename) => {
2081
- return /* @__PURE__ */ jsxDEV8(DiffRenderer, {
2835
+ return /* @__PURE__ */ jsxDEV12(DiffRenderer, {
2082
2836
  diffContent,
2083
2837
  filename,
2084
2838
  terminalWidth: 80
@@ -2101,7 +2855,7 @@ var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2101
2855
  }
2102
2856
  return lines.map((line, index2) => {
2103
2857
  const displayContent = line.substring(baseIndentation);
2104
- return /* @__PURE__ */ jsxDEV8(Text7, {
2858
+ return /* @__PURE__ */ jsxDEV12(Text11, {
2105
2859
  color: "gray",
2106
2860
  children: displayContent
2107
2861
  }, index2, false, undefined, this);
@@ -2109,11 +2863,11 @@ var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2109
2863
  };
2110
2864
  switch (entry.type) {
2111
2865
  case "user":
2112
- return /* @__PURE__ */ jsxDEV8(Box7, {
2866
+ return /* @__PURE__ */ jsxDEV12(Box11, {
2113
2867
  flexDirection: "column",
2114
2868
  marginTop: 1,
2115
- children: /* @__PURE__ */ jsxDEV8(Box7, {
2116
- children: /* @__PURE__ */ jsxDEV8(Text7, {
2869
+ children: /* @__PURE__ */ jsxDEV12(Box11, {
2870
+ children: /* @__PURE__ */ jsxDEV12(Text11, {
2117
2871
  color: "gray",
2118
2872
  children: [
2119
2873
  ">",
@@ -2124,28 +2878,28 @@ var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2124
2878
  }, undefined, false, undefined, this)
2125
2879
  }, index, false, undefined, this);
2126
2880
  case "assistant":
2127
- return /* @__PURE__ */ jsxDEV8(Box7, {
2881
+ return /* @__PURE__ */ jsxDEV12(Box11, {
2128
2882
  flexDirection: "column",
2129
2883
  marginTop: 1,
2130
- children: /* @__PURE__ */ jsxDEV8(Box7, {
2884
+ children: /* @__PURE__ */ jsxDEV12(Box11, {
2131
2885
  flexDirection: "row",
2132
2886
  alignItems: "flex-start",
2133
2887
  children: [
2134
- /* @__PURE__ */ jsxDEV8(Text7, {
2888
+ /* @__PURE__ */ jsxDEV12(Text11, {
2135
2889
  color: "white",
2136
2890
  children: "⏺ "
2137
2891
  }, undefined, false, undefined, this),
2138
- /* @__PURE__ */ jsxDEV8(Box7, {
2892
+ /* @__PURE__ */ jsxDEV12(Box11, {
2139
2893
  flexDirection: "column",
2140
2894
  flexGrow: 1,
2141
2895
  children: [
2142
- entry.toolCalls ? /* @__PURE__ */ jsxDEV8(Text7, {
2896
+ entry.toolCalls ? /* @__PURE__ */ jsxDEV12(Text11, {
2143
2897
  color: "white",
2144
2898
  children: entry.content.trim()
2145
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV8(MarkdownRenderer, {
2899
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV12(MarkdownRenderer, {
2146
2900
  content: entry.content.trim()
2147
2901
  }, undefined, false, undefined, this),
2148
- entry.isStreaming && /* @__PURE__ */ jsxDEV8(Text7, {
2902
+ entry.isStreaming && /* @__PURE__ */ jsxDEV12(Text11, {
2149
2903
  color: "cyan",
2150
2904
  children: "█"
2151
2905
  }, undefined, false, undefined, this)
@@ -2219,17 +2973,17 @@ var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2219
2973
  };
2220
2974
  const shouldShowDiff = entry.toolCall?.function?.name === "str_replace_editor" && entry.toolResult?.success && entry.content.includes("Updated") && entry.content.includes("---") && entry.content.includes("+++");
2221
2975
  const shouldShowFileContent = (entry.toolCall?.function?.name === "view_file" || entry.toolCall?.function?.name === "create_file") && entry.toolResult?.success && !shouldShowDiff;
2222
- return /* @__PURE__ */ jsxDEV8(Box7, {
2976
+ return /* @__PURE__ */ jsxDEV12(Box11, {
2223
2977
  flexDirection: "column",
2224
2978
  marginTop: 1,
2225
2979
  children: [
2226
- /* @__PURE__ */ jsxDEV8(Box7, {
2980
+ /* @__PURE__ */ jsxDEV12(Box11, {
2227
2981
  children: [
2228
- /* @__PURE__ */ jsxDEV8(Text7, {
2982
+ /* @__PURE__ */ jsxDEV12(Text11, {
2229
2983
  color: "magenta",
2230
2984
  children: "⏺"
2231
2985
  }, undefined, false, undefined, this),
2232
- /* @__PURE__ */ jsxDEV8(Text7, {
2986
+ /* @__PURE__ */ jsxDEV12(Text11, {
2233
2987
  color: "white",
2234
2988
  children: [
2235
2989
  " ",
@@ -2238,33 +2992,33 @@ var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2238
2992
  }, undefined, true, undefined, this)
2239
2993
  ]
2240
2994
  }, undefined, true, undefined, this),
2241
- /* @__PURE__ */ jsxDEV8(Box7, {
2995
+ /* @__PURE__ */ jsxDEV12(Box11, {
2242
2996
  marginLeft: 2,
2243
2997
  flexDirection: "column",
2244
- children: isExecuting ? /* @__PURE__ */ jsxDEV8(Text7, {
2998
+ children: isExecuting ? /* @__PURE__ */ jsxDEV12(Text11, {
2245
2999
  color: "cyan",
2246
3000
  children: "⎿ Executing..."
2247
- }, undefined, false, undefined, this) : shouldShowFileContent ? /* @__PURE__ */ jsxDEV8(Box7, {
3001
+ }, undefined, false, undefined, this) : shouldShowFileContent ? /* @__PURE__ */ jsxDEV12(Box11, {
2248
3002
  flexDirection: "column",
2249
3003
  children: [
2250
- /* @__PURE__ */ jsxDEV8(Text7, {
3004
+ /* @__PURE__ */ jsxDEV12(Text11, {
2251
3005
  color: "gray",
2252
3006
  children: "⎿ File contents:"
2253
3007
  }, undefined, false, undefined, this),
2254
- /* @__PURE__ */ jsxDEV8(Box7, {
3008
+ /* @__PURE__ */ jsxDEV12(Box11, {
2255
3009
  marginLeft: 2,
2256
3010
  flexDirection: "column",
2257
3011
  children: renderFileContent(entry.content)
2258
3012
  }, undefined, false, undefined, this)
2259
3013
  ]
2260
- }, undefined, true, undefined, this) : shouldShowDiff ? /* @__PURE__ */ jsxDEV8(Text7, {
3014
+ }, undefined, true, undefined, this) : shouldShowDiff ? /* @__PURE__ */ jsxDEV12(Text11, {
2261
3015
  color: "gray",
2262
3016
  children: [
2263
3017
  "⎿ ",
2264
3018
  entry.content.split(`
2265
3019
  `)[0]
2266
3020
  ]
2267
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV8(Text7, {
3021
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV12(Text11, {
2268
3022
  color: "gray",
2269
3023
  children: [
2270
3024
  "⎿ ",
@@ -2272,7 +3026,7 @@ var MemoizedChatEntry = React4.memo(({ entry, index }) => {
2272
3026
  ]
2273
3027
  }, undefined, true, undefined, this)
2274
3028
  }, undefined, false, undefined, this),
2275
- shouldShowDiff && !isExecuting && /* @__PURE__ */ jsxDEV8(Box7, {
3029
+ shouldShowDiff && !isExecuting && /* @__PURE__ */ jsxDEV12(Box11, {
2276
3030
  marginLeft: 4,
2277
3031
  flexDirection: "column",
2278
3032
  children: renderDiff(entry.content, filePath)
@@ -2289,9 +3043,9 @@ function ChatHistory({
2289
3043
  isConfirmationActive = false
2290
3044
  }) {
2291
3045
  const filteredEntries = isConfirmationActive ? entries.filter((entry) => !(entry.type === "tool_call" && entry.content === "Executing...")) : entries;
2292
- return /* @__PURE__ */ jsxDEV8(Box7, {
3046
+ return /* @__PURE__ */ jsxDEV12(Box11, {
2293
3047
  flexDirection: "column",
2294
- children: filteredEntries.slice(-20).map((entry, index) => /* @__PURE__ */ jsxDEV8(MemoizedChatEntry, {
3048
+ children: filteredEntries.slice(-20).map((entry, index) => /* @__PURE__ */ jsxDEV12(MemoizedChatEntry, {
2295
3049
  entry,
2296
3050
  index
2297
3051
  }, `${entry.timestamp.getTime()}-${index}`, false, undefined, this))
@@ -2440,8 +3194,8 @@ class ConfirmationTool {
2440
3194
  }
2441
3195
  }
2442
3196
  // src/tools/morph-editor.ts
2443
- import * as path2 from "path";
2444
- import fs2 from "fs-extra";
3197
+ import * as path3 from "path";
3198
+ import fs4 from "fs-extra";
2445
3199
  import axios from "axios";
2446
3200
 
2447
3201
  class MorphEditorTool {
@@ -2456,8 +3210,8 @@ class MorphEditorTool {
2456
3210
  }
2457
3211
  async editFile(targetFile, instructions, codeEdit) {
2458
3212
  try {
2459
- const resolvedPath = path2.resolve(targetFile);
2460
- if (!await fs2.pathExists(resolvedPath)) {
3213
+ const resolvedPath = path3.resolve(targetFile);
3214
+ if (!await fs4.pathExists(resolvedPath)) {
2461
3215
  return {
2462
3216
  success: false,
2463
3217
  error: `File not found: ${targetFile}`
@@ -2469,7 +3223,7 @@ class MorphEditorTool {
2469
3223
  error: "MORPH_API_KEY not configured. Please set your Morph API key."
2470
3224
  };
2471
3225
  }
2472
- const initialCode = await fs2.readFile(resolvedPath, "utf-8");
3226
+ const initialCode = await fs4.readFile(resolvedPath, "utf-8");
2473
3227
  const sessionFlags = this.confirmationService.getSessionFlags();
2474
3228
  if (!sessionFlags.fileOperations && !sessionFlags.allOperations) {
2475
3229
  const confirmationResult = await this.confirmationService.requestConfirmation({
@@ -2489,7 +3243,7 @@ ${codeEdit}`
2489
3243
  }
2490
3244
  }
2491
3245
  const mergedCode = await this.callMorphApply(instructions, initialCode, codeEdit);
2492
- await fs2.writeFile(resolvedPath, mergedCode, "utf-8");
3246
+ await fs4.writeFile(resolvedPath, mergedCode, "utf-8");
2493
3247
  const oldLines = initialCode.split(`
2494
3248
  `);
2495
3249
  const newLines = mergedCode.split(`
@@ -2672,11 +3426,11 @@ ${codeEdit}`
2672
3426
  }
2673
3427
  async view(filePath, viewRange) {
2674
3428
  try {
2675
- const resolvedPath = path2.resolve(filePath);
2676
- if (await fs2.pathExists(resolvedPath)) {
2677
- const stats = await fs2.stat(resolvedPath);
3429
+ const resolvedPath = path3.resolve(filePath);
3430
+ if (await fs4.pathExists(resolvedPath)) {
3431
+ const stats = await fs4.stat(resolvedPath);
2678
3432
  if (stats.isDirectory()) {
2679
- const files = await fs2.readdir(resolvedPath);
3433
+ const files = await fs4.readdir(resolvedPath);
2680
3434
  return {
2681
3435
  success: true,
2682
3436
  output: `Directory contents of ${filePath}:
@@ -2684,7 +3438,7 @@ ${files.join(`
2684
3438
  `)}`
2685
3439
  };
2686
3440
  }
2687
- const content = await fs2.readFile(resolvedPath, "utf-8");
3441
+ const content = await fs4.readFile(resolvedPath, "utf-8");
2688
3442
  const lines = content.split(`
2689
3443
  `);
2690
3444
  if (viewRange) {
@@ -2730,8 +3484,8 @@ ${numberedLines}${additionalLinesMessage}`
2730
3484
  }
2731
3485
  }
2732
3486
  // src/tools/project-map.ts
2733
- import * as path3 from "path";
2734
- import fs3 from "fs-extra";
3487
+ import * as path4 from "path";
3488
+ import fs5 from "fs-extra";
2735
3489
 
2736
3490
  class ProjectMapTool {
2737
3491
  currentDirectory = process.cwd();
@@ -2765,7 +3519,7 @@ Important Files:
2765
3519
  }
2766
3520
  let result = "";
2767
3521
  try {
2768
- const entries = await fs3.readdir(dir, { withFileTypes: true });
3522
+ const entries = await fs5.readdir(dir, { withFileTypes: true });
2769
3523
  const sortedEntries = entries.sort((a, b) => {
2770
3524
  if (a.isDirectory() && !b.isDirectory()) {
2771
3525
  return -1;
@@ -2793,7 +3547,7 @@ Important Files:
2793
3547
  if (entry.isDirectory()) {
2794
3548
  result += `${indent}\uD83D\uDCC1 ${entry.name}/
2795
3549
  `;
2796
- result += await this.generateTree(path3.join(dir, entry.name), maxDepth, currentDepth + 1);
3550
+ result += await this.generateTree(path4.join(dir, entry.name), maxDepth, currentDepth + 1);
2797
3551
  } else {
2798
3552
  result += `${indent}\uD83D\uDCC4 ${entry.name}
2799
3553
  `;
@@ -2815,8 +3569,8 @@ Important Files:
2815
3569
  ];
2816
3570
  const found = [];
2817
3571
  for (const pattern of importantPatterns) {
2818
- const fullPath = path3.join(this.currentDirectory, pattern);
2819
- if (await fs3.pathExists(fullPath)) {
3572
+ const fullPath = path4.join(this.currentDirectory, pattern);
3573
+ if (await fs5.pathExists(fullPath)) {
2820
3574
  found.push(pattern);
2821
3575
  }
2822
3576
  }
@@ -2828,8 +3582,8 @@ Important Files:
2828
3582
  }
2829
3583
  // src/tools/search.ts
2830
3584
  import { spawn } from "child_process";
2831
- import * as path4 from "path";
2832
- import fs4 from "fs-extra";
3585
+ import * as path5 from "path";
3586
+ import fs6 from "fs-extra";
2833
3587
 
2834
3588
  class SearchTool {
2835
3589
  confirmationService = ConfirmationService.getInstance();
@@ -2969,13 +3723,13 @@ class SearchTool {
2969
3723
  return;
2970
3724
  }
2971
3725
  try {
2972
- const entries = await fs4.readdir(dir, { withFileTypes: true });
3726
+ const entries = await fs6.readdir(dir, { withFileTypes: true });
2973
3727
  for (const entry of entries) {
2974
3728
  if (files.length >= maxResults) {
2975
3729
  break;
2976
3730
  }
2977
- const fullPath = path4.join(dir, entry.name);
2978
- const relativePath = path4.relative(this.currentDirectory, fullPath);
3731
+ const fullPath = path5.join(dir, entry.name);
3732
+ const relativePath = path5.relative(this.currentDirectory, fullPath);
2979
3733
  if (!options.includeHidden && entry.name.startsWith(".")) {
2980
3734
  continue;
2981
3735
  }
@@ -3074,19 +3828,19 @@ class SearchTool {
3074
3828
  }
3075
3829
  // src/tools/text-editor.ts
3076
3830
  import { writeFile as writeFilePromise } from "fs/promises";
3077
- import * as path5 from "path";
3078
- import fs5 from "fs-extra";
3831
+ import * as path6 from "path";
3832
+ import fs7 from "fs-extra";
3079
3833
 
3080
3834
  class TextEditorTool {
3081
3835
  editHistory = [];
3082
3836
  confirmationService = ConfirmationService.getInstance();
3083
3837
  async view(filePath, viewRange) {
3084
3838
  try {
3085
- const resolvedPath = path5.resolve(filePath);
3086
- if (await fs5.pathExists(resolvedPath)) {
3087
- const stats = await fs5.stat(resolvedPath);
3839
+ const resolvedPath = path6.resolve(filePath);
3840
+ if (await fs7.pathExists(resolvedPath)) {
3841
+ const stats = await fs7.stat(resolvedPath);
3088
3842
  if (stats.isDirectory()) {
3089
- const files = await fs5.readdir(resolvedPath);
3843
+ const files = await fs7.readdir(resolvedPath);
3090
3844
  return {
3091
3845
  success: true,
3092
3846
  output: `Directory contents of ${filePath}:
@@ -3094,7 +3848,7 @@ ${files.join(`
3094
3848
  `)}`
3095
3849
  };
3096
3850
  }
3097
- const content = await fs5.readFile(resolvedPath, "utf-8");
3851
+ const content = await fs7.readFile(resolvedPath, "utf-8");
3098
3852
  const lines = content.split(`
3099
3853
  `);
3100
3854
  if (viewRange) {
@@ -3134,14 +3888,14 @@ ${numberedLines}${additionalLinesMessage}`
3134
3888
  }
3135
3889
  async strReplace(filePath, oldStr, newStr, replaceAll = false) {
3136
3890
  try {
3137
- const resolvedPath = path5.resolve(filePath);
3138
- if (!await fs5.pathExists(resolvedPath)) {
3891
+ const resolvedPath = path6.resolve(filePath);
3892
+ if (!await fs7.pathExists(resolvedPath)) {
3139
3893
  return {
3140
3894
  success: false,
3141
3895
  error: `File not found: ${filePath}`
3142
3896
  };
3143
3897
  }
3144
- const content = await fs5.readFile(resolvedPath, "utf-8");
3898
+ const content = await fs7.readFile(resolvedPath, "utf-8");
3145
3899
  if (!content.includes(oldStr)) {
3146
3900
  if (oldStr.includes(`
3147
3901
  `)) {
@@ -3209,7 +3963,7 @@ ${numberedLines}${additionalLinesMessage}`
3209
3963
  }
3210
3964
  async create(filePath, content) {
3211
3965
  try {
3212
- const resolvedPath = path5.resolve(filePath);
3966
+ const resolvedPath = path6.resolve(filePath);
3213
3967
  const sessionFlags = this.confirmationService.getSessionFlags();
3214
3968
  if (!sessionFlags.fileOperations && !sessionFlags.allOperations) {
3215
3969
  const contentLines = content.split(`
@@ -3235,8 +3989,8 @@ ${numberedLines}${additionalLinesMessage}`
3235
3989
  };
3236
3990
  }
3237
3991
  }
3238
- const dir = path5.dirname(resolvedPath);
3239
- await fs5.ensureDir(dir);
3992
+ const dir = path6.dirname(resolvedPath);
3993
+ await fs7.ensureDir(dir);
3240
3994
  await writeFilePromise(resolvedPath, content, "utf-8");
3241
3995
  this.editHistory.push({
3242
3996
  command: "create",
@@ -3260,14 +4014,14 @@ ${numberedLines}${additionalLinesMessage}`
3260
4014
  }
3261
4015
  async replaceLines(filePath, startLine, endLine, newContent) {
3262
4016
  try {
3263
- const resolvedPath = path5.resolve(filePath);
3264
- if (!await fs5.pathExists(resolvedPath)) {
4017
+ const resolvedPath = path6.resolve(filePath);
4018
+ if (!await fs7.pathExists(resolvedPath)) {
3265
4019
  return {
3266
4020
  success: false,
3267
4021
  error: `File not found: ${filePath}`
3268
4022
  };
3269
4023
  }
3270
- const fileContent = await fs5.readFile(resolvedPath, "utf-8");
4024
+ const fileContent = await fs7.readFile(resolvedPath, "utf-8");
3271
4025
  const lines = fileContent.split(`
3272
4026
  `);
3273
4027
  if (startLine < 1 || startLine > lines.length) {
@@ -3330,14 +4084,14 @@ ${numberedLines}${additionalLinesMessage}`
3330
4084
  }
3331
4085
  async insert(filePath, insertLine, content) {
3332
4086
  try {
3333
- const resolvedPath = path5.resolve(filePath);
3334
- if (!await fs5.pathExists(resolvedPath)) {
4087
+ const resolvedPath = path6.resolve(filePath);
4088
+ if (!await fs7.pathExists(resolvedPath)) {
3335
4089
  return {
3336
4090
  success: false,
3337
4091
  error: `File not found: ${filePath}`
3338
4092
  };
3339
4093
  }
3340
- const fileContent = await fs5.readFile(resolvedPath, "utf-8");
4094
+ const fileContent = await fs7.readFile(resolvedPath, "utf-8");
3341
4095
  const lines = fileContent.split(`
3342
4096
  `);
3343
4097
  lines.splice(insertLine - 1, 0, content);
@@ -3373,19 +4127,19 @@ ${numberedLines}${additionalLinesMessage}`
3373
4127
  switch (lastEdit.command) {
3374
4128
  case "str_replace":
3375
4129
  if (lastEdit.path && lastEdit.old_str && lastEdit.new_str) {
3376
- const content = await fs5.readFile(lastEdit.path, "utf-8");
4130
+ const content = await fs7.readFile(lastEdit.path, "utf-8");
3377
4131
  const revertedContent = content.replace(lastEdit.new_str, lastEdit.old_str);
3378
4132
  await writeFilePromise(lastEdit.path, revertedContent, "utf-8");
3379
4133
  }
3380
4134
  break;
3381
4135
  case "create":
3382
4136
  if (lastEdit.path) {
3383
- await fs5.remove(lastEdit.path);
4137
+ await fs7.remove(lastEdit.path);
3384
4138
  }
3385
4139
  break;
3386
4140
  case "insert":
3387
4141
  if (lastEdit.path && lastEdit.insert_line) {
3388
- const content = await fs5.readFile(lastEdit.path, "utf-8");
4142
+ const content = await fs7.readFile(lastEdit.path, "utf-8");
3389
4143
  const lines = content.split(`
3390
4144
  `);
3391
4145
  lines.splice(lastEdit.insert_line - 1, 1);
@@ -4444,19 +5198,19 @@ async function getAllSuperAgentTools() {
4444
5198
  }
4445
5199
 
4446
5200
  // src/utils/custom-instructions.ts
4447
- import * as path6 from "path";
5201
+ import * as path7 from "path";
4448
5202
  import * as os2 from "os";
4449
- import * as fs6 from "fs";
5203
+ import * as fs8 from "fs";
4450
5204
  function loadCustomInstructions(workingDirectory = process.cwd()) {
4451
5205
  try {
4452
- let instructionsPath = path6.join(workingDirectory, ".super-agent", "SUPER_AGENT.md");
4453
- if (fs6.existsSync(instructionsPath)) {
4454
- const customInstructions = fs6.readFileSync(instructionsPath, "utf-8");
5206
+ let instructionsPath = path7.join(workingDirectory, ".super-agent", "SUPER_AGENT.md");
5207
+ if (fs8.existsSync(instructionsPath)) {
5208
+ const customInstructions = fs8.readFileSync(instructionsPath, "utf-8");
4455
5209
  return customInstructions.trim();
4456
5210
  }
4457
- instructionsPath = path6.join(os2.homedir(), ".super-agent", "SUPER_AGENT.md");
4458
- if (fs6.existsSync(instructionsPath)) {
4459
- const customInstructions = fs6.readFileSync(instructionsPath, "utf-8");
5211
+ instructionsPath = path7.join(os2.homedir(), ".super-agent", "SUPER_AGENT.md");
5212
+ if (fs8.existsSync(instructionsPath)) {
5213
+ const customInstructions = fs8.readFileSync(instructionsPath, "utf-8");
4460
5214
  return customInstructions.trim();
4461
5215
  }
4462
5216
  return null;
@@ -5371,9 +6125,9 @@ Maximum tool execution rounds reached. Stopping to prevent infinite loops.`
5371
6125
  }
5372
6126
 
5373
6127
  // src/ui/components/api-key-input.tsx
5374
- import { Box as Box8, Text as Text8, useApp, useInput as useInput3 } from "ink";
6128
+ import { Box as Box12, Text as Text12, useApp, useInput as useInput3 } from "ink";
5375
6129
  import { useState as useState6 } from "react";
5376
- import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
6130
+ import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
5377
6131
  function ApiKeyInput({ onApiKeySet }) {
5378
6132
  const [input, setInput] = useState6("");
5379
6133
  const [error, setError] = useState6("");
@@ -5436,40 +6190,40 @@ function ApiKeyInput({ onApiKeySet }) {
5436
6190
  }
5437
6191
  };
5438
6192
  const displayText = input.length > 0 ? isSubmitting ? "*".repeat(input.length) : "*".repeat(input.length) + "█" : isSubmitting ? " " : "█";
5439
- return /* @__PURE__ */ jsxDEV9(Box8, {
6193
+ return /* @__PURE__ */ jsxDEV13(Box12, {
5440
6194
  flexDirection: "column",
5441
6195
  paddingX: 2,
5442
6196
  paddingY: 1,
5443
6197
  children: [
5444
- /* @__PURE__ */ jsxDEV9(Text8, {
6198
+ /* @__PURE__ */ jsxDEV13(Text12, {
5445
6199
  color: "yellow",
5446
6200
  children: "\uD83D\uDD11 Super Agent API Key Required"
5447
6201
  }, undefined, false, undefined, this),
5448
- /* @__PURE__ */ jsxDEV9(Box8, {
6202
+ /* @__PURE__ */ jsxDEV13(Box12, {
5449
6203
  marginBottom: 1,
5450
- children: /* @__PURE__ */ jsxDEV9(Text8, {
6204
+ children: /* @__PURE__ */ jsxDEV13(Text12, {
5451
6205
  color: "gray",
5452
6206
  children: "Please enter your Super Agent API key to continue:"
5453
6207
  }, undefined, false, undefined, this)
5454
6208
  }, undefined, false, undefined, this),
5455
- /* @__PURE__ */ jsxDEV9(Box8, {
6209
+ /* @__PURE__ */ jsxDEV13(Box12, {
5456
6210
  borderStyle: "round",
5457
6211
  borderColor: "blue",
5458
6212
  paddingX: 1,
5459
6213
  marginBottom: 1,
5460
6214
  children: [
5461
- /* @__PURE__ */ jsxDEV9(Text8, {
6215
+ /* @__PURE__ */ jsxDEV13(Text12, {
5462
6216
  color: "gray",
5463
6217
  children: "❯ "
5464
6218
  }, undefined, false, undefined, this),
5465
- /* @__PURE__ */ jsxDEV9(Text8, {
6219
+ /* @__PURE__ */ jsxDEV13(Text12, {
5466
6220
  children: displayText
5467
6221
  }, undefined, false, undefined, this)
5468
6222
  ]
5469
6223
  }, undefined, true, undefined, this),
5470
- error ? /* @__PURE__ */ jsxDEV9(Box8, {
6224
+ error ? /* @__PURE__ */ jsxDEV13(Box12, {
5471
6225
  marginBottom: 1,
5472
- children: /* @__PURE__ */ jsxDEV9(Text8, {
6226
+ children: /* @__PURE__ */ jsxDEV13(Text12, {
5473
6227
  color: "red",
5474
6228
  children: [
5475
6229
  "❌ ",
@@ -5477,30 +6231,30 @@ function ApiKeyInput({ onApiKeySet }) {
5477
6231
  ]
5478
6232
  }, undefined, true, undefined, this)
5479
6233
  }, undefined, false, undefined, this) : null,
5480
- /* @__PURE__ */ jsxDEV9(Box8, {
6234
+ /* @__PURE__ */ jsxDEV13(Box12, {
5481
6235
  flexDirection: "column",
5482
6236
  marginTop: 1,
5483
6237
  children: [
5484
- /* @__PURE__ */ jsxDEV9(Text8, {
6238
+ /* @__PURE__ */ jsxDEV13(Text12, {
5485
6239
  color: "gray",
5486
6240
  dimColor: true,
5487
6241
  children: "• Press Enter to submit"
5488
6242
  }, undefined, false, undefined, this),
5489
- /* @__PURE__ */ jsxDEV9(Text8, {
6243
+ /* @__PURE__ */ jsxDEV13(Text12, {
5490
6244
  color: "gray",
5491
6245
  dimColor: true,
5492
6246
  children: "• Press Ctrl+C to exit"
5493
6247
  }, undefined, false, undefined, this),
5494
- /* @__PURE__ */ jsxDEV9(Text8, {
6248
+ /* @__PURE__ */ jsxDEV13(Text12, {
5495
6249
  color: "gray",
5496
6250
  dimColor: true,
5497
6251
  children: "Note: API key will be saved to ~/.super-agent/settings.json"
5498
6252
  }, undefined, false, undefined, this)
5499
6253
  ]
5500
6254
  }, undefined, true, undefined, this),
5501
- isSubmitting ? /* @__PURE__ */ jsxDEV9(Box8, {
6255
+ isSubmitting ? /* @__PURE__ */ jsxDEV13(Box12, {
5502
6256
  marginTop: 1,
5503
- children: /* @__PURE__ */ jsxDEV9(Text8, {
6257
+ children: /* @__PURE__ */ jsxDEV13(Text12, {
5504
6258
  color: "yellow",
5505
6259
  children: "\uD83D\uDD04 Validating API key..."
5506
6260
  }, undefined, false, undefined, this)
@@ -5511,8 +6265,8 @@ function ApiKeyInput({ onApiKeySet }) {
5511
6265
 
5512
6266
  // src/ui/components/mcp-status.tsx
5513
6267
  import { useEffect as useEffect3, useState as useState7 } from "react";
5514
- import { Box as Box9, Text as Text9 } from "ink";
5515
- import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
6268
+ import { Box as Box13, Text as Text13 } from "ink";
6269
+ import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
5516
6270
  function MCPStatus({}) {
5517
6271
  const [connectedServers, setConnectedServers] = useState7([]);
5518
6272
  const [availableTools, setAvailableTools] = useState7([]);
@@ -5539,9 +6293,9 @@ function MCPStatus({}) {
5539
6293
  if (connectedServers.length === 0) {
5540
6294
  return null;
5541
6295
  }
5542
- return /* @__PURE__ */ jsxDEV10(Box9, {
6296
+ return /* @__PURE__ */ jsxDEV14(Box13, {
5543
6297
  marginLeft: 1,
5544
- children: /* @__PURE__ */ jsxDEV10(Text9, {
6298
+ children: /* @__PURE__ */ jsxDEV14(Text13, {
5545
6299
  color: "green",
5546
6300
  children: [
5547
6301
  "⚒ mcps: ",
@@ -5553,8 +6307,8 @@ function MCPStatus({}) {
5553
6307
  }
5554
6308
 
5555
6309
  // src/ui/components/chat-input.tsx
5556
- import { Box as Box10, Text as Text10 } from "ink";
5557
- import { jsxDEV as jsxDEV11, Fragment as Fragment3 } from "react/jsx-dev-runtime";
6310
+ import { Box as Box14, Text as Text14 } from "ink";
6311
+ import { jsxDEV as jsxDEV15, Fragment as Fragment3 } from "react/jsx-dev-runtime";
5558
6312
  function ChatInput({
5559
6313
  input,
5560
6314
  cursorPosition,
@@ -5583,7 +6337,7 @@ function ChatInput({
5583
6337
  const placeholderText = "Ask me anything...";
5584
6338
  const isPlaceholder = !input;
5585
6339
  if (isMultiline) {
5586
- return /* @__PURE__ */ jsxDEV11(Box10, {
6340
+ return /* @__PURE__ */ jsxDEV15(Box14, {
5587
6341
  borderStyle: "round",
5588
6342
  borderColor,
5589
6343
  paddingY: 0,
@@ -5595,19 +6349,19 @@ function ChatInput({
5595
6349
  const beforeCursorInLine = line.slice(0, currentCharIndex);
5596
6350
  const cursorChar2 = line.slice(currentCharIndex, currentCharIndex + 1) || " ";
5597
6351
  const afterCursorInLine = line.slice(currentCharIndex + 1);
5598
- return /* @__PURE__ */ jsxDEV11(Box10, {
6352
+ return /* @__PURE__ */ jsxDEV15(Box14, {
5599
6353
  children: [
5600
- /* @__PURE__ */ jsxDEV11(Text10, {
6354
+ /* @__PURE__ */ jsxDEV15(Text14, {
5601
6355
  color: promptColor,
5602
6356
  children: [
5603
6357
  promptChar,
5604
6358
  " "
5605
6359
  ]
5606
6360
  }, undefined, true, undefined, this),
5607
- /* @__PURE__ */ jsxDEV11(Text10, {
6361
+ /* @__PURE__ */ jsxDEV15(Text14, {
5608
6362
  children: [
5609
6363
  beforeCursorInLine,
5610
- showCursor && /* @__PURE__ */ jsxDEV11(Text10, {
6364
+ showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
5611
6365
  backgroundColor: "white",
5612
6366
  color: "black",
5613
6367
  children: cursorChar2
@@ -5619,16 +6373,16 @@ function ChatInput({
5619
6373
  ]
5620
6374
  }, index, true, undefined, this);
5621
6375
  } else {
5622
- return /* @__PURE__ */ jsxDEV11(Box10, {
6376
+ return /* @__PURE__ */ jsxDEV15(Box14, {
5623
6377
  children: [
5624
- /* @__PURE__ */ jsxDEV11(Text10, {
6378
+ /* @__PURE__ */ jsxDEV15(Text14, {
5625
6379
  color: promptColor,
5626
6380
  children: [
5627
6381
  promptChar,
5628
6382
  " "
5629
6383
  ]
5630
6384
  }, undefined, true, undefined, this),
5631
- /* @__PURE__ */ jsxDEV11(Text10, {
6385
+ /* @__PURE__ */ jsxDEV15(Text14, {
5632
6386
  children: line
5633
6387
  }, undefined, false, undefined, this)
5634
6388
  ]
@@ -5639,35 +6393,35 @@ function ChatInput({
5639
6393
  }
5640
6394
  const cursorChar = input.slice(cursorPosition, cursorPosition + 1) || " ";
5641
6395
  const afterCursorText = input.slice(cursorPosition + 1);
5642
- return /* @__PURE__ */ jsxDEV11(Box10, {
6396
+ return /* @__PURE__ */ jsxDEV15(Box14, {
5643
6397
  borderStyle: "round",
5644
6398
  borderColor,
5645
6399
  paddingX: 1,
5646
6400
  paddingY: 0,
5647
6401
  marginTop: 1,
5648
- children: /* @__PURE__ */ jsxDEV11(Box10, {
6402
+ children: /* @__PURE__ */ jsxDEV15(Box14, {
5649
6403
  children: [
5650
- /* @__PURE__ */ jsxDEV11(Text10, {
6404
+ /* @__PURE__ */ jsxDEV15(Text14, {
5651
6405
  color: promptColor,
5652
6406
  children: "❯ "
5653
6407
  }, undefined, false, undefined, this),
5654
- isPlaceholder ? /* @__PURE__ */ jsxDEV11(Fragment3, {
6408
+ isPlaceholder ? /* @__PURE__ */ jsxDEV15(Fragment3, {
5655
6409
  children: [
5656
- /* @__PURE__ */ jsxDEV11(Text10, {
6410
+ /* @__PURE__ */ jsxDEV15(Text14, {
5657
6411
  color: "gray",
5658
6412
  dimColor: true,
5659
6413
  children: placeholderText
5660
6414
  }, undefined, false, undefined, this),
5661
- showCursor && /* @__PURE__ */ jsxDEV11(Text10, {
6415
+ showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
5662
6416
  backgroundColor: "white",
5663
6417
  color: "black",
5664
6418
  children: " "
5665
6419
  }, undefined, false, undefined, this)
5666
6420
  ]
5667
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV11(Text10, {
6421
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV15(Text14, {
5668
6422
  children: [
5669
6423
  beforeCursor,
5670
- showCursor && /* @__PURE__ */ jsxDEV11(Text10, {
6424
+ showCursor && /* @__PURE__ */ jsxDEV15(Text14, {
5671
6425
  backgroundColor: "white",
5672
6426
  color: "black",
5673
6427
  children: cursorChar
@@ -5682,9 +6436,9 @@ function ChatInput({
5682
6436
  }
5683
6437
 
5684
6438
  // src/ui/components/chat-interface.tsx
5685
- import { Box as Box11, Text as Text11 } from "ink";
6439
+ import { Box as Box15, Text as Text15 } from "ink";
5686
6440
  import cfonts from "cfonts";
5687
- import { jsxDEV as jsxDEV12, Fragment as Fragment4 } from "react/jsx-dev-runtime";
6441
+ import { jsxDEV as jsxDEV16, Fragment as Fragment4 } from "react/jsx-dev-runtime";
5688
6442
  function ChatInterfaceWithAgent({
5689
6443
  agent,
5690
6444
  initialMessage
@@ -5705,9 +6459,20 @@ function ChatInterfaceWithAgent({
5705
6459
  selectedCommandIndex,
5706
6460
  showModelSelection,
5707
6461
  selectedModelIndex,
5708
- commandSuggestions,
5709
6462
  availableModels,
5710
- autoEditEnabled
6463
+ autoEditEnabled,
6464
+ agentMode,
6465
+ showMentionSuggestions,
6466
+ commandSuggestions,
6467
+ showCommandPalette,
6468
+ commandPaletteQuery,
6469
+ selectedPaletteIndex,
6470
+ mentionSuggestions,
6471
+ mentionQuery,
6472
+ selectedMentionIndex,
6473
+ showProviderSelection,
6474
+ selectedProviderIndex,
6475
+ showConfigViewer
5711
6476
  } = useInputHandler({
5712
6477
  agent,
5713
6478
  chatHistory,
@@ -5739,15 +6504,6 @@ function ChatInterfaceWithAgent({
5739
6504
  transitionGradient: true,
5740
6505
  env: "node"
5741
6506
  });
5742
- const logoLines = logoOutput.string.split(`
5743
- `);
5744
- logoLines.forEach((line) => {
5745
- if (line.trim()) {
5746
- console.log(" " + line);
5747
- } else {
5748
- console.log(line);
5749
- }
5750
- });
5751
6507
  console.log(" ");
5752
6508
  setChatHistory([]);
5753
6509
  }, []);
@@ -5864,40 +6620,40 @@ function ChatInterfaceWithAgent({
5864
6620
  setProcessingTime(0);
5865
6621
  processingStartTime.current = 0;
5866
6622
  };
5867
- return /* @__PURE__ */ jsxDEV12(Box11, {
6623
+ return /* @__PURE__ */ jsxDEV16(Box15, {
5868
6624
  flexDirection: "column",
5869
6625
  paddingX: 2,
5870
6626
  children: [
5871
- chatHistory.length === 0 && !confirmationOptions && /* @__PURE__ */ jsxDEV12(Box11, {
6627
+ chatHistory.length === 0 && !confirmationOptions && /* @__PURE__ */ jsxDEV16(Box15, {
5872
6628
  flexDirection: "column",
5873
6629
  marginBottom: 2,
5874
6630
  children: [
5875
- /* @__PURE__ */ jsxDEV12(Text11, {
6631
+ /* @__PURE__ */ jsxDEV16(Text15, {
5876
6632
  color: "cyan",
5877
6633
  bold: true,
5878
6634
  children: "Tips for getting started:"
5879
6635
  }, undefined, false, undefined, this),
5880
- /* @__PURE__ */ jsxDEV12(Box11, {
6636
+ /* @__PURE__ */ jsxDEV16(Box15, {
5881
6637
  marginTop: 1,
5882
6638
  flexDirection: "column",
5883
6639
  children: [
5884
- /* @__PURE__ */ jsxDEV12(Text11, {
6640
+ /* @__PURE__ */ jsxDEV16(Text15, {
5885
6641
  color: "gray",
5886
6642
  children: "1. Ask questions, edit files, or run commands."
5887
6643
  }, undefined, false, undefined, this),
5888
- /* @__PURE__ */ jsxDEV12(Text11, {
6644
+ /* @__PURE__ */ jsxDEV16(Text15, {
5889
6645
  color: "gray",
5890
6646
  children: "2. Be specific for the best results."
5891
6647
  }, undefined, false, undefined, this),
5892
- /* @__PURE__ */ jsxDEV12(Text11, {
6648
+ /* @__PURE__ */ jsxDEV16(Text15, {
5893
6649
  color: "gray",
5894
6650
  children: "3. Create SUPER_AGENT.md files to customize your interactions."
5895
6651
  }, undefined, false, undefined, this),
5896
- /* @__PURE__ */ jsxDEV12(Text11, {
6652
+ /* @__PURE__ */ jsxDEV16(Text15, {
5897
6653
  color: "gray",
5898
6654
  children: "4. Press Shift+Tab to toggle auto-edit mode."
5899
6655
  }, undefined, false, undefined, this),
5900
- /* @__PURE__ */ jsxDEV12(Text11, {
6656
+ /* @__PURE__ */ jsxDEV16(Text15, {
5901
6657
  color: "gray",
5902
6658
  children: "5. /help for more information."
5903
6659
  }, undefined, false, undefined, this)
@@ -5905,23 +6661,23 @@ function ChatInterfaceWithAgent({
5905
6661
  }, undefined, true, undefined, this)
5906
6662
  ]
5907
6663
  }, undefined, true, undefined, this),
5908
- /* @__PURE__ */ jsxDEV12(Box11, {
6664
+ /* @__PURE__ */ jsxDEV16(Box15, {
5909
6665
  flexDirection: "column",
5910
6666
  marginBottom: 1,
5911
- children: /* @__PURE__ */ jsxDEV12(Text11, {
6667
+ children: /* @__PURE__ */ jsxDEV16(Text15, {
5912
6668
  color: "gray",
5913
6669
  children: "Type your request in natural language. Ctrl+C to clear, 'exit' to quit."
5914
6670
  }, undefined, false, undefined, this)
5915
6671
  }, undefined, false, undefined, this),
5916
- /* @__PURE__ */ jsxDEV12(Box11, {
6672
+ /* @__PURE__ */ jsxDEV16(Box15, {
5917
6673
  flexDirection: "column",
5918
6674
  ref: scrollRef,
5919
- children: /* @__PURE__ */ jsxDEV12(ChatHistory, {
6675
+ children: /* @__PURE__ */ jsxDEV16(ChatHistory, {
5920
6676
  entries: chatHistory,
5921
6677
  isConfirmationActive: !!confirmationOptions
5922
6678
  }, undefined, false, undefined, this)
5923
6679
  }, undefined, false, undefined, this),
5924
- confirmationOptions && /* @__PURE__ */ jsxDEV12(ConfirmationDialog, {
6680
+ confirmationOptions && /* @__PURE__ */ jsxDEV16(ConfirmationDialog, {
5925
6681
  operation: confirmationOptions.operation,
5926
6682
  filename: confirmationOptions.filename,
5927
6683
  showVSCodeOpen: confirmationOptions.showVSCodeOpen,
@@ -5929,72 +6685,184 @@ function ChatInterfaceWithAgent({
5929
6685
  onConfirm: handleConfirmation,
5930
6686
  onReject: handleRejection
5931
6687
  }, undefined, false, undefined, this),
5932
- !confirmationOptions && /* @__PURE__ */ jsxDEV12(Fragment4, {
5933
- children: [
5934
- /* @__PURE__ */ jsxDEV12(LoadingSpinner, {
5935
- isActive: isProcessing || isStreaming,
5936
- processingTime,
5937
- tokenCount
5938
- }, undefined, false, undefined, this),
5939
- /* @__PURE__ */ jsxDEV12(ChatInput, {
5940
- input,
5941
- cursorPosition,
5942
- isProcessing,
5943
- isStreaming
5944
- }, undefined, false, undefined, this),
5945
- /* @__PURE__ */ jsxDEV12(Box11, {
5946
- flexDirection: "row",
5947
- marginTop: 1,
5948
- children: [
5949
- /* @__PURE__ */ jsxDEV12(Box11, {
5950
- marginRight: 2,
5951
- children: [
5952
- /* @__PURE__ */ jsxDEV12(Text11, {
5953
- color: "cyan",
5954
- children: [
5955
- autoEditEnabled ? "▶" : "⏸",
5956
- " auto-edit:",
5957
- " ",
5958
- autoEditEnabled ? "on" : "off"
5959
- ]
5960
- }, undefined, true, undefined, this),
5961
- /* @__PURE__ */ jsxDEV12(Text11, {
5962
- color: "gray",
5963
- dimColor: true,
5964
- children: [
5965
- " ",
5966
- "(shift + tab)"
5967
- ]
5968
- }, undefined, true, undefined, this)
5969
- ]
5970
- }, undefined, true, undefined, this),
5971
- /* @__PURE__ */ jsxDEV12(Box11, {
5972
- marginRight: 2,
5973
- children: /* @__PURE__ */ jsxDEV12(Text11, {
5974
- color: "yellow",
5975
- children: [
5976
- "≋ ",
5977
- agent.getCurrentModel()
5978
- ]
5979
- }, undefined, true, undefined, this)
5980
- }, undefined, false, undefined, this),
5981
- /* @__PURE__ */ jsxDEV12(MCPStatus, {}, undefined, false, undefined, this)
5982
- ]
5983
- }, undefined, true, undefined, this),
5984
- /* @__PURE__ */ jsxDEV12(CommandSuggestions, {
5985
- suggestions: commandSuggestions,
5986
- input,
5987
- selectedIndex: selectedCommandIndex,
5988
- isVisible: showCommandSuggestions
5989
- }, undefined, false, undefined, this),
5990
- /* @__PURE__ */ jsxDEV12(ModelSelection, {
6688
+ !confirmationOptions && /* @__PURE__ */ jsxDEV16(Fragment4, {
6689
+ children: showCommandPalette ? /* @__PURE__ */ jsxDEV16(Box15, {
6690
+ flexDirection: "column",
6691
+ marginTop: 1,
6692
+ children: /* @__PURE__ */ jsxDEV16(CommandPalette, {
6693
+ files: mentionSuggestions,
6694
+ query: commandPaletteQuery,
6695
+ selectedIndex: selectedPaletteIndex,
6696
+ isVisible: showCommandPalette
6697
+ }, undefined, false, undefined, this)
6698
+ }, undefined, false, undefined, this) : showProviderSelection ? /* @__PURE__ */ jsxDEV16(Box15, {
6699
+ flexDirection: "column",
6700
+ marginTop: 1,
6701
+ children: /* @__PURE__ */ jsxDEV16(ProviderSelection, {
6702
+ providers: (() => {
6703
+ const {
6704
+ getSettingsManager: getSettingsManager2
6705
+ } = (init_settings_manager(), __toCommonJS(exports_settings_manager));
6706
+ const manager = getSettingsManager2();
6707
+ const settings = manager.loadUserSettings();
6708
+ const active = settings.active_provider;
6709
+ return Object.keys(settings.providers || {}).map((id) => ({
6710
+ id,
6711
+ name: id,
6712
+ isActive: id === active,
6713
+ hasApiKey: !!settings.providers[id]?.api_key,
6714
+ model: settings.providers[id]?.model
6715
+ }));
6716
+ })(),
6717
+ selectedIndex: selectedProviderIndex,
6718
+ isVisible: showProviderSelection
6719
+ }, undefined, false, undefined, this)
6720
+ }, undefined, false, undefined, this) : showConfigViewer ? /* @__PURE__ */ jsxDEV16(Box15, {
6721
+ flexDirection: "column",
6722
+ marginTop: 1,
6723
+ children: /* @__PURE__ */ jsxDEV16(ConfigViewer, {
6724
+ config: (() => {
6725
+ const {
6726
+ getSettingsManager: getSettingsManager2
6727
+ } = (init_settings_manager(), __toCommonJS(exports_settings_manager));
6728
+ const manager = getSettingsManager2();
6729
+ const settings = manager.loadUserSettings();
6730
+ const activeProvider = settings.active_provider;
6731
+ const activeConfig = settings.providers[activeProvider];
6732
+ return {
6733
+ activeProvider,
6734
+ apiKeySet: !!activeConfig?.api_key,
6735
+ baseUrl: activeConfig?.base_url,
6736
+ model: activeConfig?.model,
6737
+ theme: settings.ui.theme
6738
+ };
6739
+ })(),
6740
+ isVisible: showConfigViewer
6741
+ }, undefined, false, undefined, this)
6742
+ }, undefined, false, undefined, this) : showModelSelection ? /* @__PURE__ */ jsxDEV16(Box15, {
6743
+ flexDirection: "column",
6744
+ marginTop: 1,
6745
+ children: /* @__PURE__ */ jsxDEV16(ModelSelection, {
5991
6746
  models: availableModels,
5992
6747
  selectedIndex: selectedModelIndex,
5993
6748
  isVisible: showModelSelection,
5994
6749
  currentModel: agent.getCurrentModel()
5995
6750
  }, undefined, false, undefined, this)
5996
- ]
5997
- }, undefined, true, undefined, this)
6751
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV16(Fragment4, {
6752
+ children: [
6753
+ /* @__PURE__ */ jsxDEV16(LoadingSpinner, {
6754
+ isActive: isProcessing || isStreaming,
6755
+ processingTime,
6756
+ tokenCount
6757
+ }, undefined, false, undefined, this),
6758
+ /* @__PURE__ */ jsxDEV16(ChatInput, {
6759
+ input,
6760
+ cursorPosition,
6761
+ isProcessing,
6762
+ isStreaming
6763
+ }, undefined, false, undefined, this),
6764
+ /* @__PURE__ */ jsxDEV16(Box15, {
6765
+ flexDirection: "row",
6766
+ marginTop: 1,
6767
+ flexWrap: "wrap",
6768
+ children: [
6769
+ /* @__PURE__ */ jsxDEV16(Box15, {
6770
+ marginRight: 2,
6771
+ children: [
6772
+ /* @__PURE__ */ jsxDEV16(Text15, {
6773
+ color: "cyan",
6774
+ children: [
6775
+ autoEditEnabled ? "\uD83D\uDE80" : "⏸",
6776
+ " yolo:",
6777
+ " ",
6778
+ autoEditEnabled ? "on" : "off",
6779
+ " "
6780
+ ]
6781
+ }, undefined, true, undefined, this),
6782
+ /* @__PURE__ */ jsxDEV16(Text15, {
6783
+ color: "gray",
6784
+ dimColor: true,
6785
+ children: "(ctrl+y)"
6786
+ }, undefined, false, undefined, this)
6787
+ ]
6788
+ }, undefined, true, undefined, this),
6789
+ /* @__PURE__ */ jsxDEV16(Box15, {
6790
+ marginRight: 2,
6791
+ children: [
6792
+ /* @__PURE__ */ jsxDEV16(Text15, {
6793
+ color: agentMode === "plan" ? "cyan" : agentMode === "debug" ? "magenta" : "green",
6794
+ bold: true,
6795
+ children: [
6796
+ "◈ ",
6797
+ agentMode.toUpperCase()
6798
+ ]
6799
+ }, undefined, true, undefined, this),
6800
+ /* @__PURE__ */ jsxDEV16(Text15, {
6801
+ color: "gray",
6802
+ dimColor: true,
6803
+ children: [
6804
+ " ",
6805
+ "(shift+tab)"
6806
+ ]
6807
+ }, undefined, true, undefined, this)
6808
+ ]
6809
+ }, undefined, true, undefined, this),
6810
+ /* @__PURE__ */ jsxDEV16(Box15, {
6811
+ marginRight: 2,
6812
+ children: [
6813
+ /* @__PURE__ */ jsxDEV16(Text15, {
6814
+ color: "magenta",
6815
+ children: "\uD83D\uDD0D palette "
6816
+ }, undefined, false, undefined, this),
6817
+ /* @__PURE__ */ jsxDEV16(Text15, {
6818
+ color: "gray",
6819
+ dimColor: true,
6820
+ children: "(ctrl+p)"
6821
+ }, undefined, false, undefined, this)
6822
+ ]
6823
+ }, undefined, true, undefined, this),
6824
+ /* @__PURE__ */ jsxDEV16(Box15, {
6825
+ marginRight: 2,
6826
+ children: [
6827
+ /* @__PURE__ */ jsxDEV16(Text15, {
6828
+ color: "cyan",
6829
+ children: "\uD83D\uDC1A shell "
6830
+ }, undefined, false, undefined, this),
6831
+ /* @__PURE__ */ jsxDEV16(Text15, {
6832
+ color: "gray",
6833
+ dimColor: true,
6834
+ children: "(!)"
6835
+ }, undefined, false, undefined, this)
6836
+ ]
6837
+ }, undefined, true, undefined, this),
6838
+ /* @__PURE__ */ jsxDEV16(Box15, {
6839
+ marginRight: 2,
6840
+ children: /* @__PURE__ */ jsxDEV16(Text15, {
6841
+ color: "yellow",
6842
+ children: [
6843
+ "≋ ",
6844
+ agent.getCurrentModel()
6845
+ ]
6846
+ }, undefined, true, undefined, this)
6847
+ }, undefined, false, undefined, this),
6848
+ /* @__PURE__ */ jsxDEV16(MCPStatus, {}, undefined, false, undefined, this)
6849
+ ]
6850
+ }, undefined, true, undefined, this),
6851
+ /* @__PURE__ */ jsxDEV16(MentionSuggestions, {
6852
+ suggestions: mentionSuggestions,
6853
+ query: mentionQuery,
6854
+ selectedIndex: selectedMentionIndex,
6855
+ isVisible: showMentionSuggestions
6856
+ }, undefined, false, undefined, this),
6857
+ /* @__PURE__ */ jsxDEV16(CommandSuggestions, {
6858
+ suggestions: commandSuggestions,
6859
+ input,
6860
+ selectedIndex: selectedCommandIndex,
6861
+ isVisible: showCommandSuggestions
6862
+ }, undefined, false, undefined, this)
6863
+ ]
6864
+ }, undefined, true, undefined, this)
6865
+ }, undefined, false, undefined, this)
5998
6866
  ]
5999
6867
  }, undefined, true, undefined, this);
6000
6868
  }
@@ -6007,11 +6875,11 @@ function ChatInterface({
6007
6875
  setCurrentAgent(newAgent);
6008
6876
  };
6009
6877
  if (!currentAgent) {
6010
- return /* @__PURE__ */ jsxDEV12(ApiKeyInput, {
6878
+ return /* @__PURE__ */ jsxDEV16(ApiKeyInput, {
6011
6879
  onApiKeySet: handleApiKeySet
6012
6880
  }, undefined, false, undefined, this);
6013
6881
  }
6014
- return /* @__PURE__ */ jsxDEV12(ChatInterfaceWithAgent, {
6882
+ return /* @__PURE__ */ jsxDEV16(ChatInterfaceWithAgent, {
6015
6883
  agent: currentAgent,
6016
6884
  initialMessage
6017
6885
  }, undefined, false, undefined, this);
@@ -6216,7 +7084,7 @@ import { program } from "commander";
6216
7084
  // package.json
6217
7085
  var package_default = {
6218
7086
  name: "@involvex/super-agent-cli",
6219
- version: "0.0.39",
7087
+ version: "0.0.46",
6220
7088
  description: "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
6221
7089
  keywords: [
6222
7090
  "cli",
@@ -6224,6 +7092,7 @@ var package_default = {
6224
7092
  "text-editor",
6225
7093
  "ai"
6226
7094
  ],
7095
+ homepage: "https://involvex.github.io/super-agent-cli/",
6227
7096
  repository: {
6228
7097
  type: "git",
6229
7098
  url: "https://github.com/involvex/super-agent-cli.git"
@@ -6247,6 +7116,7 @@ var package_default = {
6247
7116
  build: "bun build src/index.ts --outdir ./dist --target node --packages external --format esm",
6248
7117
  "build:bun": "bun build src/index.ts --outdir ./dist --target node --packages external --format esm",
6249
7118
  changelog: "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
7119
+ compile: "bun run prebuild && bun build --compile src/index.ts --outfile ./dist/super-agent-cli.exe --config bunfig.toml",
6250
7120
  dev: "bun run --watch src/index.ts",
6251
7121
  "dev:node": "tsx src/index.ts",
6252
7122
  format: "prettier --write .",
@@ -6289,6 +7159,7 @@ var package_default = {
6289
7159
  "prettier-plugin-organize-imports": "^4.3.0",
6290
7160
  "prettier-plugin-packagejson": "^3.0.0",
6291
7161
  "prettier-plugin-sort-imports": "^1.8.9",
7162
+ "react-devtools-core": "^7.0.1",
6292
7163
  tsx: "^4.21.0",
6293
7164
  typescript: "^5.9.3",
6294
7165
  "typescript-eslint": "^8.54.0"
@@ -6305,7 +7176,7 @@ var package_default = {
6305
7176
  // src/index.ts
6306
7177
  import * as dotenv from "dotenv";
6307
7178
  import { render } from "ink";
6308
- import React5 from "react";
7179
+ import React4 from "react";
6309
7180
  dotenv.config();
6310
7181
  process.on("SIGTERM", () => {
6311
7182
  if (process.stdin.isTTY && process.stdin.setRawMode) {
@@ -6529,7 +7400,7 @@ program.name("super-agent").description("A conversational AI CLI tool powered by
6529
7400
  `);
6530
7401
  ensureUserSettingsDirectory();
6531
7402
  const initialMessage = Array.isArray(message) ? message.join(" ") : message;
6532
- render(React5.createElement(ChatInterface, { agent, initialMessage }));
7403
+ render(React4.createElement(ChatInterface, { agent, initialMessage }));
6533
7404
  } catch (error) {
6534
7405
  console.error("❌ Error initializing Super Agent CLI:", error.message);
6535
7406
  process.exit(1);