File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import * as path from 'path'
55import * as net from 'net'
66import {
77 ConnectedBrowser ,
8- InitializeChatMessage
8+ InitializeChatMessage ,
9+ WebSocketMessage
910} from '@shared/types/websocket-message'
1011import { CHATBOTS } from '@shared/constants/chatbots'
1112import { DEFAULT_PORT , SECURITY_TOKENS } from '@shared/constants/websocket'
@@ -142,7 +143,7 @@ export class WebSocketManager {
142143
143144 this . client . on ( 'message' , async ( data ) => {
144145 try {
145- const message = JSON . parse ( data . toString ( ) )
146+ const message = JSON . parse ( data . toString ( ) ) as WebSocketMessage
146147 Logger . info ( {
147148 function_name : '_connect_as_client' ,
148149 message : 'Incoming WS message' ,
@@ -159,7 +160,7 @@ export class WebSocketManager {
159160 vscode . commands . executeCommand ( 'codeWebChat.applyChatResponse' , {
160161 raw_instructions : message . raw_instructions ,
161162 edit_format : message . edit_format ,
162- chatbot_url : message . chatbot_url
163+ chatbot_url : message . url
163164 } )
164165 }
165166 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments