@kingingwang/pi-windows-x64 0.87.1 → 0.99.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/bin/CHANGELOG.md +137 -0
- package/bin/docs/cli.md +64 -3
- package/bin/docs/configuration.md +2 -0
- package/bin/docs/custom-provider.md +43 -4
- package/bin/docs/docs.json +8 -0
- package/bin/docs/extensions.md +55 -0
- package/bin/docs/keybindings.md +1 -1
- package/bin/docs/llama-cpp.md +13 -0
- package/bin/docs/mcp.md +231 -0
- package/bin/docs/models.md +35 -0
- package/bin/docs/packages.md +4 -2
- package/bin/docs/providers.md +3 -0
- package/bin/docs/rpc-commands.md +9 -3
- package/bin/docs/rpc.md +3 -1
- package/bin/docs/sdk.md +7 -2
- package/bin/docs/security.md +2 -0
- package/bin/docs/session-format.md +5 -1
- package/bin/docs/settings.md +22 -3
- package/bin/docs/themes.md +33 -7
- package/bin/docs/tui.md +18 -0
- package/bin/docs/virtual-models.md +114 -0
- package/bin/docs/windows.md +2 -0
- package/bin/examples/README.md +1 -1
- package/bin/examples/extensions/README.md +2 -0
- package/bin/examples/extensions/built-in-tool-renderer.ts +16 -40
- package/bin/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/bin/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/bin/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/bin/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
- package/bin/examples/extensions/debug-provider.ts +90 -0
- package/bin/examples/extensions/gondolin/package-lock.json +2 -2
- package/bin/examples/extensions/gondolin/package.json +1 -1
- package/bin/examples/extensions/jev-router.ts +113 -0
- package/bin/examples/extensions/minimal-mode.ts +24 -96
- package/bin/examples/extensions/sandbox/package-lock.json +2 -2
- package/bin/examples/extensions/sandbox/package.json +1 -1
- package/bin/examples/extensions/with-deps/package-lock.json +2 -2
- package/bin/examples/extensions/with-deps/package.json +1 -1
- package/bin/examples/rpc-client.ts +1 -1
- package/bin/examples/rpc-extension-ui.ts +1 -1
- package/bin/examples/sdk/14-codemode-mcp.ts +61 -0
- package/bin/examples/sdk/README.md +2 -1
- package/bin/export-html/ansi-to-html.d.ts.map +1 -1
- package/bin/export-html/ansi-to-html.js.map +1 -1
- package/bin/export-html/index.d.ts.map +1 -1
- package/bin/export-html/index.js.map +1 -1
- package/bin/export-html/template.css +10 -0
- package/bin/export-html/template.js +66 -17
- package/bin/export-html/tool-renderer.d.ts.map +1 -1
- package/bin/export-html/tool-renderer.js.map +1 -1
- package/bin/package.json +14 -12
- package/bin/pi.exe +2 -2
- package/bin/theme/dark.json +59 -72
- package/bin/theme/light.json +57 -69
- package/bin/theme/theme-schema.json +7 -2
- package/package.json +1 -1
|
@@ -930,6 +930,21 @@
|
|
|
930
930
|
'</div>';
|
|
931
931
|
};
|
|
932
932
|
|
|
933
|
+
// Calls this tool made to other tools (for example from a codemode script), recorded without results.
|
|
934
|
+
const renderNestedCalls = () => {
|
|
935
|
+
const nested = result?.nestedCalls;
|
|
936
|
+
if (!nested || !Array.isArray(nested.calls) || nested.calls.length === 0) return '';
|
|
937
|
+
const icons = { ok: '✓', error: '✗', unfinished: '…' };
|
|
938
|
+
const lines = nested.calls.map(c => {
|
|
939
|
+
const args = c.arguments ? JSON.stringify(c.arguments) : `[arguments omitted, ${c.argumentsBytes} bytes]`;
|
|
940
|
+
const duration = c.durationMs !== undefined ? ` ${c.durationMs}ms` : '';
|
|
941
|
+
const error = c.error ? `\n ${c.error.split('\n').join('\n ')}` : '';
|
|
942
|
+
return `${icons[c.status] || '?'} ${c.name} ${args}${duration}${error}`;
|
|
943
|
+
});
|
|
944
|
+
const title = `Nested calls: ${nested.calls.length}${nested.complete ? '' : ' (incomplete record)'}`;
|
|
945
|
+
return formatExpandableOutput([title, ...lines].join('\n'), 1);
|
|
946
|
+
};
|
|
947
|
+
|
|
933
948
|
const toolDomId = `tool-call-${escapeHtml(call.id)}`;
|
|
934
949
|
let html = `<div class="tool-execution ${statusClass}" id="${toolDomId}">`;
|
|
935
950
|
const args = call.arguments || {};
|
|
@@ -1063,6 +1078,7 @@
|
|
|
1063
1078
|
}
|
|
1064
1079
|
}
|
|
1065
1080
|
|
|
1081
|
+
html += renderNestedCalls();
|
|
1066
1082
|
html += '</div>';
|
|
1067
1083
|
return html;
|
|
1068
1084
|
}
|
|
@@ -1311,9 +1327,10 @@
|
|
|
1311
1327
|
</div>`;
|
|
1312
1328
|
}
|
|
1313
1329
|
|
|
1314
|
-
if (entry.type === 'custom_message'
|
|
1315
|
-
|
|
1316
|
-
|
|
1330
|
+
if (entry.type === 'custom_message') {
|
|
1331
|
+
const hidden = entry.display === false;
|
|
1332
|
+
return `<div class="hook-message${hidden ? ' hook-message-hidden' : ''}" id="${entryDomId}">${tsHtml}
|
|
1333
|
+
<div class="hook-type">[${escapeHtml(entry.customType)}]${hidden ? ' · Hidden in terminal' : ''}</div>
|
|
1317
1334
|
<div class="markdown-content">${safeMarkedParse(typeof entry.content === 'string' ? entry.content : JSON.stringify(entry.content))}</div>
|
|
1318
1335
|
</div>`;
|
|
1319
1336
|
}
|
|
@@ -1389,10 +1406,11 @@
|
|
|
1389
1406
|
<div class="header">
|
|
1390
1407
|
<h1>Session: ${escapeHtml(header?.id || 'unknown')}</h1>
|
|
1391
1408
|
<div class="help-bar">
|
|
1392
|
-
<span class="help-hint">T toggle thinking · O toggle tools</span>
|
|
1409
|
+
<span class="help-hint">T toggle thinking · O toggle tools · H toggle hidden messages</span>
|
|
1393
1410
|
<div class="help-actions">
|
|
1394
|
-
<button type="button" class="header-toggle-btn" data-action="toggle-thinking" title="Toggle thinking (T)">Toggle thinking</button>
|
|
1395
|
-
<button type="button" class="header-toggle-btn" data-action="toggle-tools" title="Toggle tools (O)">Toggle tools</button>
|
|
1411
|
+
<button type="button" class="header-toggle-btn" data-action="toggle-thinking" aria-pressed="${thinkingExpanded}" title="Toggle thinking (T)">Toggle thinking</button>
|
|
1412
|
+
<button type="button" class="header-toggle-btn" data-action="toggle-tools" aria-pressed="${toolOutputsExpanded}" title="Toggle tools (O)">Toggle tools</button>
|
|
1413
|
+
<button type="button" class="header-toggle-btn" data-action="toggle-hidden-messages" aria-pressed="${showHiddenMessages}" title="Show custom messages marked as hidden in the terminal (H).">${showHiddenMessages ? 'Hide hidden messages' : 'Show hidden messages'}</button>
|
|
1396
1414
|
<button type="button" class="download-json-btn" onclick="downloadSessionJson()" title="Download session as JSONL">↓ JSONL</button>
|
|
1397
1415
|
</div>
|
|
1398
1416
|
</div>
|
|
@@ -1500,6 +1518,10 @@
|
|
|
1500
1518
|
function navigateTo(targetId, scrollMode = 'target', scrollToEntryId = null) {
|
|
1501
1519
|
currentLeafId = targetId;
|
|
1502
1520
|
currentTargetId = scrollToEntryId || targetId;
|
|
1521
|
+
const targetEntry = byId.get(currentTargetId);
|
|
1522
|
+
if (scrollMode === 'target' && targetEntry?.type === 'custom_message' && targetEntry.display === false) {
|
|
1523
|
+
setHiddenMessagesVisible(true);
|
|
1524
|
+
}
|
|
1503
1525
|
const path = getPath(targetId);
|
|
1504
1526
|
|
|
1505
1527
|
renderTree();
|
|
@@ -1521,6 +1543,10 @@
|
|
|
1521
1543
|
messagesEl.innerHTML = '';
|
|
1522
1544
|
messagesEl.appendChild(fragment);
|
|
1523
1545
|
|
|
1546
|
+
// Cached nodes contain their initial presentation; reapply the viewer's toggle states.
|
|
1547
|
+
setThinkingExpanded(thinkingExpanded);
|
|
1548
|
+
setToolOutputsExpanded(toolOutputsExpanded);
|
|
1549
|
+
|
|
1524
1550
|
// Attach click handlers for copy-link buttons
|
|
1525
1551
|
messagesEl.querySelectorAll('.copy-link-btn').forEach(btn => {
|
|
1526
1552
|
btn.addEventListener('click', (e) => {
|
|
@@ -1793,19 +1819,32 @@
|
|
|
1793
1819
|
// Toggle states
|
|
1794
1820
|
let thinkingExpanded = true;
|
|
1795
1821
|
let toolOutputsExpanded = false;
|
|
1822
|
+
let showHiddenMessages = false;
|
|
1823
|
+
|
|
1824
|
+
function setHiddenMessagesVisible(visible) {
|
|
1825
|
+
showHiddenMessages = visible;
|
|
1826
|
+
document.body.classList.toggle('show-hidden-messages', visible);
|
|
1827
|
+
const button = document.querySelector('[data-action="toggle-hidden-messages"]');
|
|
1828
|
+
if (button) {
|
|
1829
|
+
button.setAttribute('aria-pressed', String(visible));
|
|
1830
|
+
button.textContent = visible ? 'Hide hidden messages' : 'Show hidden messages';
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1796
1833
|
|
|
1797
|
-
|
|
1798
|
-
thinkingExpanded =
|
|
1834
|
+
function setThinkingExpanded(expanded) {
|
|
1835
|
+
thinkingExpanded = expanded;
|
|
1836
|
+
document.querySelector('[data-action="toggle-thinking"]')?.setAttribute('aria-pressed', String(expanded));
|
|
1799
1837
|
document.querySelectorAll('.thinking-text').forEach(el => {
|
|
1800
1838
|
el.style.display = thinkingExpanded ? '' : 'none';
|
|
1801
1839
|
});
|
|
1802
1840
|
document.querySelectorAll('.thinking-collapsed').forEach(el => {
|
|
1803
1841
|
el.style.display = thinkingExpanded ? 'none' : 'block';
|
|
1804
1842
|
});
|
|
1805
|
-
}
|
|
1843
|
+
}
|
|
1806
1844
|
|
|
1807
|
-
|
|
1808
|
-
toolOutputsExpanded =
|
|
1845
|
+
function setToolOutputsExpanded(expanded) {
|
|
1846
|
+
toolOutputsExpanded = expanded;
|
|
1847
|
+
document.querySelector('[data-action="toggle-tools"]')?.setAttribute('aria-pressed', String(expanded));
|
|
1809
1848
|
document.querySelectorAll('.tool-output.expandable').forEach(el => {
|
|
1810
1849
|
el.classList.toggle('expanded', toolOutputsExpanded);
|
|
1811
1850
|
});
|
|
@@ -1815,11 +1854,18 @@
|
|
|
1815
1854
|
document.querySelectorAll('.skill-invocation').forEach(el => {
|
|
1816
1855
|
el.classList.toggle('expanded', toolOutputsExpanded);
|
|
1817
1856
|
});
|
|
1818
|
-
}
|
|
1857
|
+
}
|
|
1819
1858
|
|
|
1820
1859
|
const attachHeaderHandlers = () => {
|
|
1821
|
-
document.querySelector('[data-action="toggle-thinking"]')?.addEventListener('click',
|
|
1822
|
-
|
|
1860
|
+
document.querySelector('[data-action="toggle-thinking"]')?.addEventListener('click', () => {
|
|
1861
|
+
setThinkingExpanded(!thinkingExpanded);
|
|
1862
|
+
});
|
|
1863
|
+
document.querySelector('[data-action="toggle-tools"]')?.addEventListener('click', () => {
|
|
1864
|
+
setToolOutputsExpanded(!toolOutputsExpanded);
|
|
1865
|
+
});
|
|
1866
|
+
document.querySelector('[data-action="toggle-hidden-messages"]')?.addEventListener('click', () => {
|
|
1867
|
+
setHiddenMessagesVisible(!showHiddenMessages);
|
|
1868
|
+
});
|
|
1823
1869
|
};
|
|
1824
1870
|
|
|
1825
1871
|
const isEditableTarget = (element) => {
|
|
@@ -1839,17 +1885,20 @@
|
|
|
1839
1885
|
navigateTo(leafId, 'bottom');
|
|
1840
1886
|
}
|
|
1841
1887
|
|
|
1842
|
-
if (isEditableTarget(document.activeElement)) {
|
|
1888
|
+
if (e.ctrlKey || e.metaKey || e.altKey || isEditableTarget(document.activeElement)) {
|
|
1843
1889
|
return;
|
|
1844
1890
|
}
|
|
1845
1891
|
|
|
1846
1892
|
const key = e.key.toLowerCase();
|
|
1847
1893
|
if (key === 't') {
|
|
1848
1894
|
e.preventDefault();
|
|
1849
|
-
|
|
1895
|
+
setThinkingExpanded(!thinkingExpanded);
|
|
1850
1896
|
} else if (key === 'o') {
|
|
1851
1897
|
e.preventDefault();
|
|
1852
|
-
|
|
1898
|
+
setToolOutputsExpanded(!toolOutputsExpanded);
|
|
1899
|
+
} else if (key === 'h') {
|
|
1900
|
+
e.preventDefault();
|
|
1901
|
+
setHiddenMessagesVisible(!showHiddenMessages);
|
|
1853
1902
|
}
|
|
1854
1903
|
});
|
|
1855
1904
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/core/export-html/tool-renderer.ts"],"names":[],"mappings":"AAAA;;;;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AM,wBAAwB,CAAC;AAGhF,MAAM,WAAW,oBAAoB;IACpC,kDAAkD;IAClD,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,CAAC;IAChE,wBAAwB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAChC,oFAAoF;IACpF,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACpF,yGAAyG;IACzG,YAAY,CACX,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAChF,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACd;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD;AAsBD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB,GAAG,gBAAgB,CAkHnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-renderer.js","sourceRoot":"","sources":["../../../src/core/export-html/tool-renderer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0BpD;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAE3C,SAAS,mBAAmB,CAAC,IAAY
|
|
1
|
+
{"version":3,"file":"tool-renderer.js","sour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BAAiB,CAAC,CAAC;gBAC5D,MAAM,QAAQ,GAAG,eAAe,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAE3F,OAAO;oBACN,GAAG,CAAC,SAAS,IAAI,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC7D,QAAQ;iBACR,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACR,yFAAyF;gBACzF,OAAO,SAAS,CAAC;YAClB,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC","sourcesContent":["/**\n * Tool HTML renderer for custom tools in HTML export.\n *\n * Renders custom tool calls and results to HTML by invoking their TUI renderers\n * and converting the ANSI output to HTML.\n */\n\nimport type { ImageContent, TextContent } from \"@earendil-works/pi-ai\";\nimport type { Component } from \"@earendil-works/pi-tui\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.ts\";\nimport type { ToolDefinition, ToolRenderContext } from \"../extensions/types.ts\";\nimport { ansiLinesToHtml } from \"./ansi-to-html.ts\";\n\nexport interface ToolHtmlRendererDeps {\n\t/** Function to look up tool definition by name */\n\tgetToolDefinition: (name: string) => ToolDefinition | undefined;\n\t/** Theme for styling */\n\ttheme: Theme;\n\t/** Working directory for render context */\n\tcwd: string;\n\t/** Terminal width for rendering (default: 100) */\n\twidth?: number;\n}\n\nexport interface ToolHtmlRenderer {\n\t/** Render a tool call to HTML. Returns undefined if tool has no custom renderer. */\n\trenderCall(toolCallId: string, toolName: string, args: unknown): string | undefined;\n\t/** Render a tool result to collapsed/expanded HTML. Returns undefined if tool has no custom renderer. */\n\trenderResult(\n\t\ttoolCallId: string,\n\t\ttoolName: string,\n\t\tresult: Array<{ type: string; text?: string; data?: string; mimeType?: string }>,\n\t\tdetails: unknown,\n\t\tisError: boolean,\n\t): { collapsed?: string; expanded?: string } | undefined;\n}\n\n/**\n * Create a tool HTML renderer.\n *\n * The renderer looks up tool definitions and invokes their renderCall/renderResult\n * methods, converting the resulting TUI Component output (ANSI) to HTML.\n */\nconst ANSI_ESCAPE_REGEX = /\\x1b\\[[\\d;]*m/g;\n\nfunction isBlankRenderedLine(line: string): boolean {\n\treturn line.replace(ANSI_ESCAPE_REGEX, \"\").trim().length === 0;\n}\n\nfunction trimRenderedResultLines(lines: string[]): string[] {\n\tlet start = 0;\n\tlet end = lines.length;\n\twhile (start < end && isBlankRenderedLine(lines[start])) start++;\n\twhile (end > start && isBlankRenderedLine(lines[end - 1])) end--;\n\treturn lines.slice(start, end);\n}\n\nexport function createToolHtmlRenderer(deps: ToolHtmlRendererDeps): ToolHtmlRenderer {\n\tconst { getToolDefinition, theme, cwd, width = 100 } = deps;\n\n\tconst renderedCallComponents = new Map<string, Component>();\n\tconst renderedResultComponents = new Map<string, Component>();\n\tconst renderedStates = new Map<string, any>();\n\tconst renderedArgs = new Map<string, unknown>();\n\n\tconst getState = (toolCallId: string): any => {\n\t\tlet state = renderedStates.get(toolCallId);\n\t\tif (!state) {\n\t\t\tstate = {};\n\t\t\trenderedStates.set(toolCallId, state);\n\t\t}\n\t\treturn state;\n\t};\n\n\tconst createRenderContext = (\n\t\ttoolCallId: string,\n\t\tlastComponent: Component | undefined,\n\t\texpanded: boolean,\n\t\tisPartial: boolean,\n\t\tisError: boolean,\n\t): ToolRenderContext => {\n\t\treturn {\n\t\t\targs: renderedArgs.get(toolCallId),\n\t\t\ttoolCallId,\n\t\t\tinvalidate: () => {},\n\t\t\tlastComponent,\n\t\t\tstate: getState(toolCallId),\n\t\t\tcwd,\n\t\t\texecutionStarted: true,\n\t\t\targsComplete: true,\n\t\t\tisPartial,\n\t\t\texpanded,\n\t\t\tshowImages: false,\n\t\t\tisError,\n\t\t};\n\t};\n\n\treturn {\n\t\trenderCall(toolCallId: string, toolName: string, args: unknown): string | undefined {\n\t\t\ttry {\n\t\t\t\trenderedArgs.set(toolCallId, args);\n\t\t\t\tconst toolDef = getToolDefinition(toolName);\n\t\t\t\tif (!toolDef?.renderCall) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst component = toolDef.renderCall(\n\t\t\t\t\targs,\n\t\t\t\t\ttheme,\n\t\t\t\t\tcreateRenderContext(toolCallId, renderedCallComponents.get(toolCallId), false, true, false),\n\t\t\t\t);\n\t\t\t\trenderedCallComponents.set(toolCallId, component);\n\t\t\t\tconst lines = component.render(width);\n\t\t\t\treturn ansiLinesToHtml(lines);\n\t\t\t} catch {\n\t\t\t\t// On error, return undefined so HTML export can fall back to structured result rendering\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\n\t\trenderResult(\n\t\t\ttoolCallId: string,\n\t\t\ttoolName: string,\n\t\t\tresult: Array<{ type: string; text?: string; data?: string; mimeType?: string }>,\n\t\t\tdetails: unknown,\n\t\t\tisError: boolean,\n\t\t): { collapsed?: string; expanded?: string } | undefined {\n\t\t\ttry {\n\t\t\t\tconst toolDef = getToolDefinition(toolName);\n\t\t\t\tif (!toolDef?.renderResult) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// Build AgentToolResult from content array\n\t\t\t\t// Cast content since session storage uses generic object types\n\t\t\t\tconst agentToolResult = {\n\t\t\t\t\tcontent: result as (TextContent | ImageContent)[],\n\t\t\t\t\tdetails,\n\t\t\t\t\tisError,\n\t\t\t\t};\n\n\t\t\t\t// Render collapsed\n\t\t\t\tconst collapsedComponent = toolDef.renderResult(\n\t\t\t\t\tagentToolResult,\n\t\t\t\t\t{ expanded: false, isPartial: false },\n\t\t\t\t\ttheme,\n\t\t\t\t\tcreateRenderContext(toolCallId, renderedResultComponents.get(toolCallId), false, false, isError),\n\t\t\t\t);\n\t\t\t\trenderedResultComponents.set(toolCallId, collapsedComponent);\n\t\t\t\tconst collapsed = ansiLinesToHtml(trimRenderedResultLines(collapsedComponent.render(width)));\n\n\t\t\t\t// Render expanded\n\t\t\t\tconst expandedComponent = toolDef.renderResult(\n\t\t\t\t\tagentToolResult,\n\t\t\t\t\t{ expanded: true, isPartial: false },\n\t\t\t\t\ttheme,\n\t\t\t\t\tcreateRenderContext(toolCallId, renderedResultComponents.get(toolCallId), true, false, isError),\n\t\t\t\t);\n\t\t\t\trenderedResultComponents.set(toolCallId, expandedComponent);\n\t\t\t\tconst expanded = ansiLinesToHtml(trimRenderedResultLines(expandedComponent.render(width)));\n\n\t\t\t\treturn {\n\t\t\t\t\t...(collapsed && collapsed !== expanded ? { collapsed } : {}),\n\t\t\t\t\texpanded,\n\t\t\t\t};\n\t\t\t} catch {\n\t\t\t\t// On error, return undefined so HTML export can fall back to structured result rendering\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t},\n\t};\n}\n"]}
|
package/bin/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-coding-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.99.2",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"scripts": {
|
|
41
41
|
"clean": "shx rm -rf dist",
|
|
42
42
|
"build": "npm run build:unbundled && node ../../scripts/build-coding-agent-bundle.mjs",
|
|
43
|
-
"build:unbundled": "
|
|
44
|
-
"build:binary": "npm --prefix ../tui run build && npm --prefix ../telemetry run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile --no-compile-autoload-bunfig ./
|
|
43
|
+
"build:unbundled": "tsc -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && npm run copy-assets",
|
|
44
|
+
"build:binary": "npm --prefix ../tui run build && npm --prefix ../telemetry run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile --no-compile-autoload-bunfig ./dist/bun/cli.js ./src/utils/image-resize-worker.ts ./src/extensions/codemode/worker.ts --outfile dist/pi && npm run copy-binary-assets",
|
|
45
45
|
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
|
|
46
46
|
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
|
|
47
47
|
"test": "vitest --run",
|
|
@@ -49,10 +49,12 @@
|
|
|
49
49
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@earendil-works/chord": "^0.
|
|
53
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
54
|
-
"@earendil-works/pi-ai": "^0.
|
|
55
|
-
"@earendil-works/pi-
|
|
52
|
+
"@earendil-works/chord": "^0.99.2",
|
|
53
|
+
"@earendil-works/pi-agent-core": "^0.99.2",
|
|
54
|
+
"@earendil-works/pi-ai": "^0.99.2",
|
|
55
|
+
"@earendil-works/pi-codemode": "^0.99.2",
|
|
56
|
+
"@earendil-works/pi-mcp": "^0.99.2",
|
|
57
|
+
"@earendil-works/pi-tui": "^0.99.2",
|
|
56
58
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
57
59
|
"chalk": "6.0.0",
|
|
58
60
|
"cross-spawn": "7.0.6",
|
|
@@ -64,6 +66,7 @@
|
|
|
64
66
|
"jiti": "2.7.0",
|
|
65
67
|
"minimatch": "10.2.6",
|
|
66
68
|
"proper-lockfile": "4.1.2",
|
|
69
|
+
"quickjs-wasi": "3.6.2",
|
|
67
70
|
"semver": "7.8.5",
|
|
68
71
|
"typebox": "1.3.27",
|
|
69
72
|
"undici": "8.10.2",
|
|
@@ -73,9 +76,9 @@
|
|
|
73
76
|
"protobufjs": "7.6.6"
|
|
74
77
|
},
|
|
75
78
|
"devDependencies": {
|
|
76
|
-
"@earendil-works/pi-client": "^0.
|
|
77
|
-
"@earendil-works/pi-protocol": "^0.
|
|
78
|
-
"@earendil-works/pi-server": "^0.
|
|
79
|
+
"@earendil-works/pi-client": "^0.99.2",
|
|
80
|
+
"@earendil-works/pi-protocol": "^0.99.2",
|
|
81
|
+
"@earendil-works/pi-server": "^0.99.2",
|
|
79
82
|
"@types/cross-spawn": "6.0.6",
|
|
80
83
|
"@types/hosted-git-info": "3.0.5",
|
|
81
84
|
"@types/node": "22.19.19",
|
|
@@ -83,8 +86,7 @@
|
|
|
83
86
|
"@types/semver": "7.7.1",
|
|
84
87
|
"marked": "18.0.11",
|
|
85
88
|
"shx": "0.4.0",
|
|
86
|
-
"
|
|
87
|
-
"vitest": "4.1.9"
|
|
89
|
+
"vitest": "4.1.11"
|
|
88
90
|
},
|
|
89
91
|
"keywords": [
|
|
90
92
|
"coding-agent",
|
package/bin/pi.exe
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/pi.exe
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 111432704 bytes
|
|
4
|
+
sha256: 40d318b511f56935961c6caef7da12eeab12d27d418182fbd44878defd91a399
|
package/bin/theme/dark.json
CHANGED
|
@@ -1,91 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
3
|
"name": "dark",
|
|
4
|
+
"appearance": "dark",
|
|
4
5
|
"vars": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"darkGray": "#505050",
|
|
14
|
-
"accent": "#8abeb7",
|
|
15
|
-
"selectedBg": "#3a3a4a",
|
|
16
|
-
"userMsgBg": "#343541",
|
|
17
|
-
"toolPendingBg": "#282832",
|
|
18
|
-
"toolSuccessBg": "#283228",
|
|
19
|
-
"toolErrorBg": "#3c2828",
|
|
20
|
-
"customMsgBg": "#2d2838"
|
|
6
|
+
"text": "okhsl(234 3% 89%)",
|
|
7
|
+
"muted": "okhsl(229 6% 67%)",
|
|
8
|
+
"violet": "okhsl(295 50% 67%)",
|
|
9
|
+
"blue": "okhsl(232 54% 67%)",
|
|
10
|
+
"green": "okhsl(159 59% 67%)",
|
|
11
|
+
"red": "okhsl(20 72% 67%)",
|
|
12
|
+
"yellow": "okhsl(83 88% 67%)",
|
|
13
|
+
"blueBg": "okhsl(233 41% 24%)"
|
|
21
14
|
},
|
|
22
15
|
"colors": {
|
|
23
|
-
"accent": "
|
|
24
|
-
"border": "
|
|
25
|
-
"borderAccent": "
|
|
26
|
-
"borderMuted": "
|
|
16
|
+
"accent": "violet",
|
|
17
|
+
"border": "okhsl(231 57% 65%)",
|
|
18
|
+
"borderAccent": "okhsl(295 53% 64%)",
|
|
19
|
+
"borderMuted": "okhsl(229 8% 53%)",
|
|
27
20
|
"success": "green",
|
|
28
21
|
"error": "red",
|
|
29
22
|
"warning": "yellow",
|
|
30
|
-
"muted": "
|
|
31
|
-
"dim": "
|
|
23
|
+
"muted": "muted",
|
|
24
|
+
"dim": "okhsl(229 8% 56%)",
|
|
32
25
|
"text": "text",
|
|
33
|
-
"thinkingText": "
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"userMessageBg": "userMsgBg",
|
|
26
|
+
"thinkingText": "okhsl(226 7% 65%)",
|
|
27
|
+
"selectedBg": "blueBg",
|
|
28
|
+
"scrollbarTrack": "okhsl(237 7% 33%)",
|
|
29
|
+
"scrollbarThumb": "okhsl(232 7% 65%)",
|
|
30
|
+
"searchMatchBg": "okhsl(53 51% 24%)",
|
|
31
|
+
"searchMatchText": "muted",
|
|
32
|
+
"userMessageBg": "blueBg",
|
|
41
33
|
"userMessageText": "text",
|
|
42
|
-
"customMessageBg": "
|
|
43
|
-
"customMessageText": "
|
|
44
|
-
"customMessageLabel": "
|
|
45
|
-
"toolPendingBg": "
|
|
46
|
-
"toolSuccessBg": "
|
|
47
|
-
"toolErrorBg": "
|
|
34
|
+
"customMessageBg": "okhsl(295 42% 24%)",
|
|
35
|
+
"customMessageText": "muted",
|
|
36
|
+
"customMessageLabel": "violet",
|
|
37
|
+
"toolPendingBg": "okhsl(229 5% 24%)",
|
|
38
|
+
"toolSuccessBg": "okhsl(158 46% 25%)",
|
|
39
|
+
"toolErrorBg": "okhsl(19 54% 25%)",
|
|
48
40
|
"toolTitle": "text",
|
|
49
|
-
"toolOutput": "
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"mdCode": "accent",
|
|
41
|
+
"toolOutput": "muted",
|
|
42
|
+
"mdHeading": "yellow",
|
|
43
|
+
"mdLink": "blue",
|
|
44
|
+
"mdLinkUrl": "muted",
|
|
45
|
+
"mdCode": "violet",
|
|
55
46
|
"mdCodeBlock": "green",
|
|
56
|
-
"mdCodeBlockBorder": "
|
|
57
|
-
"mdQuote": "
|
|
58
|
-
"mdQuoteBorder": "
|
|
59
|
-
"mdHr": "
|
|
60
|
-
"mdListBullet": "
|
|
61
|
-
|
|
47
|
+
"mdCodeBlockBorder": "muted",
|
|
48
|
+
"mdQuote": "muted",
|
|
49
|
+
"mdQuoteBorder": "muted",
|
|
50
|
+
"mdHr": "muted",
|
|
51
|
+
"mdListBullet": "violet",
|
|
62
52
|
"toolDiffAdded": "green",
|
|
63
53
|
"toolDiffRemoved": "red",
|
|
64
|
-
"toolDiffContext": "
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"thinkingMax": "#ff5fff",
|
|
83
|
-
|
|
84
|
-
"bashMode": "green"
|
|
54
|
+
"toolDiffContext": "muted",
|
|
55
|
+
"syntaxComment": "muted",
|
|
56
|
+
"syntaxKeyword": "blue",
|
|
57
|
+
"syntaxFunction": "yellow",
|
|
58
|
+
"syntaxVariable": "okhsl(202 58% 67%)",
|
|
59
|
+
"syntaxString": "okhsl(52 67% 67%)",
|
|
60
|
+
"syntaxNumber": "green",
|
|
61
|
+
"syntaxType": "violet",
|
|
62
|
+
"syntaxOperator": "muted",
|
|
63
|
+
"syntaxPunctuation": "muted",
|
|
64
|
+
"thinkingOff": "okhsl(229 8% 49%)",
|
|
65
|
+
"thinkingMinimal": "okhsl(232 20% 52%)",
|
|
66
|
+
"thinkingLow": "okhsl(232 45% 54%)",
|
|
67
|
+
"thinkingMedium": "okhsl(263 59% 56%)",
|
|
68
|
+
"thinkingHigh": "okhsl(295 73% 59%)",
|
|
69
|
+
"thinkingXhigh": "okhsl(337 81% 61%)",
|
|
70
|
+
"thinkingMax": "okhsl(20 99% 63%)",
|
|
71
|
+
"bashMode": "okhsl(159 64% 65%)"
|
|
85
72
|
},
|
|
86
73
|
"export": {
|
|
87
|
-
"pageBg": "
|
|
88
|
-
"cardBg": "
|
|
89
|
-
"infoBg": "
|
|
74
|
+
"pageBg": "okhsl(262 14% 16%)",
|
|
75
|
+
"cardBg": "okhsl(264 13% 19%)",
|
|
76
|
+
"infoBg": "okhsl(53 51% 24%)"
|
|
90
77
|
}
|
|
91
78
|
}
|
package/bin/theme/light.json
CHANGED
|
@@ -1,90 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
3
|
"name": "light",
|
|
4
|
+
"appearance": "light",
|
|
4
5
|
"vars": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"lightGray": "#b0b0b0",
|
|
14
|
-
"selectedBg": "#d0d0e0",
|
|
15
|
-
"userMsgBg": "#e8e8e8",
|
|
16
|
-
"toolPendingBg": "#e8e8f0",
|
|
17
|
-
"toolSuccessBg": "#e8f0e8",
|
|
18
|
-
"toolErrorBg": "#f0e8e8",
|
|
19
|
-
"customMsgBg": "#ede7f6"
|
|
6
|
+
"text": "okhsl(225 5% 27%)",
|
|
7
|
+
"muted": "okhsl(229 8% 47%)",
|
|
8
|
+
"violet": "okhsl(295 60% 46%)",
|
|
9
|
+
"blue": "okhsl(231 68% 47%)",
|
|
10
|
+
"green": "okhsl(159 75% 46%)",
|
|
11
|
+
"red": "okhsl(20 91% 47%)",
|
|
12
|
+
"yellow": "okhsl(83 99% 47%)",
|
|
13
|
+
"blueBg": "okhsl(235 19% 91%)"
|
|
20
14
|
},
|
|
21
15
|
"colors": {
|
|
22
|
-
"accent": "
|
|
23
|
-
"border": "
|
|
24
|
-
"borderAccent": "
|
|
25
|
-
"borderMuted": "
|
|
16
|
+
"accent": "violet",
|
|
17
|
+
"border": "okhsl(231 67% 55%)",
|
|
18
|
+
"borderAccent": "okhsl(295 59% 55%)",
|
|
19
|
+
"borderMuted": "okhsl(235 7% 66%)",
|
|
26
20
|
"success": "green",
|
|
27
21
|
"error": "red",
|
|
28
22
|
"warning": "yellow",
|
|
29
|
-
"muted": "
|
|
30
|
-
"dim": "
|
|
23
|
+
"muted": "muted",
|
|
24
|
+
"dim": "okhsl(229 7% 59%)",
|
|
31
25
|
"text": "text",
|
|
32
|
-
"thinkingText": "
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"userMessageBg": "userMsgBg",
|
|
26
|
+
"thinkingText": "okhsl(234 8% 55%)",
|
|
27
|
+
"selectedBg": "blueBg",
|
|
28
|
+
"scrollbarTrack": "okhsl(248 3% 90%)",
|
|
29
|
+
"scrollbarThumb": "okhsl(226 7% 65%)",
|
|
30
|
+
"searchMatchBg": "okhsl(56 22% 91%)",
|
|
31
|
+
"searchMatchText": "muted",
|
|
32
|
+
"userMessageBg": "blueBg",
|
|
40
33
|
"userMessageText": "text",
|
|
41
|
-
"customMessageBg": "
|
|
42
|
-
"customMessageText": "
|
|
43
|
-
"customMessageLabel": "
|
|
44
|
-
"toolPendingBg": "
|
|
45
|
-
"toolSuccessBg": "
|
|
46
|
-
"toolErrorBg": "
|
|
34
|
+
"customMessageBg": "okhsl(295 25% 91%)",
|
|
35
|
+
"customMessageText": "muted",
|
|
36
|
+
"customMessageLabel": "violet",
|
|
37
|
+
"toolPendingBg": "okhsl(248 3% 91%)",
|
|
38
|
+
"toolSuccessBg": "okhsl(156 21% 91%)",
|
|
39
|
+
"toolErrorBg": "okhsl(24 23% 91%)",
|
|
47
40
|
"toolTitle": "text",
|
|
48
|
-
"toolOutput": "
|
|
49
|
-
|
|
41
|
+
"toolOutput": "muted",
|
|
50
42
|
"mdHeading": "yellow",
|
|
51
43
|
"mdLink": "blue",
|
|
52
|
-
"mdLinkUrl": "
|
|
53
|
-
"mdCode": "
|
|
44
|
+
"mdLinkUrl": "muted",
|
|
45
|
+
"mdCode": "violet",
|
|
54
46
|
"mdCodeBlock": "green",
|
|
55
|
-
"mdCodeBlockBorder": "
|
|
56
|
-
"mdQuote": "
|
|
57
|
-
"mdQuoteBorder": "
|
|
58
|
-
"mdHr": "
|
|
59
|
-
"mdListBullet": "
|
|
60
|
-
|
|
47
|
+
"mdCodeBlockBorder": "muted",
|
|
48
|
+
"mdQuote": "muted",
|
|
49
|
+
"mdQuoteBorder": "muted",
|
|
50
|
+
"mdHr": "muted",
|
|
51
|
+
"mdListBullet": "violet",
|
|
61
52
|
"toolDiffAdded": "green",
|
|
62
53
|
"toolDiffRemoved": "red",
|
|
63
|
-
"toolDiffContext": "
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"thinkingMax": "#af005f",
|
|
82
|
-
|
|
83
|
-
"bashMode": "green"
|
|
54
|
+
"toolDiffContext": "muted",
|
|
55
|
+
"syntaxComment": "muted",
|
|
56
|
+
"syntaxKeyword": "blue",
|
|
57
|
+
"syntaxFunction": "yellow",
|
|
58
|
+
"syntaxVariable": "okhsl(203 73% 46%)",
|
|
59
|
+
"syntaxString": "okhsl(52 84% 46%)",
|
|
60
|
+
"syntaxNumber": "green",
|
|
61
|
+
"syntaxType": "violet",
|
|
62
|
+
"syntaxOperator": "muted",
|
|
63
|
+
"syntaxPunctuation": "muted",
|
|
64
|
+
"thinkingOff": "okhsl(223 5% 80%)",
|
|
65
|
+
"thinkingMinimal": "okhsl(229 14% 78%)",
|
|
66
|
+
"thinkingLow": "okhsl(232 33% 76%)",
|
|
67
|
+
"thinkingMedium": "okhsl(264 48% 74%)",
|
|
68
|
+
"thinkingHigh": "okhsl(295 62% 72%)",
|
|
69
|
+
"thinkingXhigh": "okhsl(337 74% 70%)",
|
|
70
|
+
"thinkingMax": "okhsl(20 98% 68%)",
|
|
71
|
+
"bashMode": "okhsl(159 74% 55%)"
|
|
84
72
|
},
|
|
85
73
|
"export": {
|
|
86
|
-
"pageBg": "
|
|
87
|
-
"cardBg": "
|
|
88
|
-
"infoBg": "
|
|
74
|
+
"pageBg": "okhsl(17 3% 94%)",
|
|
75
|
+
"cardBg": "okhsl(17 5% 97%)",
|
|
76
|
+
"infoBg": "okhsl(56 22% 91%)"
|
|
89
77
|
}
|
|
90
78
|
}
|