feat(ext): use full task for tab group name
This commit is contained in:
@@ -18,7 +18,7 @@ export class MultiPageAgent extends PageAgentCore {
|
|||||||
customSystemPrompt: SYSTEM_PROMPT,
|
customSystemPrompt: SYSTEM_PROMPT,
|
||||||
|
|
||||||
onBeforeTask: async (agent) => {
|
onBeforeTask: async (agent) => {
|
||||||
await tabsController.init(agent.taskId)
|
await tabsController.init(agent.task)
|
||||||
|
|
||||||
await chrome.storage.local.set({
|
await chrome.storage.local.set({
|
||||||
isAgentRunning: true,
|
isAgentRunning: true,
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
* - no chrome apis. call sw for tab operations
|
* - no chrome apis. call sw for tab operations
|
||||||
*/
|
*/
|
||||||
export class TabsController {
|
export class TabsController {
|
||||||
tabs: TabMeta[] = []
|
|
||||||
currentTabId: number | null = null
|
currentTabId: number | null = null
|
||||||
|
|
||||||
initialTabId: number | null = null
|
private tabs: TabMeta[] = []
|
||||||
|
private initialTabId: number | null = null
|
||||||
private tabGroupId: number | null = null
|
private tabGroupId: number | null = null
|
||||||
private taskId: string = ''
|
private task: string = ''
|
||||||
private windowId: number | null = null
|
private windowId: number | null = null
|
||||||
|
|
||||||
async init(taskId: string) {
|
async init(task: string) {
|
||||||
this.taskId = taskId
|
this.task = task
|
||||||
this.tabs = []
|
this.tabs = []
|
||||||
this.currentTabId = null
|
this.currentTabId = null
|
||||||
this.tabGroupId = null
|
this.tabGroupId = null
|
||||||
@@ -84,7 +84,7 @@ export class TabsController {
|
|||||||
payload: {
|
payload: {
|
||||||
groupId: this.tabGroupId,
|
groupId: this.tabGroupId,
|
||||||
properties: {
|
properties: {
|
||||||
title: `Task(${this.taskId.slice(0, 8)})`,
|
title: `PageAgent(${this.task})`,
|
||||||
color: randomColor(),
|
color: randomColor(),
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user