Roo-Code/webview-ui/src/components
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
..
chat feat: syntax highlighting terminal output with Shiki (#3021) 2025-04-28 19:54:10 -07:00
common feat: syntax highlighting terminal output with Shiki (#3021) 2025-04-28 19:54:10 -07:00
history UI top down homescreen (#2951) 2025-04-25 22:39:11 -04:00
human-relay fix: Adjust the style of the HumanRelayDialog component to increase the maximum height and spacing of the content area (#1791) 2025-03-19 00:09:04 -04:00
mcp Refactor: Use path aliases in webview source files. (#2801) 2025-04-20 21:38:08 -04:00
prompts Remove unused ClineSay and -Ask type variants (#2061) 2025-04-28 12:33:16 -07:00
settings feat: Add Reasoning Effort setting for OpenAI Compatible provider (#2906) 2025-04-28 13:36:47 -07:00
ui Fix all linter errors (and fix the lint scripts too) (#2958) 2025-04-26 09:45:26 -07:00
welcome Feat: Add a new button to import settings on the welcome screen (#2811) 2025-04-28 16:07:35 -07:00