gsd-pi 2.70.1-dev.3e19108 → 2.70.1-dev.6504106
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/resources/extensions/claude-code-cli/stream-adapter.js +127 -30
- package/dist/resources/extensions/get-secrets-from-user.js +17 -1
- package/dist/resources/extensions/gsd/state.js +234 -332
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +13 -13
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +13 -13
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/server.js +1 -1
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +178 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +19 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js +50 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-input.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-input.js +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +107 -9
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +58 -2
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.js.map +1 -1
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +219 -1
- package/packages/pi-coding-agent/src/core/extensions/types.ts +2 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/dynamic-border.ts +58 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/extension-input.ts +2 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +119 -15
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-state.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -2
- package/packages/pi-coding-agent/src/modes/rpc/rpc-mode.ts +1 -1
- package/packages/pi-coding-agent/src/modes/rpc/rpc-types.ts +1 -0
- package/packages/pi-tui/dist/components/__tests__/input.test.js +9 -0
- package/packages/pi-tui/dist/components/__tests__/input.test.js.map +1 -1
- package/packages/pi-tui/dist/components/__tests__/markdown-maxlines.test.d.ts +2 -0
- package/packages/pi-tui/dist/components/__tests__/markdown-maxlines.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/components/__tests__/markdown-maxlines.test.js +66 -0
- package/packages/pi-tui/dist/components/__tests__/markdown-maxlines.test.js.map +1 -0
- package/packages/pi-tui/dist/components/input.d.ts +2 -0
- package/packages/pi-tui/dist/components/input.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/input.js +7 -4
- package/packages/pi-tui/dist/components/input.js.map +1 -1
- package/packages/pi-tui/dist/components/markdown.d.ts +3 -0
- package/packages/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/markdown.js +17 -1
- package/packages/pi-tui/dist/components/markdown.js.map +1 -1
- package/packages/pi-tui/src/components/__tests__/input.test.ts +11 -0
- package/packages/pi-tui/src/components/__tests__/markdown-maxlines.test.ts +75 -0
- package/packages/pi-tui/src/components/input.ts +7 -4
- package/packages/pi-tui/src/components/markdown.ts +22 -1
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +164 -31
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +112 -0
- package/src/resources/extensions/get-secrets-from-user.ts +24 -1
- package/src/resources/extensions/gsd/state.ts +274 -344
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +436 -0
- package/src/resources/extensions/gsd/tests/secure-env-collect.test.ts +45 -0
- /package/dist/web/standalone/.next/static/{cHCEWiRJM5bXJa9HkP1QU → T3hWbQ-WQBDEIGoaOOfEo}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{cHCEWiRJM5bXJa9HkP1QU → T3hWbQ-WQBDEIGoaOOfEo}/_ssgManifest.js +0 -0
|
@@ -136,6 +136,7 @@ export class InteractiveMode {
|
|
|
136
136
|
this.chatContainer = new Container();
|
|
137
137
|
this.pendingMessagesContainer = new Container();
|
|
138
138
|
this.statusContainer = new Container();
|
|
139
|
+
this.pinnedMessageContainer = new Container();
|
|
139
140
|
this.widgetContainerAbove = new Container();
|
|
140
141
|
this.widgetContainerBelow = new Container();
|
|
141
142
|
this.keybindings = KeybindingsManager.create();
|
|
@@ -313,6 +314,7 @@ export class InteractiveMode {
|
|
|
313
314
|
this.ui.addChild(this.chatContainer);
|
|
314
315
|
this.ui.addChild(this.pendingMessagesContainer);
|
|
315
316
|
this.ui.addChild(this.statusContainer);
|
|
317
|
+
this.ui.addChild(this.pinnedMessageContainer);
|
|
316
318
|
this.renderWidgets(); // Initialize with default spacer
|
|
317
319
|
this.ui.addChild(this.widgetContainerAbove);
|
|
318
320
|
this.ui.addChild(this.editorContainer);
|
|
@@ -1080,7 +1082,17 @@ export class InteractiveMode {
|
|
|
1080
1082
|
renderWidgets() {
|
|
1081
1083
|
if (!this.widgetContainerAbove || !this.widgetContainerBelow)
|
|
1082
1084
|
return;
|
|
1083
|
-
|
|
1085
|
+
// widgetContainerAbove: spacer collapses when pinned content is visible
|
|
1086
|
+
// so there's no extra blank line between pinned output and the editor border.
|
|
1087
|
+
this.widgetContainerAbove.clear();
|
|
1088
|
+
const pinned = this.pinnedMessageContainer;
|
|
1089
|
+
this.widgetContainerAbove.addChild({
|
|
1090
|
+
render: () => pinned.children.length > 0 ? [] : [""],
|
|
1091
|
+
invalidate: () => { },
|
|
1092
|
+
});
|
|
1093
|
+
for (const component of this.extensionWidgetsAbove.values()) {
|
|
1094
|
+
this.widgetContainerAbove.addChild(component);
|
|
1095
|
+
}
|
|
1084
1096
|
this.renderWidgetContainer(this.widgetContainerBelow, this.extensionWidgetsBelow, false, false);
|
|
1085
1097
|
this.ui.requestRender();
|
|
1086
1098
|
}
|
|
@@ -1259,7 +1271,7 @@ export class InteractiveMode {
|
|
|
1259
1271
|
opts?.signal?.removeEventListener("abort", onAbort);
|
|
1260
1272
|
this.hideExtensionInput();
|
|
1261
1273
|
resolve(undefined);
|
|
1262
|
-
}, { tui: this.ui, timeout: opts?.timeout });
|
|
1274
|
+
}, { tui: this.ui, timeout: opts?.timeout, secure: opts?.secure });
|
|
1263
1275
|
this.editorContainer.clear();
|
|
1264
1276
|
this.editorContainer.addChild(this.extensionInput);
|
|
1265
1277
|
this.ui.setFocus(this.extensionInput);
|
|
@@ -1811,6 +1823,7 @@ export class InteractiveMode {
|
|
|
1811
1823
|
updateFooter: true,
|
|
1812
1824
|
populateHistory: true,
|
|
1813
1825
|
});
|
|
1826
|
+
this.populatePinnedFromMessages(context.messages);
|
|
1814
1827
|
// Show compaction info if session was compacted
|
|
1815
1828
|
const allEntries = this.sessionManager.getEntries();
|
|
1816
1829
|
const compactionCount = allEntries.filter((e) => e.type === "compaction").length;
|
|
@@ -1831,6 +1844,49 @@ export class InteractiveMode {
|
|
|
1831
1844
|
this.chatContainer.clear();
|
|
1832
1845
|
const context = this.sessionManager.buildSessionContext();
|
|
1833
1846
|
this.renderSessionContext(context);
|
|
1847
|
+
this.populatePinnedFromMessages(context.messages);
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* After rebuilding chat from messages, pin the last assistant text above the
|
|
1851
|
+
* editor if tool results would otherwise push it out of the viewport.
|
|
1852
|
+
*/
|
|
1853
|
+
populatePinnedFromMessages(messages) {
|
|
1854
|
+
this.pinnedMessageContainer.clear();
|
|
1855
|
+
// Walk backwards to find the last assistant message
|
|
1856
|
+
let lastAssistant;
|
|
1857
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
1858
|
+
const msg = messages[i];
|
|
1859
|
+
if (msg && "role" in msg && msg.role === "assistant") {
|
|
1860
|
+
lastAssistant = msg;
|
|
1861
|
+
break;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
if (!lastAssistant)
|
|
1865
|
+
return;
|
|
1866
|
+
// Check if any tool calls follow the last text block
|
|
1867
|
+
const content = lastAssistant.content;
|
|
1868
|
+
let lastTextIndex = -1;
|
|
1869
|
+
let hasToolAfterText = false;
|
|
1870
|
+
for (let i = 0; i < content.length; i++) {
|
|
1871
|
+
if (content[i].type === "text")
|
|
1872
|
+
lastTextIndex = i;
|
|
1873
|
+
}
|
|
1874
|
+
if (lastTextIndex >= 0) {
|
|
1875
|
+
for (let i = lastTextIndex + 1; i < content.length; i++) {
|
|
1876
|
+
if (content[i].type === "toolCall" || content[i].type === "serverToolUse") {
|
|
1877
|
+
hasToolAfterText = true;
|
|
1878
|
+
break;
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
if (!hasToolAfterText || lastTextIndex < 0)
|
|
1883
|
+
return;
|
|
1884
|
+
const textBlock = content[lastTextIndex];
|
|
1885
|
+
const text = textBlock.text?.trim();
|
|
1886
|
+
if (!text)
|
|
1887
|
+
return;
|
|
1888
|
+
this.pinnedMessageContainer.addChild(new DynamicBorder((str) => theme.fg("dim", str), "Latest Output"));
|
|
1889
|
+
this.pinnedMessageContainer.addChild(new Markdown(text, 1, 0, this.getMarkdownThemeWithSettings()));
|
|
1834
1890
|
}
|
|
1835
1891
|
// =========================================================================
|
|
1836
1892
|
// Key handlers
|