feat(chat): 完善固资预览与下载权限

This commit is contained in:
runny committed 2026-07-07 02:27:08 +08:00
1 parent 6ce0942fef
commit bf18a7ef1d
19 files changed
+1163 -86

No files matched your search

@@ -31,6 +31,8 @@ export interface ChatPageConversationContext {
resetPeripheralState: () => void;
filePreviewVisible: Ref<boolean>;
previewFile: Ref<unknown>;
previewFiles: Ref<unknown[]>;
currentPreviewIndex: Ref<number>;
}
export function createChatPageConversationApi(ctx: ChatPageConversationContext) {
@@ -76,6 +78,8 @@ export function createChatPageConversationApi(ctx: ChatPageConversationContext)
ctx.resetPeripheralState();
ctx.filePreviewVisible.value = false;
ctx.previewFile.value = null;
ctx.previewFiles.value = [];
ctx.currentPreviewIndex.value = 0;
void ctx.router.replace({ path: ctx.route.path, query: {} });
};
@@ -89,6 +93,8 @@ export function createChatPageConversationApi(ctx: ChatPageConversationContext)
ctx.resetPeripheralState();
ctx.filePreviewVisible.value = false;
ctx.previewFile.value = null;
ctx.previewFiles.value = [];
ctx.currentPreviewIndex.value = 0;
};
return { loadConversation, startNewChat, resetChatStateForAgentChange };