mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
feat: add required mode flag to cleanup and close
- Made `mode` a mandatory property in `MultiModelOptions`, `CloseSessionOptions`, and `CleanupOptions`. - Updated function signatures to accept `mode` and removed default empty option objects where appropriate. - Passed `mode: "cli"` from CLI commands and `mode: "tool"` from tool commands to cleanup, close, and open operations. - Adjusted internal handling to use the provided `mode` (removed fallback defaults). - Updated type definitions and added documentation for the new `mode` field.
This commit is contained in:
+5
-1
@@ -9,7 +9,7 @@ export interface MultiModelOptions {
|
||||
/** Binary name to use ('opencode' or 'kilo'). Defaults to 'opencode'. */
|
||||
binaryName?: string;
|
||||
/** Caller context: 'cli' shows shell commands, 'tool' shows tool instructions. */
|
||||
mode?: "cli" | "tool";
|
||||
mode: "cli" | "tool";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,6 +40,8 @@ export interface CloseSessionOptions {
|
||||
cleanupWorktrees?: boolean;
|
||||
/** Skip confirmation prompts. */
|
||||
force?: boolean;
|
||||
/** Caller context: 'cli' shows shell commands, 'tool' shows tool instructions. */
|
||||
mode: "cli" | "tool";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,6 +89,8 @@ export interface CleanupOptions {
|
||||
* - If false: only local cleanup (--no-remote flag)
|
||||
*/
|
||||
remote?: string | false;
|
||||
/** Caller context: 'cli' shows shell commands, 'tool' shows tool instructions. */
|
||||
mode: "cli" | "tool";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user