Sanitize shell output by removing Unicode Format characters and lone
surrogates that crash string-width. This fixes crashes when running
commands like curl that download binary files.
Anthropic (via LiteLLM/proxy) requires the `tools` parameter to be
present when messages include tool_calls or tool role messages,
even if no tools are currently being provided.
This adds a `hasToolHistory()` helper to detect if the conversation
contains tool calls or tool results, and ensures `tools: []` is
included in the request params when needed.
Fixes#149🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-50-87.us-west-2.compute.internal>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add 'xhigh' to ThinkingLevel type in ai and agent packages
- Map xhigh to reasoning_effort: 'max' for OpenAI providers
- Add thinkingXhigh color token to theme schema and built-in themes
- Show xhigh option only when using codex-max models
- Update CHANGELOG for both ai and coding-agent packages
closes#143
- read: actionable notices with offset for continuation
- First line > 30KB: return empty + bash command suggestion
- Hit limit: '[Showing lines X-Y of Z. Use offset=N to continue]'
- bash: tail truncation with temp file
- Notice includes line range + temp file path
- Edge case: last line > 30KB shows partial
- grep: pre-truncate match lines to 500 chars
- '[... truncated]' suffix on long lines
- Notice for match limit and line truncation
- find/ls: result/entry limit notices
- '[N results limit reached. Use limit=M for more]'
- All notices now in text content (LLM sees them)
- TUI simplified (notices render as part of output)
- Never return partial lines (except bash edge case)
- Add truncate.ts utility with truncateHead/truncateTail functions
- Both respect 2000 line and 30KB limits (whichever hits first)
- read: head truncation, returns truncation info in details
- bash: tail truncation, writes full output to temp file if large
- grep: head truncation + 100 match limit
- find: head truncation + 1000 result limit
- ls: head truncation + 500 entry limit
- tool-execution.ts displays truncation notices in warning color
- All tools return clean output + structured truncation in details