mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-07 06:19:43 -10:00
* feat(web-shell): Add workspace file browser and previews * fix(web-shell): Restore source preview CI fixtures and notices * fix(web-shell): Address file pane review blockers * fix(web-shell): Resolve review regressions and strengthen file checks --------- Co-authored-by: 钉萁 <[email protected]>
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import { forwardRef } from 'react';
|
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
import { cn } from '../../lib/utils';
|
|
|
|
const ResizablePanelGroup = forwardRef<
|
|
HTMLDivElement,
|
|
Omit<ResizablePrimitive.GroupProps, 'elementRef'>
|
|
>(({ className, ...props }, ref) => (
|
|
<ResizablePrimitive.Group
|
|
data-slot="resizable-panel-group"
|
|
className={cn('flex h-full w-full', className)}
|
|
{...props}
|
|
elementRef={ref}
|
|
/>
|
|
));
|
|
ResizablePanelGroup.displayName = 'ResizablePanelGroup';
|
|
|
|
const ResizablePanel = forwardRef<
|
|
HTMLDivElement,
|
|
Omit<ResizablePrimitive.PanelProps, 'elementRef'>
|
|
>((props, ref) => (
|
|
<ResizablePrimitive.Panel
|
|
data-slot="resizable-panel"
|
|
{...props}
|
|
elementRef={ref}
|
|
/>
|
|
));
|
|
ResizablePanel.displayName = 'ResizablePanel';
|
|
|
|
const ResizableHandle = forwardRef<
|
|
HTMLDivElement,
|
|
Omit<ResizablePrimitive.SeparatorProps, 'elementRef'>
|
|
>(({ className, ...props }, ref) => (
|
|
<ResizablePrimitive.Separator
|
|
data-slot="resizable-handle"
|
|
className={cn(
|
|
'relative w-px shrink-0 bg-border focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full',
|
|
className,
|
|
)}
|
|
{...props}
|
|
elementRef={ref}
|
|
/>
|
|
));
|
|
ResizableHandle.displayName = 'ResizableHandle';
|
|
|
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|