refactor: 将对话解析器拆分为独立模块

将 lib/conversationParser 重构为 conversation/ 目录:
- 按 API 格式拆分解析器 (claude.ts, openai.ts, gemini.ts)
- 提取公共渲染逻辑到 render.ts
- 添加解析器注册表支持自动格式检测
- 更新组件导入路径
This commit is contained in:
fawney19
2026-01-16 03:11:41 +08:00
parent 02770d56df
commit adc82532eb
10 changed files with 2844 additions and 3 deletions
@@ -191,7 +191,7 @@
<script setup lang="ts">
import { User, Bot, Settings, Wrench, AlertCircle, ChevronRight, FileText, Image as ImageIcon } from 'lucide-vue-next'
import Badge from '@/components/ui/badge.vue'
import type { RenderBlock } from '../../lib/conversationParser'
import type { RenderBlock } from '../../conversation'
defineProps<{
blocks: RenderBlock[]
@@ -38,7 +38,7 @@
<script setup lang="ts">
import { AlertCircle, Zap } from 'lucide-vue-next'
import BlockRenderer from './BlockRenderer.vue'
import type { RenderResult } from '../../lib/conversationParser'
import type { RenderResult } from '../../conversation'
defineProps<{
renderResult: RenderResult