Skip to content

Commit 191d7c9

Browse files
committed
send bb session id
1 parent 066571f commit 191d7c9

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

lib/api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class StagehandAPI {
4343
waitForCaptchaSolves,
4444
actionTimeoutMs,
4545
browserbaseSessionCreateParams,
46+
browserbaseSessionId,
4647
}: StartSessionParams): Promise<StartSessionResult> {
4748
const sessionResponse = await this.request("/sessions/start", {
4849
method: "POST",
@@ -56,6 +57,7 @@ export class StagehandAPI {
5657
waitForCaptchaSolves,
5758
actionTimeoutMs,
5859
browserbaseSessionCreateParams,
60+
browserbaseSessionId,
5961
}),
6062
headers: {
6163
"x-model-api-key": modelApiKey,

lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ export class Stagehand {
626626
waitForCaptchaSolves: this.waitForCaptchaSolves,
627627
actionTimeoutMs: this.actTimeoutMs,
628628
browserbaseSessionCreateParams: this.browserbaseSessionCreateParams,
629+
browserbaseSessionId: this.browserbaseSessionID,
629630
});
630631
this.browserbaseSessionID = sessionId;
631632
}

types/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface StartSessionParams {
2424
selfHeal?: boolean;
2525
waitForCaptchaSolves?: boolean;
2626
actionTimeoutMs?: number;
27+
browserbaseSessionId?: string;
2728
}
2829

2930
export interface StartSessionResult {

0 commit comments

Comments
 (0)