Skip to content

Commit 4a73755

Browse files
committed
refactor: executionDetailContent
1 parent a1abf33 commit 4a73755

File tree

12 files changed

+854
-764
lines changed

12 files changed

+854
-764
lines changed

ui/public/tool/bochaai/detail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[博查开放平台](https://open.bochaai.com/overview) 上申请 API 密钥。
1010
![API Key](/ui/tool/img/bocha_APIKey.jpg)
1111
2. 在函数库中配置
12-
在函数库的博查函数面板中,点击 … > 启用参数,填写 API 密钥,并启用该函数。
12+
在函数库的博查函数面板中,点击 … > 启动参数,填写 API 密钥,并启用该函数。
1313
![启动参数](/ui/tool/img/bocha_setting.jpg)
1414
3. 在应用中使用
1515
在高级编排应用中,点击添加组件->函数库->博查,设置使用参数。

ui/public/tool/langsearch/detail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LangSearch 是一个提供免费Web Search API和Rerank API的服务,支持新
99
[LangSearch](https://langsearch.com/overview) 上申请 API 密钥。
1010
![API Key](/ui/tool/img/langsearch_APIKey.jpg)
1111
2. 在函数库中配置
12-
在函数库的LangSearch函数面板中,点击 … > 启用参数,填写 API 密钥,并启用该函数。
12+
在函数库的LangSearch函数面板中,点击 … > 启动参数,填写 API 密钥,并启用该函数。
1313
![启动参数](/ui/tool/img/langsearch_setting.jpg)
1414
3. 在应用中使用
1515
在高级编排应用中,点击添加组件->函数库->LangSearch,设置使用参数。

ui/public/tool/mysql/detail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MySQL查询是一个连接MySQL数据库执行SQL查询的工具。
66
## 配置
77

88
1. 在函数库中配置启动参数
9-
在函数库的MySQL函数面板中,点击 … > 启用参数,填写数据库连接参数,并启用该函数。
9+
在函数库的MySQL函数面板中,点击 … > 启动参数,填写数据库连接参数,并启用该函数。
1010
![启动参数](/ui/tool/img/MySQL_setting.jpg)
1111
2. 在应用中使用
1212
在高级编排应用中,点击添加组件->函数库->MySQL查询,设置查询内容。

ui/public/tool/postgresql/detail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PostgreSQL查询是一个连接PostgreSQL数据库执行SQL查询的工具。
66
## 配置
77

88
1. 在函数库中配置启动参数
9-
在函数库的PostgreSQL函数面板中,点击 … > 启用参数,填写数据库连接参数,并启用该函数。
9+
在函数库的PostgreSQL函数面板中,点击 … > 启动参数,填写数据库连接参数,并启用该函数。
1010
![启动参数](/ui/tool/img/PostgreSQL_setting.jpg)
1111
2. 在应用中使用
1212
在高级编排应用中,点击添加组件->函数库->PostgreSQL查询,设置查询内容。

ui/src/components/ai-chat/ExecutionDetailDialog.vue

Lines changed: 2 additions & 710 deletions
Large diffs are not rendered by default.

ui/src/components/ai-chat/KnowledgeSource.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,25 @@ const props = defineProps({
8181
type: {
8282
type: String,
8383
default: ''
84+
},
85+
executionIsRightPanel: {
86+
type: Boolean,
87+
required: false,
8488
}
8589
})
8690
91+
const emit = defineEmits(['openExecutionDetail'])
92+
8793
const ParagraphSourceDialogRef = ref()
8894
const ExecutionDetailDialogRef = ref()
8995
function openParagraph(row: any, id?: string) {
9096
ParagraphSourceDialogRef.value.open(row, id)
9197
}
9298
function openExecutionDetail(row: any) {
99+
if(props.executionIsRightPanel){
100+
emit('openExecutionDetail')
101+
return
102+
}
93103
ExecutionDetailDialogRef.value.open(row)
94104
}
95105
const uniqueParagraphList = computed(() => {

ui/src/components/ai-chat/component/ExecutionDetailContent.vue

Lines changed: 725 additions & 0 deletions
Large diffs are not rendered by default.

ui/src/components/ai-chat/component/answer-content/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
<KnowledgeSource
4444
:data="chatRecord"
4545
:type="application.type"
46+
:executionIsRightPanel="props.executionIsRightPanel"
47+
@open-execution-detail="emit('openExecutionDetail')"
4648
v-if="showSource(chatRecord) && index === chatRecord.answer_text_list.length - 1"
4749
/>
4850
</el-card>
@@ -83,11 +85,12 @@ const props = defineProps<{
8385
sendMessage: (question: string, other_params_data?: any, chat?: chatType) => Promise<boolean>
8486
chatManagement: any
8587
type: 'log' | 'ai-chat' | 'debug-ai-chat'
88+
executionIsRightPanel?: boolean
8689
}>()
8790
8891
const { user } = useStore()
8992
90-
const emit = defineEmits(['update:chatRecord'])
93+
const emit = defineEmits(['update:chatRecord', 'openExecutionDetail'])
9194
9295
const showAvatar = computed(() => {
9396
return user.isEnterprise() ? props.application.show_avatar : true

ui/src/components/ai-chat/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
:type="type"
4949
:send-message="sendMessage"
5050
:chat-management="ChatManagement"
51+
:executionIsRightPanel="props.executionIsRightPanel"
52+
@open-execution-detail="emit('openExecutionDetail', chatList[index])"
5153
></AnswerContent>
5254
</template>
5355
<TransitionContent
@@ -119,14 +121,15 @@ const props = withDefaults(
119121
record?: Array<chatType>
120122
available?: boolean
121123
chatId?: string
124+
executionIsRightPanel?: boolean
122125
}>(),
123126
{
124127
applicationDetails: () => ({}),
125128
available: true,
126129
type: 'ai-chat',
127130
},
128131
)
129-
const emit = defineEmits(['refresh', 'scroll'])
132+
const emit = defineEmits(['refresh', 'scroll', 'openExecutionDetail'])
130133
const { application, common } = useStore()
131134
const isMobile = computed(() => {
132135
return common.isMobile() || mode === 'embed' || mode === 'mobile'

ui/src/locales/lang/en-US/ai-chat.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export default {
2+
mine: 'Mine',
3+
logoutContent: 'Logging out will not lose any data. You can still log in to this account.',
4+
confirmModification: 'Confirm modification',
25
noHistory: 'No Chat History',
36
createChat: 'New Chat',
47
history: 'Chat History',

0 commit comments

Comments
 (0)