mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-13 23:52:06 +00:00
chore: generate
This commit is contained in:
@@ -475,9 +475,9 @@ it.instance("resolves keybind lookup from canonical keybinds", () =>
|
||||
expect(config.keybinds.get("dialog.mcp.toggle")?.[0]?.key).toBe("ctrl+t")
|
||||
expect(config.keybinds.get("model.dialog.favorite")?.[0]?.key).toBe("ctrl+f")
|
||||
expect(config.keybinds.get("dialog.plugins.install")?.[0]?.key).toBe("shift+i")
|
||||
expect(config.keybinds.gather("plugins.dialog", ["dialog.plugins.install"]).map((binding) => binding.cmd)).toEqual([
|
||||
"dialog.plugins.install",
|
||||
])
|
||||
expect(
|
||||
config.keybinds.gather("plugins.dialog", ["dialog.plugins.install"]).map((binding) => binding.cmd),
|
||||
).toEqual(["dialog.plugins.install"])
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -169,8 +169,9 @@ function firstEvent(open: (signal: AbortSignal) => Promise<{ stream: AsyncIterat
|
||||
(controller) => Effect.sync(() => controller.abort()),
|
||||
).pipe(
|
||||
Effect.flatMap((controller) =>
|
||||
Effect.acquireRelease(call(() => open(controller.signal)), (events) =>
|
||||
call(async () => void (await events.stream.return?.(undefined))).pipe(Effect.ignore),
|
||||
Effect.acquireRelease(
|
||||
call(() => open(controller.signal)),
|
||||
(events) => call(async () => void (await events.stream.return?.(undefined))).pipe(Effect.ignore),
|
||||
).pipe(
|
||||
Effect.flatMap((events) =>
|
||||
call(() => events.stream.next()).pipe(
|
||||
@@ -234,7 +235,7 @@ function httpapiInstance<A, E>(
|
||||
name,
|
||||
Effect.gen(function* () {
|
||||
const instance = yield* TestInstance
|
||||
yield* (options.setup?.(instance.directory) ?? Effect.void)
|
||||
yield* options.setup?.(instance.directory) ?? Effect.void
|
||||
return yield* run({ sdk: client(options.serverPath, instance.directory), directory: instance.directory })
|
||||
}),
|
||||
{ git: options.git ?? true, config: { formatter: false, lsp: false, ...options.config } },
|
||||
@@ -255,17 +256,27 @@ function serverPathParity<A, E>(name: string, scenario: (serverPath: ServerPath)
|
||||
|
||||
function withProject<A, E, E2 = never>(
|
||||
serverPath: ServerPath,
|
||||
options: { git?: boolean; config?: Partial<Config.Info>; setup?: (dir: string) => Effect.Effect<void, E2, TestServices> },
|
||||
options: {
|
||||
git?: boolean
|
||||
config?: Partial<Config.Info>
|
||||
setup?: (dir: string) => Effect.Effect<void, E2, TestServices>
|
||||
},
|
||||
run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>,
|
||||
) {
|
||||
return Effect.gen(function* () {
|
||||
const directory = yield* tmpdirScoped({ git: options.git ?? true, config: { formatter: false, lsp: false, ...options.config } })
|
||||
yield* (options.setup?.(directory) ?? Effect.void)
|
||||
const directory = yield* tmpdirScoped({
|
||||
git: options.git ?? true,
|
||||
config: { formatter: false, lsp: false, ...options.config },
|
||||
})
|
||||
yield* options.setup?.(directory) ?? Effect.void
|
||||
return yield* run({ sdk: client(serverPath, directory), directory })
|
||||
})
|
||||
}
|
||||
|
||||
function withStandardProject<A, E>(serverPath: ServerPath, run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>) {
|
||||
function withStandardProject<A, E>(
|
||||
serverPath: ServerPath,
|
||||
run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>,
|
||||
) {
|
||||
return withProject(serverPath, { setup: writeStandardFiles }, run)
|
||||
}
|
||||
|
||||
|
||||
@@ -1337,6 +1337,18 @@ export type Model = {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
tiers?: Array<{
|
||||
input: number
|
||||
output: number
|
||||
cache: {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
tier: {
|
||||
type: "context"
|
||||
size: number
|
||||
}
|
||||
}>
|
||||
experimentalOver200K?: {
|
||||
input: number
|
||||
output: number
|
||||
|
||||
@@ -12641,6 +12641,49 @@
|
||||
"required": ["read", "write"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"tiers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "number"
|
||||
},
|
||||
"output": {
|
||||
"type": "number"
|
||||
},
|
||||
"cache": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"read": {
|
||||
"type": "number"
|
||||
},
|
||||
"write": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["read", "write"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"tier": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["context"]
|
||||
},
|
||||
"size": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["type", "size"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["input", "output", "cache", "tier"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"experimentalOver200K": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user