@oh-my-pi/pi-coding-agent 15.12.1 → 15.12.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/CHANGELOG.md +8 -1
- package/dist/cli.js +22 -36
- package/dist/types/collab/protocol.d.ts +8 -2
- package/dist/types/config/settings-schema.d.ts +1 -1
- package/package.json +12 -12
- package/src/collab/host.ts +13 -1
- package/src/collab/protocol.ts +25 -16
- package/src/config/settings-schema.ts +1 -4
- package/src/internal-urls/docs-index.generated.ts +2 -2
- package/src/session/agent-session.ts +23 -0
|
@@ -1139,9 +1139,24 @@ export class AgentSession {
|
|
|
1139
1139
|
if (this.#promptInFlightCount === 0) {
|
|
1140
1140
|
this.#releasePowerAssertion();
|
|
1141
1141
|
this.#flushPendingAgentEnd();
|
|
1142
|
+
this.#drainStrandedQueuedMessages();
|
|
1142
1143
|
}
|
|
1143
1144
|
}
|
|
1144
1145
|
|
|
1146
|
+
/** A steer/follow-up can land after the agent loop's final queue poll but
|
|
1147
|
+
* before the prompt unwinds: #promptInFlightCount keeps isStreaming true
|
|
1148
|
+
* through post-prompt recovery, so senders (collab guests, skills) still
|
|
1149
|
+
* queue via agent.steer()/followUp() instead of starting a fresh prompt.
|
|
1150
|
+
* Without a drain those messages strand invisibly until the next manual
|
|
1151
|
+
* prompt. Runs when the session settles; the guard makes it a no-op when
|
|
1152
|
+
* the queue was consumed normally or a new turn already started. */
|
|
1153
|
+
#drainStrandedQueuedMessages(): void {
|
|
1154
|
+
if (!this.agent.hasQueuedMessages()) return;
|
|
1155
|
+
this.#scheduleAgentContinue({
|
|
1156
|
+
shouldContinue: () => this.#canAutoContinueForFollowUp() && this.agent.hasQueuedMessages(),
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1145
1160
|
#resetInFlight(): void {
|
|
1146
1161
|
this.#promptInFlightCount = 0;
|
|
1147
1162
|
this.#releasePowerAssertion();
|
|
@@ -5255,6 +5270,14 @@ export class AgentSession {
|
|
|
5255
5270
|
} else {
|
|
5256
5271
|
this.agent.steer(normalizedAppMessage);
|
|
5257
5272
|
}
|
|
5273
|
+
// The isStreaming check above can be stale: image normalization is
|
|
5274
|
+
// awaited, so the turn may have ended in between, leaving the message
|
|
5275
|
+
// queued on an idle agent. Mirror #queueSteer's idle-path delivery.
|
|
5276
|
+
if (this.#canAutoContinueForFollowUp()) {
|
|
5277
|
+
this.#scheduleAgentContinue({
|
|
5278
|
+
shouldContinue: () => this.#canAutoContinueForFollowUp() && this.agent.hasQueuedMessages(),
|
|
5279
|
+
});
|
|
5280
|
+
}
|
|
5258
5281
|
return;
|
|
5259
5282
|
}
|
|
5260
5283
|
|