Roo-Code/webview-ui/src
KJ7LNW 8b072ad126
feat: syntax highlighting terminal output with Shiki (#3021)
* feat: syntax highlighting terminal output with Shiki

Refactored CommandExecution.tsx to:
- Implement CodeBlock component for terminal display
- Use Shiki for syntax highlighting of shell commands and terminal output

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* ui: present same compressed command output that the model will receive

Avoids rendering problems and performance regressions:
- Compresses output using BaseTerminal.compressTerminalOutput
- Eliminates need for Virtuoso by limiting output size

Ensures command output shown in UI matches the compressed format provided to the model:
- Applies same BaseTerminal.compressTerminalOutput processing
- Uses configured terminalOutputLineLimit for consistency

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* test: update CommandExecution tests to use CodeBlock mock

- Replace virtuoso mock with CodeBlock mock to fix shiki import error
- Update CodeBlock mock to properly handle source prop
- Add proper empty output test case verification
- Keep original test values and structure

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

---------

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-04-28 19:54:10 -07:00
..
__mocks__ feat: Add shift-click to append suggestions to text area (#2081) 2025-03-30 23:35:02 -04:00
__tests__ Remove unused ClineSay and -Ask type variants (#2061) 2025-04-28 12:33:16 -07:00
components feat: syntax highlighting terminal output with Shiki (#3021) 2025-04-28 19:54:10 -07:00
context Add support for multiple command execution strategies (#2820) 2025-04-28 08:55:07 -07:00
i18n Feat: Add a new button to import settings on the welcome screen (#2811) 2025-04-28 16:07:35 -07:00
lib Add shadcn/ui + Storybook 2025-01-30 12:50:09 -08:00
oauth Welcome page OAuth (#1913) 2025-03-23 10:08:16 -04:00
stories Remove ModelInfo objects from settings (#2939) 2025-04-25 15:23:25 -07:00
utils Overhaul CodeBlock rendering (#3019) 2025-04-28 17:10:57 -07:00
App.tsx UI top down homescreen (#2951) 2025-04-25 22:39:11 -04:00
index.css Add a warning display when a system prompt override is active (#2804) 2025-04-20 23:28:19 -04:00
index.tsx Overhaul CodeBlock rendering (#3019) 2025-04-28 17:10:57 -07:00
preflight.css Bring most of Tailwind's preflight.css back 2025-02-03 12:18:28 -08:00
setupTests.ts Fix context window bar color (#2733) 2025-04-17 23:25:35 -04: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