feat(sidebar): replicate WorkBuddy task context menu (TODO 01)

Replace the sidebar delete button with the original task menu: pin/unpin,
rename, open in a separate window, open folder, archive and delete.

Source: REA ev_f5e9d71a676c453daab40928acfb33aeabae68ba57ffda342380cead7f1a1fe2
(WorkBuddy 5.8.3 task menu, open state) supplies the container/item geometry,
the two dividers, danger colour and every item icon.

Verified by scripts/verify-task-menu.cjs: 33 assertions in a real isolated
Electron app (real preload/IPC/filesystem), including menu geometry, anchor
offset, pin/rename/archive persistence, open-folder target and the separate
window query. typecheck, test:conversation and build pass.
This commit is contained in:
xiaohan.yuan committed 2026-10-17 04:43:56 +08:00
1 parent e365e830cf
commit e335588826
15 files changed
+821 -31

No files matched your search

+9
View File
@@ -131,11 +131,20 @@ export interface YCodeApi {
}
session: {
list(): Ipc<SessionMeta[]>
listArchived(): Ipc<SessionMeta[]>
create(title?: string, context?: SessionContext): Ipc<SessionMeta>
updateContext(id: string, context: SessionContext): Ipc<SessionMeta>
messages(sessionId: string): Ipc<ChatMessage[]>
rename(sessionId: string, title: string): Ipc<void>
remove(sessionId: string): Ipc<void>
/** 置顶/取消置顶;返回刷新后的元信息。 */
setPinned(sessionId: string, pinned: boolean): Ipc<SessionMeta>
/** 归档/取消归档;不删除消息与工作目录。 */
setArchived(sessionId: string, archived: boolean): Ipc<SessionMeta>
/** 用系统文件管理器打开任务绑定的工作目录。 */
openFolder(sessionId: string): Ipc<void>
/** 在新窗口打开该任务。 */
openWindow(sessionId: string): Ipc<void>
}
chat: {
revert(sessionId: string, userMessageId: string): Ipc<{ messages: ChatMessage[] }>