chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-13 01:45:20 +00:00
parent c2b1ebd9dc
commit c9df833d2c
4 changed files with 76 additions and 10 deletions

View File

@@ -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"])
}),
),
)

View File

@@ -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)
}