We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a492d77 commit e44f8adCopy full SHA for e44f8ad
src/node/services/agentSession.ts
@@ -396,7 +396,10 @@ export class AgentSession {
396
}
397
398
private attachAiListeners(): void {
399
- const forward = (event: string, handler: (payload: WorkspaceChatMessage) => void) => {
+ const forward = (
400
+ event: string,
401
+ handler: (payload: WorkspaceChatMessage) => void | Promise<void>
402
+ ) => {
403
const wrapped = (...args: unknown[]) => {
404
const [payload] = args;
405
if (
@@ -407,7 +410,7 @@ export class AgentSession {
407
410
) {
408
411
return;
409
412
- handler(payload as WorkspaceChatMessage);
413
+ void handler(payload as WorkspaceChatMessage);
414
};
415
this.aiListeners.push({ event, handler: wrapped });
416
this.aiService.on(event, wrapped as never);
0 commit comments