diff --git a/apps/chat/template/embed.js b/apps/chat/template/embed.js index a64e6379..202b52db 100644 --- a/apps/chat/template/embed.js +++ b/apps/chat/template/embed.js @@ -240,8 +240,8 @@ function initMaxkbStyle(root, maxkbId){ } #maxkb-chat-container { - width: 450px; - height: 600px; + width: 460px; + height: 680px; display:none; } @media only screen and (max-width: 768px) { diff --git a/ui/src/api/application/application-xpack.ts b/ui/src/api/application/application-xpack.ts deleted file mode 100644 index 6209e6d7..00000000 --- a/ui/src/api/application/application-xpack.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Result } from '@/request/Result' -import { get, put } from '@/request/index' -import useStore from '@/stores' -import { type Ref } from 'vue' - -const prefix: any = { _value: '/workspace/' } -Object.defineProperty(prefix, 'value', { - get: function () { - const { user } = useStore() - return this._value + user.getWorkspaceId() + '/application' - }, -}) - -/** - * 替换社区版-获取AccessToken - * @param 参数 application_id - */ -const getAccessToken: (application_id: string, loading?: Ref) => Promise> = ( - application_id, - loading, -) => { - return get(`${prefix.value}/${application_id}/setting`, undefined, loading) -} - -/** - * 替换社区版-修改AccessToken - * @param 参数 application_id - * data { - * "show_source": boolean, - * "show_history": boolean, - * "draggable": boolean, - * "show_guide": boolean, - * "avatar": file, - * "float_icon": file, - * } - */ -const putAccessToken: ( - application_id: string, - data: any, - loading?: Ref, -) => Promise> = (application_id, data, loading) => { - return put(`${prefix.value}/${application_id}/setting`, data, undefined, loading) -} - -export default { - getAccessToken, - putAccessToken, -} diff --git a/ui/src/api/application/application.ts b/ui/src/api/application/application.ts index df549140..583f1c72 100644 --- a/ui/src/api/application/application.ts +++ b/ui/src/api/application/application.ts @@ -120,6 +120,27 @@ const putAccessToken: ( return put(`${prefix.value}/${application_id}/access_token`, data, undefined, loading) } +/** + * 替换社区版-修改AccessToken + * @param 参数 application_id + * data { + * "show_source": boolean, + * "show_history": boolean, + * "draggable": boolean, + * "show_guide": boolean, + * "avatar": file, + * "float_icon": file, + * } + */ +const putXpackAccessToken: ( + application_id: string, + data: any, + loading?: Ref, +) => Promise> = (application_id, data, loading) => { + return put(`${prefix.value}/${application_id}/setting`, data, undefined, loading) +} + + /** * 导出应用 */ @@ -331,6 +352,7 @@ export default { getApplicationDetail, getAccessToken, putAccessToken, + putXpackAccessToken, exportApplication, importApplication, getStatistics, 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 f544cfd2..ccaf584d 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -42,6 +42,7 @@ () -const { user } = useStore() - const emit = defineEmits([ 'update:chatRecord', 'openExecutionDetail', @@ -100,10 +99,10 @@ const emit = defineEmits([ ]) const showAvatar = computed(() => { - return user.isEE() || user.isPE() ? props.application.show_avatar : true + return props.application.show_avatar == undefined ? true : props.application.show_avatar }) const showUserAvatar = computed(() => { - return user.isEE() || user.isPE() ? props.application.show_user_avatar : true + return props.application.show_user_avatar == undefined ? true : props.application.show_user_avatar }) const chatMessage = (question: string, type: 'old' | 'new', other_params_data?: any) => { if (type === 'old') { @@ -150,7 +149,11 @@ function showSource(row: any) { if (props.type === 'log') { return true } else if (row.write_ed && 500 !== row.status) { - if (props.type === 'debug-ai-chat' || props.application?.show_source) { + if ( + props.type === 'debug-ai-chat' || + props.application?.show_source || + props.application?.show_exec + ) { return true } } diff --git a/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue b/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue index deff5f1c..dd6750fd 100644 --- a/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue +++ b/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue @@ -193,7 +193,7 @@ >
- {{ $t('views.application.applicationForm.form.roleSettings.label') }} + {{ $t('views.application.form.roleSettings.label') }}
{{ item.system || '-' }} @@ -503,7 +503,7 @@
- - + {{ $t('chat.KnowledgeSource.noSource') }}
diff --git a/ui/src/components/ai-chat/component/knowledge-source-component/index.vue b/ui/src/components/ai-chat/component/knowledge-source-component/index.vue index b454f9cd..b176750b 100644 --- a/ui/src/components/ai-chat/component/knowledge-source-component/index.vue +++ b/ui/src/components/ai-chat/component/knowledge-source-component/index.vue @@ -1,6 +1,6 @@ -
+
- - - - -
- {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.customThemeColor') }} -
-
- - {{ - !xpackForm.custom_theme.theme_color - ? $t('views.applicationOverview.appInfo.SettingDisplayDialog.default') - : '' - }} -
-
- -
- {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.headerTitleFontColor') - }} -
- -
-
- -
- {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.languageLabel') }} -
- - - -
- - -
- {{ $t('views.application.title') + ' LOGO' }} - - - - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} - - - -
- - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} - -
- - -
- {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackground') - }} - - - - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} - - - -
- - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackgroundMessage') }} - -
- - -
- {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.AIAvatar') - }} - - {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.display') - }} - - - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} - - - -
- - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} - -
- - -
- {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.askUserAvatar') - }} - - - {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.display') - }} - - - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} - - - -
- {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} - -
- - -
- {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.floatIcon') - }} - - - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} - - -
- - {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} - -
-
- {{ - $t('views.applicationOverview.appInfo.SettingDisplayDialog.iconDefaultPosition') - }} - -
- + +
+ + -
- - - - - - px +
+ {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.customThemeColor') + }} +
+
+ + {{ + !xpackForm.custom_theme.theme_color + ? $t('views.applicationOverview.appInfo.SettingDisplayDialog.default') + : '' + }}
-
- - - - - - px -
+
+ {{ + $t( + 'views.applicationOverview.appInfo.SettingDisplayDialog.headerTitleFontColor', + ) + }} +
+
-
- + +
+ {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.languageLabel') }} +
+ + + +
+ + +
+ {{ $t('views.application.title') + ' LOGO' }} + + + + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} + + + +
+ + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} + +
+ + +
+ {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackground') + }} + + + + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} + + + +
+ + {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackgroundMessage') + }} + +
+ + +
+ {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.AIAvatar') + }} + + {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.display') + }} + + + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} + + + +
+ + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} + +
+ + +
+ {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.askUserAvatar') + }} + + + {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.display') + }} + + + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} + + + +
+ {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} + +
+ + +
+ {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.floatIcon') + }} + + + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }} + + +
+ + {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} + +
+
+ {{ + $t('views.applicationOverview.appInfo.SettingDisplayDialog.iconDefaultPosition') + }} + +
+ + +
+ + + + + + px +
+
+ +
+ + + + + + px +
+
+
+
+
- - - - - - - - -
+ + + + + + + + + +
+