cliskill 1.0.7 → 1.0.9

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-SE4GOVKS.js";
4
+ } from "../chunk-MM3EHZQQ.js";
5
5
  import "../chunk-AJENHWD3.js";
6
6
  export {
7
7
  runCli
@@ -132,9 +132,9 @@ var appConfigSchema = z.object({
132
132
  }).default({}),
133
133
  /** Context window — no subscription limits */
134
134
  contextWindow: z.object({
135
- maxTokens: z.number().default(1e6),
136
- compactionThreshold: z.number().default(0.75),
137
- warningThreshold: z.number().default(0.6),
135
+ maxTokens: z.number().default(256e3),
136
+ compactionThreshold: z.number().default(0.65),
137
+ warningThreshold: z.number().default(0.5),
138
138
  strategy: z.enum(["sliding", "compaction", "hybrid"]).default("hybrid")
139
139
  }).default({}),
140
140
  /** Theme configuration for terminal output */
@@ -3187,9 +3187,9 @@ function countLatinChars(text) {
3187
3187
 
3188
3188
  // src/services/context-compaction.ts
3189
3189
  var DEFAULT_CONFIG = {
3190
- maxTokens: 128e3,
3191
- compactionThreshold: 0.8,
3192
- keepRecentMessages: 6
3190
+ maxTokens: 256e3,
3191
+ compactionThreshold: 0.65,
3192
+ keepRecentMessages: 4
3193
3193
  };
3194
3194
  var AUTOCOMPACT_BUFFER_TOKENS = 13e3;
3195
3195
  var MAX_CONSECUTIVE_FAILURES = 3;
@@ -6019,9 +6019,9 @@ var FastModeManager = class {
6019
6019
 
6020
6020
  // src/services/context-window.ts
6021
6021
  var DEFAULT_CONFIG4 = {
6022
- maxTokens: 1e6,
6023
- compactionThreshold: 0.8,
6024
- warningThreshold: 0.6,
6022
+ maxTokens: 256e3,
6023
+ compactionThreshold: 0.65,
6024
+ warningThreshold: 0.5,
6025
6025
  strategy: "hybrid"
6026
6026
  };
6027
6027
  var ContextWindowManager = class {
@@ -7259,9 +7259,11 @@ var StatusBar = memo(function StatusBar2({
7259
7259
  ] })
7260
7260
  ] });
7261
7261
  });
7262
- var Spinner = memo(function Spinner2({ label }) {
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: "\u25CF" }),
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,13 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
7448
7462
  setInputTokens(event.inputTokens);
7449
7463
  setOutputTokens(event.outputTokens);
7450
7464
  break;
7465
+ case "context_compacted":
7466
+ if (event.removedCount > 0) {
7467
+ setSpinnerLabel(`Context compacted (-${event.removedCount} msgs)`);
7468
+ } else {
7469
+ setSpinnerLabel("Context optimized");
7470
+ }
7471
+ break;
7451
7472
  case "loop_complete":
7452
7473
  setInputTokens(event.usage.inputTokens);
7453
7474
  setOutputTokens(event.usage.outputTokens);
@@ -7583,6 +7604,7 @@ function InkApp({ model, toolCount, onSubmit, onCancel }) {
7583
7604
  contentWidth: chatContentWidth,
7584
7605
  loading,
7585
7606
  spinnerLabel,
7607
+ spinnerFrame,
7586
7608
  width: chatWidth,
7587
7609
  showScroll,
7588
7610
  thumbPos,
@@ -8499,6 +8521,9 @@ async function runBasicRepl(config) {
8499
8521
  toolName: event.toolName
8500
8522
  });
8501
8523
  break;
8524
+ case "tool_progress":
8525
+ process.stdout.write(`\r [${event.toolName}: ${event.message}]`);
8526
+ break;
8502
8527
  case "tool_result":
8503
8528
  console.log(` [Result: ${event.result.slice(0, 200)}${event.result.length > 200 ? "..." : ""}]`);
8504
8529
  await sessionSaver.append({
@@ -11507,4 +11532,4 @@ export {
11507
11532
  MCPConnectionManager,
11508
11533
  runCli
11509
11534
  };
11510
- //# sourceMappingURL=chunk-SE4GOVKS.js.map
11535
+ //# sourceMappingURL=chunk-MM3EHZQQ.js.map