mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
refactor: rename launchMultiModel to openMultiModel
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bun
|
||||
import { Command } from "commander";
|
||||
import { launchMultiModel } from "./core/open";
|
||||
import { openMultiModel } from "./core/open";
|
||||
import { closeMultiModel } from "./core/close";
|
||||
import { getBinaryName } from "./core/utils";
|
||||
|
||||
@@ -21,7 +21,7 @@ program
|
||||
try {
|
||||
const binaryName = options.binary || getBinaryName();
|
||||
|
||||
const result = await launchMultiModel({
|
||||
const result = await openMultiModel({
|
||||
sessionName,
|
||||
models: options.models,
|
||||
binaryName,
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
export { launchMultiModel } from "./open";
|
||||
export { openMultiModel } from "./open";
|
||||
export { closeMultiModel } from "./close";
|
||||
export * from "./utils";
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import {
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const result = await launchMultiModel({
|
||||
* const result = await openMultiModel({
|
||||
* sessionName: "compare",
|
||||
* models: ["openai/gpt-5.2", "anthropic/claude-3-5-sonnet"],
|
||||
* binaryName: "opencode",
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export async function launchMultiModel(options: MultiModelOptions): Promise<MultiModelResult> {
|
||||
export async function openMultiModel(options: MultiModelOptions): Promise<MultiModelResult> {
|
||||
const sessionName = options.sessionName.trim();
|
||||
const safeSessionName = sanitizeName(sessionName);
|
||||
const models = normalizeModels(options.models);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { tool } from "@opencode-ai/plugin";
|
||||
import { launchMultiModel } from "../core/open";
|
||||
import { openMultiModel } from "../core/open";
|
||||
import { getBinaryName } from "../core/utils";
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,7 @@ export const openTool = tool({
|
||||
async execute(args, context) {
|
||||
const binaryName = getBinaryName();
|
||||
|
||||
const result = await launchMultiModel({
|
||||
const result = await openMultiModel({
|
||||
sessionName: args.sessionName,
|
||||
models: args.models,
|
||||
binaryName,
|
||||
|
||||
Reference in New Issue
Block a user