perf(runtime): preserve ordinary prompt scheduling

This commit is contained in:
Merge Sim
2026-09-05 00:39:29 -07:00
parent 188b87bce9
commit f529dee47f
@@ -52,7 +52,9 @@ export class OrcaRuntimeWithWriteTerminalAgentPrompt extends OrcaRuntimeWithReso
if (!this.ptyController?.write(ptyId, pastePayload)) {
throw new Error('terminal_not_writable')
}
await options.afterWrite?.(ptyId)
if (options.afterWrite) {
await options.afterWrite(ptyId)
}
} catch (error) {
renderGate?.dispose()
throw error
@@ -90,7 +92,9 @@ export class OrcaRuntimeWithWriteTerminalAgentPrompt extends OrcaRuntimeWithReso
if (!this.ptyController?.write(ptyId, AGENT_PROMPT_SUBMIT)) {
throw new Error(options.suffixFailureError ?? 'terminal_not_writable')
}
await options.afterWrite?.(ptyId)
if (options.afterWrite) {
await options.afterWrite(ptyId)
}
await verifyAgentPromptSubmission({
baseline,
readActivity: () => this.getAgentPromptActivity(handle, ptyId, waitTextCache),