mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
build: color-code open output
This commit is contained in:
+19
-11
@@ -1,4 +1,5 @@
|
||||
import * as fs from "node:fs";
|
||||
import chalk from 'chalk';
|
||||
import type { MultiModelOptions, MultiModelResult } from "../types";
|
||||
import {
|
||||
runCommand,
|
||||
@@ -201,13 +202,17 @@ export async function openMultiModel(options: MultiModelOptions): Promise<MultiM
|
||||
sessionName,
|
||||
windows: windowNames,
|
||||
instructions: [
|
||||
`Error: Created tmux session '${sessionName}', but some model launches failed.`,
|
||||
`Succeeded: ${succeededModels.length > 0 ? succeededModels.join(", ") : "none"}.`,
|
||||
`Failed: ${failedModels.join(", ")}.`,
|
||||
`Attach with \`${attachCommand}\` to inspect the session.`,
|
||||
`Cleanup when done using either:`,
|
||||
`1. ${primaryCleanup}`,
|
||||
`2. Or run manually: \`${cleanupCommand}\``,
|
||||
chalk.red(`Error: Created tmux session '${sessionName}', but some model launches failed.`),
|
||||
chalk.red(`Failed: ${failedModels.join(", ")}.`),
|
||||
chalk.dim(`Succeeded: ${succeededModels.length > 0 ? succeededModels.join(", ") : "none"}.`),
|
||||
"",
|
||||
chalk.bold(`Attach with \`${attachCommand}\` to inspect the session.`),
|
||||
"",
|
||||
chalk.dim(`When finished, clean up using:`),
|
||||
primaryCleanup,
|
||||
"",
|
||||
chalk.dim(`Alternate manual cleanup - `),
|
||||
chalk.dim(cleanupCommand)
|
||||
].join("\n"),
|
||||
};
|
||||
}
|
||||
@@ -217,10 +222,13 @@ export async function openMultiModel(options: MultiModelOptions): Promise<MultiM
|
||||
sessionName,
|
||||
windows: windowNames,
|
||||
instructions: [
|
||||
`Use \`${attachCommand}\` to join session.`,
|
||||
`When finished, clean up using either:`,
|
||||
`1. ${primaryCleanup}`,
|
||||
`2. Or run manually: \`${cleanupCommand}\``,
|
||||
chalk.bold(`Use \`${attachCommand}\` to join session.`),
|
||||
"",
|
||||
chalk.dim(`When finished, clean up using:`),
|
||||
primaryCleanup,
|
||||
"",
|
||||
chalk.dim(`Alternate manual cleanup - `),
|
||||
chalk.dim(cleanupCommand)
|
||||
].join("\n"),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user