snow-ai 0.6.38 → 0.6.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/cli.mjs CHANGED
@@ -1473,7 +1473,7 @@ var require_react_development = __commonJS({
1473
1473
  }
1474
1474
  return dispatcher.useContext(Context);
1475
1475
  }
1476
- function useState71(initialState) {
1476
+ function useState70(initialState) {
1477
1477
  var dispatcher = resolveDispatcher();
1478
1478
  return dispatcher.useState(initialState);
1479
1479
  }
@@ -1485,7 +1485,7 @@ var require_react_development = __commonJS({
1485
1485
  var dispatcher = resolveDispatcher();
1486
1486
  return dispatcher.useRef(initialValue);
1487
1487
  }
1488
- function useEffect65(create3, deps) {
1488
+ function useEffect64(create3, deps) {
1489
1489
  var dispatcher = resolveDispatcher();
1490
1490
  return dispatcher.useEffect(create3, deps);
1491
1491
  }
@@ -2268,7 +2268,7 @@ var require_react_development = __commonJS({
2268
2268
  exports2.useContext = useContext13;
2269
2269
  exports2.useDebugValue = useDebugValue;
2270
2270
  exports2.useDeferredValue = useDeferredValue;
2271
- exports2.useEffect = useEffect65;
2271
+ exports2.useEffect = useEffect64;
2272
2272
  exports2.useId = useId;
2273
2273
  exports2.useImperativeHandle = useImperativeHandle2;
2274
2274
  exports2.useInsertionEffect = useInsertionEffect;
@@ -2276,7 +2276,7 @@ var require_react_development = __commonJS({
2276
2276
  exports2.useMemo = useMemo40;
2277
2277
  exports2.useReducer = useReducer8;
2278
2278
  exports2.useRef = useRef16;
2279
- exports2.useState = useState71;
2279
+ exports2.useState = useState70;
2280
2280
  exports2.useSyncExternalStore = useSyncExternalStore2;
2281
2281
  exports2.useTransition = useTransition;
2282
2282
  exports2.version = ReactVersion;
@@ -81777,6 +81777,8 @@ var init_en = __esm({
81777
81777
  codebaseSearching: "\u23CF Codebase Search (Attempt {current}/{max})",
81778
81778
  codebaseSearchAttempt: "Attempt {current}/{max}",
81779
81779
  codebaseSearchComplete: "Codebase search complete",
81780
+ codebaseIndexingEnabled: "Codebase indexing enabled for this project",
81781
+ codebaseIndexingDisabled: "Codebase indexing disabled for this project",
81780
81782
  // IDE
81781
81783
  ideConnecting: "Connecting to IDE...",
81782
81784
  ideConnected: "IDE Connected",
@@ -83043,6 +83045,8 @@ var init_zh = __esm({
83043
83045
  codebaseSearching: "\u23CF \u4EE3\u7801\u5E93\u641C\u7D22 (\u5C1D\u8BD5 {current}/{max})",
83044
83046
  codebaseSearchAttempt: "\u5C1D\u8BD5 {current}/{max}",
83045
83047
  codebaseSearchComplete: "\u4EE3\u7801\u5E93\u641C\u7D22\u5B8C\u6210",
83048
+ codebaseIndexingEnabled: "\u5DF2\u4E3A\u6B64\u9879\u76EE\u542F\u7528\u4EE3\u7801\u5E93\u7D22\u5F15",
83049
+ codebaseIndexingDisabled: "\u5DF2\u4E3A\u6B64\u9879\u76EE\u7981\u7528\u4EE3\u7801\u5E93\u7D22\u5F15",
83046
83050
  // IDE
83047
83051
  ideConnecting: "\u8FDE\u63A5\u5230 IDE...",
83048
83052
  ideConnected: "IDE \u5DF2\u8FDE\u63A5",
@@ -84309,6 +84313,8 @@ var init_zh_TW = __esm({
84309
84313
  codebaseSearching: "\u23CF \u4EE3\u78BC\u5EAB\u641C\u5C0B (\u5617\u8A66 {current}/{max})",
84310
84314
  codebaseSearchAttempt: "\u5617\u8A66 {current}/{max}",
84311
84315
  codebaseSearchComplete: "\u4EE3\u78BC\u5EAB\u641C\u5C0B\u5B8C\u6210",
84316
+ codebaseIndexingEnabled: "\u5DF2\u70BA\u6B64\u5C08\u6848\u555F\u7528\u4EE3\u78BC\u5EAB\u7D22\u5F15",
84317
+ codebaseIndexingDisabled: "\u5DF2\u70BA\u6B64\u5C08\u6848\u7981\u7528\u4EE3\u78BC\u5EAB\u7D22\u5F15",
84312
84318
  // IDE
84313
84319
  ideConnecting: "\u9023\u7DDA\u5230 IDE...",
84314
84320
  ideConnected: "IDE \u5DF2\u9023\u7DDA",
@@ -89399,49 +89405,15 @@ var init_Menu = __esm({
89399
89405
  // dist/ui/components/common/UpdateNotice.js
89400
89406
  function UpdateNotice({ currentVersion: currentVersion2, latestVersion, terminalWidth }) {
89401
89407
  const { t } = useI18n();
89402
- const [wavePosition, setWavePosition] = (0, import_react61.useState)(0);
89403
- (0, import_react61.useEffect)(() => {
89404
- const interval = setInterval(() => {
89405
- setWavePosition((prev) => (prev + 1) % 12);
89406
- }, 100);
89407
- return () => clearInterval(interval);
89408
- }, []);
89409
- const waveChars = ["\u2591", "\u2592", "\u2593", "\u2588", "\u2593", "\u2592", "\u2591"];
89410
- const arrowHeight = 8;
89411
- const arrowShapes = [
89412
- " \u2588 ",
89413
- " \u2588\u2588\u2588 ",
89414
- " \u2588\u2588\u2588\u2588\u2588 ",
89415
- " \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ",
89416
- " \u2588\u2588\u2588 ",
89417
- " \u2588\u2588\u2588 ",
89418
- " \u2588\u2588\u2588 ",
89419
- " \u2588\u2588\u2588 "
89420
- ];
89421
- const createWaveArrow = () => {
89422
- const lines = [];
89423
- for (let row = 0; row < arrowHeight; row++) {
89424
- const shape = arrowShapes[row] || "";
89425
- const waveOffset = (wavePosition + row) % 12;
89426
- let waveChar = "\u2591";
89427
- if (waveOffset < waveChars.length) {
89428
- waveChar = waveChars[waveOffset] || "\u2591";
89429
- }
89430
- const line = shape.replace(/█/g, waveChar);
89431
- lines.push(line);
89432
- }
89433
- return lines;
89434
- };
89435
- const arrowLines = createWaveArrow();
89436
89408
  return import_react61.default.createElement(
89437
89409
  Box_default,
89438
89410
  { paddingX: 1, marginBottom: 1 },
89439
89411
  import_react61.default.createElement(
89440
89412
  Box_default,
89441
- { borderStyle: "double", borderColor: "#FFD700", paddingX: 2, paddingY: 1, width: terminalWidth - 2, flexDirection: "row" },
89413
+ { borderStyle: "double", borderColor: "#FFD700", paddingX: 2, paddingY: 1, width: terminalWidth - 2 },
89442
89414
  import_react61.default.createElement(
89443
89415
  Box_default,
89444
- { flexDirection: "column", flexGrow: 1 },
89416
+ { flexDirection: "column" },
89445
89417
  import_react61.default.createElement(Text, { bold: true, color: "#FFD700" }, t.welcome.updateNoticeTitle),
89446
89418
  import_react61.default.createElement(
89447
89419
  Text,
@@ -89475,8 +89447,7 @@ function UpdateNotice({ currentVersion: currentVersion2, latestVersion, terminal
89475
89447
  " ",
89476
89448
  "https://github.com/MayDay-wpf/snow-cli"
89477
89449
  )
89478
- ),
89479
- import_react61.default.createElement(Box_default, { flexDirection: "column", marginLeft: 2, justifyContent: "center" }, arrowLines.map((line, index) => import_react61.default.createElement(Text, { key: index, color: "#FFD700" }, line)))
89450
+ )
89480
89451
  )
89481
89452
  );
89482
89453
  }
@@ -90865,7 +90836,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
90865
90836
  import_react64.default.createElement(
90866
90837
  Text,
90867
90838
  { color: isActive ? theme14.colors.menuSelected : theme14.colors.menuNormal },
90868
- isActive ? "> " : " ",
90839
+ isActive ? "\u276F " : " ",
90869
90840
  t.configScreen.maxTokens
90870
90841
  ),
90871
90842
  isCurrentlyEditing && import_react64.default.createElement(
@@ -90892,7 +90863,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
90892
90863
  import_react64.default.createElement(
90893
90864
  Text,
90894
90865
  { color: isActive ? theme14.colors.menuSelected : theme14.colors.menuNormal },
90895
- isActive ? "> " : " ",
90866
+ isActive ? "\u276F " : " ",
90896
90867
  t.configScreen.toolResultTokenLimit
90897
90868
  ),
90898
90869
  isCurrentlyEditing && import_react64.default.createElement(
@@ -91512,7 +91483,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
91512
91483
  return import_react64.default.createElement(
91513
91484
  Text,
91514
91485
  { color: isSelected ? "cyan" : isMarked ? theme14.colors.menuInfo : "white" },
91515
- isMeta ? "" : isMarked ? "[x] " : "[ ] ",
91486
+ isMeta ? "" : isMarked ? "[\u2713] " : "[ ] ",
91516
91487
  label
91517
91488
  );
91518
91489
  }, onToggleItem: (item) => {
@@ -459730,7 +459701,7 @@ function SystemPromptConfigScreen({ onBack }) {
459730
459701
  Text,
459731
459702
  { color: index === selectedIndex ? theme14.colors.menuSelected : config3.active.includes(prompt.id) ? theme14.colors.menuInfo : theme14.colors.menuNormal },
459732
459703
  index === selectedIndex ? "> " : " ",
459733
- config3.active.includes(prompt.id) ? "[x] " : "[ ] ",
459704
+ config3.active.includes(prompt.id) ? "[\u2713] " : "[ ] ",
459734
459705
  prompt.name,
459735
459706
  typeof prompt.content === "string" && prompt.content.length > 0 && import_react72.default.createElement(
459736
459707
  Text,
@@ -557125,6 +557096,9 @@ var init_CommandPanel = __esm({
557125
557096
  if (!visible) {
557126
557097
  return null;
557127
557098
  }
557099
+ if (commands.length === 0) {
557100
+ return null;
557101
+ }
557128
557102
  if (isProcessing) {
557129
557103
  return import_react97.default.createElement(
557130
557104
  Box_default,
@@ -557149,9 +557123,6 @@ var init_CommandPanel = __esm({
557149
557123
  )
557150
557124
  );
557151
557125
  }
557152
- if (commands.length === 0) {
557153
- return null;
557154
- }
557155
557126
  return import_react97.default.createElement(
557156
557127
  Box_default,
557157
557128
  { flexDirection: "column" },
@@ -559183,26 +559154,44 @@ function truncatePath(path56, maxLen) {
559183
559154
  if (path56.length <= safeMaxLen)
559184
559155
  return path56;
559185
559156
  const sep = path56.includes("\\") ? "\\" : "/";
559186
- const lastSep = path56.lastIndexOf(sep);
559187
- const filename = lastSep >= 0 ? path56.slice(lastSep + 1) : path56;
559157
+ const parts = path56.split(sep);
559158
+ const filename = parts.pop() || "";
559188
559159
  if (filename.length + 4 > safeMaxLen) {
559189
559160
  return "..." + filename.slice(-(safeMaxLen - 3));
559190
559161
  }
559191
559162
  const prefix = "..." + sep;
559192
- const availableForDir = safeMaxLen - prefix.length - filename.length - 1;
559193
- if (availableForDir <= 0) {
559163
+ const available = safeMaxLen - prefix.length - filename.length - 1;
559164
+ if (available <= 0) {
559165
+ return prefix + filename;
559166
+ }
559167
+ const includedParts = [];
559168
+ let used = filename.length;
559169
+ for (let i = parts.length - 1; i >= 0; i--) {
559170
+ const part = parts[i];
559171
+ if (!part)
559172
+ continue;
559173
+ const needed = part.length + 1;
559174
+ if (used + needed > available) {
559175
+ break;
559176
+ }
559177
+ includedParts.unshift(part);
559178
+ used += needed;
559179
+ }
559180
+ if (includedParts.length === 0) {
559194
559181
  return prefix + filename;
559195
559182
  }
559196
- const dirPart = path56.slice(0, lastSep);
559197
- return prefix + dirPart.slice(-availableForDir) + sep + filename;
559183
+ return prefix + includedParts.join(sep) + sep + filename;
559198
559184
  }
559199
559185
  function wrapWithFileLink(filePath, displayText) {
559200
559186
  const fileUrl = `file://${filePath}`;
559201
559187
  return `\x1B]8;;${fileUrl}\x07${displayText}\x1B]8;;\x07`;
559202
559188
  }
559203
- function smartTruncatePath(filePath, maxLength) {
559189
+ function smartTruncatePath(filePath, maxLength, includeLink = true) {
559204
559190
  const effectiveMaxLength = Math.max(maxLength ?? getTerminalWidth() - PATH_DISPLAY_PADDING, MIN_DISPLAY_LENGTH);
559205
559191
  const displayText = truncatePath(filePath, effectiveMaxLength);
559192
+ if (!includeLink) {
559193
+ return displayText;
559194
+ }
559206
559195
  return wrapWithFileLink(filePath, displayText);
559207
559196
  }
559208
559197
  function formatToolCallMessage(toolCall) {
@@ -559604,7 +559593,7 @@ function StatusLine({ yoloMode = false, planMode = false, vulnerabilityHuntingMo
559604
559593
  null,
559605
559594
  "\u25CF ",
559606
559595
  t.chatScreen.ideConnected,
559607
- (editorContext == null ? void 0 : editorContext.activeFile) && t.chatScreen.ideActiveFile.replace("{file}", smartTruncatePath(editorContext.activeFile)),
559596
+ (editorContext == null ? void 0 : editorContext.activeFile) && t.chatScreen.ideActiveFile.replace("{file}", smartTruncatePath(editorContext.activeFile, 40, false)),
559608
559597
  (editorContext == null ? void 0 : editorContext.selectedText) && t.chatScreen.ideSelectedText.replace("{count}", editorContext.selectedText.length.toString())
559609
559598
  ))
559610
559599
  ),
@@ -574676,7 +574665,7 @@ ${errorMsg}`,
574676
574665
  saveCodebaseConfig2(config3, workingDirectory);
574677
574666
  const statusMessage = {
574678
574667
  role: "command",
574679
- content: `Codebase indexing ${newEnabled ? "enabled" : "disabled"} for this project`,
574668
+ content: newEnabled ? t.chatScreen.codebaseIndexingEnabled : t.chatScreen.codebaseIndexingDisabled,
574680
574669
  commandName: "codebase"
574681
574670
  };
574682
574671
  setMessages((prev) => [...prev, statusMessage]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.6.38",
3
+ "version": "0.6.40",
4
4
  "description": "Agentic coding in your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.6.38",
3
+ "version": "0.6.40",
4
4
  "description": "Agentic coding in your terminal",
5
5
  "license": "MIT",
6
6
  "bin": {