Open Bug 2059729 Opened 1 month ago Updated 17 days ago

Add getTabGroups() to TabManagementService

Categories

(Core :: Machine Learning: Frontend, task, P1)

task
Points:
1

Tracking

()

ASSIGNED

People

(Reporter: flozia, Assigned: chloezhou)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [aiasst])

Attachments

(1 file)

Summary

TabManagementService.sys.mjs already has createTabGroup() and ungroupTabs(), but no way to read tab groups. Tab group aware prompting needs a single read API so its consumers — the mentions picker, the get_tab_groups tool, and submit-time mention resolution — do not each directly access gBrowser.tabGroups and duplicate filtering rules.

Acceptance Criteria

  • getTabGroups({ window }) returns open tab groups as { id, label, color, tabCount, tabs }.
  • getTabGroupById({ groupId, window }) returns a single group in the same shape or null when the group does not exist.
  • Grouped tabs are filtered through the same filters used by getTabList().
  • Unit test coverage
Blocks: 2059755
Blocks: 2059756
Blocks: 2014499
Points: --- → 1
Priority: -- → P1

Give tab group aware prompting a single read API so its consumers don't each reach into gBrowser.tabGroups and duplicate the filtering. Grouped tabs use the same isAllowedURL, isNewPageUrl, and sanitizeUntrustedContent rules as getTabList(); to share them, isAllowedURL moves into ChatUtils.sys.mjs. Includes xpcshell coverage.

Assignee: nobody → chzhou
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: