mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
fix ci
This commit is contained in:
parent
0b40c3d37d
commit
8bff3cdae8
@ -38,7 +38,7 @@ export namespace Project {
|
||||
export type Info = z.infer<typeof Info>
|
||||
|
||||
export const Event = {
|
||||
Updated: BusEvent.define("project.updated", z.object(Info)),
|
||||
Updated: BusEvent.define("project.updated", Info),
|
||||
}
|
||||
|
||||
export async function fromDirectory(directory: string) {
|
||||
@ -100,6 +100,7 @@ export namespace Project {
|
||||
await migrateFromGlobal(id, worktree)
|
||||
}
|
||||
}
|
||||
if (!existing.icon) discover(existing)
|
||||
await Storage.write<Info>(["project", id], {
|
||||
...existing,
|
||||
worktree,
|
||||
@ -115,9 +116,11 @@ export namespace Project {
|
||||
properties: existing,
|
||||
},
|
||||
})
|
||||
return existing!
|
||||
return existing
|
||||
}
|
||||
|
||||
async function discover(input: Pick<Info, "id" | "worktree">) {}
|
||||
|
||||
async function migrateFromGlobal(newProjectID: string, worktree: string) {
|
||||
const globalProject = await Storage.read<Info>(["project", "global"]).catch(() => undefined)
|
||||
if (!globalProject) return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user