frontend: add unified file action model with context menus across tree, list and pending changes

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
fenghp
2026-06-10 18:09:48 +08:00
co-authored by Cursor
parent bbbb938df0
commit 0b908e8d2c
12 changed files with 911 additions and 78 deletions
+8
View File
@@ -62,12 +62,20 @@ export default function Home() {
setSelectedServerPath(serverPath)
}, [])
/**
* Mapping 创建 / 取消后更新固定上下文中的映射列表,浏览位置保持不变。
*/
const handleMappingsChanged = useCallback((mappings: WorkspaceSession["mappings"]) => {
setSession((prev) => (prev ? { ...prev, mappings } : prev))
}, [])
if (phase === "workspace" && session) {
return (
<WorkspaceShell
session={session}
selectedServerPath={selectedServerPath}
onNavigate={handleNavigate}
onMappingsChanged={handleMappingsChanged}
onReconnect={handleReconnect}
/>
)