Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(web): add project path action to sidebar menu (#1436)

Fllipce463a5360ab
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index af60ce7d2..2d974be3e 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 project = projects.find((entry) => entry.id === projectId);
+ if (!project) return;
+
const clicked = await api.contextMenu.show(
- [{ id: "delete", label: "Remove project", destructive: true }],
+ [
+ { 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 project = projects.find((entry) => entry.id === projectId);
- if (!project) 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,