mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
fix(coding-agent): suppress informational output in non-interactive modes
In -p, --mode json, and --mode rpc modes, don't print informational messages like 'Loaded project context from:' or model restore messages. Only the actual output should be printed.
This commit is contained in:
parent
b49a017c55
commit
56450a4f19
2 changed files with 11 additions and 227 deletions
|
|
@ -745,7 +745,9 @@ export async function main(args: string[]) {
|
|||
// Having initial messages doesn't make it non-interactive anymore
|
||||
const isInteractive = !parsed.print && parsed.mode === undefined;
|
||||
const mode = parsed.mode || "text";
|
||||
const shouldPrintMessages = isInteractive || mode === "text";
|
||||
// Only print informational messages in interactive mode
|
||||
// Non-interactive modes (-p, --mode json, --mode rpc) should be silent except for output
|
||||
const shouldPrintMessages = isInteractive;
|
||||
|
||||
// Non-interactive mode: fail early if no model available
|
||||
if (!isInteractive && !initialModel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue