@mjasnikovs/pi-task 0.10.1 → 0.10.2

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.
Files changed (2) hide show
  1. package/dist/remote/ui.js +14 -2
  2. package/package.json +1 -1
package/dist/remote/ui.js CHANGED
@@ -114,6 +114,7 @@ export function html(wsUrl) {
114
114
  border-top: 1px solid var(--surface0);
115
115
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
116
116
  }
117
+ .tool-spin { color: var(--mauve); margin-left: 6px; font-family: ui-monospace, monospace; font-size: 13px; }
117
118
  .code-block {
118
119
  background: var(--crust); border: 1px solid var(--surface0);
119
120
  border-radius: 6px; overflow: hidden; margin: 4px 0;
@@ -561,7 +562,11 @@ export function html(wsUrl) {
561
562
  pre.textContent = toolResultText(p.result);
562
563
  d.appendChild(pre);
563
564
  } else {
564
- toolCallMap[p.toolCallId] = d; // a later tool_end delta fills the result
565
+ const sp = document.createElement('span');
566
+ sp.className = 'tool-spin spin';
567
+ d.querySelector('summary').appendChild(sp);
568
+ startSpin();
569
+ toolCallMap[p.toolCallId] = d;
565
570
  }
566
571
  return d;
567
572
  }
@@ -882,12 +887,19 @@ export function html(wsUrl) {
882
887
  case 'tool_start': {
883
888
  hideThinking();
884
889
  const argsStr = typeof msg.args === 'string' ? msg.args : JSON.stringify(msg.args);
885
- toolCallMap[msg.toolCallId] = addToolCall(msg.toolName, argsStr, false);
890
+ const d = addToolCall(msg.toolName, argsStr, false);
891
+ const sp = document.createElement('span');
892
+ sp.className = 'tool-spin spin';
893
+ d.querySelector('summary').appendChild(sp);
894
+ startSpin();
895
+ toolCallMap[msg.toolCallId] = d;
886
896
  break;
887
897
  }
888
898
  case 'tool_end': {
889
899
  const d = toolCallMap[msg.toolCallId];
890
900
  if (d) {
901
+ const sp = d.querySelector('.tool-spin');
902
+ if (sp) { sp.remove(); stopSpinIfIdle(); }
891
903
  if (msg.isError) d.classList.add('error');
892
904
  const pre = document.createElement('pre');
893
905
  pre.textContent = toolResultText(msg.result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjasnikovs/pi-task",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "description": "Deterministic spec-orchestration for local models, with a bundled real-time remote web view and web/docs/fetch/worker subagent tools.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",