|
@@ -1,4 +1,4 @@
|
|
|
-<template>
|
|
|
|
|
|
|
+<template>
|
|
|
<div class="ai-chat-container">
|
|
<div class="ai-chat-container">
|
|
|
<div class="message-quick-box">
|
|
<div class="message-quick-box">
|
|
|
<div class="message-quick-box-item" :class="{ 'active': isQuickActions.includes('quick') }">
|
|
<div class="message-quick-box-item" :class="{ 'active': isQuickActions.includes('quick') }">
|
|
@@ -44,7 +44,7 @@
|
|
|
</span>
|
|
</span>
|
|
|
</button>
|
|
</button>
|
|
|
|
|
|
|
|
- <!-- <button type="button" class="coco-quick-action" v-if="cocoQuickTab === 'page'"
|
|
|
|
|
|
|
+ <button type="button" class="coco-quick-action" v-if="cocoQuickTab === 'page'"
|
|
|
@click="sendQuickAction(lang.ssAiChatQuickAction4)">
|
|
@click="sendQuickAction(lang.ssAiChatQuickAction4)">
|
|
|
<span class="coco-quick-action-copy">
|
|
<span class="coco-quick-action-copy">
|
|
|
<span class="coco-quick-action-title">{{ lang.ssAiChatQuickGenWebTitle }}</span>
|
|
<span class="coco-quick-action-title">{{ lang.ssAiChatQuickGenWebTitle }}</span>
|
|
@@ -57,7 +57,7 @@
|
|
|
<path d="M13 5l7 7-7 7"></path>
|
|
<path d="M13 5l7 7-7 7"></path>
|
|
|
</svg>
|
|
</svg>
|
|
|
</span>
|
|
</span>
|
|
|
- </button> -->
|
|
|
|
|
|
|
+ </button>
|
|
|
<button type="button" class="coco-quick-action" v-if="cocoQuickTab === 'course'"
|
|
<button type="button" class="coco-quick-action" v-if="cocoQuickTab === 'course'"
|
|
|
@click="sendQuickAction(lang.ssAiChatQuickAction5)">
|
|
@click="sendQuickAction(lang.ssAiChatQuickAction5)">
|
|
|
<span class="coco-quick-action-copy">
|
|
<span class="coco-quick-action-copy">
|
|
@@ -72,7 +72,7 @@
|
|
|
</svg>
|
|
</svg>
|
|
|
</span>
|
|
</span>
|
|
|
</button>
|
|
</button>
|
|
|
- <!-- <button type="button" class="coco-quick-action" v-if="cocoQuickTab === 'course'" @click="sendQuickAction(lang.ssBatchInteractiveWeb)">
|
|
|
|
|
|
|
+ <button type="button" class="coco-quick-action" v-if="cocoQuickTab === 'course'" @click="sendQuickAction(lang.ssBatchInteractiveWeb)">
|
|
|
<span class="coco-quick-action-copy">
|
|
<span class="coco-quick-action-copy">
|
|
|
<span class="coco-quick-action-title">{{ lang.ssAiChatQuickBatchGenToolsTitle }}</span>
|
|
<span class="coco-quick-action-title">{{ lang.ssAiChatQuickBatchGenToolsTitle }}</span>
|
|
|
<span class="coco-quick-action-desc">{{ lang.ssAiChatQuickBatchGenToolsDesc }}</span>
|
|
<span class="coco-quick-action-desc">{{ lang.ssAiChatQuickBatchGenToolsDesc }}</span>
|
|
@@ -83,7 +83,7 @@
|
|
|
<path d="M13 5l7 7-7 7"></path>
|
|
<path d="M13 5l7 7-7 7"></path>
|
|
|
</svg>
|
|
</svg>
|
|
|
</span>
|
|
</span>
|
|
|
- </button> -->
|
|
|
|
|
|
|
+ </button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -127,7 +127,7 @@
|
|
|
v-if="message.jsonData?.gType !== 'chat' && message.jsonData?.gType !== 'generate_interactive_web' && message.jsonData?.gType !== 'trigger_tool_recommend' && message.jsonData?.gType !== 'trigger_batch_tool' && !message.chatloading && message.aiContent"
|
|
v-if="message.jsonData?.gType !== 'chat' && message.jsonData?.gType !== 'generate_interactive_web' && message.jsonData?.gType !== 'trigger_tool_recommend' && message.jsonData?.gType !== 'trigger_batch_tool' && !message.chatloading && message.aiContent"
|
|
|
@click="generate(message)">{{ message.gLoading ? lang.ssLoading : lang.ssConfirm }}</button>
|
|
@click="generate(message)">{{ message.gLoading ? lang.ssLoading : lang.ssConfirm }}</button>
|
|
|
<button type="button" class="coco-interactive-web-card"
|
|
<button type="button" class="coco-interactive-web-card"
|
|
|
- v-if="message.jsonData?.gType === 'generate_interactive_web' && !message.chatloading" :class="{ 'loading-state': create_app_loading }" @click="!create_app_loading && handle_add_aiWeb()">
|
|
|
|
|
|
|
+ v-if="message.jsonData?.gType === 'generate_interactive_web' && !message.chatloading" :class="{ 'loading-state': create_app_loading }" @click="!create_app_loading && handle_add_aiWeb(message)">
|
|
|
<div class="submenu-icon loading-icon" v-show="create_app_loading">
|
|
<div class="submenu-icon loading-icon" v-show="create_app_loading">
|
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="spin">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="spin">
|
|
|
<circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12"></circle>
|
|
<circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12"></circle>
|
|
@@ -204,7 +204,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <AiWeb :visible="showAiWebModal" :web-id="webId" @close="showAiWebModal = false" @add="addAiWeb" :is-loading="isLoading" />
|
|
|
|
|
|
|
+ <AiWeb :visible="showAiWebModal" :web-id="webId" @close="showAiWebModal = false" :tx="webTx" @add="addAiWeb" :is-loading="isLoading" />
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -212,7 +212,7 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, onMounted, useTemplateRef, nextTick, watch } from 'vue'
|
|
import { ref, onMounted, useTemplateRef, nextTick, watch } from 'vue'
|
|
|
import { chat_no_stream, chat_stream, getAgentModel, chat_no_stream2 } from '@/tools/aiChat'
|
|
import { chat_no_stream, chat_stream, getAgentModel, chat_no_stream2 } from '@/tools/aiChat'
|
|
|
-import { useSlidesStore } from '@/store'
|
|
|
|
|
|
|
+import { useSlidesStore, useMainStore } from '@/store'
|
|
|
import { lang } from '@/main'
|
|
import { lang } from '@/main'
|
|
|
import MarkdownIt from 'markdown-it'
|
|
import MarkdownIt from 'markdown-it'
|
|
|
import { getWorkPageId } from '@/services/course'
|
|
import { getWorkPageId } from '@/services/course'
|
|
@@ -435,8 +435,10 @@ const sendQuickAction = (action: string) => {
|
|
|
import { v4 as uuidv4 } from 'uuid'
|
|
import { v4 as uuidv4 } from 'uuid'
|
|
|
const session_name = ref('')
|
|
const session_name = ref('')
|
|
|
const slidesStore = useSlidesStore()
|
|
const slidesStore = useSlidesStore()
|
|
|
|
|
+const mainStore = useMainStore()
|
|
|
const gType = ref('chat')
|
|
const gType = ref('chat')
|
|
|
|
|
|
|
|
|
|
+
|
|
|
const sendAction = async (action: string) => {
|
|
const sendAction = async (action: string) => {
|
|
|
const md = new MarkdownIt()
|
|
const md = new MarkdownIt()
|
|
|
if (gType.value === 'chat' || gType.value === 'generate_interactive_web' || gType.value === 'trigger_tool_recommend' || gType.value === 'trigger_batch_tool') {
|
|
if (gType.value === 'chat' || gType.value === 'generate_interactive_web' || gType.value === 'trigger_tool_recommend' || gType.value === 'trigger_batch_tool') {
|
|
@@ -469,18 +471,32 @@ const sendAction = async (action: string) => {
|
|
|
gType: gType.value,
|
|
gType: gType.value,
|
|
|
isGenerate: false
|
|
isGenerate: false
|
|
|
}
|
|
}
|
|
|
- messages.value.at(-1).aiContent = lang.ssInteractiveWebWorkspaceDesc
|
|
|
|
|
- messages.value.at(-1).loading = false
|
|
|
|
|
- messages.value.at(-1).chatloading = false
|
|
|
|
|
- chatLoading.value = false
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ // messages.value.at(-1).aiContent = lang.ssInteractiveWebWorkspaceDesc
|
|
|
|
|
+ // messages.value.at(-1).loading = false
|
|
|
|
|
+ // messages.value.at(-1).chatloading = false
|
|
|
|
|
+ // chatLoading.value = false
|
|
|
|
|
+ // return
|
|
|
}
|
|
}
|
|
|
else if (gType.value === 'trigger_batch_tool') {
|
|
else if (gType.value === 'trigger_batch_tool') {
|
|
|
messages.value.at(-1).jsonData = {
|
|
messages.value.at(-1).jsonData = {
|
|
|
gType: gType.value,
|
|
gType: gType.value,
|
|
|
isGenerate: false
|
|
isGenerate: false
|
|
|
}
|
|
}
|
|
|
|
|
+ let isHave = 1
|
|
|
|
|
+ const hasUnprocessedTools = slidesStore.slides.some(slide => slide.toolsArray && slide.toolsArray?.length > 0)
|
|
|
|
|
+ if (hasUnprocessedTools) {
|
|
|
|
|
+ isHave = 2
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isHave == 2) {
|
|
|
|
|
+ messages.value.at(-1).aiContent = lang.ssBatchInteractiveWebDesc3
|
|
|
|
|
+ messages.value.at(-1).loading = false
|
|
|
|
|
+ chatLoading.value = false
|
|
|
|
|
+ messages.value.at(-1).chatloading = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
messages.value.at(-1).aiContent = lang.ssBatchInteractiveWebDesc
|
|
messages.value.at(-1).aiContent = lang.ssBatchInteractiveWebDesc
|
|
|
|
|
+
|
|
|
// messages.value.at(-1).loading = false
|
|
// messages.value.at(-1).loading = false
|
|
|
// messages.value.at(-1).chatloading = false
|
|
// messages.value.at(-1).chatloading = false
|
|
|
// chatLoading.value = false
|
|
// chatLoading.value = false
|
|
@@ -493,12 +509,6 @@ const sendAction = async (action: string) => {
|
|
|
gType: 'generate_interactive_web',
|
|
gType: 'generate_interactive_web',
|
|
|
isGenerate: false
|
|
isGenerate: false
|
|
|
}
|
|
}
|
|
|
- messages.value.at(-1).aiContent = lang.ssInteractiveWebWorkspaceDesc
|
|
|
|
|
- messages.value.at(-1).loading = false
|
|
|
|
|
- chatLoading.value = false
|
|
|
|
|
- messages.value.at(-1).chatloading = false
|
|
|
|
|
-
|
|
|
|
|
- return
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (content.includes(lang.ssAiChatQuickAction5)) {
|
|
if (content.includes(lang.ssAiChatQuickAction5)) {
|
|
@@ -515,11 +525,25 @@ const sendAction = async (action: string) => {
|
|
|
gType: 'trigger_batch_tool',
|
|
gType: 'trigger_batch_tool',
|
|
|
isGenerate: false
|
|
isGenerate: false
|
|
|
}
|
|
}
|
|
|
|
|
+ let isHave = 1
|
|
|
|
|
+ const hasUnprocessedTools = slidesStore.slides.some(slide => slide.toolsArray && slide.toolsArray?.length > 0)
|
|
|
|
|
+ if (hasUnprocessedTools) {
|
|
|
|
|
+ isHave = 2
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isHave == 2) {
|
|
|
|
|
+ messages.value.at(-1).aiContent = lang.ssBatchInteractiveWebDesc3
|
|
|
|
|
+ messages.value.at(-1).loading = false
|
|
|
|
|
+ chatLoading.value = false
|
|
|
|
|
+ messages.value.at(-1).chatloading = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
messages.value.at(-1).aiContent = lang.ssBatchInteractiveWebDesc
|
|
messages.value.at(-1).aiContent = lang.ssBatchInteractiveWebDesc
|
|
|
|
|
+
|
|
|
// messages.value.at(-1).loading = false
|
|
// messages.value.at(-1).loading = false
|
|
|
// chatLoading.value = false
|
|
// chatLoading.value = false
|
|
|
// messages.value.at(-1).chatloading = false
|
|
// messages.value.at(-1).chatloading = false
|
|
|
- return
|
|
|
|
|
|
|
+ // return
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
@@ -635,28 +659,68 @@ const sendAction = async (action: string) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (gType.value === 'trigger_batch_tool') {
|
|
if (gType.value === 'trigger_batch_tool') {
|
|
|
- chat_stream(prompt, agentid, props.userid || '', lang.lang, async (event) => {
|
|
|
|
|
- if (event.type === 'message') {
|
|
|
|
|
- messages.value.at(-1).jsonData.aiContent = md.render(event.data)
|
|
|
|
|
- messages.value.at(-1).loading = false
|
|
|
|
|
|
|
+ const result = chat_no_stream(prompt, agentid, props.userid || '', lang.lang)
|
|
|
|
|
+ streamController.value = result
|
|
|
|
|
+ console.log(result)
|
|
|
|
|
+ const content = await result.promise
|
|
|
|
|
+ messages.value.at(-1).jsonData.aiContent = content
|
|
|
|
|
+ console.log('event.data', content)
|
|
|
|
|
+ generate(messages.value.at(-1))
|
|
|
|
|
+
|
|
|
|
|
+ // chat_stream(prompt, agentid, props.userid || '', lang.lang, async (event) => {
|
|
|
|
|
+ // if (event.type === 'message') {
|
|
|
|
|
+ // messages.value.at(-1).jsonData.aiContent = md.render(event.data)
|
|
|
|
|
+ // messages.value.at(-1).loading = false
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- else if (event.type === 'messageEnd') {
|
|
|
|
|
- messages.value.at(-1).jsonData.aiContent = md.render(event.data)
|
|
|
|
|
- console.log('event.data', event.data)
|
|
|
|
|
- generate(messages.value.at(-1))
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- }, session_name.value, messages.value.at(-1).sourceFiles?.map(file => file.id).filter(Boolean)).then(controller => {
|
|
|
|
|
- streamController.value = controller
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- chatLoading.value = false
|
|
|
|
|
- console.log('err', err)
|
|
|
|
|
- stopMessage()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // }
|
|
|
|
|
+ // else if (event.type === 'messageEnd') {
|
|
|
|
|
+ // messages.value.at(-1).jsonData.aiContent = md.render(event.data)
|
|
|
|
|
+ // console.log('event.data', event.data)
|
|
|
|
|
+ // generate(messages.value.at(-1))
|
|
|
|
|
+
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }, session_name.value, messages.value.at(-1).sourceFiles?.map(file => file.id).filter(Boolean)).then(controller => {
|
|
|
|
|
+ // streamController.value = controller
|
|
|
|
|
+ // }).catch(err => {
|
|
|
|
|
+ // chatLoading.value = false
|
|
|
|
|
+ // console.log('err', err)
|
|
|
|
|
+ // stopMessage()
|
|
|
|
|
+ // })
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (gType.value === 'generate_interactive_web') {
|
|
|
|
|
+ agentid = agentid5.value
|
|
|
|
|
+ const result = chat_no_stream(prompt, agentid, props.userid || '', lang.lang)
|
|
|
|
|
+ streamController.value = result
|
|
|
|
|
+ console.log(result)
|
|
|
|
|
+ const content = await result.promise
|
|
|
|
|
+ messages.value.at(-1).jsonData.aiContent = content
|
|
|
|
|
+ console.log('event.data', content)
|
|
|
|
|
+ generate(messages.value.at(-1))
|
|
|
|
|
+
|
|
|
|
|
+ // chat_stream(prompt, agentid, props.userid || '', lang.lang, async (event) => {
|
|
|
|
|
+ // if (event.type === 'message') {
|
|
|
|
|
+ // // messages.value.at(-1).jsonData.aiContent = md.render(event.data)
|
|
|
|
|
+ // // messages.value.at(-1).loading = false
|
|
|
|
|
+
|
|
|
|
|
+ // }
|
|
|
|
|
+ // else if (event.type === 'messageEnd') {
|
|
|
|
|
+ // messages.value.at(-1).aiContent = lang.ssInteractiveWebWorkspaceDesc
|
|
|
|
|
+ // messages.value.at(-1).jsonData.aiContent = event.data
|
|
|
|
|
+ // messages.value.at(-1).loading = false
|
|
|
|
|
+ // chatLoading.value = false
|
|
|
|
|
+ // messages.value.at(-1).chatloading = false
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }, session_name.value, messages.value.at(-1).sourceFiles?.map(file => file.id).filter(Boolean)).then(controller => {
|
|
|
|
|
+ // streamController.value = controller
|
|
|
|
|
+ // }).catch(err => {
|
|
|
|
|
+ // chatLoading.value = false
|
|
|
|
|
+ // console.log('err', err)
|
|
|
|
|
+ // stopMessage()
|
|
|
|
|
+ // })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
chat_stream(prompt, agentid, props.userid || '', lang.lang, (event) => {
|
|
chat_stream(prompt, agentid, props.userid || '', lang.lang, (event) => {
|
|
|
if (event.type === 'message') {
|
|
if (event.type === 'message') {
|
|
@@ -816,6 +880,33 @@ const generate = (message: ChatMessage) => {
|
|
|
slidesStore.updateSlide({ toolsArray: item.tools }, slide.id)
|
|
slidesStore.updateSlide({ toolsArray: item.tools }, slide.id)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const firstPageWithTools = slidesStore.slides.findIndex((slide: any) =>
|
|
|
|
|
+ slide.toolsArray && slide.toolsArray.length > 0
|
|
|
|
|
+ )
|
|
|
|
|
+ if (firstPageWithTools !== -1) {
|
|
|
|
|
+ slidesStore.updateSlideIndex(firstPageWithTools)
|
|
|
|
|
+ mainStore.setChildPageState(true, slidesStore.slides[firstPageWithTools].toolsArray || [], firstPageWithTools || 0)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (message.jsonData?.gType === 'generate_interactive_web') {
|
|
|
|
|
+ console.log(message.jsonData?.gType)
|
|
|
|
|
+ const prompt = [
|
|
|
|
|
+ {
|
|
|
|
|
+ role: 'user',
|
|
|
|
|
+ content: `这是用户输入的内容:“${message.jsonData.aiContent}”,根据用户输入的内容,取出里面prompt的值。输出一个json格式的回复{"prompt":""}。`, // ,"imageList":[],"evaluationCriteria":"评价标准" 输出语言为${lang.lang === 'en' ? '英文' : lang.lang === 'hk' ? '繁体中文' : '简体中文'}
|
|
|
|
|
+ },
|
|
|
|
|
+ ]
|
|
|
|
|
+ chat_no_stream2(prompt, { type: 'json_object' }).then((res: any) => {
|
|
|
|
|
+ console.log('批量生成工具', JSON.parse(res))
|
|
|
|
|
+ gType.value = 'chat'
|
|
|
|
|
+ chatLoading.value = false
|
|
|
|
|
+ messages.value.at(-1).aiContent = lang.ssInteractiveWebWorkspaceDesc
|
|
|
|
|
+ messages.value.at(-1).jsonData.aiContent = JSON.parse(res).prompt
|
|
|
|
|
+ messages.value.at(-1).loading = false
|
|
|
|
|
+ chatLoading.value = false
|
|
|
|
|
+ messages.value.at(-1).chatloading = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -878,6 +969,7 @@ const agentid1 = ref('cbb29b41-2a4a-4453-bf8d-357929ced4bd')// 判断意图
|
|
|
const agentid2 = ref('f86aa63c-b7b7-4d03-9b37-b59f116d36f3')// 生成内容
|
|
const agentid2 = ref('f86aa63c-b7b7-4d03-9b37-b59f116d36f3')// 生成内容
|
|
|
const agentid3 = ref('caaa43ab-41a5-466a-94bc-74e0c9265068')// 互动工具推荐
|
|
const agentid3 = ref('caaa43ab-41a5-466a-94bc-74e0c9265068')// 互动工具推荐
|
|
|
const agentid4 = ref('b41bc650-9861-468c-a624-b52269dfff22')// 批量生成工具
|
|
const agentid4 = ref('b41bc650-9861-468c-a624-b52269dfff22')// 批量生成工具
|
|
|
|
|
+const agentid5 = ref('939d28ef-3a1b-442b-871f-3894eb67ac9c')// 互动网页
|
|
|
|
|
|
|
|
const isQuickActions = ref<string[]>([])
|
|
const isQuickActions = ref<string[]>([])
|
|
|
const toggleQuickActions = (section: string) => {
|
|
const toggleQuickActions = (section: string) => {
|
|
@@ -899,11 +991,22 @@ const create_app_loading = ref(false)
|
|
|
const webId = ref('')
|
|
const webId = ref('')
|
|
|
const showAiWebModal = ref(false)
|
|
const showAiWebModal = ref(false)
|
|
|
const isEdit = ref(false)
|
|
const isEdit = ref(false)
|
|
|
|
|
+const webTx = ref('')
|
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
|
import _ from 'lodash'
|
|
import _ from 'lodash'
|
|
|
const { currentSlide } = storeToRefs(slidesStore)
|
|
const { currentSlide } = storeToRefs(slidesStore)
|
|
|
|
|
|
|
|
-const handle_add_aiWeb = _.throttle(async () => {
|
|
|
|
|
|
|
+const handle_add_aiWeb = _.throttle(async (message: any) => {
|
|
|
|
|
+ console.log(message)
|
|
|
|
|
+ const aiContent = message?.jsonData?.aiContent || ''
|
|
|
|
|
+ let tx = ''
|
|
|
|
|
+ if (aiContent) {
|
|
|
|
|
+ tx = '&aiContent=' + aiContent
|
|
|
|
|
+ webTx.value = tx
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ webTx.value = tx
|
|
|
|
|
+ }
|
|
|
create_app_loading.value = true
|
|
create_app_loading.value = true
|
|
|
try {
|
|
try {
|
|
|
const elements = currentSlide.value?.elements || []
|
|
const elements = currentSlide.value?.elements || []
|
|
@@ -969,12 +1072,18 @@ const addAiWeb = async (code: string) => {
|
|
|
isEdit.value = false
|
|
isEdit.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+defineExpose({
|
|
|
|
|
+ sendQuickAction,
|
|
|
|
|
+ sendMessage
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
session_name.value = uuidv4()
|
|
session_name.value = uuidv4()
|
|
|
getAgentModel(agentid1.value)
|
|
getAgentModel(agentid1.value)
|
|
|
getAgentModel(agentid2.value)
|
|
getAgentModel(agentid2.value)
|
|
|
getAgentModel(agentid3.value)
|
|
getAgentModel(agentid3.value)
|
|
|
getAgentModel(agentid4.value)
|
|
getAgentModel(agentid4.value)
|
|
|
|
|
+ getAgentModel(agentid5.value)
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|