Remove emitLastMessage from continue(), use prompt(AppMessage) instead

Cleans up the temporary emitLastMessage plumbing since we now use
Agent.prompt(AppMessage) for hook messages instead of appendMessage+continue.

- Remove emitLastMessage parameter from Agent.continue()
- Remove from transport interface and implementations
- Remove from agentLoopContinue()
This commit is contained in:
Mario Zechner 2025-12-27 01:58:58 +01:00
parent a6322fda59
commit c1b4d043a8
5 changed files with 10 additions and 27 deletions

View file

@ -73,12 +73,12 @@ export class ProviderTransport implements AgentTransport {
}
}
async *continue(messages: Message[], cfg: AgentRunConfig, signal?: AbortSignal, emitLastMessage?: boolean) {
async *continue(messages: Message[], cfg: AgentRunConfig, signal?: AbortSignal) {
const model = this.getModel(cfg);
const context = this.buildContext(messages, cfg);
const pc = this.buildLoopConfig(model, cfg);
for await (const ev of agentLoopContinue(context, pc, signal, undefined, emitLastMessage)) {
for await (const ev of agentLoopContinue(context, pc, signal)) {
yield ev;
}
}