+
{ void handleFileChange(e); }}
+ />
+
{[
- { icon: Plus, label: "上传文件" },
{ icon: CloudUpload, label: "从云端硬盘添加" },
{ icon: Globe, label: "添加网站" },
{ icon: AlignLeft, label: "复制的文字" },
@@ -158,6 +201,9 @@ function SourcesDialog({
{label}
))}
+ {uploadError && (
+
{uploadError}
+ )}
@@ -496,10 +542,15 @@ export default function StudioNotebookDetailPage() {
open={sourcesOpen}
onClose={() => setSourcesOpen(false)}
notebookName={notebook.name}
+ notebookId={notebook.id}
+ token={queryClient.getQueryData(["studio", "token", getStoredAuth()?.email ?? ""]) ?? ""}
sources={sources}
isLoadingSources={isLoadingSources}
selectedSourceIds={selectedSourceIds}
onToggle={handleToggleSource}
+ onUploadSuccess={() => {
+ void queryClient.invalidateQueries({ queryKey: ["studio", "sources", notebook.id] });
+ }}
/>