-
Notifications
You must be signed in to change notification settings - Fork 55
Feat: Automatically organize tabs #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
CLA Assistant Lite bot ✅ All contributors have signed the CLA. Thank you for helping make BrowserOS better! |
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"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 1 comment
|
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 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
