diff --git a/ui/packages/ai/AiCopilot.vue b/ui/packages/ai/AiCopilot.vue index d4dca5dd..91c665df 100644 --- a/ui/packages/ai/AiCopilot.vue +++ b/ui/packages/ai/AiCopilot.vue @@ -87,9 +87,11 @@ export default { if (++i < content.length) setTimeout(() => concatenateStr(content, i, target), 50) } this.$debounce(() => { - const {currentConversation: conversationId, app, prompt: content, latlng} = this.$data - const message = {appType: "2", userType: 0, content, conversationId, ...app, supplementContent: latlng} + const {currentConversation: conversationId, app, prompt: content, latlng, files} = this.$data + const {id: fileId, url: sdkFileUrl, name: fileName} = files[0] || {} + const message = {appType: "2", userType: 0, content, conversationId, ...app, supplementContent: latlng, fileId, sdkFileUrl, fileName} this.history.push(message) + this.$refs.uploader?.clearFiles() this.loading = true this.prompt = "" this.http.post("/app/appaicopilotinfo/add", message).then(res => { @@ -190,7 +192,7 @@ export default {
diff --git a/ui/packages/ai/components/chatContent.vue b/ui/packages/ai/components/chatContent.vue
index 6eac4440..3ba81d72 100644
--- a/ui/packages/ai/components/chatContent.vue
+++ b/ui/packages/ai/components/chatContent.vue
@@ -3,7 +3,10 @@