mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-19 00:01:19 +00:00
* fix: render ANSI escape codes in inline terminal output Fixes #10699 ## Problem The inline terminal output displayed raw ANSI bracket codes ([1m, [32m, etc.) instead of rendering colors and formatting. This was caused by: 1. Backend: strip-ansi removing the ESC byte but leaving bracket remnants 2. Frontend: CodeBlock/Shiki having no ANSI rendering capability ## Solution 1. Backend: Replace strip-ansi with targeted removal of only VSCode shell integration sequences (OSC 633/133), preserving standard ANSI SGR codes 2. Frontend: Add new TerminalOutput component using ansi-to-html library that converts ANSI sequences to styled HTML spans 3. Map ANSI colors to VSCode terminal theme CSS variables for consistent theming across light/dark themes ## Testing - Verified XSS prevention (escapeXML: true) - Verified theme compatibility - Added unit tests for both backend and frontend changes - Updated existing tests to expect ANSI codes in output Bundle size impact: ~3KB gzipped (ansi-to-html library) Co-authored-by: Zman771 <605281+Zman771@users.noreply.github.com> * fix: add eslint-disable for intentional ANSI control regex --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Zman771 <605281+Zman771@users.noreply.github.com> Co-authored-by: Russell Zager <rzager@google.com> |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| __tests__ | ||
| activate | ||
| api | ||
| assets | ||
| core | ||
| extension | ||
| i18n | ||
| integrations | ||
| services | ||
| shared | ||
| types | ||
| utils | ||
| workers | ||
| .gitignore | ||
| .prettierignore | ||
| .vscodeignore | ||
| esbuild.mjs | ||
| eslint.config.mjs | ||
| extension.ts | ||
| package.json | ||
| package.nls.ca.json | ||
| package.nls.de.json | ||
| package.nls.es.json | ||
| package.nls.fr.json | ||
| package.nls.hi.json | ||
| package.nls.id.json | ||
| package.nls.it.json | ||
| package.nls.ja.json | ||
| package.nls.json | ||
| package.nls.ko.json | ||
| package.nls.nl.json | ||
| package.nls.pl.json | ||
| package.nls.pt-BR.json | ||
| package.nls.ru.json | ||
| package.nls.tr.json | ||
| package.nls.vi.json | ||
| package.nls.zh-CN.json | ||
| package.nls.zh-TW.json | ||
| tsconfig.json | ||
| turbo.json | ||
| vitest.config.ts | ||
| vitest.setup.ts | ||