feat(ext): use full task for tab group name

This commit is contained in:
Simon
2026-01-28 14:12:30 +08:00
parent 77a771f0b6
commit 0cad8a1159
2 changed files with 7 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ export class MultiPageAgent extends PageAgentCore {
customSystemPrompt: SYSTEM_PROMPT,
onBeforeTask: async (agent) => {
await tabsController.init(agent.taskId)
await tabsController.init(agent.task)
await chrome.storage.local.set({
isAgentRunning: true,

View File

@@ -4,16 +4,16 @@
* - no chrome apis. call sw for tab operations
*/
export class TabsController {
tabs: TabMeta[] = []
currentTabId: number | null = null
initialTabId: number | null = null
private tabs: TabMeta[] = []
private initialTabId: number | null = null
private tabGroupId: number | null = null
private taskId: string = ''
private task: string = ''
private windowId: number | null = null
async init(taskId: string) {
this.taskId = taskId
async init(task: string) {
this.task = task
this.tabs = []
this.currentTabId = null
this.tabGroupId = null
@@ -84,7 +84,7 @@ export class TabsController {
payload: {
groupId: this.tabGroupId,
properties: {
title: `Task(${this.taskId.slice(0, 8)})`,
title: `PageAgent(${this.task})`,
color: randomColor(),
collapsed: false,
},