The open source coding agent.
TypeScript
fix(app): renaming non-git projects shouldn't affect other projects
Adamae8cff22e5c2
diff --git a/packages/app/src/components/dialog-edit-project.tsx b/packages/app/src/components/dialog-edit-project.tsxindex b6e2f822eba..acf146ef52d 100644--- a/packages/app/src/components/dialog-edit-project.tsx+++ b/packages/app/src/components/dialog-edit-project.tsx@@ -75,6 +75,7 @@ export function DialogEditProject(props: { project: LocalProject }) {const name = store.name.trim() === folderName() ? "" : store.name.trim()await globalSDK.client.project.update({projectID: props.project.id,+ directory: props.project.worktree,name,icon: { color: store.color, override: store.iconUrl },})diff --git a/packages/app/src/context/layout.tsx b/packages/app/src/context/layout.tsxindex d7d09aa3999..7a355629059 100644--- a/packages/app/src/context/layout.tsx+++ b/packages/app/src/context/layout.tsx@@ -296,7 +296,7 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(used.add(color)setColors(project.worktree, color)if (!project.id) continue- void globalSdk.client.project.update({ projectID: project.id, icon: { color } })+ void globalSdk.client.project.update({ projectID: project.id, directory: project.worktree, icon: { color } })}})diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsxindex 4d1c1f73b93..befdf721d2b 100644--- a/packages/app/src/pages/layout.tsx+++ b/packages/app/src/pages/layout.tsx@@ -979,7 +979,7 @@ export default function Layout(props: ParentProps) {const current = displayName(project)if (next === current) returnconst name = next === getFilename(project.worktree) ? "" : next- await globalSDK.client.project.update({ projectID: project.id, name })+ await globalSDK.client.project.update({ projectID: project.id, directory: project.worktree, name })}async function renameSession(session: Session, next: string) {