mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-28 05:42:51 +00:00
feat:
This commit is contained in:
parent
50480616c5
commit
05cd6c2cb0
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="ai-chat" :class="log ? 'chart-log' : ''">
|
||||
<el-scrollbar ref="scrollDiv" @scroll="handleScrollTop">
|
||||
<div ref="aiChatRef" class="ai-chat" :class="log ? 'chart-log' : ''">
|
||||
<el-scrollbar ref="scrollDiv">
|
||||
<div ref="dialogScrollbar" class="ai-chat__content p-24">
|
||||
<div class="item-content mb-16">
|
||||
<div class="avatar">
|
||||
|
|
@ -156,6 +156,7 @@ const props = defineProps({
|
|||
})
|
||||
const { application } = useStore()
|
||||
|
||||
const aiChatRef = ref()
|
||||
const quickInputRef = ref()
|
||||
const scrollDiv = ref()
|
||||
const dialogScrollbar = ref()
|
||||
|
|
@ -272,9 +273,6 @@ function chatMessage() {
|
|||
if (row) {
|
||||
ChatManagement.addChatRecord(row, 50, loading)
|
||||
ChatManagement.write(id)
|
||||
nextTick(() => {
|
||||
scrollDiv.value.setScrollTop(Number.MAX_SAFE_INTEGER)
|
||||
})
|
||||
const reader = response.body.getReader()
|
||||
/*eslint no-constant-condition: ["error", { "checkLoops": false }]*/
|
||||
const write = ({ done, value }: { done: boolean; value: any }) => {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ import type { FormInstance, FormRules } from 'element-plus'
|
|||
import logApi from '@/api/log'
|
||||
import useStore from '@/stores'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
const isEdit = ref(false)
|
||||
|
||||
const route = useRoute()
|
||||
const {
|
||||
|
|
@ -74,6 +73,7 @@ const dialogVisible = ref<boolean>(false)
|
|||
const loading = ref(false)
|
||||
|
||||
const form = ref<any>({})
|
||||
const isEdit = ref(false)
|
||||
|
||||
const rules = reactive<FormRules>({
|
||||
content: [{ required: true, message: '请输入内容', trigger: 'blur' }]
|
||||
|
|
@ -82,6 +82,7 @@ const rules = reactive<FormRules>({
|
|||
watch(dialogVisible, (bool) => {
|
||||
if (!bool) {
|
||||
form.value = {}
|
||||
isEdit.value = false
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<el-table-column prop="chat_record_count" label="对话提问数" align="right" />
|
||||
<el-table-column prop="star_num" label="用户反馈" align="right">
|
||||
<template #default="{ row }">
|
||||
<span v-if="!row.trample_num && !row.trample_num"> - </span>
|
||||
<span v-if="!row.trample_num && !row.star_num"> - </span>
|
||||
<span v-else>
|
||||
<span v-if="row.star_num">
|
||||
<AppIcon iconName="app-like-color"></AppIcon>
|
||||
|
|
|
|||
Loading…
Reference in New Issue