mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
build: add biome formatter and linter
This commit is contained in:
+18
-4
@@ -8,11 +8,25 @@ import { closeMultiModel } from "../core/close";
|
||||
* creates archive tags, and deletes associated branches.
|
||||
*/
|
||||
export const closeTool = tool({
|
||||
description: "Close a multi-model tmux session and optionally cleanup worktrees and branches",
|
||||
description:
|
||||
"Close a multi-model tmux session and optionally cleanup worktrees and branches",
|
||||
args: {
|
||||
sessionName: tool.schema.string().min(1).describe("tmux session name to close"),
|
||||
cleanupWorktrees: tool.schema.boolean().default(true).describe("whether to remove worktrees and delete branches (default: true)"),
|
||||
createArchiveTags: tool.schema.boolean().default(true).describe("whether to create archive tags before deleting branches (default: true)"),
|
||||
sessionName: tool.schema
|
||||
.string()
|
||||
.min(1)
|
||||
.describe("tmux session name to close"),
|
||||
cleanupWorktrees: tool.schema
|
||||
.boolean()
|
||||
.default(true)
|
||||
.describe(
|
||||
"whether to remove worktrees and delete branches (default: true)",
|
||||
),
|
||||
createArchiveTags: tool.schema
|
||||
.boolean()
|
||||
.default(true)
|
||||
.describe(
|
||||
"whether to create archive tags before deleting branches (default: true)",
|
||||
),
|
||||
},
|
||||
async execute(args, context) {
|
||||
// In plugin mode, we skip confirmation (force=true) since there's no interactive terminal
|
||||
|
||||
+8
-2
@@ -11,7 +11,10 @@ import { getBinaryName } from "../core/utils";
|
||||
export const openTool = tool({
|
||||
description: "Launch multiple OpenCode models in tmux",
|
||||
args: {
|
||||
sessionName: tool.schema.string().min(1).describe("tmux session name to create"),
|
||||
sessionName: tool.schema
|
||||
.string()
|
||||
.min(1)
|
||||
.describe("tmux session name to create"),
|
||||
models: tool.schema
|
||||
.array(tool.schema.string().min(1))
|
||||
.min(1)
|
||||
@@ -39,6 +42,9 @@ export const openTool = tool({
|
||||
return result.error!;
|
||||
}
|
||||
|
||||
return result.instructions || `Created session "${result.sessionName}" with ${result.windows?.length || 0} windows`;
|
||||
return (
|
||||
result.instructions ||
|
||||
`Created session "${result.sessionName}" with ${result.windows?.length || 0} windows`
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user