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.
- 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
- Added totalTokens field to Usage interface in pi-ai
- Anthropic: computed as input + output + cacheRead + cacheWrite
- OpenAI/Google: uses native total_tokens/totalTokenCount
- Fixed openai-completions to compute totalTokens when reasoning tokens present
- Updated calculateContextTokens() to use totalTokens field
- Added comprehensive test covering 13 providers
fixes#130
- Updated isBunBinary detection to check for %7EBUN (URL-encoded ~BUN)
- Simplified build:binary script to remove Unix-specific shell syntax
- Binary now correctly locates supporting files next to executable on Windows
Editor text wrapping now uses grapheme-aware width calculation instead
of string length. Fixes crash when pasting text containing emojis like
✅ or CJK characters that are 2 terminal columns wide.