snow-ai 0.6.3 → 0.6.4
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 +21 -10
- package/bundle/package.json +1 -1
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -43215,8 +43215,8 @@ async function executeCommand(commandName, args2) {
|
|
|
43215
43215
|
const handler = commandHandlers[commandName];
|
|
43216
43216
|
if (!handler) {
|
|
43217
43217
|
return {
|
|
43218
|
-
success:
|
|
43219
|
-
|
|
43218
|
+
success: true,
|
|
43219
|
+
action: "sendAsMessage"
|
|
43220
43220
|
};
|
|
43221
43221
|
}
|
|
43222
43222
|
try {
|
|
@@ -540336,6 +540336,17 @@ function useKeyboardInput(options3) {
|
|
|
540336
540336
|
const commandName = commandMatch[1];
|
|
540337
540337
|
const commandArgs = commandMatch[2];
|
|
540338
540338
|
executeCommand(commandName, commandArgs).then((result2) => {
|
|
540339
|
+
if (result2.action === "sendAsMessage") {
|
|
540340
|
+
const currentText2 = buffer.text;
|
|
540341
|
+
const allImages2 = buffer.getImages();
|
|
540342
|
+
const validImages2 = allImages2.filter((img) => currentText2.includes(img.placeholder)).map((img) => ({
|
|
540343
|
+
data: img.data,
|
|
540344
|
+
mimeType: img.mimeType
|
|
540345
|
+
}));
|
|
540346
|
+
saveToHistory(message);
|
|
540347
|
+
onSubmit(message, validImages2.length > 0 ? validImages2 : void 0);
|
|
540348
|
+
return;
|
|
540349
|
+
}
|
|
540339
540350
|
commandUsageManager.recordUsage(commandName);
|
|
540340
540351
|
if (onCommand) {
|
|
540341
540352
|
Promise.resolve(onCommand(commandName, result2)).catch((error) => {
|
|
@@ -543011,20 +543022,19 @@ function TodoTree({ todos }) {
|
|
|
543011
543022
|
if (depth > 0) {
|
|
543012
543023
|
childPrefixes.push(isLast ? " " : "\u2502 ");
|
|
543013
543024
|
}
|
|
543025
|
+
const applyColor = (text3) => {
|
|
543026
|
+
var _a21, _b14;
|
|
543027
|
+
return statusColor.startsWith("#") ? source_default.hex(statusColor)(text3) : ((_b14 = (_a21 = source_default)[statusColor]) == null ? void 0 : _b14.call(_a21, text3)) ?? text3;
|
|
543028
|
+
};
|
|
543014
543029
|
return import_react101.default.createElement(
|
|
543015
543030
|
Box_default,
|
|
543016
543031
|
{ key: todo.id, flexDirection: "column" },
|
|
543017
543032
|
import_react101.default.createElement(
|
|
543018
543033
|
Text,
|
|
543019
543034
|
null,
|
|
543020
|
-
|
|
543021
|
-
|
|
543022
|
-
|
|
543023
|
-
Text,
|
|
543024
|
-
{ color: statusColor, dimColor: todo.status === "completed" },
|
|
543025
|
-
" ",
|
|
543026
|
-
todo.content
|
|
543027
|
-
)
|
|
543035
|
+
applyColor(prefix),
|
|
543036
|
+
applyColor(statusIcon),
|
|
543037
|
+
applyColor(" " + todo.content)
|
|
543028
543038
|
),
|
|
543029
543039
|
children.map((child, index) => renderTodo(child, depth + 1, index === children.length - 1, childPrefixes))
|
|
543030
543040
|
);
|
|
@@ -543055,6 +543065,7 @@ var init_TodoTree = __esm({
|
|
|
543055
543065
|
"use strict";
|
|
543056
543066
|
import_react101 = __toESM(require_react(), 1);
|
|
543057
543067
|
await init_build2();
|
|
543068
|
+
init_source();
|
|
543058
543069
|
init_ThemeContext();
|
|
543059
543070
|
}
|
|
543060
543071
|
});
|
package/bundle/package.json
CHANGED