File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,21 @@ async function handleCreateSession(
8383 const bb = new Browserbase ( {
8484 apiKey : config . browserbaseApiKey ,
8585 } ) ;
86- const debugUrl = ( await bb . sessions . debug ( session . sessionId ) )
86+
87+ const browserbaseSessionId = session . stagehand . browserbaseSessionID ;
88+ if ( ! browserbaseSessionId ) {
89+ throw new Error (
90+ "Browserbase session ID not found in Stagehand instance" ,
91+ ) ;
92+ }
93+ const debugUrl = ( await bb . sessions . debug ( browserbaseSessionId ) )
8794 . debuggerFullscreenUrl ;
8895 process . stderr . write (
89- `[tool.connected] Successfully connected to Browserbase session. Internal ID: ${ targetSessionId } , Actual ID: ${ session . sessionId } ` ,
96+ `[tool.connected] Successfully connected to Browserbase session. Internal ID: ${ targetSessionId } , Actual ID: ${ browserbaseSessionId } ` ,
9097 ) ;
9198
9299 process . stderr . write (
93- `[SessionManager] Browserbase Live Session View URL: https://www.browserbase.com/sessions/${ session . sessionId } ` ,
100+ `[SessionManager] Browserbase Live Session View URL: https://www.browserbase.com/sessions/${ browserbaseSessionId } ` ,
94101 ) ;
95102
96103 process . stderr . write (
@@ -101,7 +108,7 @@ async function handleCreateSession(
101108 content : [
102109 {
103110 type : "text" ,
104- text : `Browserbase Live Session View URL: https://www.browserbase.com/sessions/${ session . sessionId } ` ,
111+ text : `Browserbase Live Session View URL: https://www.browserbase.com/sessions/${ browserbaseSessionId } ` ,
105112 } ,
106113 {
107114 type : "text" ,
You can’t perform that action at this time.
0 commit comments