Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
c3a95ac9
Commit
c3a95ac9
authored
Oct 18, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 多语言字段提取
parent
cddb9b77
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
230 additions
and
140 deletions
+230
-140
sidebar.vue
src/layout/components/sidebar/sidebar.vue
+4
-4
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+65
-32
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+65
-31
create-discrete.ts
src/utils/create-discrete.ts
+5
-0
columns.ts
src/views/personal-space/personal-app-setting/columns.ts
+3
-8
app-setting.vue
...nal-space/personal-app-setting/components/app-setting.vue
+3
-3
auto-config-modal.vue
...ace/personal-app-setting/components/auto-config-modal.vue
+1
-5
optimize-system-modal.vue
...personal-app-setting/components/optimize-system-modal.vue
+1
-5
page-narbar.vue
...nal-space/personal-app-setting/components/page-narbar.vue
+3
-3
columns.ts
src/views/personal-space/personal-app/columns.ts
+2
-2
personal-space.vue
src/views/personal-space/personal-space.vue
+7
-7
footer-input.vue
src/views/share/components/footer-input.vue
+3
-3
mobile-page-header.vue
src/views/share/components/mobile-page-header.vue
+2
-2
web-page-header.vue
src/views/share/components/web-page-header.vue
+3
-3
locales.d.ts
types/locales.d.ts
+63
-32
No files found.
src/layout/components/sidebar/sidebar.vue
View file @
c3a95ac9
...
@@ -26,7 +26,7 @@ const avatarOptions = readonly([
...
@@ -26,7 +26,7 @@ const avatarOptions = readonly([
// icon: () => h(CustomIcon, { icon: 'bx:user' }),
// icon: () => h(CustomIcon, { icon: 'bx:user' }),
// },
// },
{
{
label
:
()
=>
h
(
'div'
,
{},
t
(
'
sidebar_module.dropdow
n_module.logout'
)),
label
:
()
=>
h
(
'div'
,
{},
t
(
'
commo
n_module.logout'
)),
key
:
'logout'
,
key
:
'logout'
,
icon
:
()
=>
h
(
CustomIcon
,
{
icon
:
'teenyicons:logout-solid'
}),
icon
:
()
=>
h
(
CustomIcon
,
{
icon
:
'teenyicons:logout-solid'
}),
},
},
...
@@ -79,7 +79,7 @@ function handleToLogin() {
...
@@ -79,7 +79,7 @@ function handleToLogin() {
@
click=
"handleToPersonAppSettingPage"
@
click=
"handleToPersonAppSettingPage"
>
>
<Plus
theme=
"outline"
size=
"16"
fill=
"#fff"
:stroke-width=
"4"
/>
<Plus
theme=
"outline"
size=
"16"
fill=
"#fff"
:stroke-width=
"4"
/>
<span
class=
"ml-[5px]"
>
{{
t
(
'
sidebar_module.create_application
_btn_text'
)
}}
</span>
<span
class=
"ml-[5px]"
>
{{
t
(
'
common_module.create_agent
_btn_text'
)
}}
</span>
</button>
</button>
</div>
</div>
...
@@ -109,14 +109,14 @@ function handleToLogin() {
...
@@ -109,14 +109,14 @@ function handleToLogin() {
<NAvatar
round
:size=
"40"
object-fit=
"cover"
:src=
"userStore.userInfo.avatarUrl || defaultAvatar"
/>
<NAvatar
round
:size=
"40"
object-fit=
"cover"
:src=
"userStore.userInfo.avatarUrl || defaultAvatar"
/>
<div
class=
"ml-3 line-clamp-1 max-w-[140px] select-none break-all text-base"
>
<div
class=
"ml-3 line-clamp-1 max-w-[140px] select-none break-all text-base"
>
{{
userStore
.
userInfo
.
nickName
||
t
(
'
sidebar
_module.not_login_text'
)
}}
{{
userStore
.
userInfo
.
nickName
||
t
(
'
common
_module.not_login_text'
)
}}
</div>
</div>
</div>
</div>
</NDropdown>
</NDropdown>
<div
v-else
>
<div
v-else
>
<NButton
type=
"primary"
class=
"w-full! rounded-md!"
@
click=
"handleToLogin"
>
<NButton
type=
"primary"
class=
"w-full! rounded-md!"
@
click=
"handleToLogin"
>
{{
t
(
'
sidebar_module.login_btn_text
'
)
}}
{{
t
(
'
common_module.login_now
'
)
}}
</NButton>
</NButton>
</div>
</div>
</div>
</div>
...
...
src/locales/langs/zh-cn.yaml
View file @
c3a95ac9
...
@@ -5,6 +5,32 @@ home_module:
...
@@ -5,6 +5,32 @@ home_module:
common_module
:
common_module
:
cancel_btn_text
:
'
取
消'
cancel_btn_text
:
'
取
消'
confirm_btn_text
:
'
确
认'
confirm_btn_text
:
'
确
认'
prev_btn_text
:
'
上一步'
next_btn_text
:
'
下一步'
create
:
'
新增'
delete
:
'
删除'
login
:
'
登录'
logout
:
'
退出登录'
not_login_text
:
'
请先登录'
login_now
:
'
立即登录'
name
:
'
名称'
desc
:
'
描述'
publish_time_in
:
'
发布于'
modified_time
:
'
编辑时间'
is_open
:
'
启用'
status
:
'
状态'
publish
:
'
发布'
published
:
'
已发布'
unpublished
:
'
未发布'
ai_generate
:
'
AI生成'
regenerate
:
'
重新生成'
unavailable
:
'
不可用'
available
:
'
可用'
studying
:
'
学习中'
config
:
'
配置'
agent
:
'
应用'
knowledge
:
'
知识库'
create_agent_btn_text
:
'
创建应用'
copy_success_message
:
'
复制成功'
copy_success_message
:
'
复制成功'
delete_success_message
:
'
删除成功'
delete_success_message
:
'
删除成功'
save_success_message
:
'
保存成功'
save_success_message
:
'
保存成功'
...
@@ -26,6 +52,7 @@ common_module:
...
@@ -26,6 +52,7 @@ common_module:
edit
:
'
编辑'
edit
:
'
编辑'
copy
:
'
复制'
copy
:
'
复制'
delete
:
'
删除'
delete
:
'
删除'
view
:
'
查看'
pagination_module
:
pagination_module
:
page_no
:
'
条'
page_no
:
'
条'
...
@@ -43,25 +70,15 @@ router_title_module:
...
@@ -43,25 +70,15 @@ router_title_module:
app_setting
:
'
应用设置'
app_setting
:
'
应用设置'
agent_application
:
'
Agent应用'
agent_application
:
'
Agent应用'
share_application
:
'
我的Agent应用'
share_application
:
'
我的Agent应用'
knowledge
:
'
知识库'
sidebar_module
:
upload_knowledge_document
:
'
上传知识库文档'
create_application_btn_text
:
'
创建应用'
knowledge_document_list
:
'
知识库文档列表'
login_btn_text
:
'
立即登录'
knowledge_document_detail
:
'
知识库文档详情'
not_login_text
:
'
未登录'
dropdown_module
:
logout
:
'
退出登录'
personal_space_module
:
personal_space_module
:
title
:
'
个人空间'
title
:
'
个人空间'
create_btn_text
:
'
新建'
create_btn_text
:
'
新建'
dropdown_module
:
create_agent
:
'
应用'
tab_module
:
agent
:
'
应用'
agent_module
:
agent_module
:
agent_list_module
:
agent_list_module
:
search_agent_placeholder
:
'
请输入应用名称或描述'
search_agent_placeholder
:
'
请输入应用名称或描述'
...
@@ -69,8 +86,6 @@ personal_space_module:
...
@@ -69,8 +86,6 @@ personal_space_module:
large_model
:
'
模型名称'
large_model
:
'
模型名称'
agent_id
:
'
应用ID'
agent_id
:
'
应用ID'
agent_publish_status
:
'
发布状态'
agent_publish_status
:
'
发布状态'
draft_status
:
'
未发布'
publish_status
:
'
已发布'
modified_time
:
'
最近编辑时间'
modified_time
:
'
最近编辑时间'
channel
:
'
渠道'
channel
:
'
渠道'
channel_popover_text
:
'
查看发布详情'
channel_popover_text
:
'
查看发布详情'
...
@@ -89,10 +104,6 @@ personal_space_module:
...
@@ -89,10 +104,6 @@ personal_space_module:
missing_agent_title_message
:
'
应用名称不能为空'
missing_agent_title_message
:
'
应用名称不能为空'
missing_agent_desc_message
:
'
暂无描述'
missing_agent_desc_message
:
'
暂无描述'
agent_options_module
:
config
:
'
配置'
publish
:
'
发布'
agent_config_module
:
agent_config_module
:
stop_generate
:
'
停止生成'
stop_generate
:
'
停止生成'
generating_config_message
:
'
配置信息生成中...'
generating_config_message
:
'
配置信息生成中...'
...
@@ -111,7 +122,6 @@ personal_space_module:
...
@@ -111,7 +122,6 @@ personal_space_module:
agent_title_input_rule_message
:
'
请输入应用名称'
agent_title_input_rule_message
:
'
请输入应用名称'
agent_desc_input_placeholder
:
'
请描述你的应用,该描述将在应用发布后固定展示'
agent_desc_input_placeholder
:
'
请描述你的应用,该描述将在应用发布后固定展示'
update_avatar
:
'
修改头像'
update_avatar
:
'
修改头像'
ai_generate
:
'
AI生成'
agent_system_prompt
:
'
角色指令'
agent_system_prompt
:
'
角色指令'
agent_system_popover_message
:
'
通过角色指令(Instruction)功能,你能够精确设定Agent应用的作用范围。包括指定应用将扮演的角色、能够使用的组件以及输出结果的格式与风格。此外,你还可以规定应用不得执行哪些操作等。'
agent_system_popover_message
:
'
通过角色指令(Instruction)功能,你能够精确设定Agent应用的作用范围。包括指定应用将扮演的角色、能够使用的组件以及输出结果的格式与风格。此外,你还可以规定应用不得执行哪些操作等。'
optimize_agent_system_prompt
:
'
优化'
optimize_agent_system_prompt
:
'
优化'
...
@@ -156,33 +166,56 @@ personal_space_module:
...
@@ -156,33 +166,56 @@ personal_space_module:
auto_config_input_placeholder
:
'
请告诉我你想创建一个什么样的应用,大模型将为你自动生成'
auto_config_input_placeholder
:
'
请告诉我你想创建一个什么样的应用,大模型将为你自动生成'
cancel_btn_text
:
'
取
消'
cancel_btn_text
:
'
取
消'
random_generate_btn_text
:
'
随机生成'
random_generate_btn_text
:
'
随机生成'
ai_generate_btn_text
:
'
AI生成'
optimize_system_modal_module
:
optimize_system_modal_module
:
modal_title
:
'
角色指令优化'
modal_title
:
'
角色指令优化'
confirm_btn_text
:
'
使
用'
confirm_btn_text
:
'
使
用'
regenerate_btn_text
:
'
重新生成'
agent_publish_module
:
agent_publish_module
:
channel
:
'
发布渠道'
channel
:
'
发布渠道'
web_channel_name
:
'
网页端'
web_channel_name
:
'
网页端'
web_channel_desc
:
'
可通过PC或移动设备立即开始对话'
web_channel_desc
:
'
可通过PC或移动设备立即开始对话'
publish_status
:
'
状态'
published
:
'
已发布'
publish_time_label
:
'
发布'
access_page
:
'
立即访问'
access_page
:
'
立即访问'
share_link
:
'
分享链接'
share_link
:
'
分享链接'
copy_share_url_success_message
:
'
链接复制成功,快分享给你的好友吧!'
copy_share_url_success_message
:
'
链接复制成功,快分享给你的好友吧!'
knowledge_module
:
search_knowledge_placeholder
:
'
请输入知识库名称'
knowledge_name
:
'
知识库名称'
knowledge_desc
:
'
知识库描述'
empty_knowledge_list
:
'
暂无知识库'
search_empty_knowledge_list
:
'
暂⽆搜索结果,请换⼀个关键词进⾏搜索'
delete_knowledge_dialog_content
:
'
删除后将无法恢复,
是否确认删除?'
not_find_knowledge_message
:
'
未找到知识库'
search_knowledge_document_placeholder
:
'
请输入文件名称'
knowledge_document_name
:
'
文件名称'
knowledge_document_char_count
:
'
字符数'
knowledge_document_char_unit
:
'
字符'
knowledge_document_format
:
'
文件格式'
view_knowledge_document_fragment
:
'
查看切片'
training_knowledge_document
:
'
重新训练'
empty_knowledge_document_list
:
'
暂无上传文档'
search_empty_knowledge_document_list
:
'
暂⽆搜索结果,请换⼀个关键词进⾏搜索'
upload_knowledge_document_btn_text
:
'
导入文件'
batch_delete_knowledge_document_btn_text
:
'
批量删除'
not_find_knowledge_document_message
:
'
未找到知识库文件'
create_knowledge_modal_title
:
'
创建知识库'
edit_knowledge_modal_title
:
'
编辑知识库'
knowledge_name_input_placeholder
:
'
请输入数据集名称'
knowledge_desc_input_placeholder
:
'
请输入数据集内容描述'
knowledge_import_type_label
:
'
导入类型'
knowledge_type_rule
:
'
请选择数据集类型'
knowledge_name_rule
:
'
请输入数据集名称'
knowledge_import_type_rule
:
'
请选择数据集导入方式'
knowledge_document_text_type
:
'
文本格式'
import_local_document_knowledge
:
'
本地文档'
import_local_document_knowledge_desc
:
'
支持上传TXT、MD、PDF、DOC、DOCX、格式的本地文件'
share_agent_module
:
share_agent_module
:
not_login_text
:
'
请先登录'
please
:
'
请先'
please
:
'
请先'
login
:
'
登录'
after_action
:
'
后开始提问'
after_action
:
'
后开始提问'
create_agent_btn_text
:
'
创建应用'
login_btn_text
:
'
立即登录'
publish_time_in
:
'
发布于'
create_agent_dialogue_title
:
'
温馨提示'
create_agent_dialogue_title
:
'
温馨提示'
create_agent_dialogue_content
:
'
为保证您的体验,请通过pc端访问'
create_agent_dialogue_content
:
'
为保证您的体验,请通过pc端访问'
create_agent_dialogue_positive_text
:
'
我知道啦'
create_agent_dialogue_positive_text
:
'
我知道啦'
src/locales/langs/zh-hk.yaml
View file @
c3a95ac9
...
@@ -5,6 +5,32 @@ home_module:
...
@@ -5,6 +5,32 @@ home_module:
common_module
:
common_module
:
cancel_btn_text
:
'
取
消'
cancel_btn_text
:
'
取
消'
confirm_btn_text
:
'
確
認'
confirm_btn_text
:
'
確
認'
prev_btn_text
:
'
上一步'
next_btn_text
:
'
下一步'
create
:
'
新增'
delete
:
'
刪除'
login
:
'
登錄'
logout
:
'
退出登錄'
not_login_text
:
'
請先登錄'
login_now
:
'
立即登錄'
name
:
'
名稱'
desc
:
'
描述'
publish_time_in
:
'
發佈於'
modified_time
:
'
編輯時間'
is_open
:
'
啓用'
status
:
'
狀態'
publish
:
'
發佈'
published
:
'
已發佈'
unpublished
:
'
未發佈'
ai_generate
:
'
AI生成'
regenerate
:
'
重新生成'
unavailable
:
'
不可用'
available
:
'
可用'
studying
:
'
學習中'
config
:
'
配置'
agent
:
'
應用'
knowledge
:
'
知識庫'
create_agent_btn_text
:
'
創建應用'
copy_success_message
:
'
複製成功'
copy_success_message
:
'
複製成功'
delete_success_message
:
'
刪除成功'
delete_success_message
:
'
刪除成功'
save_success_message
:
'
保存成功'
save_success_message
:
'
保存成功'
...
@@ -26,6 +52,7 @@ common_module:
...
@@ -26,6 +52,7 @@ common_module:
edit
:
'
編輯'
edit
:
'
編輯'
copy
:
'
複製'
copy
:
'
複製'
delete
:
'
刪除'
delete
:
'
刪除'
view
:
'
查看'
pagination_module
:
pagination_module
:
page_no
:
'
條'
page_no
:
'
條'
...
@@ -43,25 +70,15 @@ router_title_module:
...
@@ -43,25 +70,15 @@ router_title_module:
app_setting
:
'
應用設置'
app_setting
:
'
應用設置'
agent_application
:
'
Agent應用'
agent_application
:
'
Agent應用'
share_application
:
'
我的Agent應用'
share_application
:
'
我的Agent應用'
knowledge
:
'
知識庫'
sidebar_module
:
upload_knowledge_document
:
'
上傳知識庫文檔'
create_application_btn_text
:
'
創建應用'
knowledge_document_list
:
'
知識庫文檔列表'
login_btn_text
:
'
立即登錄'
knowledge_document_detail
:
'
知識庫文檔詳情'
not_login_text
:
'
未登錄'
dropdown_module
:
logout
:
'
退出登錄'
personal_space_module
:
personal_space_module
:
title
:
'
個人空間'
title
:
'
個人空間'
create_btn_text
:
'
新建'
create_btn_text
:
'
新建'
dropdown_module
:
create_agent
:
'
應用'
tab_module
:
agent
:
'
應用'
agent_module
:
agent_module
:
agent_list_module
:
agent_list_module
:
search_agent_placeholder
:
'
請輸入應用名稱或描述'
search_agent_placeholder
:
'
請輸入應用名稱或描述'
...
@@ -69,8 +86,6 @@ personal_space_module:
...
@@ -69,8 +86,6 @@ personal_space_module:
large_model
:
'
模型名稱'
large_model
:
'
模型名稱'
agent_id
:
'
應用ID'
agent_id
:
'
應用ID'
agent_publish_status
:
'
發佈狀態'
agent_publish_status
:
'
發佈狀態'
draft_status
:
'
未發佈'
publish_status
:
'
已發佈'
modified_time
:
'
最近編輯時間'
modified_time
:
'
最近編輯時間'
channel
:
'
渠道'
channel
:
'
渠道'
channel_popover_text
:
'
查看發佈詳情'
channel_popover_text
:
'
查看發佈詳情'
...
@@ -89,10 +104,6 @@ personal_space_module:
...
@@ -89,10 +104,6 @@ personal_space_module:
missing_agent_title_message
:
'
應用名稱不能爲空'
missing_agent_title_message
:
'
應用名稱不能爲空'
missing_agent_desc_message
:
'
暫無描述'
missing_agent_desc_message
:
'
暫無描述'
agent_options_module
:
config
:
'
配置'
publish
:
'
發佈'
agent_config_module
:
agent_config_module
:
stop_generate
:
'
停止生成'
stop_generate
:
'
停止生成'
generating_config_message
:
'
配置信息生成中...'
generating_config_message
:
'
配置信息生成中...'
...
@@ -111,7 +122,6 @@ personal_space_module:
...
@@ -111,7 +122,6 @@ personal_space_module:
agent_title_input_rule_message
:
'
請輸入應用名稱'
agent_title_input_rule_message
:
'
請輸入應用名稱'
agent_desc_input_placeholder
:
'
請描述你的應用,該描述將在應用發佈後固定展示'
agent_desc_input_placeholder
:
'
請描述你的應用,該描述將在應用發佈後固定展示'
update_avatar
:
'
修改頭像'
update_avatar
:
'
修改頭像'
ai_generate
:
'
AI生成'
agent_system_prompt
:
'
角色指令'
agent_system_prompt
:
'
角色指令'
agent_system_popover_message
:
'
通過角色指令(Instruction)功能,你能夠精確設定Agent應用的作用範圍。包括指定應用將扮演的角色、能夠使用的組件以及輸出結果的格式與風格。此外,你還可以規定應用不得執行哪些操作等。'
agent_system_popover_message
:
'
通過角色指令(Instruction)功能,你能夠精確設定Agent應用的作用範圍。包括指定應用將扮演的角色、能夠使用的組件以及輸出結果的格式與風格。此外,你還可以規定應用不得執行哪些操作等。'
optimize_agent_system_prompt
:
'
優化'
optimize_agent_system_prompt
:
'
優化'
...
@@ -156,32 +166,56 @@ personal_space_module:
...
@@ -156,32 +166,56 @@ personal_space_module:
auto_config_input_placeholder
:
'
請告訴我你想創建一個什麼樣的應用,大模型將爲你自動生成'
auto_config_input_placeholder
:
'
請告訴我你想創建一個什麼樣的應用,大模型將爲你自動生成'
cancel_btn_text
:
'
取
消'
cancel_btn_text
:
'
取
消'
random_generate_btn_text
:
'
隨機生成'
random_generate_btn_text
:
'
隨機生成'
ai_generate_btn_text
:
'
AI生成'
optimize_system_modal_module
:
optimize_system_modal_module
:
modal_title
:
'
角色指令優化'
modal_title
:
'
角色指令優化'
confirm_btn_text
:
'
使
用'
confirm_btn_text
:
'
使
用'
regenerate_btn_text
:
'
重新生成'
agent_publish_module
:
agent_publish_module
:
channel
:
'
發佈渠道'
channel
:
'
發佈渠道'
web_channel_name
:
'
網頁端'
web_channel_name
:
'
網頁端'
web_channel_desc
:
'
可通過PC或移動設備立即開始對話'
web_channel_desc
:
'
可通過PC或移動設備立即開始對話'
publish_status
:
'
狀態'
published
:
'
已發佈'
publish_time_label
:
'
發佈'
access_page
:
'
立即訪問'
access_page
:
'
立即訪問'
share_link
:
'
分享鏈接'
share_link
:
'
分享鏈接'
copy_share_url_success_message
:
'
鏈接複製成功,快分享給你的好友吧!'
copy_share_url_success_message
:
'
鏈接複製成功,快分享給你的好友吧!'
knowledge_module
:
search_knowledge_placeholder
:
'
請輸入知識庫名稱'
knowledge_name
:
'
知識庫名稱'
knowledge_desc
:
'
知識庫描述'
empty_knowledge_list
:
'
暫無知識庫'
search_empty_knowledge_list
:
'
暫⽆搜索結果,請換⼀個關鍵詞進⾏搜索'
delete_knowledge_dialog_content
:
'
刪除後將無法恢復,
是否確認刪除?'
not_find_knowledge_message
:
'
未找到知識庫'
search_knowledge_document_placeholder
:
'
請輸入文件名稱'
knowledge_document_name
:
'
文件名稱'
knowledge_document_char_count
:
'
字符數'
knowledge_document_char_unit
:
'
字符'
knowledge_document_format
:
'
文件格式'
view_knowledge_document_fragment
:
'
查看切片'
training_knowledge_document
:
'
重新訓練'
empty_knowledge_document_list
:
'
暫無上傳文檔'
search_empty_knowledge_document_list
:
'
暫⽆搜索結果,請換⼀個關鍵詞進⾏搜索'
upload_knowledge_document_btn_text
:
'
導入文件'
batch_delete_knowledge_document_btn_text
:
'
批量刪除'
not_find_knowledge_document_message
:
'
未找到知識庫文件'
create_knowledge_modal_title
:
'
創建知識庫'
edit_knowledge_modal_title
:
'
編輯知識庫'
knowledge_name_input_placeholder
:
'
請輸入數據集名稱'
knowledge_desc_input_placeholder
:
'
請輸入數據集內容描述'
knowledge_import_type_label
:
'
導入類型'
knowledge_type_rule
:
'
請選擇數據集類型'
knowledge_name_rule
:
'
請輸入數據集名稱'
knowledge_import_type_rule
:
'
請選擇數據集導入方式'
knowledge_document_text_type
:
'
文本格式'
import_local_document_knowledge
:
'
本地文檔'
import_local_document_knowledge_desc
:
'
支持上傳TXT、MD、PDF、DOC、DOCX、格式的本地文件'
share_agent_module
:
share_agent_module
:
not_login_text
:
'
請先登錄'
please
:
'
請先'
please
:
'
請先'
login
:
'
登錄'
after_action
:
'
後開始提問'
after_action
:
'
後開始提問'
create_agent_btn_text
:
'
創建應用'
login_btn_text
:
'
立即登錄'
publish_time_in
:
'
發佈於'
create_agent_dialogue_title
:
'
溫馨提示'
create_agent_dialogue_title
:
'
溫馨提示'
create_agent_dialogue_content
:
'
爲保證您的體驗,請通過pc端訪問'
create_agent_dialogue_content
:
'
爲保證您的體驗,請通過pc端訪問'
create_agent_dialogue_positive_text
:
'
我知道啦'
create_agent_dialogue_positive_text
:
'
我知道啦'
src/utils/create-discrete.ts
View file @
c3a95ac9
import
{
createDiscreteApi
}
from
'naive-ui'
import
{
createDiscreteApi
}
from
'naive-ui'
import
type
{
DialogApiInjection
,
DialogOptions
,
DialogReactive
}
from
'naive-ui/es/dialog/src/DialogProvider'
import
type
{
DialogApiInjection
,
DialogOptions
,
DialogReactive
}
from
'naive-ui/es/dialog/src/DialogProvider'
import
i18n
from
'@/locales'
const
{
t
}
=
i18n
.
global
/* 拦截一层添加默认配置 */
/* 拦截一层添加默认配置 */
function
createDialogProvider
(
dialog
:
DialogApiInjection
):
DialogApiInjection
{
function
createDialogProvider
(
dialog
:
DialogApiInjection
):
DialogApiInjection
{
...
@@ -8,6 +11,8 @@ function createDialogProvider(dialog: DialogApiInjection): DialogApiInjection {
...
@@ -8,6 +11,8 @@ function createDialogProvider(dialog: DialogApiInjection): DialogApiInjection {
style
:
'margin-top: 180px'
,
style
:
'margin-top: 180px'
,
titleStyle
:
'font-size: 16px'
,
titleStyle
:
'font-size: 16px'
,
contentStyle
:
'margin-left: 32px'
,
contentStyle
:
'margin-left: 32px'
,
negativeText
:
t
(
'common_module.cancel_btn_text'
),
positiveText
:
t
(
'common_module.confirm_btn_text'
),
}
}
return
{
return
{
...
...
src/views/personal-space/personal-app-setting/columns.ts
View file @
c3a95ac9
...
@@ -71,8 +71,7 @@ export function createChannelPublishColumn(handleChannelPublishTableAction: (act
...
@@ -71,8 +71,7 @@ export function createChannelPublishColumn(handleChannelPublishTableAction: (act
},
},
},
},
{
{
title
:
()
=>
title
:
()
=>
h
(
'span'
,
{},
t
(
'common_module.status'
)),
h
(
'span'
,
{},
t
(
'personal_space_module.agent_module.agent_setting_module.agent_publish_module.publish_status'
)),
key
:
'agentPublishStatus'
,
key
:
'agentPublishStatus'
,
align
:
'left'
,
align
:
'left'
,
width
:
220
,
width
:
220
,
...
@@ -100,7 +99,7 @@ export function createChannelPublishColumn(handleChannelPublishTableAction: (act
...
@@ -100,7 +99,7 @@ export function createChannelPublishColumn(handleChannelPublishTableAction: (act
marginBottom
:
'4px'
,
marginBottom
:
'4px'
,
},
},
},
},
t
(
'
personal_space_module.agent_module.agent_setting_module.agent_publish
_module.published'
),
t
(
'
common
_module.published'
),
),
),
h
(
h
(
'span'
,
'span'
,
...
@@ -110,11 +109,7 @@ export function createChannelPublishColumn(handleChannelPublishTableAction: (act
...
@@ -110,11 +109,7 @@ export function createChannelPublishColumn(handleChannelPublishTableAction: (act
},
},
},
},
{
{
default
:
()
=>
default
:
()
=>
formatDateTime
(
new
Date
())
+
t
(
'common_module.publish'
),
formatDateTime
(
new
Date
())
+
t
(
'personal_space_module.agent_module.agent_setting_module.agent_publish_module.publish_time_label'
,
),
},
},
),
),
],
],
...
...
src/views/personal-space/personal-app-setting/components/app-setting.vue
View file @
c3a95ac9
...
@@ -634,7 +634,7 @@ function handleStopGenerate() {
...
@@ -634,7 +634,7 @@ function handleStopGenerate() {
>
>
<div
class=
"mt-[-2px] h-[14px] w-[14px] bg-[url(@/assets/svgs/star.svg)] bg-[length:100%_100%]"
/>
<div
class=
"mt-[-2px] h-[14px] w-[14px] bg-[url(@/assets/svgs/star.svg)] bg-[length:100%_100%]"
/>
<span
class=
"text-xs"
>
<span
class=
"text-xs"
>
{{ t('
personal_space_module.agent_module.agent_setting_module.agent_config
_module.ai_generate') }}
{{ t('
common
_module.ai_generate') }}
</span>
</span>
</div>
</div>
</div>
</div>
...
@@ -842,7 +842,7 @@ function handleStopGenerate() {
...
@@ -842,7 +842,7 @@ function handleStopGenerate() {
@
click=
"handleAIGeneratePreamble"
@
click=
"handleAIGeneratePreamble"
/>
/>
</
template
>
</
template
>
{{ t('
personal_space_module.agent_module.agent_setting_module.agent_config
_module.ai_generate') }}
{{ t('
common
_module.ai_generate') }}
</NTooltip>
</NTooltip>
</template>
</template>
<NInput
<NInput
...
@@ -879,7 +879,7 @@ function handleStopGenerate() {
...
@@ -879,7 +879,7 @@ function handleStopGenerate() {
@
click=
"handleAIGenerateFeaturedQuestions"
@
click=
"handleAIGenerateFeaturedQuestions"
/>
/>
</
template
>
</
template
>
{{ t('
personal_space_module.agent_module.agent_setting_module.agent_config
_module.ai_generate') }}
{{ t('
common
_module.ai_generate') }}
</NTooltip>
</NTooltip>
</template>
</template>
<NDynamicInput
<NDynamicInput
...
...
src/views/personal-space/personal-app-setting/components/auto-config-modal.vue
View file @
c3a95ac9
...
@@ -117,11 +117,7 @@ function handleConfirm(inputType: 'random' | 'input') {
...
@@ -117,11 +117,7 @@ function handleConfirm(inputType: 'random' | 'input') {
class=
"h-[32px]! px-6! rounded-md! ml-4!"
class=
"h-[32px]! px-6! rounded-md! ml-4!"
@
click=
"handleConfirm('input')"
@
click=
"handleConfirm('input')"
>
>
{{
{{
t
(
'common_module.ai_generate'
)
}}
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.auto_config_modal_module.ai_generate_btn_text'
,
)
}}
</NButton>
</NButton>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/personal-space/personal-app-setting/components/optimize-system-modal.vue
View file @
c3a95ac9
...
@@ -142,11 +142,7 @@ function handleAdditionalPrompt() {
...
@@ -142,11 +142,7 @@ function handleAdditionalPrompt() {
<div
class=
"mt-2.5"
>
<div
class=
"mt-2.5"
>
<NButton
:disabled=
"generateAgentSystemLoading"
class=
"rounded-md!"
@
click=
"handleGenerateAgentSystem"
>
<NButton
:disabled=
"generateAgentSystemLoading"
class=
"rounded-md!"
@
click=
"handleGenerateAgentSystem"
>
{{
{{
t
(
'common_module.regenerate'
)
}}
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.optimize_system_modal_module.regenerate_btn_text'
,
)
}}
</NButton>
</NButton>
</div>
</div>
</div>
</div>
...
...
src/views/personal-space/personal-app-setting/components/page-narbar.vue
View file @
c3a95ac9
...
@@ -27,7 +27,7 @@ const personalAppConfigStore = usePersonalAppConfigStore()
...
@@ -27,7 +27,7 @@ const personalAppConfigStore = usePersonalAppConfigStore()
const
avatarOptions
=
readonly
([
const
avatarOptions
=
readonly
([
{
{
label
:
()
=>
h
(
'span'
,
{},
t
(
'
sidebar_module.dropdow
n_module.logout'
)),
label
:
()
=>
h
(
'span'
,
{},
t
(
'
commo
n_module.logout'
)),
key
:
'logout'
,
key
:
'logout'
,
icon
:
()
=>
h
(
CustomIcon
,
{
icon
:
'teenyicons:logout-solid'
}),
icon
:
()
=>
h
(
CustomIcon
,
{
icon
:
'teenyicons:logout-solid'
}),
},
},
...
@@ -46,11 +46,11 @@ const publishBtnLoading = ref(false)
...
@@ -46,11 +46,11 @@ const publishBtnLoading = ref(false)
const
agentAppOptionList
=
[
const
agentAppOptionList
=
[
{
{
value
:
'config'
,
value
:
'config'
,
label
:
'
personal_space_module.agent_module.agent_setting_module.agent_options
_module.config'
,
label
:
'
common
_module.config'
,
},
},
{
{
value
:
'publish'
,
value
:
'publish'
,
label
:
'
personal_space_module.agent_module.agent_setting_module.agent_options
_module.publish'
,
label
:
'
common
_module.publish'
,
},
},
]
]
...
...
src/views/personal-space/personal-app/columns.ts
View file @
c3a95ac9
...
@@ -174,13 +174,13 @@ export function createPersonalAppColumn(handlePersonalAppTableAction: (actionTyp
...
@@ -174,13 +174,13 @@ export function createPersonalAppColumn(handlePersonalAppTableAction: (actionTyp
switch
(
row
.
baseInfo
.
agentPublishStatus
)
{
switch
(
row
.
baseInfo
.
agentPublishStatus
)
{
case
'draft'
:
case
'draft'
:
publicText
=
'
personal_space_module.agent_module.agent_list_module.draft_status
'
publicText
=
'
common_module.unpublished
'
publicIcon
=
'gg:time'
publicIcon
=
'gg:time'
bgColor
=
'#f2f5f9'
bgColor
=
'#f2f5f9'
color
=
'#84868c'
color
=
'#84868c'
break
break
case
'publish'
:
case
'publish'
:
publicText
=
'
personal_space_module.agent_module.agent_list_module.publish_status
'
publicText
=
'
common_module.published
'
publicIcon
=
'gg:check-o'
publicIcon
=
'gg:check-o'
bgColor
=
'#ecffe6'
bgColor
=
'#ecffe6'
color
=
'#30bf13'
color
=
'#30bf13'
...
...
src/views/personal-space/personal-space.vue
View file @
c3a95ac9
...
@@ -18,23 +18,23 @@ const routerNameValue = ref(currentRoute.name)
...
@@ -18,23 +18,23 @@ const routerNameValue = ref(currentRoute.name)
const
personalSpaceModuleList
=
[
const
personalSpaceModuleList
=
[
{
{
routeName
:
'PersonalSpaceApp'
,
routeName
:
'PersonalSpaceApp'
,
label
:
'personal_space_module.tab_module.agent'
,
label
:
'common_module.agent'
,
},
{
routeName
:
'PersonalSpaceKnowledge'
,
label
:
'common_module.knowledge'
,
},
},
// {
// routeName: 'PersonalSpaceKnowledge',
// label: '知识库',
// },
]
]
const
addPersonalSpaceOptions
=
readonly
([
const
addPersonalSpaceOptions
=
readonly
([
{
{
label
:
()
=>
h
(
'
div'
,
{},
t
(
'personal_space_module.dropdown_module.create_
agent'
)),
label
:
()
=>
h
(
'
span'
,
{},
t
(
'common_module.
agent'
)),
key
:
'addAgent'
,
key
:
'addAgent'
,
icon
:
()
=>
h
(
ApplicationTwo
,
{
theme
:
'outline'
,
size
:
16
,
fill
:
'#333'
}),
icon
:
()
=>
h
(
ApplicationTwo
,
{
theme
:
'outline'
,
size
:
16
,
fill
:
'#333'
}),
},
},
// {
// {
// label:
'知识库'
,
// label:
() => h('span', {}, t('common_module.knowledge'))
,
// key: 'addKnowledge',
// key: 'addKnowledge',
// icon: () => h(NotebookOne, { theme: 'outline', size: 16, fill: '#333' }),
// icon: () => h(NotebookOne, { theme: 'outline', size: 16, fill: '#333' }),
// },
// },
...
...
src/views/share/components/footer-input.vue
View file @
c3a95ac9
...
@@ -64,7 +64,7 @@ const isCreateContinueQuestions = computed(() => {
...
@@ -64,7 +64,7 @@ const isCreateContinueQuestions = computed(() => {
onMounted
(()
=>
{
onMounted
(()
=>
{
emitter
?.
on
(
'selectQuestion'
,
(
featuredQuestion
)
=>
{
emitter
?.
on
(
'selectQuestion'
,
(
featuredQuestion
)
=>
{
if
(
!
isLogin
.
value
)
{
if
(
!
isLogin
.
value
)
{
window
.
$message
.
warning
(
t
(
'
share_agent
_module.not_login_text'
))
window
.
$message
.
warning
(
t
(
'
common
_module.not_login_text'
))
return
return
}
}
...
@@ -101,7 +101,7 @@ function handleEnterKeypress(event: KeyboardEvent) {
...
@@ -101,7 +101,7 @@ function handleEnterKeypress(event: KeyboardEvent) {
function
handleMessageSend
()
{
function
handleMessageSend
()
{
if
(
!
isLogin
.
value
)
{
if
(
!
isLogin
.
value
)
{
window
.
$message
.
warning
(
t
(
'
share_agent
_module.not_login_text'
))
window
.
$message
.
warning
(
t
(
'
common
_module.not_login_text'
))
return
return
}
}
...
@@ -238,7 +238,7 @@ defineExpose({
...
@@ -238,7 +238,7 @@ defineExpose({
<div
v-show=
"!isLogin"
class=
"absolute left-3 top-[5px] flex h-[34px] items-center text-[#84868c]"
>
<div
v-show=
"!isLogin"
class=
"absolute left-3 top-[5px] flex h-[34px] items-center text-[#84868c]"
>
{{ t('share_agent_module.please') }}
{{ t('share_agent_module.please') }}
<span
class=
"text-theme-color cursor-pointer px-1 hover:opacity-80"
@
click=
"handleToLogin"
>
<span
class=
"text-theme-color cursor-pointer px-1 hover:opacity-80"
@
click=
"handleToLogin"
>
{{ t('
share_agent
_module.login') }}
{{ t('
common
_module.login') }}
</span>
</span>
{{ t('share_agent_module.after_action') }}
{{ t('share_agent_module.after_action') }}
</div>
</div>
...
...
src/views/share/components/mobile-page-header.vue
View file @
c3a95ac9
...
@@ -41,10 +41,10 @@ function handleToLogin() {
...
@@ -41,10 +41,10 @@ function handleToLogin() {
class=
"rounded-md! h-[32px]! text-xs! w-[80px]!"
class=
"rounded-md! h-[32px]! text-xs! w-[80px]!"
@
click=
"handleToCreateApplication"
@
click=
"handleToCreateApplication"
>
>
{{
t
(
'
share_agent
_module.create_agent_btn_text'
)
}}
{{
t
(
'
common
_module.create_agent_btn_text'
)
}}
</NButton>
</NButton>
<NButton
v-show=
"!isLogin"
type=
"primary"
class=
"rounded-md! h-[32px]! text-xs! w-[80px]!"
@
click=
"handleToLogin"
>
<NButton
v-show=
"!isLogin"
type=
"primary"
class=
"rounded-md! h-[32px]! text-xs! w-[80px]!"
@
click=
"handleToLogin"
>
<span
class=
"text-xs"
>
{{
t
(
'
share_agent_module.login_btn_text
'
)
}}
</span>
<span
class=
"text-xs"
>
{{
t
(
'
common_module.login_now
'
)
}}
</span>
</NButton>
</NButton>
</div>
</div>
</header>
</header>
...
...
src/views/share/components/web-page-header.vue
View file @
c3a95ac9
...
@@ -61,7 +61,7 @@ function handleToLogin() {
...
@@ -61,7 +61,7 @@ function handleToLogin() {
{{
userStore
.
userInfo
.
nickName
}}
{{
userStore
.
userInfo
.
nickName
}}
</p>
</p>
<span>
<span>
{{
t
(
'
share_agent
_module.publish_time_in'
)
}}
{{
t
(
'
common
_module.publish_time_in'
)
}}
{{
formatDateTime
(
agentApplicationConfig
.
modifiedTime
)
}}
{{
formatDateTime
(
agentApplicationConfig
.
modifiedTime
)
}}
</span>
</span>
</div>
</div>
...
@@ -75,10 +75,10 @@ function handleToLogin() {
...
@@ -75,10 +75,10 @@ function handleToLogin() {
class=
"rounded-md! h-[32px]! w-[100px]!"
class=
"rounded-md! h-[32px]! w-[100px]!"
@
click=
"handleToCreateApplication"
@
click=
"handleToCreateApplication"
>
>
{{
t
(
'
share_agent
_module.create_agent_btn_text'
)
}}
{{
t
(
'
common
_module.create_agent_btn_text'
)
}}
</NButton>
</NButton>
<NButton
v-show=
"!isLogin"
type=
"primary"
class=
"rounded-md! h-[32px]! w-[100px]!"
@
click=
"handleToLogin"
>
<NButton
v-show=
"!isLogin"
type=
"primary"
class=
"rounded-md! h-[32px]! w-[100px]!"
@
click=
"handleToLogin"
>
{{
t
(
'
share_agent_module.login_btn_text
'
)
}}
{{
t
(
'
common_module.login_now
'
)
}}
</NButton>
</NButton>
</div>
</div>
</header>
</header>
...
...
types/locales.d.ts
View file @
c3a95ac9
...
@@ -10,6 +10,29 @@ declare namespace I18n {
...
@@ -10,6 +10,29 @@ declare namespace I18n {
common_module
:
{
common_module
:
{
cancel_btn_text
:
string
cancel_btn_text
:
string
confirm_btn_text
:
string
confirm_btn_text
:
string
prev_btn_text
:
string
next_btn_text
:
string
create
:
string
delete
:
string
login
:
string
logout
:
string
not_login_text
:
string
login_now
:
string
name
:
string
desc
:
string
publish_time_in
:
string
modified_time
:
string
is_open
:
string
status
:
string
publish
:
string
published
:
string
unpublished
:
string
ai_generate
:
string
regenerate
:
string
config
:
string
agent
:
string
knowledge
:
string
create_agent_btn_text
:
string
copy_success_message
:
string
copy_success_message
:
string
delete_success_message
:
string
delete_success_message
:
string
save_success_message
:
string
save_success_message
:
string
...
@@ -32,6 +55,7 @@ declare namespace I18n {
...
@@ -32,6 +55,7 @@ declare namespace I18n {
edit
:
string
edit
:
string
copy
:
string
copy
:
string
delete
:
string
delete
:
string
view
:
string
}
}
pagination_module
:
{
pagination_module
:
{
...
@@ -52,28 +76,17 @@ declare namespace I18n {
...
@@ -52,28 +76,17 @@ declare namespace I18n {
app_setting
:
string
app_setting
:
string
agent_application
:
string
agent_application
:
string
share_application
:
string
share_application
:
string
}
knowledge
:
string
upload_knowledge_document
:
string
sidebar_module
:
{
knowledge_document_list
:
string
create_application_btn_text
:
string
knowledge_document_detail
:
string
login_btn_text
:
string
not_login_text
:
string
dropdown_module
:
{
logout
:
string
}
}
}
personal_space_module
:
{
personal_space_module
:
{
title
:
string
title
:
string
create_btn_text
:
string
create_btn_text
:
string
dropdown_module
:
{
create_agent
:
string
}
tab_module
:
{
tab_module
:
{
agent
:
string
agent_module
:
{
agent_module
:
{
agent_list_module
:
{
agent_list_module
:
{
search_agent_placeholder
:
string
search_agent_placeholder
:
string
...
@@ -81,7 +94,6 @@ declare namespace I18n {
...
@@ -81,7 +94,6 @@ declare namespace I18n {
large_model
:
string
large_model
:
string
agent_id
:
string
agent_id
:
string
agent_publish_status
:
string
agent_publish_status
:
string
draft_status
:
string
publish_status
:
string
publish_status
:
string
modified_time
:
string
modified_time
:
string
channel
:
string
channel
:
string
...
@@ -103,11 +115,6 @@ declare namespace I18n {
...
@@ -103,11 +115,6 @@ declare namespace I18n {
missing_agent_title_message
:
string
missing_agent_title_message
:
string
missing_agent_desc_message
:
string
missing_agent_desc_message
:
string
agent_options_module
:
{
config
:
string
publish
:
string
}
agent_config_module
:
{
agent_config_module
:
{
stop_generate
:
string
stop_generate
:
string
generating_config_message
:
string
generating_config_message
:
string
...
@@ -126,7 +133,6 @@ declare namespace I18n {
...
@@ -126,7 +133,6 @@ declare namespace I18n {
agent_title_input_rule_message
:
string
agent_title_input_rule_message
:
string
agent_desc_input_placeholder
:
string
agent_desc_input_placeholder
:
string
update_avatar
:
string
update_avatar
:
string
ai_generate
:
string
agent_system_prompt
:
string
agent_system_prompt
:
string
agent_system_popover_message
:
string
agent_system_popover_message
:
string
optimize_agent_system_prompt
:
string
optimize_agent_system_prompt
:
string
...
@@ -162,13 +168,11 @@ declare namespace I18n {
...
@@ -162,13 +168,11 @@ declare namespace I18n {
auto_config_input_placeholder
:
string
auto_config_input_placeholder
:
string
cancel_btn_text
:
string
cancel_btn_text
:
string
random_generate_btn_text
:
string
random_generate_btn_text
:
string
ai_generate_btn_text
:
string
}
}
optimize_system_modal_module
:
{
optimize_system_modal_module
:
{
modal_title
:
string
modal_title
:
string
confirm_btn_text
:
string
confirm_btn_text
:
string
regenerate_btn_text
:
string
}
}
}
}
...
@@ -176,25 +180,52 @@ declare namespace I18n {
...
@@ -176,25 +180,52 @@ declare namespace I18n {
channel
:
string
channel
:
string
web_channel_name
:
string
web_channel_name
:
string
web_channel_desc
:
string
web_channel_desc
:
string
publish_status
:
string
published
:
string
publish_time_label
:
string
access_page
:
string
access_page
:
string
share_link
:
string
share_link
:
string
copy_share_url_success_message
:
string
copy_share_url_success_message
:
string
}
}
}
}
knowledge_module
:
{
search_knowledge_placeholder
:
string
knowledge_name
:
string
knowledge_desc
:
string
empty_knowledge_list
:
string
search_empty_knowledge_list
:
string
delete_knowledge_dialog_content
:
string
not_find_knowledge_message
:
string
search_knowledge_document_placeholder
:
string
knowledge_document_name
:
string
knowledge_document_char_count
:
string
knowledge_document_char_unit
:
string
knowledge_document_format
:
string
view_knowledge_document_fragment
:
string
training_knowledge_document
:
string
empty_knowledge_document_list
:
string
search_empty_knowledge_document_list
:
string
upload_knowledge_document_btn_text
:
string
batch_delete_knowledge_document_btn_text
:
string
not_find_knowledge_document_message
:
string
create_knowledge_modal_title
:
string
edit_knowledge_modal_title
:
string
knowledge_name_input_placeholder
:
string
knowledge_desc_input_placeholder
:
string
knowledge_import_type_label
:
string
knowledge_type_rule
:
string
knowledge_name_rule
:
string
knowledge_import_type_rule
:
string
knowledge_document_text_type
:
string
import_local_document_knowledge
:
string
import_local_document_knowledge_desc
:
string
}
}
}
}
}
share_agent_module
:
{
share_agent_module
:
{
not_login_text
:
string
please
:
string
please
:
string
login
:
string
after_action
:
string
after_action
:
string
create_agent_btn_text
:
string
login_btn_text
:
string
publish_time_in
:
string
create_agent_dialogue_title
:
string
create_agent_dialogue_title
:
string
create_agent_dialogue_content
:
string
create_agent_dialogue_content
:
string
create_agent_dialogue_positive_text
:
string
create_agent_dialogue_positive_text
:
string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment