diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index af60ce7d2972fa138eacbb3d04d92ec4b5bf34a4..2d974be3eeac342414520450fbd404a800a357ec 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -818,15 +818,22 @@ export default function Sidebar() { async (projectId: ProjectId, position: { x: number; y: number }) => { const api = readNativeApi(); if (!api) return; - const clicked = await api.contextMenu.show( - [{ id: "delete", label: "Remove project", destructive: true }], - position, - ); - if (clicked !== "delete") return; - const project = projects.find((entry) => entry.id === projectId); if (!project) return; + const clicked = await api.contextMenu.show( + [ + { id: "copy-path", label: "Copy Project Path" }, + { id: "delete", label: "Remove project", destructive: true }, + ], + position, + ); + if (clicked === "copy-path") { + copyPathToClipboard(project.cwd, { path: project.cwd }); + return; + } + if (clicked !== "delete") return; + const projectThreads = threads.filter((thread) => thread.projectId === projectId); if (projectThreads.length > 0) { toastManager.add({ @@ -864,6 +871,7 @@ export default function Sidebar() { [ clearComposerDraftForThread, clearProjectDraftThreadId, + copyPathToClipboard, getDraftThreadByProjectId, projects, threads,