snow-ai 0.6.4 → 0.6.5
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 +39 -13
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -81046,7 +81046,7 @@ var init_en = __esm({
|
|
|
81046
81046
|
toolRejected: "\u2717 Rejected",
|
|
81047
81047
|
// Parallel execution
|
|
81048
81048
|
parallelStart: "\u250C\u2500 Parallel execution",
|
|
81049
|
-
parallelEnd: "\u2514\u2500
|
|
81049
|
+
parallelEnd: "\u2514\u2500 Execution completed",
|
|
81050
81050
|
// Messages
|
|
81051
81051
|
userMessage: "You",
|
|
81052
81052
|
assistantMessage: "Assistant",
|
|
@@ -82132,7 +82132,7 @@ var init_zh = __esm({
|
|
|
82132
82132
|
toolRejected: "\u2717 \u5DF2\u62D2\u7EDD",
|
|
82133
82133
|
// Parallel execution
|
|
82134
82134
|
parallelStart: "\u250C\u2500 \u5E76\u884C\u6267\u884C",
|
|
82135
|
-
parallelEnd: "\u2514\u2500 \
|
|
82135
|
+
parallelEnd: "\u2514\u2500 \u6267\u884C\u5B8C\u6210",
|
|
82136
82136
|
// Messages
|
|
82137
82137
|
userMessage: "\u4F60",
|
|
82138
82138
|
assistantMessage: "\u52A9\u624B",
|
|
@@ -83218,7 +83218,7 @@ var init_zh_TW = __esm({
|
|
|
83218
83218
|
toolRejected: "\u2717 \u5DF2\u62D2\u7D55",
|
|
83219
83219
|
// Parallel execution
|
|
83220
83220
|
parallelStart: "\u250C\u2500 \u4E26\u884C\u57F7\u884C",
|
|
83221
|
-
parallelEnd: "\u2514\u2500 \
|
|
83221
|
+
parallelEnd: "\u2514\u2500 \u57F7\u884C\u5B8C\u6210",
|
|
83222
83222
|
// Messages
|
|
83223
83223
|
userMessage: "\u4F60",
|
|
83224
83224
|
assistantMessage: "\u52A9\u624B",
|
|
@@ -536474,8 +536474,8 @@ function MessageRenderer({ message, index, isLastMessage, filteredMessages, term
|
|
|
536474
536474
|
const isFirstInGroup = shouldShowParallelIndicator && (index === 0 || ((_a21 = filteredMessages[index - 1]) == null ? void 0 : _a21.parallelGroup) !== message.parallelGroup || // Previous message is time-consuming tool, so this is the first non-time-consuming one
|
|
536475
536475
|
((_b14 = filteredMessages[index - 1]) == null ? void 0 : _b14.toolPending) || ((_c6 = filteredMessages[index - 1]) == null ? void 0 : _c6.messageStatus) === "pending");
|
|
536476
536476
|
const nextMessage = filteredMessages[index + 1];
|
|
536477
|
-
const
|
|
536478
|
-
const isLastInGroup = shouldShowParallelIndicator &&
|
|
536477
|
+
const nextInSameGroup = nextMessage && nextMessage.parallelGroup !== void 0 && nextMessage.parallelGroup !== null && nextMessage.parallelGroup === message.parallelGroup;
|
|
536478
|
+
const isLastInGroup = shouldShowParallelIndicator && !nextInSameGroup;
|
|
536479
536479
|
if (message.role === "assistant" || message.role === "subagent") {
|
|
536480
536480
|
if (message.messageStatus === "pending") {
|
|
536481
536481
|
toolStatusColor = "yellowBright";
|
|
@@ -536493,7 +536493,7 @@ function MessageRenderer({ message, index, isLastMessage, filteredMessages, term
|
|
|
536493
536493
|
isFirstInGroup && import_react77.default.createElement(
|
|
536494
536494
|
Box_default,
|
|
536495
536495
|
{ marginBottom: 0 },
|
|
536496
|
-
import_react77.default.createElement(Text, { color: theme14.colors.menuInfo, dimColor: true },
|
|
536496
|
+
import_react77.default.createElement(Text, { color: theme14.colors.menuInfo, dimColor: true }, t.chatScreen.parallelStart)
|
|
536497
536497
|
),
|
|
536498
536498
|
import_react77.default.createElement(
|
|
536499
536499
|
Box_default,
|
|
@@ -536624,7 +536624,7 @@ function MessageRenderer({ message, index, isLastMessage, filteredMessages, term
|
|
|
536624
536624
|
!message.plainOutput && isLastInGroup && import_react77.default.createElement(
|
|
536625
536625
|
Box_default,
|
|
536626
536626
|
{ marginTop: 0 },
|
|
536627
|
-
import_react77.default.createElement(Text, { color: theme14.colors.menuInfo, dimColor: true },
|
|
536627
|
+
import_react77.default.createElement(Text, { color: theme14.colors.menuInfo, dimColor: true }, t.chatScreen.parallelEnd)
|
|
536628
536628
|
)
|
|
536629
536629
|
));
|
|
536630
536630
|
}
|
|
@@ -542994,10 +542994,20 @@ function TodoTree({ todos }) {
|
|
|
542994
542994
|
}
|
|
542995
542995
|
const completedCount = todos.filter((t) => t.status === "completed").length;
|
|
542996
542996
|
const totalCount = todos.length;
|
|
542997
|
-
const
|
|
542997
|
+
const MAX_VISIBLE_COMPLETED = 5;
|
|
542998
|
+
const pendingTodos = todos.filter((t) => t.status === "pending");
|
|
542999
|
+
const completedTodos = todos.filter((t) => t.status === "completed");
|
|
543000
|
+
const visibleCompletedTodos = completedTodos.slice(-MAX_VISIBLE_COMPLETED);
|
|
543001
|
+
const hiddenCompletedCount = completedTodos.length - visibleCompletedTodos.length;
|
|
543002
|
+
const visibleTodoIds = /* @__PURE__ */ new Set([
|
|
543003
|
+
...pendingTodos.map((t) => t.id),
|
|
543004
|
+
...visibleCompletedTodos.map((t) => t.id)
|
|
543005
|
+
]);
|
|
543006
|
+
const visibleTodos = [...pendingTodos, ...visibleCompletedTodos];
|
|
543007
|
+
const rootTodos = visibleTodos.filter((t) => !t.parentId || !visibleTodoIds.has(t.parentId));
|
|
542998
543008
|
const childTodosMap = /* @__PURE__ */ new Map();
|
|
542999
|
-
|
|
543000
|
-
if (todo.parentId) {
|
|
543009
|
+
visibleTodos.forEach((todo) => {
|
|
543010
|
+
if (todo.parentId && visibleTodoIds.has(todo.parentId)) {
|
|
543001
543011
|
const children = childTodosMap.get(todo.parentId) || [];
|
|
543002
543012
|
children.push(todo);
|
|
543003
543013
|
childTodosMap.set(todo.parentId, children);
|
|
@@ -543054,6 +543064,13 @@ function TodoTree({ todos }) {
|
|
|
543054
543064
|
"/",
|
|
543055
543065
|
totalCount,
|
|
543056
543066
|
")"
|
|
543067
|
+
),
|
|
543068
|
+
hiddenCompletedCount > 0 && import_react101.default.createElement(
|
|
543069
|
+
Text,
|
|
543070
|
+
{ dimColor: true },
|
|
543071
|
+
" +",
|
|
543072
|
+
hiddenCompletedCount,
|
|
543073
|
+
" completed hidden"
|
|
543057
543074
|
)
|
|
543058
543075
|
),
|
|
543059
543076
|
rootTodos.map((todo, index) => renderTodo(todo, 0, index === rootTodos.length - 1, []))
|
|
@@ -544112,9 +544129,10 @@ function BashCommandExecutionStatus({ command, timeout: timeout2 = 3e4, terminal
|
|
|
544112
544129
|
const timeoutSeconds = Math.round(timeout2 / 1e3);
|
|
544113
544130
|
const maxCommandWidth = Math.max(40, terminalWidth - 10);
|
|
544114
544131
|
const displayCommand = truncateCommand2(command, maxCommandWidth);
|
|
544132
|
+
const processedOutput = output2.flatMap((line) => line.split(/\r?\n/)).slice(-5);
|
|
544115
544133
|
return import_react108.default.createElement(
|
|
544116
544134
|
Box_default,
|
|
544117
|
-
{ flexDirection: "column",
|
|
544135
|
+
{ flexDirection: "column", paddingX: 1 },
|
|
544118
544136
|
import_react108.default.createElement(
|
|
544119
544137
|
Box_default,
|
|
544120
544138
|
null,
|
|
@@ -544131,7 +544149,7 @@ function BashCommandExecutionStatus({ command, timeout: timeout2 = 3e4, terminal
|
|
|
544131
544149
|
{ paddingLeft: 2 },
|
|
544132
544150
|
import_react108.default.createElement(Text, { dimColor: true }, displayCommand)
|
|
544133
544151
|
),
|
|
544134
|
-
|
|
544152
|
+
import_react108.default.createElement(Box_default, { flexDirection: "column", paddingLeft: 2, marginTop: 1, height: 5 }, processedOutput.map((line, index) => import_react108.default.createElement(Text, { key: index, wrap: "truncate", dimColor: true }, truncateText(line, maxCommandWidth)))),
|
|
544135
544153
|
import_react108.default.createElement(
|
|
544136
544154
|
Box_default,
|
|
544137
544155
|
{ flexDirection: "column", gap: 0 },
|
|
@@ -544210,7 +544228,7 @@ function CustomCommandExecutionDisplay({ commandName, isRunning, output: output2
|
|
|
544210
544228
|
)
|
|
544211
544229
|
)
|
|
544212
544230
|
),
|
|
544213
|
-
|
|
544231
|
+
import_react109.default.createElement(Box_default, { flexDirection: "column", paddingLeft: 2, height: 5 }, output2.flatMap((line) => line.split(/\r?\n/)).slice(-5).map((line, index) => import_react109.default.createElement(Text, { key: index, wrap: "truncate", dimColor: true }, truncateText2(line, 100)))),
|
|
544214
544232
|
error && import_react109.default.createElement(
|
|
544215
544233
|
Box_default,
|
|
544216
544234
|
{ paddingLeft: 2 },
|
|
@@ -549197,6 +549215,14 @@ Output: ${combinedOutput}`;
|
|
|
549197
549215
|
commandName
|
|
549198
549216
|
};
|
|
549199
549217
|
options3.setMessages((prev) => [...prev, commandMessage]);
|
|
549218
|
+
} else if (result2.success && result2.action === "showMcpPanel") {
|
|
549219
|
+
options3.setShowMcpPanel(true);
|
|
549220
|
+
const commandMessage = {
|
|
549221
|
+
role: "command",
|
|
549222
|
+
content: "",
|
|
549223
|
+
commandName
|
|
549224
|
+
};
|
|
549225
|
+
options3.setMessages((prev) => [...prev, commandMessage]);
|
|
549200
549226
|
} else if (result2.success && result2.action === "showUsagePanel") {
|
|
549201
549227
|
options3.setShowUsagePanel(true);
|
|
549202
549228
|
const commandMessage = {
|
package/bundle/package.json
CHANGED