diff --git a/ui/public/tool/bochaai/detail.md b/ui/public/tool/bochaai/detail.md index 3a350a3c1..d94763245 100644 --- a/ui/public/tool/bochaai/detail.md +++ b/ui/public/tool/bochaai/detail.md @@ -9,7 +9,7 @@ 在[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。 ![API Key](/ui/tool/img/bocha_APIKey.jpg) 2. 在函数库中配置 -在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用该函数。 +在函数库的博查函数面板中,点击 … > 启动参数,填写 API 密钥,并启用该函数。 ![启动参数](/ui/tool/img/bocha_setting.jpg) 3. 在应用中使用 在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。 diff --git a/ui/public/tool/langsearch/detail.md b/ui/public/tool/langsearch/detail.md index b67d22f41..05f1989e4 100644 --- a/ui/public/tool/langsearch/detail.md +++ b/ui/public/tool/langsearch/detail.md @@ -9,7 +9,7 @@ LangSearch 是一个提供免费Web Search API和Rerank API的服务,支持新 在[LangSearch](https://langsearch.com/overview) 上申请 API 密钥。 ![API Key](/ui/tool/img/langsearch_APIKey.jpg) 2. 在函数库中配置 -在函数库的LangSearch函数面板中,点击 … > 启用参数,填写 API 密钥,并启用该函数。 +在函数库的LangSearch函数面板中,点击 … > 启动参数,填写 API 密钥,并启用该函数。 ![启动参数](/ui/tool/img/langsearch_setting.jpg) 3. 在应用中使用 在高级编排应用中,点击添加组件->函数库->LangSearch,设置使用参数。 diff --git a/ui/public/tool/mysql/detail.md b/ui/public/tool/mysql/detail.md index f574382ad..4486f0394 100644 --- a/ui/public/tool/mysql/detail.md +++ b/ui/public/tool/mysql/detail.md @@ -6,7 +6,7 @@ MySQL查询是一个连接MySQL数据库执行SQL查询的工具。 ## 配置   1. 在函数库中配置启动参数 -在函数库的MySQL函数面板中,点击 … > 启用参数,填写数据库连接参数,并启用该函数。 +在函数库的MySQL函数面板中,点击 … > 启动参数,填写数据库连接参数,并启用该函数。 ![启动参数](/ui/tool/img/MySQL_setting.jpg) 2. 在应用中使用 在高级编排应用中,点击添加组件->函数库->MySQL查询,设置查询内容。 diff --git a/ui/public/tool/postgresql/detail.md b/ui/public/tool/postgresql/detail.md index 84b7f0e29..a214d6c55 100644 --- a/ui/public/tool/postgresql/detail.md +++ b/ui/public/tool/postgresql/detail.md @@ -6,7 +6,7 @@ PostgreSQL查询是一个连接PostgreSQL数据库执行SQL查询的工具。 ## 配置   1. 在函数库中配置启动参数 -在函数库的PostgreSQL函数面板中,点击 … > 启用参数,填写数据库连接参数,并启用该函数。 +在函数库的PostgreSQL函数面板中,点击 … > 启动参数,填写数据库连接参数,并启用该函数。 ![启动参数](/ui/tool/img/PostgreSQL_setting.jpg) 2. 在应用中使用 在高级编排应用中,点击添加组件->函数库->PostgreSQL查询,设置查询内容。 diff --git a/ui/src/components/ai-chat/ExecutionDetailDialog.vue b/ui/src/components/ai-chat/ExecutionDetailDialog.vue index 63db3266c..44caa79bf 100644 --- a/ui/src/components/ai-chat/ExecutionDetailDialog.vue +++ b/ui/src/components/ai-chat/ExecutionDetailDialog.vue @@ -8,723 +8,17 @@ align-center @click.stop > - -
- -
-
+ + diff --git a/ui/src/components/ai-chat/component/answer-content/index.vue b/ui/src/components/ai-chat/component/answer-content/index.vue index 26cd8a0d0..9c9220144 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -43,6 +43,8 @@ @@ -83,11 +85,12 @@ const props = defineProps<{ sendMessage: (question: string, other_params_data?: any, chat?: chatType) => Promise chatManagement: any type: 'log' | 'ai-chat' | 'debug-ai-chat' + executionIsRightPanel?: boolean }>() const { user } = useStore() -const emit = defineEmits(['update:chatRecord']) +const emit = defineEmits(['update:chatRecord', 'openExecutionDetail']) const showAvatar = computed(() => { return user.isEnterprise() ? props.application.show_avatar : true diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 6df7c2aa7..41311ef57 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -48,6 +48,8 @@ :type="type" :send-message="sendMessage" :chat-management="ChatManagement" + :executionIsRightPanel="props.executionIsRightPanel" + @open-execution-detail="emit('openExecutionDetail', chatList[index])" > available?: boolean chatId?: string + executionIsRightPanel?: boolean }>(), { applicationDetails: () => ({}), @@ -126,7 +129,7 @@ const props = withDefaults( type: 'ai-chat', }, ) -const emit = defineEmits(['refresh', 'scroll']) +const emit = defineEmits(['refresh', 'scroll', 'openExecutionDetail']) const { application, common } = useStore() const isMobile = computed(() => { return common.isMobile() || mode === 'embed' || mode === 'mobile' diff --git a/ui/src/locales/lang/en-US/ai-chat.ts b/ui/src/locales/lang/en-US/ai-chat.ts index 01c5c3c67..8fe995287 100644 --- a/ui/src/locales/lang/en-US/ai-chat.ts +++ b/ui/src/locales/lang/en-US/ai-chat.ts @@ -1,4 +1,7 @@ export default { + mine: 'Mine', + logoutContent: 'Logging out will not lose any data. You can still log in to this account.', + confirmModification: 'Confirm modification', noHistory: 'No Chat History', createChat: 'New Chat', history: 'Chat History', diff --git a/ui/src/locales/lang/zh-Hant/ai-chat.ts b/ui/src/locales/lang/zh-Hant/ai-chat.ts index df43dd6f8..50d92612b 100644 --- a/ui/src/locales/lang/zh-Hant/ai-chat.ts +++ b/ui/src/locales/lang/zh-Hant/ai-chat.ts @@ -1,4 +1,7 @@ export default { + mine: '我的', + logoutContent: '退出登入不會遺失任何資料,您仍可登入此帳號。', + confirmModification: '確認修改', noHistory: '暫無歷史記錄', createChat: '新建對話', history: '歷史記錄', diff --git a/ui/src/views/chat/pc/index.vue b/ui/src/views/chat/pc/index.vue index 0ff0e2185..5e26ae73a 100644 --- a/ui/src/views/chat/pc/index.vue +++ b/ui/src/views/chat/pc/index.vue @@ -183,54 +183,69 @@
-
-

- {{ currentChatName }} -

+ + +
+

+ {{ currentChatName }} +

- - - - {{ paginationConfig.total }} {{ $t('chat.question_count') }} - - - - - - -
-
- - -
+ + + + {{ paginationConfig.total }} {{ $t('chat.question_count') }} + + + + + + +
+
+ + +
+ + +
+

{{ $t('chat.executionDetails.title') }}

+ +
+
+ +
+
+
@@ -258,6 +273,8 @@ import { useRouter } from 'vue-router' import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue' import { t } from '@/locales' import type { ResetCurrentUserPasswordRequest } from '@/api/type/user' +import ExecutionDetailContent from '@/components/ai-chat/component/ExecutionDetailContent.vue' +import { cloneDeep } from 'lodash' useResize() @@ -511,6 +528,22 @@ const init = () => { onMounted(() => { init() }) + +const rightPanelSize = ref(0) +const executionDetail = ref([]) +const executionLoading = ref(false) +async function openExecutionDetail(row: any) { + rightPanelSize.value = 400 + if (row.execution_details) { + executionDetail.value = cloneDeep(row.execution_details) + } else { + const res = await chatAPI.getChatRecord(row.chat_id, row.record_id, executionLoading) + executionDetail.value = cloneDeep(res.data.execution_details) + } +} +function closeExecutionDetail() { + rightPanelSize.value = 0 +}