@caupulican/pi-adaptative 0.80.11 → 0.80.13
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 +8 -0
- package/README.md +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +10 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +15 -17
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/usage.md +1 -1
- 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/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/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -73,6 +73,8 @@ export class AgentSession {
|
|
|
73
73
|
_queuedExtensionCommands = [];
|
|
74
74
|
/** Messages queued to be included with the next user prompt as context ("asides"). */
|
|
75
75
|
_pendingNextTurnMessages = [];
|
|
76
|
+
/** Serializes prompt() submissions made while streaming so queued steering/follow-ups keep user-typed FIFO order. */
|
|
77
|
+
_streamingPromptSubmissionTail = Promise.resolve();
|
|
76
78
|
// Compaction state
|
|
77
79
|
_compactionAbortController = undefined;
|
|
78
80
|
_autoCompactionAbortController = undefined;
|
|
@@ -836,6 +838,14 @@ export class AgentSession {
|
|
|
836
838
|
* @throws Error if no model selected or no API key available (when not streaming)
|
|
837
839
|
*/
|
|
838
840
|
async prompt(text, options) {
|
|
841
|
+
if (this.isStreaming && options?.streamingBehavior) {
|
|
842
|
+
const run = this._streamingPromptSubmissionTail.then(() => this._promptUnserialized(text, options), () => this._promptUnserialized(text, options));
|
|
843
|
+
this._streamingPromptSubmissionTail = run.catch(() => { });
|
|
844
|
+
return run;
|
|
845
|
+
}
|
|
846
|
+
return this._promptUnserialized(text, options);
|
|
847
|
+
}
|
|
848
|
+
async _promptUnserialized(text, options) {
|
|
839
849
|
const expandPromptTemplates = options?.expandPromptTemplates ?? true;
|
|
840
850
|
const processSlashCommands = options?.processSlashCommands ?? expandPromptTemplates;
|
|
841
851
|
const preflightResult = options?.preflightResult;
|