@@ -17,27 +17,30 @@ import ComposerShell from "@src/components/ComposerShell";
1717import Message from "@src/components/Message" ;
1818import { VoiceInputButton , VoiceRecordingBar } from "@src/components/Voice" ;
1919import {
20+ INPUT_AREA ,
2021 INPUT_AREA_EDITOR_CLASS ,
2122 INPUT_AREA_EDITOR_HEIGHT ,
2223} from "@src/config/inputAreaTokens" ;
2324import { capPillText , storePillText } from "@src/config/pillTokens" ;
2425import type { ComposerModeEntry } from "@src/config/sessionCreatorConfig" ;
2526import ContextMenuPortal from "@src/engines/ChatPanel/InputArea/components/ContextMenuPortal" ;
2627import SlashCommandPortal from "@src/engines/ChatPanel/InputArea/components/SlashCommandPortal" ;
28+ import { useExternalFileDragOver } from "@src/engines/ChatPanel/InputArea/hooks/useContainerDrag" ;
29+ import { useTabDragHover } from "@src/engines/ChatPanel/InputArea/hooks/useTabDragHover" ;
2730import { type VoiceInputError , useVoiceInput } from "@src/hooks/voice" ;
2831import i18n from "@src/i18n" ;
2932import {
3033 clearReferenceDragData ,
3134 getReferenceDragPillData ,
3235 hasReferenceDragData ,
3336} from "@src/shared/dnd/referenceDragData" ;
37+ import { useTabDragEndToPill } from "@src/shared/dnd/useTabDragEndToPill" ;
3438import { chatAppearanceAtom } from "@src/store/config/configAtom" ;
3539import { voiceInputEnabledAtom } from "@src/store/platform/voiceInputAtom" ;
3640import type { RepoKind } from "@src/store/repo/types" ;
3741import type { ChatImageAttachment } from "@src/store/ui/chatImageAtom" ;
3842import type { SlashItem } from "@src/types/extensions" ;
3943
40- import { useTabDragDrop } from "../hooks/useTabDragDrop" ;
4144import type { AdvancedConfig , UploadedFile } from "../types" ;
4245import ControlButtons , { type DropdownDirection } from "./ControlButtons" ;
4346import ImageThumbnailRow from "./ImageThumbnailRow" ;
@@ -300,9 +303,15 @@ const EditorArea: React.FC<EditorAreaProps> = ({
300303 const voiceFeatureEnabled = useAtomValue ( voiceInputEnabledAtom ) ;
301304 const { sendOnEnter } = useAtomValue ( chatAppearanceAtom ) ;
302305
303- const isTabDragOver = useTabDragDrop ( editorContainerRef , composerInputRef ) ;
306+ const isTabDragOver = useTabDragHover ( editorContainerRef ) ;
307+ useTabDragEndToPill ( editorContainerRef , composerInputRef ) ;
308+ // OS file drags never fire HTML5 drag events here (Tauri swallows them), so
309+ // without this the shell keeps its rest border while GlobalDragDrop's scss
310+ // fallback paints a second ring on top — the double-border regression.
311+ const isExternalFileDragOver = useExternalFileDragOver ( editorContainerRef ) ;
304312 const [ isReferenceDragOver , setIsReferenceDragOver ] = useState ( false ) ;
305- const isDragOver = isTabDragOver || isReferenceDragOver ;
313+ const isDragOver =
314+ isTabDragOver || isReferenceDragOver || isExternalFileDragOver ;
306315
307316 const hasReferenceDrag = useCallback (
308317 ( types ?: readonly string [ ] ) => hasReferenceDragData ( types ) ,
@@ -518,9 +527,7 @@ const EditorArea: React.FC<EditorAreaProps> = ({
518527 data-chat-drop-target
519528 className = { [
520529 "wp_text_area" ,
521- isDragOver
522- ? "!border-primary-6 !bg-[color-mix(in_srgb,var(--color-primary-6)_5%,var(--color-chat-input))] !shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-primary-6)_20%,transparent)]"
523- : "" ,
530+ isDragOver ? INPUT_AREA . shellDragOverClasses : "" ,
524531 headerContent ? "!pt-1.5" : "" ,
525532 shellClassName ?? "" ,
526533 ]
0 commit comments