feat: 任务管理页二级开关「有新后台任务时自动展开」(autoOpenTasks)
- 新 pref autoOpenTasks(默认开):当前会话出现新后台任务(任意新任务 id, 非仅首个)时自动展开侧边栏并打开任务管理页,与 autoOpenSubagent 并列 - 注册为 subagent tab 的声明式二级开关(设置页齿轮弹窗,key 在 PrefsSchema) - Sidebar 新增独立基线 effect(镜像子代理自动展开;刷新不触发、开关关闭/类型 禁用不触发);detectNewTask 纯函数(settling/同 id/他会话不触发) - 测试:detectNewTask 用例、prefs 解析断言、builtins 开关清单、schema 默认值 断言;全量 371 通过
This commit is contained in:
@@ -20,6 +20,12 @@ export interface SidebarPrefs {
|
||||
* Subagent page when the current conversation spawns a new subagent.
|
||||
*/
|
||||
autoOpenSubagent: boolean
|
||||
/**
|
||||
* Whether the sidebar auto-activates (opens the panel) and expands the
|
||||
* Tasks page when a NEW background task appears for the current
|
||||
* conversation (any new task id, not just the first one).
|
||||
*/
|
||||
autoOpenTasks: boolean
|
||||
/**
|
||||
* Whether the model-facing agent terminal tools (terminal_create / list /
|
||||
* send / read / wait_for / resize / signal / close) are injected into the
|
||||
@@ -103,6 +109,7 @@ export const SIDEBAR_PREFS_DEFAULTS: SidebarPrefs = {
|
||||
openByDefault: true,
|
||||
defaultWidthPercent: WIDTH_PERCENT_DEFAULT,
|
||||
autoOpenSubagent: true,
|
||||
autoOpenTasks: true,
|
||||
agentTerminalTools: false,
|
||||
bottomPanelAutoTerminal: true,
|
||||
interceptOpenPath: true,
|
||||
|
||||
Reference in New Issue
Block a user