(event: {
type: 'switch', mode: 'local' | 'remote'
} | {
type: 'message', message: string
} | {
type: 'permission-mode-changed', mode: 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan'
} | {
type: 'ready'
}, id?: string)
| 830 | } |
| 831 | |
| 832 | sendSessionEvent(event: { |
| 833 | type: 'switch', mode: 'local' | 'remote' |
| 834 | } | { |
| 835 | type: 'message', message: string |
| 836 | } | { |
| 837 | type: 'permission-mode-changed', mode: 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan' |
| 838 | } | { |
| 839 | type: 'ready' |
| 840 | }, id?: string) { |
| 841 | let content = { |
| 842 | role: 'agent', |
| 843 | content: { |
| 844 | id: id ?? randomUUID(), |
| 845 | type: 'event', |
| 846 | data: event |
| 847 | } |
| 848 | }; |
| 849 | this.enqueueMessage(content); |
| 850 | } |
| 851 | |
| 852 | /** |
| 853 | * Send a ping message to keep the connection alive |
no test coverage detected