feat: add external file drag-and-drop upload to file tree

Enable users to drag files from their system directly into the file tree
to upload them. Files can be dropped on the tree container (uploads to root)
or on specific folders. Hovering over a closed folder for 2 seconds auto-
expands it. Uses Zustand for drag state management instead of React Context
for better performance.
This commit is contained in:
yyh
2026-01-19 16:57:32 +08:00
parent 4b67008dba
commit a432fa5fcf
7 changed files with 184 additions and 0 deletions

View File

@ -1018,6 +1018,7 @@
"skillSidebar.menu.fileDeleted": "File deleted successfully",
"skillSidebar.menu.filesUploaded": "{{count}} file(s) uploaded successfully",
"skillSidebar.menu.folderCreated": "Folder created successfully",
"skillSidebar.menu.folderDropNotSupported": "Folder upload via drag-drop is not supported yet. Please use the upload folder option.",
"skillSidebar.menu.folderUploaded": "Folder uploaded successfully",
"skillSidebar.menu.moreActions": "More actions",
"skillSidebar.menu.newFile": "New File",

View File

@ -1012,6 +1012,7 @@
"skillSidebar.menu.fileDeleted": "文件删除成功",
"skillSidebar.menu.filesUploaded": "成功上传 {{count}} 个文件",
"skillSidebar.menu.folderCreated": "文件夹创建成功",
"skillSidebar.menu.folderDropNotSupported": "暂不支持拖拽上传文件夹,请使用上传文件夹选项。",
"skillSidebar.menu.folderUploaded": "文件夹上传成功",
"skillSidebar.menu.newFile": "新建文件",
"skillSidebar.menu.newFilePrompt": "请输入文件名(包含扩展名,如 script.py",