Feat: Automatically organize tabs#198
Open
David Vincent Fischer (theUpsider) wants to merge 2 commits into
Open
Feat: Automatically organize tabs#198David Vincent Fischer (theUpsider) wants to merge 2 commits into
David Vincent Fischer (theUpsider) wants to merge 2 commits into
Conversation
Contributor
|
CLA Assistant Lite bot ✅ All contributors have signed the CLA. Thank you for helping make BrowserOS better! |
Contributor
Greptile OverviewGreptile SummaryAdds three new tools ( Key Changes:
Issues Found:
Confidence Score: 3/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant Agent as BrowserAgent
participant LTG as ListTabGroupsTool
participant CTG as CreateTabGroupTool
participant ATG as AddTabToGroupTool
participant Chrome as Chrome API
User->>Agent: "Organize my tabs"
Agent->>LTG: list_tab_groups()
LTG->>Chrome: chrome.tabGroups.query({})
Chrome-->>LTG: existing groups[]
LTG->>Chrome: chrome.tabs.query({groupId})
Chrome-->>LTG: tabs in each group
LTG-->>Agent: groups with tab counts
Agent->>CTG: create_tab_group(name, color, tabIds?)
CTG->>Chrome: chrome.tabs.query({})
Chrome-->>CTG: validate tabIds exist
CTG->>Chrome: chrome.tabs.group({tabIds})
Chrome-->>CTG: groupId
CTG->>Chrome: chrome.tabGroups.update(groupId, {title, color})
Chrome-->>CTG: success
CTG-->>Agent: group created with ID
Agent->>ATG: add_tab_to_group(tabId, groupId)
ATG->>Chrome: chrome.tabs.get(tabId)
Chrome-->>ATG: tab details
ATG->>Chrome: chrome.tabGroups.query({})
Chrome-->>ATG: validate groupId exists
ATG->>Chrome: chrome.tabs.group({groupId, tabIds})
Chrome-->>ATG: success
ATG-->>Agent: tab added to group
Agent-->>User: "Tabs organized into groups"
|
Author
|
I have read the CLA Document and I hereby sign the CLA |
… group tools chrome.tabs.getCurrent() returns undefined in extension contexts like background scripts and side panels. Using chrome.tabs.query() with active: true and currentWindow: true properly retrieves the current active tab in these contexts. Fixes bug reported in PR browseros-ai#198 review.
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 introduces new tab group management capabilities to the browser agent, allowing users to create, list, and organize tabs into groups. The changes include three new tools for tab group operations, updates to the agent's tool registration and prompt documentation, and a minor version bump in the manifest. These improvements make it easier to automate and structure browser workflows involving multiple tabs.
Addresses browseros-ai/BrowserOS#200
Tab Group Management Tools:
CreateTabGroupTool, enabling creation of tab groups with specified names and colors, and optional immediate tab assignment.ListTabGroupsTool, which lists all existing tab groups with their IDs, names, colors, and tab counts.AddTabToGroupTool, allowing a specific tab to be moved into an existing tab group by ID.Integration and Registration:
BrowserAgent.ts, ensuring they are available for use and included in dynamic tool descriptions. [1] [2] [3] [4]Prompt and Documentation Updates:
BrowserAgent.prompt.tsto document the new tab group operations, including examples and tool descriptions for improved agent guidance. [1] [2] [3] [4]Miscellaneous:
manifest.jsonfrom50.1.0.2to50.1.1.0.Video:
Screencast from 2025-11-13 23-47-55.webm
Image
