chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-09 16:12:42 +00:00
parent ffcb45d7c9
commit ada5b31bb0
11 changed files with 69 additions and 33 deletions

View File

@ -30,7 +30,9 @@ export const Plugin = {
local(entry)
? new Reference.LocalSource({
type: "local",
path: AbsolutePath.make(localPath(directory, global.home, typeof entry === "string" ? entry : entry.path)),
path: AbsolutePath.make(
localPath(directory, global.home, typeof entry === "string" ? entry : entry.path),
),
})
: new Reference.GitSource({
type: "git",

View File

@ -627,6 +627,4 @@ export const layer = Layer.effect(
}),
)
export const locationLayer = layer.pipe(
Layer.provide(Ripgrep.defaultLayer),
)
export const locationLayer = layer.pipe(Layer.provide(Ripgrep.defaultLayer))

View File

@ -13,11 +13,7 @@ import { tmpdir } from "./fixture/tmpdir"
import { location } from "./fixture/location"
import { it } from "./lib/effect"
function provide(
directory: string,
filesystem = FSUtil.defaultLayer,
data = Global.Path.data,
) {
function provide(directory: string, filesystem = FSUtil.defaultLayer, data = Global.Path.data) {
return Effect.provide(
FileSystem.layer.pipe(
Layer.provide(
@ -447,5 +443,4 @@ describe("FileSystem", () => {
}).pipe(provide(directory)),
),
)
})

View File

@ -44,7 +44,11 @@ describe("Reference", () => {
yield* update((editor) => editor.add("sdk", source))
expect(yield* references.list()).toEqual([
new Reference.Info({ name: "sdk", path: AbsolutePath.make(Repository.cachePath(Global.Path.repos, repository)), source }),
new Reference.Info({
name: "sdk",
path: AbsolutePath.make(Repository.cachePath(Global.Path.repos, repository)),
source,
}),
])
}).pipe(
Effect.scoped,

View File

@ -139,9 +139,7 @@ export const layer = Layer.effect(
const resolvePromptParts = Effect.fn("SessionPrompt.resolvePromptParts")(function* (template: string) {
const ctx = yield* InstanceState.context
const parts: Types.DeepMutable<PromptInput["parts"]> = [
{ type: "text", text: template },
]
const parts: Types.DeepMutable<PromptInput["parts"]> = [{ type: "text", text: template }]
const files = ConfigMarkdown.files(template)
const seen = new Set<string>()
yield* Effect.forEach(

View File

@ -32,23 +32,23 @@ describe("reference HttpApi", () => {
const body = await response.json()
expect(body).toMatchObject({ location: { directory: tmp.path } })
expect(body.data).toEqual([
{
name: "docs",
{
name: "docs",
path: path.join(tmp.path, "docs"),
source: {
type: "local",
path: path.join(tmp.path, "docs"),
source: {
type: "local",
path: path.join(tmp.path, "docs"),
},
},
{
name: "effect",
path: path.join(Global.Path.repos, "github.com", "Effect-TS", "effect"),
source: {
type: "git",
repository: "Effect-TS/effect",
branch: "main",
},
},
{
name: "effect",
path: path.join(Global.Path.repos, "github.com", "Effect-TS", "effect"),
source: {
type: "git",
repository: "Effect-TS/effect",
branch: "main",
},
])
},
])
})
})

View File

@ -133,5 +133,4 @@ describe("tool.glob", () => {
}
}),
)
})

View File

@ -203,5 +203,4 @@ describe("tool.grep", () => {
expect(requests.find((req) => req.permission === "external_directory")).toBeUndefined()
}),
)
})

View File

@ -254,7 +254,6 @@ describe("tool.read external_directory permission", () => {
expect(ext).toBeUndefined()
}),
)
})
describe("tool.read env file permissions", () => {

View File

@ -12316,6 +12316,9 @@
{
"$ref": "#/components/schemas/EventPermissionV2Replied"
},
{
"$ref": "#/components/schemas/EventReferenceUpdated"
},
{
"$ref": "#/components/schemas/EventFileWatcherUpdated"
},
@ -16259,6 +16262,25 @@
"required": ["id", "type", "properties"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_"
},
"type": {
"type": "string",
"enum": ["reference.updated"]
},
"properties": {
"type": "object",
"properties": {}
}
},
"required": ["id", "type", "properties"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
@ -27673,6 +27695,25 @@
"required": ["id", "type", "properties"],
"additionalProperties": false
},
"EventReferenceUpdated": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_"
},
"type": {
"type": "string",
"enum": ["reference.updated"]
},
"properties": {
"type": "object",
"properties": {}
}
},
"required": ["id", "type", "properties"],
"additionalProperties": false
},
"EventFileWatcherUpdated": {
"type": "object",
"properties": {

View File

@ -60,7 +60,8 @@ export function createFetch(override?: FetchHandler) {
if (url.pathname === "/experimental/console") return json({ consoleManagedProviders: [], switchableOrgCount: 0 })
if (url.pathname === "/path") return json({ home: "", state: "", config: "", worktree, directory })
if (url.pathname === "/project/current") return json({ id: "proj_test" })
if (url.pathname === "/api/reference") return json({ location: { directory, project: { id: "proj_test", directory } }, data: [] })
if (url.pathname === "/api/reference")
return json({ location: { directory, project: { id: "proj_test", directory } }, data: [] })
if (url.pathname === "/provider") return json({ all: [], default: {}, connected: [] })
if (url.pathname === "/session") return json([])
if (url.pathname === "/vcs") return json({ branch: "main" })