Update extensions/cli/src/commands/chat.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
c081764e0c
commit
e0da466987
1 changed files with 1 additions and 1 deletions
|
|
@ -446,7 +446,7 @@ async function runHeadlessMode(
|
|||
): Promise<void> {
|
||||
// Critical validation: Ensure we have a prompt in headless mode
|
||||
// This prevents the CLI from hanging in TTY-less environments
|
||||
if (!prompt) {
|
||||
if (!prompt && !options.prompt?.length && !options.agent) {
|
||||
throw new Error(
|
||||
'Headless mode requires a prompt. Use: cn -p "your prompt"\n' +
|
||||
'Or pipe input: echo "prompt" | cn -p\n' +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue