mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 21:52:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fabd2f6519 |
+12
-6
@@ -8,6 +8,8 @@ import type {
|
|||||||
WorktreeInfo,
|
WorktreeInfo,
|
||||||
} from "../types";
|
} from "../types";
|
||||||
|
|
||||||
|
let sharedSpinner: Ora | undefined;
|
||||||
|
|
||||||
const MAX_SUGGESTIONS = 3;
|
const MAX_SUGGESTIONS = 3;
|
||||||
const WINDOW_NAME_LIMIT = 24;
|
const WINDOW_NAME_LIMIT = 24;
|
||||||
|
|
||||||
@@ -35,17 +37,21 @@ export async function runCommand(
|
|||||||
process.env.NODE_ENV === "test" || process.env.BUN_ENV === "test";
|
process.env.NODE_ENV === "test" || process.env.BUN_ENV === "test";
|
||||||
if (options?.mode === "cli" && !isTest) {
|
if (options?.mode === "cli" && !isTest) {
|
||||||
const msg = options.spinnerMsg || `Running ${parts[0]}...`;
|
const msg = options.spinnerMsg || `Running ${parts[0]}...`;
|
||||||
spinner = ora(msg).start();
|
if (!sharedSpinner) {
|
||||||
|
sharedSpinner = ora(msg).start();
|
||||||
|
} else {
|
||||||
|
sharedSpinner.text = msg;
|
||||||
|
if (!sharedSpinner.isSpinning) {
|
||||||
|
sharedSpinner.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spinner = sharedSpinner;
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await Bun.$`${parts}`.quiet().nothrow();
|
const result = await Bun.$`${parts}`.quiet().nothrow();
|
||||||
|
|
||||||
if (spinner) {
|
if (spinner) {
|
||||||
if (result.exitCode === 0) {
|
spinner.stop().clear();
|
||||||
spinner.succeed();
|
|
||||||
} else {
|
|
||||||
spinner.fail();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user