/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/plugin/src/example.ts
18 строк
397 B
Kit Langton
fix: prefix 32 unused parameters with underscore (#22694)
16 апр 2026, 04:56
Не верифицирован
16 апр 2026, 04:56
d6b14e2
Код
Авторство
О чём код?
import { Plugin } from "./index.js" import { tool } from "./tool.js" export const ExamplePlugin: Plugin = async (_ctx) => { return { tool: { mytool: tool({ description: "This is a custom tool", args: { foo: tool.schema.string().describe("foo"), }, async execute(args) { return `Hello ${args.foo}!` }, }), }, } }