feat(core): render CodeMode catalog deltas from structured snapshots (#38183)
This commit is contained in:
parent
c64d813347
commit
4605308be2
19 changed files with 565 additions and 431 deletions
|
|
@ -1,6 +1,7 @@
|
|||
export * as CodeMode from "./codemode"
|
||||
|
||||
import { Context, Effect, Layer, Scope } from "effect"
|
||||
import { CodeModeCatalog } from "./codemode/catalog"
|
||||
import { makeLocationNode } from "@opencode-ai/util/effect/app-node"
|
||||
import { PermissionV2 } from "./permission"
|
||||
import { ExecuteTool } from "./tool/execute"
|
||||
|
|
@ -9,7 +10,7 @@ import { Wildcard } from "./util/wildcard"
|
|||
|
||||
export interface Materialization {
|
||||
readonly tool?: Any
|
||||
readonly instructions?: string
|
||||
readonly catalog?: ReadonlyArray<CodeModeCatalog.Entry>
|
||||
}
|
||||
|
||||
export interface Interface {
|
||||
|
|
@ -67,7 +68,7 @@ const layer = Layer.effect(
|
|||
if (executeRule?.resource === "*" && executeRule.effect === "deny") return {}
|
||||
return {
|
||||
tool: ExecuteTool.create(registrations),
|
||||
instructions: ExecuteTool.instructions(registrations),
|
||||
catalog: ExecuteTool.catalog(registrations),
|
||||
}
|
||||
}),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue