Skip to content

Conversation

@kamath
Copy link
Contributor

@kamath kamath commented Dec 12, 2024

why

We have params being passed in to init that are also in the constructor. This is redundant and doesn't make sense. Cleaning this up. Also deprecating initFromPage in favor of browserbaseResumeSessionId. Lastly, change browserBase to browserbase.

Now you can just do

const stagehand = new Stagehand({ yourParams });
await stagehand.init()

what changed

param names + docs

test plan

evals CI

@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2024

🦋 Changeset detected

Latest commit: c0339b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@browserbasehq/stagehand Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kamath kamath changed the title Tidy: deprecate fields Tidy: deprecate + rename init/constructor Dec 12, 2024
@kamath kamath marked this pull request as ready for review December 12, 2024 20:10
@kamath kamath merged commit f11da27 into main Dec 12, 2024
3 checks passed
@kamath kamath deleted the anirudh/deprecate-fields branch December 12, 2024 20:23
@github-actions github-actions bot mentioned this pull request Dec 12, 2024
@ilias-t
Copy link

ilias-t commented Dec 24, 2024

is there a migration guide somewhere for this change?

Deprecate initFromPage in favor of browserbaseResumeSessionID in constructor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants