refactor(opencode): build runtimes from layer nodes (#34515)
This commit is contained in:
@@ -7,8 +7,9 @@ export const ScrapCommand = cmd({
|
||||
builder: (yargs) => yargs,
|
||||
async handler() {
|
||||
const { Project } = await import("@/project/project")
|
||||
const { AppNodeBuilder } = await import("@opencode-ai/core/effect/app-node-builder")
|
||||
const { makeRuntime } = await import("@opencode-ai/core/effect/runtime")
|
||||
const runtime = makeRuntime(Project.Service, Project.defaultLayer)
|
||||
const runtime = makeRuntime(Project.Service, AppNodeBuilder.build(Project.node))
|
||||
const list = await runtime.runPromise((project) => project.list())
|
||||
process.stdout.write(JSON.stringify(list, null, 2) + EOL)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user