mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat(webui): add webview container and isolate styles for VSCode integration
- Introduce WebviewContainer component for style isolation in VSCode webviews - Rename CSS variables from --app-* to --qwen-app-* to prevent conflicts - Add dedicated webview.css with isolated styles - Update exports to include webview.css in package - Modify all components to use new CSS variable names - Update VSCode IDE companion to use new webview container - Add style isolation to prevent conflicts with VSCode environment Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Fixes webview UI issues in VSCode IDE Companion by providing proper style encapsulation.
This commit is contained in:
parent
9a47ad5e62
commit
ff43a278dc
64 changed files with 564 additions and 216 deletions
17
packages/webui/src/components/WebviewContainer.tsx
Normal file
17
packages/webui/src/components/WebviewContainer.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import type { PropsWithChildren } from 'react';
|
||||
import type React from 'react';
|
||||
|
||||
interface WebviewContainerProps extends PropsWithChildren {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container component that provides style isolation for VSCode webviews
|
||||
* This component wraps content in a namespace to prevent style conflicts
|
||||
*/
|
||||
const WebviewContainer: React.FC<WebviewContainerProps> = ({
|
||||
children,
|
||||
className = '',
|
||||
}) => <div className={`qwen-webui-container ${className}`}>{children}</div>;
|
||||
|
||||
export default WebviewContainer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue