feat(composer): replicate WorkBuddy branch label and context usage (TODO 21)

This commit is contained in:
xiaohan.yuan committed 2026-10-17 08:15:19 +08:00
1 parent cb8a7e6466
commit bde041c12d
21 files changed
+1350 -12

No files matched your search

+6 -1
View File
@@ -10,7 +10,8 @@ import type {
GatewayConfigView,
WorkspaceInfo,
WindowState,
AppInfo
AppInfo,
GitBranchInfo
} from './types'
import type { DownloadPayload, DownloadResult, ResourceEntry, ResourceRange, WorkspaceResource } from './resources'
import type { ChatAttachment, InteractionResponse, MessageQuote, PermissionMode } from './conversation'
@@ -91,6 +92,10 @@ export interface YCodeApi {
onSettingsChanged(listener: () => void): () => void
onSettingsNavigate(listener: (section: string, action?: 'new') => void): () => void
}
git: {
/** 读取某个会话工作目录的真实分支信息;目录不在仓库内或 git 不可用时返回 repo:false/unavailable。 */
branch(sessionId: string): Ipc<GitBranchInfo>
}
config: {
get(): Ipc<GatewayConfigView>
update(patch: ConfigPatchLike): Ipc<GatewayConfigView>