mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
Impl: tool-npm-package
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import type { Plugin } from "@opencode-ai/plugin";
|
||||
import { openTool } from "./tools/open";
|
||||
import { closeTool } from "./tools/close";
|
||||
|
||||
/**
|
||||
* OpenCode plugin that provides multi-model tmux session management tools.
|
||||
*
|
||||
* Registers two tools:
|
||||
* - `multi-model-open`: Launch multiple AI models in a tmux session
|
||||
* - `multi-model-close`: Close a multi-model session and cleanup resources
|
||||
*
|
||||
* @example
|
||||
* ```json
|
||||
* // opencode.json
|
||||
* {
|
||||
* "plugin": ["@username/opencode-multi-model"]
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
const OpenCodeMultiModelPlugin: Plugin = async (_ctx) => {
|
||||
return {
|
||||
tool: {
|
||||
"multi-model-open": openTool,
|
||||
"multi-model-close": closeTool,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default OpenCodeMultiModelPlugin;
|
||||
export { openTool, closeTool };
|
||||
export * from "./core/index";
|
||||
export * from "./types";
|
||||
Reference in New Issue
Block a user