feat: wire the fastCRW provider into the plugin entry

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
haylanandClaude Bot committed 2026-10-03 19:27:04 +02:00
1 parent bdac7ddf17
commit bcb6dfbe8c
3 files changed
+80 -3

No files matched your search

+19 -2
View File
@@ -1,2 +1,19 @@
// ponytail: placeholder so `tsc` has an input; replaced by the plugin entry.
export {}
import { Plugin } from "@opencode/plugin"
import { resolveConfig } from "./config.ts"
import { search } from "./search.ts"
export default Plugin.define({
id: "fastcrw.websearch",
async setup(ctx) {
// Throws on bad options so a misconfigured plugin fails loudly instead of silently searching elsewhere.
const config = resolveConfig(ctx.options, process.env)
await ctx.websearch.transform((editor) => {
editor.add({
id: "fastcrw",
name: "fastCRW",
execute: ({ query }, { signal }) => search(config, query, signal),
})
editor.default.set("fastcrw")
})
},
})