feat(studio): 上传组件用我的笔记 token + 关闭上传弹窗刷新来源列表
- document-upload-popup: 新增 getNotebookToken(),上传/导入到笔记后端 (source/import、documents/fileupload)改用「我的笔记」token; 其余请求由调用方在 init.headers 自带 Authorization,不再注入本系统 token - query-client-provider: 导出 queryClient 单例,便于非 hook 处读取缓存的 token - network-actor: consumerUrl 改为读 VITE_AIPI_CONSUMER_URL;修复 source/import headers 语法并去掉重复 token - StudioNotebookDetailPage: DocumentUploadDialogProvider 增加 onClose, 关闭上传弹窗时刷新来源列表与 source_count Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
bd0d922737
commit
c268348e29
4 files changed
+24
-17
No files matched your search
@@ -455,6 +455,11 @@ export default function StudioNotebookDetailPage() {
|
||||
return (
|
||||
<DocumentUploadDialogProvider
|
||||
searchSpace={{ id: notebook.id }}
|
||||
onClose={() => {
|
||||
// 关闭上传弹窗时刷新来源列表与 source_count(覆盖文件上传 / A·B·Y 导入等所有路径)
|
||||
void queryClient.invalidateQueries({ queryKey: ["studio", "sources"] });
|
||||
void queryClient.invalidateQueries({ queryKey: ["studio", "notebooks", studioToken] });
|
||||
}}
|
||||
onUploadSuccess={() => {
|
||||
void queryClient.invalidateQueries({ queryKey: ["studio", "sources"] });
|
||||
void queryClient.invalidateQueries({ queryKey: ["studio", "notebooks", studioToken] });
|
||||
|
||||
Reference in new issue
Block a user