mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +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>
110 lines
3.3 KiB
JSON
110 lines
3.3 KiB
JSON
{
|
|
"name": "@roo-code/vscode-webview",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"lint": "eslint src --ext=ts,tsx --max-warnings=0",
|
|
"check-types": "tsc",
|
|
"pretest": "turbo run bundle --cwd ..",
|
|
"test": "vitest run",
|
|
"format": "prettier --write src",
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"build:nightly": "tsc -b && vite build --mode nightly",
|
|
"preview": "vite preview",
|
|
"clean": "rimraf ../src/webview-ui ../apps/vscode-nightly/build/webview-ui tsconfig.tsbuildinfo .turbo"
|
|
},
|
|
"dependencies": {
|
|
"@radix-ui/react-alert-dialog": "^1.1.6",
|
|
"@radix-ui/react-checkbox": "^1.1.5",
|
|
"@radix-ui/react-collapsible": "^1.1.3",
|
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.5",
|
|
"@radix-ui/react-icons": "^1.3.2",
|
|
"@radix-ui/react-popover": "^1.1.6",
|
|
"@radix-ui/react-portal": "^1.1.5",
|
|
"@radix-ui/react-progress": "^1.1.2",
|
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
"@radix-ui/react-select": "^2.1.6",
|
|
"@radix-ui/react-separator": "^1.1.2",
|
|
"@radix-ui/react-slider": "^1.2.3",
|
|
"@radix-ui/react-slot": "^1.1.2",
|
|
"@radix-ui/react-tooltip": "^1.1.8",
|
|
"@roo-code/types": "workspace:^",
|
|
"@tailwindcss/vite": "^4.0.0",
|
|
"@tanstack/react-query": "^5.68.0",
|
|
"@vscode/codicons": "^0.0.36",
|
|
"@vscode/webview-ui-toolkit": "^1.4.0",
|
|
"ansi-to-html": "^0.7.2",
|
|
"axios": "^1.12.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.0.0",
|
|
"date-fns": "^4.1.0",
|
|
"debounce": "^2.1.1",
|
|
"diff": "^5.2.0",
|
|
"fast-deep-equal": "^3.1.3",
|
|
"fzf": "^0.5.2",
|
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
"i18next": "^25.0.0",
|
|
"i18next-http-backend": "^3.0.2",
|
|
"katex": "^0.16.11",
|
|
"knuth-shuffle-seeded": "^1.0.6",
|
|
"lru-cache": "^11.1.0",
|
|
"lucide-react": "^0.518.0",
|
|
"mermaid": "^11.4.1",
|
|
"posthog-js": "^1.227.2",
|
|
"pretty-bytes": "^7.0.0",
|
|
"react": "^18.3.1",
|
|
"react-compiler-runtime": "^1.0.0",
|
|
"react-dom": "^18.3.1",
|
|
"react-i18next": "^15.4.1",
|
|
"react-icons": "^5.5.0",
|
|
"react-markdown": "^9.0.3",
|
|
"react-remark": "^2.1.0",
|
|
"react-textarea-autosize": "^8.5.3",
|
|
"react-use": "^17.5.1",
|
|
"react-virtuoso": "^4.7.13",
|
|
"rehype-highlight": "^7.0.0",
|
|
"rehype-katex": "^7.0.1",
|
|
"remark-gfm": "^4.0.1",
|
|
"remark-math": "^6.0.0",
|
|
"remove-markdown": "^0.6.0",
|
|
"shell-quote": "^1.8.2",
|
|
"shiki": "^3.2.1",
|
|
"source-map": "^0.7.4",
|
|
"stacktrace-js": "^2.0.2",
|
|
"styled-components": "^6.1.13",
|
|
"tailwind-merge": "^3.0.0",
|
|
"tailwindcss": "^4.0.0",
|
|
"tailwindcss-animate": "^1.0.7",
|
|
"unist-util-visit": "^5.0.0",
|
|
"use-sound": "^5.0.0",
|
|
"vscode-material-icons": "^0.1.1",
|
|
"vscrui": "^0.2.2",
|
|
"zod": "^3.25.61"
|
|
},
|
|
"devDependencies": {
|
|
"@roo-code/config-eslint": "workspace:^",
|
|
"@roo-code/config-typescript": "workspace:^",
|
|
"@testing-library/jest-dom": "^6.6.3",
|
|
"@testing-library/react": "^16.2.0",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@types/diff": "^5.2.1",
|
|
"@types/jest": "^29.0.0",
|
|
"@types/katex": "^0.16.7",
|
|
"@types/node": "20.x",
|
|
"@types/react": "^18.3.23",
|
|
"@types/react-dom": "^18.3.5",
|
|
"@types/shell-quote": "^1.7.5",
|
|
"@types/stacktrace-js": "^2.0.3",
|
|
"@types/vscode-webview": "^1.57.5",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"@vitest/ui": "^3.2.3",
|
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
"identity-obj-proxy": "^3.0.0",
|
|
"jsdom": "^26.0.0",
|
|
"vite": "6.3.6",
|
|
"vitest": "^3.2.3"
|
|
}
|
|
}
|