File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1513,20 +1513,20 @@ async function attachAgentList(
15131513}
15141514
15151515/** Subscribe an explorer socket to host fs.watch notifications for its cwd. */
1516- function attachFsEvents (
1516+ async function attachFsEvents (
15171517 ctx : Context ,
15181518 hub : FsWatchHub ,
15191519 ws : WebSocket ,
15201520 req : SidebarHttpRequest ,
1521- ) : void {
1521+ ) : Promise < void > {
15221522 try {
15231523 const url = new URL ( req . url ?? '/' , 'http://dsh.internal' )
15241524 const sessionId = url . searchParams . get ( 'sessionId' )
15251525 if ( sessionId === null ) {
15261526 ws . close ( 1008 , 'sessionId is required' )
15271527 return
15281528 }
1529- const cwd = sessionCwdOf ( ctx , sessionId , url . searchParams . get ( 'cwd' ) ?? undefined )
1529+ const cwd = await sessionCwdOf ( ctx , sessionId , url . searchParams . get ( 'cwd' ) ?? undefined )
15301530 ws . on ( 'message' , ( data ) => {
15311531 try {
15321532 const msg = JSON . parse ( String ( data ) ) as { type ?: unknown ; path ?: unknown }
You can’t perform that action at this time.
0 commit comments