Skip to content

Commit 9e1dd3e

Browse files
ericdalloeca
andcommitted
Add chat/opened notification support for /fork command
🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca <git@eca.dev>
1 parent 74a9a86 commit 9e1dd3e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/bridge/transport.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ export class WebBridge {
605605
'chat:status-changed',
606606
'chat:cleared',
607607
'chat:deleted',
608+
'chat:opened',
608609
]);
609610

610611
private handleSSEEvent(event: SSEEvent): void {
@@ -665,6 +666,12 @@ export class WebBridge {
665666
this.notifyChatListChange();
666667
break;
667668

669+
case 'chat:opened':
670+
this.dispatch('chat/opened', data);
671+
this.upsertChatEntry(data.chatId, { title: data.title });
672+
this.notifyChatListChange();
673+
break;
674+
668675
case 'chat:status-changed': {
669676
const status = data as SSEChatStatusPayload;
670677
// Only update sidebar for non-subagent chats

src/bridge/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ export type DispatchType =
325325
| 'chat/contentReceived'
326326
| 'chat/cleared'
327327
| 'chat/deleted'
328+
| 'chat/opened'
328329
| 'chat/queryContext'
329330
| 'chat/queryCommands'
330331
| 'chat/queryFiles'

0 commit comments

Comments
 (0)