Merge branch 'main' of github.com:maxkb-dev/maxkb

This commit is contained in:
shaohuzhang1 2024-03-12 12:10:12 +08:00
commit cc2cdff2bc

View File

@ -260,10 +260,11 @@ function openParagraph(row: any, id?: string) {
function quickProblemHandel(val: string) { function quickProblemHandel(val: string) {
if (!props.log) { if (!props.log) {
inputValue.value = val // inputValue.value = val
nextTick(() => { // nextTick(() => {
quickInputRef.value?.focus() // quickInputRef.value?.focus()
}) // })
chatMessage(null, val)
} }
} }
@ -404,12 +405,12 @@ const errorWrite = (chat: any) => {
ChatManagement.append(chat.id, '抱歉,当前正在维护,无法提供服务,请稍后再试!') ChatManagement.append(chat.id, '抱歉,当前正在维护,无法提供服务,请稍后再试!')
ChatManagement.close(chat.id) ChatManagement.close(chat.id)
} }
function chatMessage(chat?: any) { function chatMessage(chat?: any, problem?: string) {
loading.value = true loading.value = true
if (!chat) { if (!chat) {
chat = reactive({ chat = reactive({
id: randomId(), id: randomId(),
problem_text: inputValue.value, problem_text: problem ? problem : inputValue.value,
answer_text: '', answer_text: '',
buffer: [], buffer: [],
write_ed: false, write_ed: false,