Delete Instance.dispose and Instance.reload (#25427)

This commit is contained in:
Kit Langton
2026-05-02 11:44:16 -04:00
committed by GitHub
parent 7371db5cc6
commit 3b9155714d
11 changed files with 30 additions and 47 deletions

View File

@@ -2,6 +2,7 @@ import { Hono } from "hono"
import { describeRoute, validator } from "hono-openapi"
import { resolver } from "hono-openapi"
import { Instance } from "@/project/instance"
import { InstanceStore } from "@/project/instance-store"
import { Project } from "@/project/project"
import z from "zod"
import { ProjectID } from "@/project/schema"
@@ -81,11 +82,7 @@ export const ProjectRoutes = lazy(() =>
Project.Service.use((svc) => svc.initGit({ directory: dir, project: prev })),
)
if (next.id === prev.id && next.vcs === prev.vcs && next.worktree === prev.worktree) return c.json(next)
await Instance.reload({
directory: dir,
worktree: dir,
project: next,
})
await InstanceStore.reloadInstance({ directory: dir, worktree: dir, project: next })
return c.json(next)
},
)