Previously, typing "/org" would hide the suggestion immediately upon
completion. Now suggestions only disappear when user presses space
or Enter, making it clearer that the command is available to execute.
Fixes UX issue where users lose visual confirmation of valid commands.
Fix service initialization race condition where getAllTools() would return
all tools when ToolPermissionService wasn't ready, causing plan mode to
incorrectly include excluded tools like Bash.
The issue occurred in GitHub Actions where `cn -p` (plan mode) should exclude
Bash tool, but due to timing issues, Bash was being presented to the LLM and
then failing during execution with permission errors.
Changes:
- Fix getAllTools() to properly pass permissions to filterExcludedTools()
- Throw descriptive error when service not initialized instead of fallback
- Add comprehensive regression tests covering all modes and edge cases
Fixes automated PR review failures in GitHub Actions workflows.
Add --silent flag to headless mode (-p/--print) that removes <think></think>
tags and excess whitespace from LLM responses. This enables clean output
suitable for shell piping and automation.
## Why --silent instead of --no-think
The flag was renamed from --no-think to --silent because:
- Commander.js treats --no- prefix as negation flags, expecting a base --think option
- --silent provides clearer semantic meaning for "quiet, clean output"
- Follows Unix convention where --silent typically means suppress extra output
## Problem Solved
Many models (like Nemotron - Llama 3.3 Nemotron Super 49B v1.5) emit <think></think>
tags that interfere with shell piping:
Without --silent:
```
$ cn -p "Echo a shell script that prints 'Hello World' Output only the script and NOTHING ELSE. No code fences. No markdown."
<think>
I need to write a shell script. Let me think about this.
The user wants a simple Hello World script.
</think>
#\!/bin/bash
echo "Hello World"
```
With --silent:
```
$ cn -p --silent "Echo a shell script that prints 'Hello World' Output only the script and NOTHING ELSE. No code fences. No markdown."
#\!/bin/bash
echo "Hello World"
```
This makes piping work correctly:
```
$ eval $(cn -p --silent "Write a shell script that prints 'Hello World'")
Hello World
```
## Features
- Strips all <think></think> blocks and their content
- Reduces excessive whitespace (3+ consecutive newlines become 2)
- Works with --format json flag
- Includes comprehensive unit and e2e tests
- Only available with -p/--print flag (headless mode)