Roo-Code/webview-ui/src
RussellZager 618aa6652b
Inline terminal rendering parity with the VSCode Terminal (#11361)
* 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>
2026-02-20 00:19:56 -07:00
..
__tests__ feat: show aggregated +/− line counts in FileChangesPanel header (#11618) 2026-02-19 23:22:20 -07:00
components Inline terminal rendering parity with the VSCode Terminal (#11361) 2026-02-20 00:19:56 -07:00
context feat: remove Roomote Control from extension (#11271) 2026-02-19 16:33:39 -08:00
hooks fix(chat): redesign rehydration scroll lifecycle (#11483) 2026-02-18 23:51:12 -07:00
i18n feat: remove Roomote Control from extension (#11271) 2026-02-19 16:33:39 -08:00
lib Add shadcn/ui + Storybook 2025-01-30 12:50:09 -08:00
oauth Remove Glama provider (#9801) 2025-12-10 14:08:29 -08:00
utils Reapply Batches 3-4: Skills, browser removal, provider removals (6 major-conflict cherry-picks) (#11475) 2026-02-14 22:06:24 -07:00
vite-plugins fix: prevent empty mode names from being saved (fixes #5766) (#5767) 2025-08-04 11:03:34 -07:00
App.tsx ux: improve worktree selector and creation UX (#10940) 2026-01-24 22:06:37 +00:00
index.css Reapply Batches 3-4: Skills, browser removal, provider removals (6 major-conflict cherry-picks) (#11475) 2026-02-14 22:06:24 -07:00
index.tsx PNPM + Turbo monorepo + Nightly releases (#3407) 2025-05-21 21:01:20 -07:00
preflight.css Bring most of Tailwind's preflight.css back 2025-02-03 12:18:28 -08:00
types.d.ts Welcome page OAuth (#1913) 2025-03-23 10:08:16 -04:00
vite-env.d.ts Remove lucide 2025-01-30 14:47:59 -08:00