mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-15 21:03:22 +00:00
fix chat
This commit is contained in:
parent
43c6b56dfa
commit
6b2a639fb6
3 changed files with 282 additions and 45 deletions
|
|
@ -913,6 +913,14 @@ export class AgentSession {
|
|||
await this._memoryDisposePromise;
|
||||
}
|
||||
|
||||
private async _awaitAgentEventProcessing(): Promise<void> {
|
||||
try {
|
||||
await this._agentEventQueue;
|
||||
} catch {
|
||||
// Agent event failures are surfaced through normal listener paths.
|
||||
}
|
||||
}
|
||||
|
||||
private _enqueueMemoryPromotion(messages: AgentMessage[]): void {
|
||||
this._memoryWriteQueue = this._memoryWriteQueue
|
||||
.catch(() => undefined)
|
||||
|
|
@ -1161,6 +1169,7 @@ export class AgentSession {
|
|||
|
||||
await this.agent.prompt(messages);
|
||||
await this.waitForRetry();
|
||||
await this._awaitAgentEventProcessing();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1369,6 +1378,8 @@ export class AgentSession {
|
|||
}
|
||||
} else if (options?.triggerTurn) {
|
||||
await this.agent.prompt(appMessage);
|
||||
await this.waitForRetry();
|
||||
await this._awaitAgentEventProcessing();
|
||||
} else {
|
||||
this.agent.appendMessage(appMessage);
|
||||
this.sessionManager.appendCustomMessageEntry(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue