snow-ai 0.6.39 → 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 +38 -14
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -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",
|
|
@@ -90830,7 +90836,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
90830
90836
|
import_react64.default.createElement(
|
|
90831
90837
|
Text,
|
|
90832
90838
|
{ color: isActive ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
90833
|
-
isActive ? "
|
|
90839
|
+
isActive ? "\u276F " : " ",
|
|
90834
90840
|
t.configScreen.maxTokens
|
|
90835
90841
|
),
|
|
90836
90842
|
isCurrentlyEditing && import_react64.default.createElement(
|
|
@@ -90857,7 +90863,7 @@ function ConfigScreen({ onBack, onSave, inlineMode = false }) {
|
|
|
90857
90863
|
import_react64.default.createElement(
|
|
90858
90864
|
Text,
|
|
90859
90865
|
{ color: isActive ? theme14.colors.menuSelected : theme14.colors.menuNormal },
|
|
90860
|
-
isActive ? "
|
|
90866
|
+
isActive ? "\u276F " : " ",
|
|
90861
90867
|
t.configScreen.toolResultTokenLimit
|
|
90862
90868
|
),
|
|
90863
90869
|
isCurrentlyEditing && import_react64.default.createElement(
|
|
@@ -557090,6 +557096,9 @@ var init_CommandPanel = __esm({
|
|
|
557090
557096
|
if (!visible) {
|
|
557091
557097
|
return null;
|
|
557092
557098
|
}
|
|
557099
|
+
if (commands.length === 0) {
|
|
557100
|
+
return null;
|
|
557101
|
+
}
|
|
557093
557102
|
if (isProcessing) {
|
|
557094
557103
|
return import_react97.default.createElement(
|
|
557095
557104
|
Box_default,
|
|
@@ -557114,9 +557123,6 @@ var init_CommandPanel = __esm({
|
|
|
557114
557123
|
)
|
|
557115
557124
|
);
|
|
557116
557125
|
}
|
|
557117
|
-
if (commands.length === 0) {
|
|
557118
|
-
return null;
|
|
557119
|
-
}
|
|
557120
557126
|
return import_react97.default.createElement(
|
|
557121
557127
|
Box_default,
|
|
557122
557128
|
{ flexDirection: "column" },
|
|
@@ -559148,26 +559154,44 @@ function truncatePath(path56, maxLen) {
|
|
|
559148
559154
|
if (path56.length <= safeMaxLen)
|
|
559149
559155
|
return path56;
|
|
559150
559156
|
const sep = path56.includes("\\") ? "\\" : "/";
|
|
559151
|
-
const
|
|
559152
|
-
const filename =
|
|
559157
|
+
const parts = path56.split(sep);
|
|
559158
|
+
const filename = parts.pop() || "";
|
|
559153
559159
|
if (filename.length + 4 > safeMaxLen) {
|
|
559154
559160
|
return "..." + filename.slice(-(safeMaxLen - 3));
|
|
559155
559161
|
}
|
|
559156
559162
|
const prefix = "..." + sep;
|
|
559157
|
-
const
|
|
559158
|
-
if (
|
|
559163
|
+
const available = safeMaxLen - prefix.length - filename.length - 1;
|
|
559164
|
+
if (available <= 0) {
|
|
559159
559165
|
return prefix + filename;
|
|
559160
559166
|
}
|
|
559161
|
-
const
|
|
559162
|
-
|
|
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) {
|
|
559181
|
+
return prefix + filename;
|
|
559182
|
+
}
|
|
559183
|
+
return prefix + includedParts.join(sep) + sep + filename;
|
|
559163
559184
|
}
|
|
559164
559185
|
function wrapWithFileLink(filePath, displayText) {
|
|
559165
559186
|
const fileUrl = `file://${filePath}`;
|
|
559166
559187
|
return `\x1B]8;;${fileUrl}\x07${displayText}\x1B]8;;\x07`;
|
|
559167
559188
|
}
|
|
559168
|
-
function smartTruncatePath(filePath, maxLength) {
|
|
559189
|
+
function smartTruncatePath(filePath, maxLength, includeLink = true) {
|
|
559169
559190
|
const effectiveMaxLength = Math.max(maxLength ?? getTerminalWidth() - PATH_DISPLAY_PADDING, MIN_DISPLAY_LENGTH);
|
|
559170
559191
|
const displayText = truncatePath(filePath, effectiveMaxLength);
|
|
559192
|
+
if (!includeLink) {
|
|
559193
|
+
return displayText;
|
|
559194
|
+
}
|
|
559171
559195
|
return wrapWithFileLink(filePath, displayText);
|
|
559172
559196
|
}
|
|
559173
559197
|
function formatToolCallMessage(toolCall) {
|
|
@@ -559569,7 +559593,7 @@ function StatusLine({ yoloMode = false, planMode = false, vulnerabilityHuntingMo
|
|
|
559569
559593
|
null,
|
|
559570
559594
|
"\u25CF ",
|
|
559571
559595
|
t.chatScreen.ideConnected,
|
|
559572
|
-
(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)),
|
|
559573
559597
|
(editorContext == null ? void 0 : editorContext.selectedText) && t.chatScreen.ideSelectedText.replace("{count}", editorContext.selectedText.length.toString())
|
|
559574
559598
|
))
|
|
559575
559599
|
),
|
|
@@ -574641,7 +574665,7 @@ ${errorMsg}`,
|
|
|
574641
574665
|
saveCodebaseConfig2(config3, workingDirectory);
|
|
574642
574666
|
const statusMessage = {
|
|
574643
574667
|
role: "command",
|
|
574644
|
-
content:
|
|
574668
|
+
content: newEnabled ? t.chatScreen.codebaseIndexingEnabled : t.chatScreen.codebaseIndexingDisabled,
|
|
574645
574669
|
commandName: "codebase"
|
|
574646
574670
|
};
|
|
574647
574671
|
setMessages((prev) => [...prev, statusMessage]);
|
package/bundle/package.json
CHANGED