Skip to content

Commit 88fd875

Browse files
committed
fix: clean up formatting and improve readability in index.vue
1 parent 350095a commit 88fd875

File tree

1 file changed

+10
-9
lines changed
  • ui/src/components/ai-chat/component/answer-content

1 file changed

+10
-9
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div class="item-content mb-16 lighter">
33
<template v-for="(answer_text, index) in answer_text_list" :key="index">
44
<div class="avatar mr-8" v-if="showAvatar">
5-
<img v-if="application.avatar" :src="application.avatar" height="28px" width="28px" />
6-
<LogoIcon v-else height="28px" width="28px" />
5+
<img v-if="application.avatar" :src="application.avatar" height="28px" width="28px"/>
6+
<LogoIcon v-else height="28px" width="28px"/>
77
</div>
88
<div
99
class="content"
@@ -74,12 +74,14 @@
7474
</div>
7575
</template>
7676
<script setup lang="ts">
77-
import { computed, onMounted } from 'vue'
78-
import KnowledgeSourceComponent from '@/components/ai-chat/component/knowledge-source-component/index.vue'
77+
import {computed, onMounted} from 'vue'
78+
import KnowledgeSourceComponent
79+
from '@/components/ai-chat/component/knowledge-source-component/index.vue'
7980
import MdRenderer from '@/components/markdown/MdRenderer.vue'
8081
import OperationButton from '@/components/ai-chat/component/operation-button/index.vue'
81-
import { type chatType } from '@/api/type/application'
82+
import {type chatType} from '@/api/type/application'
8283
import bus from '@/bus'
84+
8385
const props = defineProps<{
8486
chatRecord: chatType
8587
application: any
@@ -148,14 +150,13 @@ function showSource(row: any) {
148150
if (props.type === 'log') {
149151
return true
150152
} else if (row.write_ed && 500 !== row.status) {
151-
if (props.type === 'debug-ai-chat') {
152-
return true
153-
}
153+
return true
154154
}
155155
return false
156156
}
157+
157158
const regenerationChart = (chat: chatType) => {
158-
props.sendMessage(chat.problem_text, { re_chat: true })
159+
props.sendMessage(chat.problem_text, {re_chat: true})
159160
}
160161
const stopChat = (chat: chatType) => {
161162
props.chatManagement.stop(chat.id)

0 commit comments

Comments
 (0)