File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,16 @@ export class IpcClient extends EventEmitter<IpcClientEvents> {
5858
5959 private onMessage ( data : unknown ) {
6060 if ( typeof data !== "object" ) {
61- this . _log ( " [client#onMessage] invalid data" , data )
61+ this . log ( ` [client#onMessage] invalid data -> ${ JSON . stringify ( data ) } ` )
6262 return
6363 }
6464
6565 const result = ipcMessageSchema . safeParse ( data )
6666
6767 if ( ! result . success ) {
68- this . log ( "[client#onMessage] invalid payload" , result . error , data )
68+ this . log (
69+ `[client#onMessage] invalid payload -> ${ JSON . stringify ( result . error . issues ) } -> ${ JSON . stringify ( data ) } ` ,
70+ )
6971 return
7072 }
7173
@@ -113,9 +115,10 @@ export class IpcClient extends EventEmitter<IpcClientEvents> {
113115 public disconnect ( ) {
114116 try {
115117 ipc . disconnect ( this . _id )
116- // @TODO : Should we set _disconnect here?
117118 } catch ( error ) {
118- this . log ( "[client#disconnect] error disconnecting" , error )
119+ this . log (
120+ `[client#disconnect] error disconnecting -> ${ error instanceof Error ? error . message : String ( error ) } ` ,
121+ )
119122 }
120123 }
121124
Original file line number Diff line number Diff line change @@ -76,18 +76,17 @@ export class IpcServer extends EventEmitter<IpcServerEvents> implements RooCodeI
7676
7777 private onMessage ( data : unknown ) {
7878 if ( typeof data !== "object" ) {
79- this . log ( " [server#onMessage] invalid data" , data )
79+ this . log ( ` [server#onMessage] invalid data -> ${ JSON . stringify ( data ) } ` )
8080 return
8181 }
8282
8383 const result = ipcMessageSchema . safeParse ( data )
8484
8585 if ( ! result . success ) {
8686 this . log (
87- "[server#onMessage] invalid paylooooad" ,
88- JSON . stringify ( result . error . format ( ) ) ,
89- JSON . stringify ( data ) ,
87+ `[server#onMessage] invalid payload -> ${ JSON . stringify ( result . error . issues ) } -> ${ JSON . stringify ( data ) } ` ,
9088 )
89+
9190 return
9291 }
9392
You can’t perform that action at this time.
0 commit comments