Update local frontend and backend changes
This commit is contained in:
1 parent
faca2c9a2d
commit
a27206c543
35 files changed
+1756
-334
No files matched your search
@@ -674,12 +674,22 @@ export const PromptInput = ({
|
||||
useEffect(() => {
|
||||
if (!globalDrop) return;
|
||||
|
||||
// Suppress the global chat-upload handler when the drop happens inside an open
|
||||
// modal dialog or popover — those owners (e.g. the skill-install dialog) handle
|
||||
// their own file uploads and should not leak into the active chat thread.
|
||||
const isInsideModal = (target: EventTarget | null): boolean => {
|
||||
if (!(target instanceof Element)) return false;
|
||||
return target.closest('[role="dialog"], [role="alertdialog"]') !== null;
|
||||
};
|
||||
|
||||
const onDragOver = (e: DragEvent) => {
|
||||
if (isInsideModal(e.target)) return;
|
||||
if (e.dataTransfer?.types?.includes("Files")) {
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
const onDrop = (e: DragEvent) => {
|
||||
if (isInsideModal(e.target)) return;
|
||||
if (e.dataTransfer?.types?.includes("Files")) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user