Skip to content

Conversation

@OrKoN
Copy link
Collaborator

@OrKoN OrKoN commented Sep 23, 2025

McpContext currently assumes that there is a page. Eventually we might support closing the browser by closing the last page but right now we do not really have responses that indicate that the browser was closed. So this PR helps the LLM understand that it is okay to keep the last page running (and there are platform-specific differences as to what happens if the last page is closed).

Ref #87

@OrKoN OrKoN marked this pull request as ready for review September 23, 2025 19:48
@OrKoN OrKoN force-pushed the orkon/no-close-last-page branch from a9caf20 to 2b3dc63 Compare September 24, 2025 06:23
@OrKoN
Copy link
Collaborator Author

OrKoN commented Sep 24, 2025

@sebastianbenz would it be useful as an intermediate solution?

@OrKoN OrKoN force-pushed the orkon/no-close-last-page branch from 2b3dc63 to 02144e5 Compare September 24, 2025 07:05
Copy link
Collaborator

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Wdyt about adding this to the tool description as well -> then it also makes sense to throw an error as the client is using it wrong.

@OrKoN OrKoN force-pushed the orkon/no-close-last-page branch from 02144e5 to 7e73558 Compare September 24, 2025 07:13
@OrKoN
Copy link
Collaborator Author

OrKoN commented Sep 24, 2025

Good idea, added.

@OrKoN OrKoN force-pushed the orkon/no-close-last-page branch from 7e73558 to 0574009 Compare September 24, 2025 07:13
@OrKoN OrKoN force-pushed the orkon/no-close-last-page branch from 0574009 to cb253eb Compare September 24, 2025 07:21
@OrKoN OrKoN enabled auto-merge (squash) September 24, 2025 07:22
@OrKoN OrKoN merged commit 0ca2434 into main Sep 24, 2025
10 checks passed
@OrKoN OrKoN deleted the orkon/no-close-last-page branch September 24, 2025 07:23
OrKoN pushed a commit that referenced this pull request Sep 24, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.2.4](chrome-devtools-mcp-v0.2.3...chrome-devtools-mcp-v0.2.4)
(2025-09-24)


### Bug Fixes

* forbid closing the last page
([#90](#90))
([0ca2434](0ca2434))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
OzTamir pushed a commit to OzTamir/chrome-devtools-mcp that referenced this pull request Sep 25, 2025
McpContext currently assumes that there is a page. Eventually we might
support closing the browser by closing the last page but right now we do
not really have responses that indicate that the browser was closed. So
this PR helps the LLM understand that it is okay to keep the last page
running (and there are platform-specific differences as to what happens
if the last page is closed).

Ref ChromeDevTools#87
OzTamir pushed a commit to OzTamir/chrome-devtools-mcp that referenced this pull request Sep 25, 2025
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.

2 participants