feat: add JavaScript debugging tools to browser automation#25
Merged
Conversation
* update Browser MCP prompts. Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
services/browser_debugger.go:98
- Consider validating that 'result["breakpointId"]' is a string before performing the type assertion to avoid potential panics if the response structure changes.
breakpointID = result["breakpointId"].(string)
services/browser_config.go:35
- [nitpick] If the commented-out logger field is no longer needed, consider removing it entirely to keep the configuration file clean.
//logger *zerolog.Logger
…press cancel error in browser Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
services/browser_debugger.go:100
- [nitpick] Consider providing a more descriptive error message when the breakpoint ID is not retrieved, possibly including details from the debugger's response to facilitate troubleshooting.
breakpointID = ""
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes significant additions and modifications to the
services/browser.goandservices/browser_debugger.gofiles to enhance browser automation and debugging capabilities. The most important changes include adding new tools for JavaScript debugging, modifying the headless mode configuration, updating the prompt for the browser assistant, and implementing the handling of various debugging tasks.Enhancements to browser automation and debugging:
services/browser.go: Modified theInitfunction to use theHeadlessconfiguration frombs.configinstead of a hardcoded value.services/browser.go: Added tools for enabling/disabling JavaScript debugging, setting/removing breakpoints, pausing/resuming script execution, and retrieving the current call stack.services/browser.go: Updated the prompt in thehandlePromptfunction to include detailed descriptions of the browser assistant's capabilities, including new debugging tools.services/browser.go: Enabled the cancellation of the browser context in theClosefunction to properly stop the browser.New debugging capabilities:
services/browser_debugger.go: Added a new file to handle various debugging tasks such as enabling/disabling debugging, setting/removing breakpoints, pausing/resuming script execution, and retrieving the current call stack.