feat(settings): replicate the WorkBuddy agents panel and persist team-management preference (TODO 15)

This commit is contained in:
xiaohan.yuan committed 2026-10-17 12:58:25 +08:00
1 parent b3be45715e
commit 143516b3a8
33 files changed
+1071 -21

No files matched your search

+8 -1
View File
@@ -15,7 +15,9 @@ import type {
GeneralSettingsPatch,
GeneralSettingsView,
PersonalizationPatch,
PersonalizationSettings
PersonalizationSettings,
AgentSettings,
AgentSettingsPatch
} from './types'
import type { DownloadPayload, DownloadResult, ResourceEntry, ResourceRange, WorkspaceResource } from './resources'
import type { ChatAttachment, InteractionResponse, MessageQuote, PermissionMode } from './conversation'
@@ -120,6 +122,11 @@ export interface YCodeApi {
get(): Ipc<PersonalizationSettings>
update(patch: PersonalizationPatch): Ipc<PersonalizationSettings>
}
/** 设置 → 智能体:智能体团队管理偏好。 */
agents: {
get(): Ipc<AgentSettings>
update(patch: AgentSettingsPatch): Ipc<AgentSettings>
}
workspace: {
get(): Ipc<WorkspaceInfo>
choose(): Ipc<WorkspaceInfo & { changed: boolean }>
+11
View File
@@ -172,6 +172,17 @@ export interface PersonalizationSettings {
export type PersonalizationPatch = Partial<PersonalizationSettings>
/**
* 设置 → 智能体(TODO 15)。
* 本轮只接入「智能体团队管理」这一个偏好;经济模式与浏览器操控仅按原版布局呈现并明确标注未接入。
*/
export interface AgentSettings {
/** 开启后复杂任务自动拆分多个智能体协作完成(原版默认开启)。 */
teamManagement: boolean
}
export type AgentSettingsPatch = Partial<AgentSettings>
/** 主进程 → 渲染进程的流式事件 */
export type ChatEvent = { sessionId?: string; turnDurationMs?: number } & (
| { runId: string; type: 'started'; messageId: string }