cliskill 1.0.7 → 1.0.8
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/dist/bootstrap/cli.js
CHANGED
|
@@ -7259,9 +7259,11 @@ var StatusBar = memo(function StatusBar2({
|
|
|
7259
7259
|
] })
|
|
7260
7260
|
] });
|
|
7261
7261
|
});
|
|
7262
|
-
var
|
|
7262
|
+
var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
7263
|
+
var Spinner = memo(function Spinner2({ label, frame }) {
|
|
7264
|
+
const ch = SPINNER_FRAMES[frame % SPINNER_FRAMES.length];
|
|
7263
7265
|
return /* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
7264
|
-
/* @__PURE__ */ jsx(Text, { color: C.primary, children:
|
|
7266
|
+
/* @__PURE__ */ jsx(Text, { color: C.primary, children: ch }),
|
|
7265
7267
|
/* @__PURE__ */ jsx(Text, { color: C.dimText, children: label })
|
|
7266
7268
|
] });
|
|
7267
7269
|
});
|
|
@@ -7271,6 +7273,7 @@ var ChatPanel = memo(function ChatPanel2({
|
|
|
7271
7273
|
contentWidth,
|
|
7272
7274
|
loading,
|
|
7273
7275
|
spinnerLabel,
|
|
7276
|
+
spinnerFrame,
|
|
7274
7277
|
width,
|
|
7275
7278
|
showScroll,
|
|
7276
7279
|
thumbPos,
|
|
@@ -7321,7 +7324,7 @@ var ChatPanel = memo(function ChatPanel2({
|
|
|
7321
7324
|
lines,
|
|
7322
7325
|
loading && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
7323
7326
|
/* @__PURE__ */ jsx(Text, { color: C.border, children: "\u2502" }),
|
|
7324
|
-
/* @__PURE__ */ jsx(Box, { width: contentWidth, children: /* @__PURE__ */ jsx(Spinner, { label: clampLine(spinnerLabel, contentWidth - 2) }) }),
|
|
7327
|
+
/* @__PURE__ */ jsx(Box, { width: contentWidth, children: /* @__PURE__ */ jsx(Spinner, { label: clampLine(spinnerLabel, contentWidth - 2), frame: spinnerFrame }) }),
|
|
7325
7328
|
/* @__PURE__ */ jsx(Text, { color: C.border, children: "\u2502" })
|
|
7326
7329
|
] }),
|
|
7327
7330
|
/* @__PURE__ */ jsx(Text, { color: C.primary, children: panelBottom(width) })
|
|
@@ -7342,6 +7345,7 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7342
7345
|
const [messages, setMessages] = useState([]);
|
|
7343
7346
|
const [loading, setLoading] = useState(false);
|
|
7344
7347
|
const [spinnerLabel, setSpinnerLabel] = useState("Thinking...");
|
|
7348
|
+
const [spinnerFrame, setSpinnerFrame] = useState(0);
|
|
7345
7349
|
const [inputTokens, setInputTokens] = useState(0);
|
|
7346
7350
|
const [outputTokens, setOutputTokens] = useState(0);
|
|
7347
7351
|
const [sessionStart] = useState(Date.now());
|
|
@@ -7352,6 +7356,11 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7352
7356
|
const autoScrollRef = useRef(true);
|
|
7353
7357
|
const assistantBufferRef = useRef("");
|
|
7354
7358
|
const flushTimerRef = useRef(null);
|
|
7359
|
+
useEffect(() => {
|
|
7360
|
+
if (!loading) return;
|
|
7361
|
+
const t = setInterval(() => setSpinnerFrame((f) => f + 1), 80);
|
|
7362
|
+
return () => clearInterval(t);
|
|
7363
|
+
}, [loading]);
|
|
7355
7364
|
const inputRef = useRef("");
|
|
7356
7365
|
const [input, setInput] = useState("");
|
|
7357
7366
|
useEffect(() => {
|
|
@@ -7411,6 +7420,7 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7411
7420
|
switch (event.type) {
|
|
7412
7421
|
case "assistant_text": {
|
|
7413
7422
|
assistantBufferRef.current += event.text;
|
|
7423
|
+
setSpinnerLabel("Writing...");
|
|
7414
7424
|
if (!flushTimerRef.current) {
|
|
7415
7425
|
flushTimerRef.current = setTimeout(flushAssistantBuffer, 150);
|
|
7416
7426
|
}
|
|
@@ -7420,6 +7430,9 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7420
7430
|
setSpinnerLabel(`Running ${event.toolName}...`);
|
|
7421
7431
|
setMessages((prev) => [...prev, { id: msgId(), role: "tool", content: "...", toolName: event.toolName }]);
|
|
7422
7432
|
break;
|
|
7433
|
+
case "tool_progress":
|
|
7434
|
+
setSpinnerLabel(`${event.toolName}: ${event.message}`);
|
|
7435
|
+
break;
|
|
7423
7436
|
case "tool_result":
|
|
7424
7437
|
setSpinnerLabel("Thinking...");
|
|
7425
7438
|
setMessages((prev) => {
|
|
@@ -7438,6 +7451,7 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7438
7451
|
});
|
|
7439
7452
|
break;
|
|
7440
7453
|
case "turn_complete":
|
|
7454
|
+
setSpinnerLabel(`Turn ${event.turnNumber} done, thinking...`);
|
|
7441
7455
|
if (flushTimerRef.current) {
|
|
7442
7456
|
clearTimeout(flushTimerRef.current);
|
|
7443
7457
|
flushAssistantBuffer();
|
|
@@ -7448,6 +7462,9 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7448
7462
|
setInputTokens(event.inputTokens);
|
|
7449
7463
|
setOutputTokens(event.outputTokens);
|
|
7450
7464
|
break;
|
|
7465
|
+
case "context_compacted":
|
|
7466
|
+
setSpinnerLabel(`Compacting context (${event.removedCount} msgs)...`);
|
|
7467
|
+
break;
|
|
7451
7468
|
case "loop_complete":
|
|
7452
7469
|
setInputTokens(event.usage.inputTokens);
|
|
7453
7470
|
setOutputTokens(event.usage.outputTokens);
|
|
@@ -7583,6 +7600,7 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
|
|
|
7583
7600
|
contentWidth: chatContentWidth,
|
|
7584
7601
|
loading,
|
|
7585
7602
|
spinnerLabel,
|
|
7603
|
+
spinnerFrame,
|
|
7586
7604
|
width: chatWidth,
|
|
7587
7605
|
showScroll,
|
|
7588
7606
|
thumbPos,
|
|
@@ -8499,6 +8517,9 @@ async function runBasicRepl(config) {
|
|
|
8499
8517
|
toolName: event.toolName
|
|
8500
8518
|
});
|
|
8501
8519
|
break;
|
|
8520
|
+
case "tool_progress":
|
|
8521
|
+
process.stdout.write(`\r [${event.toolName}: ${event.message}]`);
|
|
8522
|
+
break;
|
|
8502
8523
|
case "tool_result":
|
|
8503
8524
|
console.log(` [Result: ${event.result.slice(0, 200)}${event.result.length > 200 ? "..." : ""}]`);
|
|
8504
8525
|
await sessionSaver.append({
|
|
@@ -11507,4 +11528,4 @@ export {
|
|
|
11507
11528
|
MCPConnectionManager,
|
|
11508
11529
|
runCli
|
|
11509
11530
|
};
|
|
11510
|
-
//# sourceMappingURL=chunk-
|
|
11531
|
+
//# sourceMappingURL=chunk-4XDWZXBP.js.map
|