mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
- Bump `@opencode-ai/plugin` dependency from 1.2.27 to 1.3.0. - Introduce `cleanup` command in CLI with force and remote options. - Export `cleanupMultiModel` from core index. - Register `multi-model-cleanup` tool in plugin and update exports. - Add `CleanupOptions` and `CleanupResult` types to define cleanup behavior and results.
36 lines
996 B
TypeScript
36 lines
996 B
TypeScript
import type { Plugin } from "@opencode-ai/plugin";
|
|
import { cleanupTool } from "./tools/cleanup";
|
|
import { closeTool } from "./tools/close";
|
|
import { openTool } from "./tools/open";
|
|
|
|
/**
|
|
* OpenCode plugin that provides multi-model tmux session management tools.
|
|
*
|
|
* Registers three tools:
|
|
* - `multi-model-open`: Launch multiple AI models in a tmux session
|
|
* - `multi-model-close`: Close a multi-model session and cleanup resources
|
|
* - `multi-model-cleanup`: Delete all archive tags from local and remote repositories
|
|
*
|
|
* @example
|
|
* ```json
|
|
* // opencode.json
|
|
* {
|
|
* "plugin": ["@username/opencode-multi-model"]
|
|
* }
|
|
* ```
|
|
*/
|
|
const OpenCodeMultiModelPlugin: Plugin = async (_ctx) => {
|
|
return {
|
|
tool: {
|
|
"multi-model-open": openTool,
|
|
"multi-model-close": closeTool,
|
|
"multi-model-cleanup": cleanupTool,
|
|
},
|
|
};
|
|
};
|
|
|
|
export default OpenCodeMultiModelPlugin;
|
|
export * from "./core/index";
|
|
export * from "./types";
|
|
export { cleanupTool, closeTool, openTool };
|