mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-05-02 05:51:29 +08:00
feat: 发布v3.5版本
This commit is contained in:
@@ -28,7 +28,7 @@ import { useModelStore } from '@/stores/modules/model';
|
||||
import { useSessionStore } from '@/stores/modules/session';
|
||||
import { useUserStore } from '@/stores/modules/user';
|
||||
import { getUserProfilePicture, systemProfilePicture } from '@/utils/user.ts';
|
||||
import YMarkdown from '@/vue-element-plus-y/components/XMarkdown/index.vue';
|
||||
import MarkedMarkdown from '@/components/MarkedMarkdown/index.vue';
|
||||
import '@/styles/github-markdown.css';
|
||||
import '@/styles/yixin-markdown.scss';
|
||||
|
||||
@@ -202,6 +202,13 @@ function handleDataChunk(chunk: AnyObject) {
|
||||
latest.content += parsed.content;
|
||||
}
|
||||
}
|
||||
|
||||
// 流式输出时保持滚动条在底部(等待 DOM 更新后再滚动)
|
||||
nextTick(() => {
|
||||
requestAnimationFrame(() => {
|
||||
bubbleListRef.value?.scrollToBottom();
|
||||
});
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
console.error('解析数据时出错:', err);
|
||||
@@ -864,7 +871,7 @@ onUnmounted(() => {
|
||||
<!-- 自定义气泡内容 -->
|
||||
<template #content="{ item }">
|
||||
<!-- chat 内容走 markdown -->
|
||||
<YMarkdown v-if="item.content && (item.role === 'assistant' || item.role === 'system')" class="markdown-body" :markdown="item.content" :themes="{ light: 'github-light', dark: 'github-dark' }" default-theme-mode="dark" />
|
||||
<MarkedMarkdown v-if="item.content && (item.role === 'assistant' || item.role === 'system')" class="markdown-body" :content="item.content" />
|
||||
<!-- user 内容 纯文本 + 图片 + 文件 -->
|
||||
<div v-if="item.role === 'user'" class="user-content-wrapper">
|
||||
<!-- 图片列表 -->
|
||||
|
||||
Reference in New Issue
Block a user