Commit 035913b6 authored by tyyin lan's avatar tyyin lan
parents f6db356e 50b156da
...@@ -256,6 +256,7 @@ personal_space_module: ...@@ -256,6 +256,7 @@ personal_space_module:
application_empty: 'No application created' application_empty: 'No application created'
agent_setting_module: agent_setting_module:
my_agent: 'My Agent'
modified: 'Have been changed' modified: 'Have been changed'
auto_save_in: 'Autosave to' auto_save_in: 'Autosave to'
update_publish_btn_text: 'Update release' update_publish_btn_text: 'Update release'
......
...@@ -254,6 +254,7 @@ personal_space_module: ...@@ -254,6 +254,7 @@ personal_space_module:
application_empty: '未创建应用' application_empty: '未创建应用'
agent_setting_module: agent_setting_module:
my_agent: '我的Agent应用'
modified: '已变更' modified: '已变更'
auto_save_in: '自动保存于' auto_save_in: '自动保存于'
update_publish_btn_text: '更新发布' update_publish_btn_text: '更新发布'
......
...@@ -254,6 +254,7 @@ personal_space_module: ...@@ -254,6 +254,7 @@ personal_space_module:
application_empty: '未創建應用' application_empty: '未創建應用'
agent_setting_module: agent_setting_module:
my_agent: '我的Agent應用'
modified: '已變更' modified: '已變更'
auto_save_in: '自動保存於' auto_save_in: '自動保存於'
update_publish_btn_text: '更新發布' update_publish_btn_text: '更新發布'
......
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { PersonalAppConfigState } from '../types/personal-app-config' import { PersonalAppConfigState } from '../types/personal-app-config'
import i18n from '@/locales'
const { t } = i18n.global
export function defaultPersonalAppConfigState(): PersonalAppConfigState { export function defaultPersonalAppConfigState(): PersonalAppConfigState {
return { return {
baseInfo: { baseInfo: {
agentId: '', agentId: '',
agentTitle: '我的Agent应用', agentTitle: t('personal_space_module.agent_module.agent_setting_module.my_agent'),
agentAvatar: 'https://gsst-poe-sit.gz.bcebos.com/data/20240911/1726041369632.webp', agentAvatar: 'https://gsst-poe-sit.gz.bcebos.com/data/20240911/1726041369632.webp',
agentDesc: '', agentDesc: '',
agentSystem: '', agentSystem: '',
......
...@@ -75,7 +75,9 @@ const isHasUploadImage = computed(() => { ...@@ -75,7 +75,9 @@ const isHasUploadImage = computed(() => {
const isEnglishLanguage = computed(() => systemLanguageStore.currentLanguageInfo.key === 'en') const isEnglishLanguage = computed(() => systemLanguageStore.currentLanguageInfo.key === 'en')
const isEnableUploadImage = computed(() => currentAgentApplication.value.unitIds?.includes(PluginType.IMAGE_OCR)) const isEnableUploadImage = computed(() => {
return currentAgentApplication.value.unitIds?.includes(PluginType.IMAGE_OCR) || false
})
;(function () { ;(function () {
getAgentApplicationSelectList() getAgentApplicationSelectList()
......
...@@ -51,7 +51,7 @@ const isEnableDocumentParse = computed(() => { ...@@ -51,7 +51,7 @@ const isEnableDocumentParse = computed(() => {
}) })
const isEnableUploadImage = computed(() => { const isEnableUploadImage = computed(() => {
return agentApplicationConfig.value.unitIds?.includes(PluginType.IMAGE_OCR) return agentApplicationConfig.value.unitIds?.includes(PluginType.IMAGE_OCR) || false
}) })
onMounted(async () => { onMounted(async () => {
......
...@@ -101,7 +101,7 @@ const isUploadFileDisabled = computed(() => { ...@@ -101,7 +101,7 @@ const isUploadFileDisabled = computed(() => {
}) })
const isEnableUploadImage = computed(() => { const isEnableUploadImage = computed(() => {
return personalAppConfigStore.unitIds?.includes(PluginType.IMAGE_OCR) return personalAppConfigStore.unitIds?.includes(PluginType.IMAGE_OCR) || false
}) })
const uploadFileIcon = (type: string) => { const uploadFileIcon = (type: string) => {
......
...@@ -57,7 +57,7 @@ const isEnableDocumentParse = computed(() => { ...@@ -57,7 +57,7 @@ const isEnableDocumentParse = computed(() => {
}) })
const isEnableUploadImage = computed(() => { const isEnableUploadImage = computed(() => {
return agentApplicationConfig.value.unitIds?.includes(PluginType.IMAGE_OCR) return agentApplicationConfig.value.unitIds?.includes(PluginType.IMAGE_OCR) || false
}) })
const isEnableVoice = computed(() => { const isEnableVoice = computed(() => {
......
...@@ -60,7 +60,7 @@ const isEnableDocumentParse = computed(() => { ...@@ -60,7 +60,7 @@ const isEnableDocumentParse = computed(() => {
}) })
const isEnableUploadImage = computed(() => { const isEnableUploadImage = computed(() => {
return agentApplicationConfig.value.unitIds?.includes(PluginType.IMAGE_OCR) return agentApplicationConfig.value.unitIds?.includes(PluginType.IMAGE_OCR) || false
}) })
const isEnableVoice = computed(() => { const isEnableVoice = computed(() => {
......
...@@ -264,6 +264,7 @@ declare namespace I18n { ...@@ -264,6 +264,7 @@ declare namespace I18n {
} }
agent_setting_module: { agent_setting_module: {
my_agent: string
modified: string modified: string
auto_save_in: string auto_save_in: string
update_publish_btn_text: string update_publish_btn_text: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment