@averyyy/pi-coding-agent 0.82.1-piclient.9 → 0.83.0-piclient.1
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/CHANGELOG.md +45 -0
- package/README.md +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +8 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/credential-print.d.ts +23 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +116 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +13 -6
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +7 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +7 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +10 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +13 -6
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader.d.ts +15 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +63 -9
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +1 -1
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +43 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +20 -6
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +13 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/docs/custom-provider.md +9 -3
- package/docs/extensions.md +3 -1
- package/docs/providers.md +1 -0
- package/docs/session-format.md +2 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +8 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/12-full-control.ts +2 -0
- package/package.json +5 -5
|
@@ -182,7 +182,7 @@ export class AgentSession {
|
|
|
182
182
|
_retryAbortController = undefined;
|
|
183
183
|
_retryAttempt = 0;
|
|
184
184
|
// Bash execution state
|
|
185
|
-
|
|
185
|
+
_bashAbortControllers = new Set();
|
|
186
186
|
_pendingBashMessages = [];
|
|
187
187
|
_validationModifiedFiles = new Set();
|
|
188
188
|
_validationFailure = undefined;
|
|
@@ -2353,6 +2353,7 @@ export class AgentSession {
|
|
|
2353
2353
|
setThinkingLevel: (level) => this.setThinkingLevel(level),
|
|
2354
2354
|
}, {
|
|
2355
2355
|
getModel: () => this.model,
|
|
2356
|
+
getScopedModels: () => this._scopedModels,
|
|
2356
2357
|
isIdle: () => this.isIdle,
|
|
2357
2358
|
isProjectTrusted: () => this.settingsManager.isProjectTrusted(),
|
|
2358
2359
|
getSignal: () => this.agent.signal,
|
|
@@ -2682,7 +2683,8 @@ export class AgentSession {
|
|
|
2682
2683
|
* @param options.operations Custom BashOperations for remote execution
|
|
2683
2684
|
*/
|
|
2684
2685
|
async executeBash(command, onChunk, options) {
|
|
2685
|
-
|
|
2686
|
+
const abortController = new AbortController();
|
|
2687
|
+
this._bashAbortControllers.add(abortController);
|
|
2686
2688
|
// Apply command prefix if configured (e.g., "shopt -s expand_aliases" for alias support)
|
|
2687
2689
|
const prefix = this.settingsManager.getShellCommandPrefix();
|
|
2688
2690
|
const shellPath = this.settingsManager.getShellPath();
|
|
@@ -2693,13 +2695,13 @@ export class AgentSession {
|
|
|
2693
2695
|
onChunk?.(delta);
|
|
2694
2696
|
this._emit({ type: "bash_execution_update", id: options?.id, delta });
|
|
2695
2697
|
},
|
|
2696
|
-
signal:
|
|
2698
|
+
signal: abortController.signal,
|
|
2697
2699
|
});
|
|
2698
2700
|
this.recordBashResult(command, result, options);
|
|
2699
2701
|
return result;
|
|
2700
2702
|
}
|
|
2701
2703
|
finally {
|
|
2702
|
-
this.
|
|
2704
|
+
this._bashAbortControllers.delete(abortController);
|
|
2703
2705
|
}
|
|
2704
2706
|
}
|
|
2705
2707
|
/**
|
|
@@ -2734,11 +2736,13 @@ export class AgentSession {
|
|
|
2734
2736
|
* Cancel running bash command.
|
|
2735
2737
|
*/
|
|
2736
2738
|
abortBash() {
|
|
2737
|
-
this.
|
|
2739
|
+
for (const abortController of [...this._bashAbortControllers]) {
|
|
2740
|
+
abortController.abort();
|
|
2741
|
+
}
|
|
2738
2742
|
}
|
|
2739
2743
|
/** Whether a bash command is currently running */
|
|
2740
2744
|
get isBashRunning() {
|
|
2741
|
-
return this.
|
|
2745
|
+
return this._bashAbortControllers.size > 0;
|
|
2742
2746
|
}
|
|
2743
2747
|
/** Whether there are pending bash messages waiting to be flushed */
|
|
2744
2748
|
get hasPendingBashMessages() {
|
|
@@ -2786,6 +2790,9 @@ export class AgentSession {
|
|
|
2786
2790
|
* @returns Result with editorText (if user message) and cancelled status
|
|
2787
2791
|
*/
|
|
2788
2792
|
async navigateTree(targetId, options = {}) {
|
|
2793
|
+
if (this.isStreaming) {
|
|
2794
|
+
throw new Error("Wait for the current response to finish before navigating the session tree.");
|
|
2795
|
+
}
|
|
2789
2796
|
const oldLeafId = this.sessionManager.getLeafId();
|
|
2790
2797
|
// No-op if already at target
|
|
2791
2798
|
if (targetId === oldLeafId) {
|