Skip to content

Commit 0b090b0

Browse files
fix: chat skill style
1 parent 2827bb2 commit 0b090b0

File tree

3 files changed

+35
-21
lines changed

3 files changed

+35
-21
lines changed

ui/src/components/markdown/MdRenderer.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,4 @@ function handleQuestionClick(content: string) {
247247
}
248248
}
249249
250-
.cursor {
251-
cursor: pointer;
252-
}
253250
</style>

ui/src/components/markdown/tool-calls-render/content/simple-tool-calls/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
2-
<el-card>
3-
{{ content.content.input }}
4-
</el-card>
5-
<el-card>
6-
{{ content.content.output }}
7-
</el-card>
2+
<div>
3+
<p class="mt-8 mb-8">{{ $t('common.param.inputParam') }}:</p>
4+
<span class="color-secondary">{{ content.content.input }}</span>
5+
<p class="mt-8 mb-8">{{ $t('common.param.outputParam') }}:</p>
6+
<span class="color-secondary">{{ content.content.output }}</span>
7+
</div>
88
</template>
99
<script setup lang="ts">
1010
import { type ToolCalls } from '@/components/markdown/tool-calls-render/index'
Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
<template>
2-
<el-collapse>
3-
<el-collapse-item title="Consistency">
4-
<template #title>
5-
<div class="flex" style="flex-wrap: nowrap; align-items: center">
6-
<el-avatar class="avatar-gradient mr-8" style="height: 20px; width: 20px" shape="square">
7-
<img :src="toolCallsContent.icon || defaultIcon" /> </el-avatar
8-
>{{ toolCallsContent.title || '工具执行' }}
9-
</div>
10-
</template>
11-
<Content :content="toolCallsContent"></Content>
12-
</el-collapse-item>
13-
</el-collapse>
2+
<el-card shadow="never" class="layout-bg mt-8" style="--el-card-padding: 8px 12px">
3+
<div class="flex-between cursor" @click="showContent = !showContent">
4+
<div class="flex align-center" style="line-height: 20px">
5+
<el-avatar
6+
v-if="toolCallsContent.icon"
7+
shape="square"
8+
:size="24"
9+
style="background: none"
10+
class="mr-4"
11+
>
12+
<img :src="toolCallsContent.icon" alt="" />
13+
</el-avatar>
14+
<ToolIcon v-else :size="24" class="mr-4" />
15+
<span class="ml-4">{{ toolCallsContent.title || '-' }}</span>
16+
</div>
17+
<div>
18+
<el-icon class="arrow-icon" :class="showContent ? 'rotate-180' : ''">
19+
<ArrowDown />
20+
</el-icon>
21+
</div>
22+
</div>
23+
<el-collapse-transition>
24+
<div v-show="showContent">
25+
<Content :content="toolCallsContent"></Content>
26+
</div>
27+
</el-collapse-transition>
28+
</el-card>
1429
</template>
1530
<script lang="ts" setup>
1631
import Content from './content/index.vue'
@@ -26,5 +41,7 @@ const toolCallsContent = computed<ToolCalls>(() => {
2641
return { type: 'simple-tool-calls', icon: '', title: '', content: {} }
2742
}
2843
})
44+
45+
const showContent = ref<boolean>(false)
2946
</script>
3047
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)