Skip to content

Commit 328b86b

Browse files
feat: Frontend reasoning style
1 parent 81593b5 commit 328b86b

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

ui/src/components/markdown/ReasoningRander.vue

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
<template>
22
<div class="reasoning">
3-
<el-button link>
3+
<el-button text @click="showThink = !showThink" class="reasoning-button">
44
{{ $t('views.applicationWorkflow.nodes.aiChatNode.think') }}
5+
<el-icon class="ml-4" :class="showThink ? 'rotate-180' : ''"><ArrowDownBold /> </el-icon>
56
</el-button>
6-
<div class="border-l">
7-
<MdPreview
8-
noIconfont
9-
ref="editorRef"
10-
editorId="preview-only"
11-
:modelValue="content"
12-
class="reasoning-md"
13-
/>
14-
</div>
7+
<el-collapse-transition>
8+
<div class="border-l mt-8" v-show="showThink">
9+
<MdPreview
10+
noIconfont
11+
ref="editorRef"
12+
editorId="preview-only"
13+
:modelValue="content"
14+
class="reasoning-md"
15+
/>
16+
</div>
17+
</el-collapse-transition>
1518
</div>
1619
</template>
1720
<script lang="ts" setup>
21+
import { ref } from 'vue'
1822
const props = defineProps<{ content?: string }>()
23+
const showThink = ref<boolean>(true)
1924
</script>
2025
<style lang="scss" scoped>
2126
.reasoning {
22-
padding-left: 8px;
27+
.reasoning-button {
28+
font-size: 14px;
29+
color: var(--app-text-color-secondary) !important;
30+
}
2331
.reasoning-md {
32+
padding-left: 8px;
2433
--md-color: var(--app-text-color-secondary) !important;
2534
}
2635
}

0 commit comments

Comments
 (0)