opencode/packages/plugin/src/example.ts
Dax Raad b8a73fb575 feat: add opentui interface for opencode
- Add comprehensive TUI interface with React Ink components
- Implement session management, model selection, and command dialogs
- Add theme system with customizable colors and styling
- Integrate with existing opencode server and SDK
- Add todo management and file browsing capabilities
- Include proper TypeScript support and error handling
2025-09-22 01:31:58 -04:00

18 lines
390 B
TypeScript

import { Plugin } from "./index"
import { tool } from "./tool"
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}!`
},
}),
},
}
}