优化智能体代码
This commit is contained in:
parent
58df6a599e
commit
0c6829887b
@ -115,11 +115,6 @@ import {
|
||||
ThunderboltOutlined, ReloadOutlined, CheckCircleOutlined,
|
||||
PlusCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import { Marked } from 'marked';
|
||||
import { markedHighlight } from 'marked-highlight';
|
||||
// import { onClickOutside } from '@vueuse/core';
|
||||
import 'highlight.js/styles/github.css';
|
||||
import hljs from 'highlight.js';
|
||||
import MessageInputComponent from '@/components/MessageInputComponent.vue'
|
||||
import MessageComponent from '@/components/MessageComponent.vue'
|
||||
|
||||
@ -128,17 +123,6 @@ const route = useRoute();
|
||||
const router = useRouter();
|
||||
const useSingleMode = computed(() => !!route.params.agent_id);
|
||||
|
||||
// ==================== 初始化配置 ====================
|
||||
|
||||
// Markdown渲染配置
|
||||
const marked = new Marked(
|
||||
{ gfm: true, breaks: true, tables: true },
|
||||
markedHighlight({
|
||||
langPrefix: 'hljs language-',
|
||||
highlight(code) { return hljs.highlightAuto(code).value; }
|
||||
})
|
||||
);
|
||||
|
||||
// ==================== 状态管理 ====================
|
||||
|
||||
// UI状态
|
||||
@ -172,11 +156,6 @@ const expandedToolCalls = ref(new Set()); // 展开的工具调用集合
|
||||
|
||||
// ==================== 基础工具函数 ====================
|
||||
|
||||
// 渲染Markdown
|
||||
const renderMarkdown = (text) => {
|
||||
if (!text) return '';
|
||||
return marked.parse(text);
|
||||
};
|
||||
|
||||
// 滚动到底部 TODO: 需要优化
|
||||
const scrollToBottom = async () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user