Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/opencode/src/cli/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { InstanceRuntime } from "../project/instance-runtime"
import { context } from "../project/instance-context"

export async function bootstrap<T>(directory: string, cb: () => Promise<T>) {
const ctx = await InstanceRuntime.load({ directory })
try {
return await context.provide(ctx, cb)
return await cb()
} finally {
await InstanceRuntime.disposeInstance(ctx)
}
Expand Down
3 changes: 0 additions & 3 deletions packages/opencode/src/project/instance-context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LocalContext } from "@/util/local-context"
import { AppFileSystem } from "@opencode-ai/core/filesystem"
import type * as Project from "./project"

Expand All @@ -8,8 +7,6 @@ export interface InstanceContext {
project: Project.Info
}

export const context = LocalContext.create<InstanceContext>("instance")

/**
* Check if a path is within the project boundary.
* Returns true if path is inside ctx.directory OR ctx.worktree.
Expand Down
Loading
Loading