diff options
| author | Adam <[email protected]> | 2026-01-22 18:07:48 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-22 18:07:57 -0600 |
| commit | bcf7a65e36af1437cda556577a275dd8531afd0d (patch) | |
| tree | a370d10879d11c8efcf161f1b73526a464c40ea8 /packages/app/src/pages | |
| parent | 7c80ac072bd1b42e4ea962ad47b049606b015ebb (diff) | |
| download | opencode-bcf7a65e36af1437cda556577a275dd8531afd0d.tar.gz opencode-bcf7a65e36af1437cda556577a275dd8531afd0d.zip | |
fix(app): non-git projects should be renameable
Diffstat (limited to 'packages/app/src/pages')
| -rw-r--r-- | packages/app/src/pages/layout.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx index c4fd07e57..12e11e724 100644 --- a/packages/app/src/pages/layout.tsx +++ b/packages/app/src/pages/layout.tsx @@ -1018,11 +1018,16 @@ export default function Layout(props: ParentProps) { const displayName = (project: LocalProject) => project.name || getFilename(project.worktree) async function renameProject(project: LocalProject, next: string) { - if (!project.id) return const current = displayName(project) if (next === current) return const name = next === getFilename(project.worktree) ? "" : next - await globalSDK.client.project.update({ projectID: project.id, directory: project.worktree, name }) + + if (project.id && project.id !== "global") { + await globalSDK.client.project.update({ projectID: project.id, directory: project.worktree, name }) + return + } + + globalSync.project.meta(project.worktree, { name }) } async function renameSession(session: Session, next: string) { |
