pi-ultracode 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.
- package/package.json +1 -1
- package/src/workflow/tool.ts +8 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-ultracode",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Adaptive semantic-depth workflow orchestration for Pi, with focused, standard, and deep modes, isolated subagents, worktree delivery, structured output, and durable resume.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
package/src/workflow/tool.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as crypto from "node:crypto";
|
|
8
8
|
import * as path from "node:path";
|
|
9
|
-
import { defineTool, type ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
9
|
+
import { defineTool, highlightCode, type ToolDefinition } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
import { Text } from "@earendil-works/pi-tui";
|
|
11
11
|
import { Type } from "typebox";
|
|
12
12
|
import {
|
|
@@ -607,7 +607,9 @@ export function createWorkflowTool(deps: WorkflowToolDeps = {}): ToolDefinition<
|
|
|
607
607
|
const title = theme.fg("toolTitle", theme.bold("workflow"));
|
|
608
608
|
// Arguments arrive incrementally; display source without parsing incomplete JavaScript.
|
|
609
609
|
if (typeof args.script === "string" && args.script.length > 0) {
|
|
610
|
-
|
|
610
|
+
const source = safeTranscriptText(args.script, DISPLAY_INPUT_LIMIT);
|
|
611
|
+
const heading = theme.fg("muted", "Script · JavaScript");
|
|
612
|
+
return new Text(`${title}\n\n${heading}\n${highlightCode(source, "javascript").join("\n")}`, 0, 0);
|
|
611
613
|
}
|
|
612
614
|
const source = args.scriptPath || args.name;
|
|
613
615
|
return new Text(source ? `${title} ${theme.fg("muted", safeDisplayText(source, 240))}` : title, 0, 0);
|
|
@@ -615,14 +617,15 @@ export function createWorkflowTool(deps: WorkflowToolDeps = {}): ToolDefinition<
|
|
|
615
617
|
renderResult(result, { isPartial, expanded }, theme) {
|
|
616
618
|
const snapshot = result.details as WorkflowSnapshot | undefined;
|
|
617
619
|
if (snapshot?.name) {
|
|
618
|
-
return new Text(renderWorkflowText(snapshot, {
|
|
620
|
+
return new Text(`\n${theme.fg("toolTitle", theme.bold("Status"))}\n${renderWorkflowText(snapshot, {
|
|
619
621
|
maxAgentRows: expanded ? Number.MAX_SAFE_INTEGER : undefined,
|
|
620
622
|
maxLogs: expanded ? 12 : undefined,
|
|
621
623
|
showResultPreviews: expanded && !isPartial,
|
|
622
|
-
})
|
|
624
|
+
})}`, 0, 0);
|
|
623
625
|
}
|
|
624
626
|
const text = result.content?.[0];
|
|
625
|
-
|
|
627
|
+
const heading = theme.fg("toolTitle", theme.bold("Result"));
|
|
628
|
+
return new Text(`\n${heading}\n${text?.type === "text" ? text.text : theme.fg("muted", "workflow")}`, 0, 0);
|
|
626
629
|
},
|
|
627
630
|
});
|
|
628
631
|
}
|