mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-01 14:52:25 +00:00
Co-authored-by: Github Action <action@github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: Brendan Allan <git@brendonovich.dev>
34 lines
976 B
TypeScript
34 lines
976 B
TypeScript
import { Plugin } from "../plugin"
|
|
import { Format } from "../format"
|
|
import { LSP } from "../lsp"
|
|
import { FileWatcher } from "../file/watcher"
|
|
import { File } from "../file"
|
|
import { Project } from "./project"
|
|
import { Bus } from "../bus"
|
|
import { Command } from "../command"
|
|
import { Instance } from "./instance"
|
|
import { Vcs } from "./vcs"
|
|
import { Log } from "@/util/log"
|
|
import { ShareNext } from "@/share/share-next"
|
|
import { Snapshot } from "../snapshot"
|
|
import { Truncate } from "../tool/truncation"
|
|
|
|
export async function InstanceBootstrap() {
|
|
Log.Default.info("bootstrapping", { directory: Instance.directory })
|
|
await Plugin.init()
|
|
ShareNext.init()
|
|
Format.init()
|
|
await LSP.init()
|
|
FileWatcher.init()
|
|
File.init()
|
|
Vcs.init()
|
|
Snapshot.init()
|
|
Truncate.init()
|
|
|
|
Bus.subscribe(Command.Event.Executed, async (payload) => {
|
|
if (payload.properties.name === Command.Default.INIT) {
|
|
await Project.setInitialized(Instance.project.id)
|
|
}
|
|
})
|
|
}
|