fix: explicit output if command is not supported

This commit is contained in:
mingholy.lmh 2025-12-26 17:47:35 +08:00
parent 7f645b9726
commit 5d59ceb6f3
7 changed files with 336 additions and 34 deletions

View file

@ -205,13 +205,19 @@ export async function runNonInteractive(
return;
}
case 'stream_messages':
// ACP exclusive - should not reach here in non-interactive mode
throw new FatalInputError(
'Stream messages mode is not supported in non-interactive CLI',
);
break;
case 'unsupported':
throw new FatalInputError(slashCommandResult.reason);
case 'unsupported': {
await emitNonInteractiveFinalMessage({
message: slashCommandResult.reason,
isError: true,
adapter,
config,
startTimeMs: startTime,
});
return;
}
case 'no_command':
break;
default: {