@mjasnikovs/pi-task 0.10.0 → 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.
- package/dist/remote/ui.js +14 -2
- package/dist/task/parsers.d.ts +0 -1
- package/dist/task/parsers.js +2 -5
- 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
|
-
|
|
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
|
-
|
|
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/dist/task/parsers.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export interface ClarifyQuestion {
|
|
|
22
22
|
}
|
|
23
23
|
export declare const GRILL_LINE_RE: RegExp;
|
|
24
24
|
export declare const SUGGESTED_LINE_RE: RegExp;
|
|
25
|
-
export declare const TITLE_MAX_CHARS = 120;
|
|
26
25
|
export declare function parseVerifyBlock(spec: string): VerifyCommand[] | null;
|
|
27
26
|
export declare function parseGrillQuestions(raw: string): string[];
|
|
28
27
|
export declare function parseClarifyList(raw: string): ClarifyQuestion[];
|
package/dist/task/parsers.js
CHANGED
|
@@ -7,7 +7,6 @@ import { MAX_GRILL_QUESTIONS } from './phases.js';
|
|
|
7
7
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
8
8
|
export const GRILL_LINE_RE = /^\s*\d+[.)]\s+(.+)$/;
|
|
9
9
|
export const SUGGESTED_LINE_RE = /^\s*SUGGESTED:\s*(.*)$/i;
|
|
10
|
-
export const TITLE_MAX_CHARS = 120;
|
|
11
10
|
// ─── Verify block parser ─────────────────────────────────────────────────────
|
|
12
11
|
export function parseVerifyBlock(spec) {
|
|
13
12
|
const lines = spec.split('\n');
|
|
@@ -222,9 +221,7 @@ export function deriveTitle(refined) {
|
|
|
222
221
|
const headerCheck = line.replace(/^#+\s+/, '');
|
|
223
222
|
if (/^(CONSTRAINTS|KNOWN-UNKNOWNS)\s*:?\s*$/i.test(headerCheck))
|
|
224
223
|
break;
|
|
225
|
-
return line
|
|
226
|
-
line.slice(0, TITLE_MAX_CHARS - 1) + '…'
|
|
227
|
-
: line;
|
|
224
|
+
return line;
|
|
228
225
|
}
|
|
229
226
|
break;
|
|
230
227
|
}
|
|
@@ -236,7 +233,7 @@ export function deriveTitle(refined) {
|
|
|
236
233
|
line = line.replace(/^#+\s+/, '').replace(/^GOAL\s*:?\s*/i, '');
|
|
237
234
|
if (line.length === 0)
|
|
238
235
|
continue;
|
|
239
|
-
return line
|
|
236
|
+
return line;
|
|
240
237
|
}
|
|
241
238
|
return '(untitled)';
|
|
242
239
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjasnikovs/pi-task",
|
|
3
|
-
"version": "0.10.
|
|
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",
|