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:
1 parent
e365e830cf
commit
e335588826
15 files changed
+821
-31
No files matched your search
@@ -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[] }>
|
||||
|
||||
@@ -138,6 +138,10 @@ export interface SessionMeta {
|
||||
expertId?: string | null
|
||||
agentMode?: import('./conversation').AgentMode
|
||||
thinkingLevel?: import('./workspaces').ThinkingLevel
|
||||
/** 置顶时间(毫秒)。有值即视为已置顶,用于侧栏任务排序,不改变 createdAt/updatedAt 语义。 */
|
||||
pinnedAt?: number
|
||||
/** 归档时间(毫秒)。归档任务从默认任务列表移出,但不删除消息与工作目录。 */
|
||||
archivedAt?: number
|
||||
}
|
||||
|
||||
/** 工作目录信息 */
|
||||
|
||||
Reference in new issue
Block a user