feat: Integrate Swiper library and enhance chat functionality

- Added Swiper library to package dependencies for improved UI components.
- Updated chat API to include summary model ID in message handling, allowing for more flexible model selection.
- Enhanced InputField component to manage model selection and state more effectively.
- Improved event handling in chat components to support new model features and ensure accurate message processing.
- Refactored SVG assets for better visual consistency and updated styles for improved user experience.
This commit is contained in:
wizardchen
2025-11-09 00:02:31 +08:00
parent 6e147be202
commit 83721f98d4
40 changed files with 5030 additions and 2085 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" class="r4oyk8abi__design-iconfont" width="128" height="128">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 2C5.79086 2 4 3.79086 4 6C4 7.56981 4.90422 8.92935 6.22252 9.58448C6.39251 9.66896 6.5 9.84241 6.5 10.0322V11H9.5V10.0322C9.5 9.84241 9.60749 9.66896 9.77748 9.58448C11.0958 8.92935 12 7.56981 12 6C12 3.79086 10.2091 2 8 2ZM3 6C3 3.23858 5.23858 1 8 1C10.7614 1 13 3.23858 13 6C13 7.85144 11.9936 9.46702 10.5 10.331V11.5C10.5 11.7761 10.2761 12 10 12H6C5.72386 12 5.5 11.7761 5.5 11.5V10.331C4.00636 9.46702 3 7.85144 3 6Z" fill="#32CE3F"></path>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 13.5H6V12.5H10V13.5Z" fill="#32CE3F"></path>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 15H7V14H9V15Z" fill="#32CE3F"></path>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4269 5.11946L7.60516 7.94123L5.7821 6.11819L6.48921 5.41108L7.60516 6.52702L9.71982 4.41235L10.4269 5.11946Z" fill="#32CE3F"></path>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="128" height="128">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 2C5.79086 2 4 3.79086 4 6C4 7.56981 4.90422 8.92935 6.22252 9.58448C6.39251 9.66896 6.5 9.84241 6.5 10.0322V11H9.5V10.0322C9.5 9.84241 9.60749 9.66896 9.77748 9.58448C11.0958 8.92935 12 7.56981 12 6C12 3.79086 10.2091 2 8 2ZM3 6C3 3.23858 5.23858 1 8 1C10.7614 1 13 3.23858 13 6C13 7.85144 11.9936 9.46702 10.5 10.331V11.5C10.5 11.7761 10.2761 12 10 12H6C5.72386 12 5.5 11.7761 5.5 11.5V10.331C4.00636 9.46702 3 7.85144 3 6Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.3"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 13.5H6V12.5H10V13.5Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.3"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 15H7V14H9V15Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.3"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4269 5.11946L7.60516 7.94123L5.7821 6.11819L6.48921 5.41108L7.60516 6.52702L9.71982 4.41235L10.4269 5.11946Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.3"/>
</svg>

Before

Width:  |  Height:  |  Size: 1022 B

After

Width:  |  Height:  |  Size: 1.1 KiB

+4 -4
View File
@@ -1,5 +1,5 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 3L10.8 6.2C10.9 6.7 11.3 7.1 11.8 7.2L15 8L11.8 8.8C11.3 8.9 10.9 9.3 10.8 9.8L10 13L9.2 9.8C9.1 9.3 8.7 8.9 8.2 8.8L5 8L8.2 7.2C8.7 7.1 9.1 6.7 9.2 6.2L10 3Z" fill="rgba(0,0,0,0.15)" stroke="rgba(0,0,0,0.3)" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.5 4L15.8 5.2C15.85 5.45 16.05 5.65 16.3 5.7L17.5 6L16.3 6.3C16.05 6.35 15.85 6.55 15.8 6.8L15.5 8L15.2 6.8C15.15 6.55 14.95 6.35 14.7 6.3L13.5 6L14.7 5.7C14.95 5.65 15.15 5.45 15.2 5.2L15.5 4Z" fill="rgba(0,0,0,0.15)" stroke="rgba(0,0,0,0.3)" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.5 13L4.8 14.2C4.85 14.45 5.05 14.65 5.3 14.7L6.5 15L5.3 15.3C5.05 15.35 4.85 15.55 4.8 15.8L4.5 17L4.2 15.8C4.15 15.55 3.95 15.35 3.7 15.3L2.5 15L3.7 14.7C3.95 14.65 4.15 14.45 4.2 14.2L4.5 13Z" fill="rgba(0,0,0,0.15)" stroke="rgba(0,0,0,0.3)" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<path d="M10 3L10.8 6.2C10.9 6.7 11.3 7.1 11.8 7.2L15 8L11.8 8.8C11.3 8.9 10.9 9.3 10.8 9.8L10 13L9.2 9.8C9.1 9.3 8.7 8.9 8.2 8.8L5 8L8.2 7.2C8.7 7.1 9.1 6.7 9.2 6.2L10 3Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.5 4L15.8 5.2C15.85 5.45 16.05 5.65 16.3 5.7L17.5 6L16.3 6.3C16.05 6.35 15.85 6.55 15.8 6.8L15.5 8L15.2 6.8C15.15 6.55 14.95 6.35 14.7 6.3L13.5 6L14.7 5.7C14.95 5.65 15.15 5.45 15.2 5.2L15.5 4Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.5 13L4.8 14.2C4.85 14.45 5.05 14.65 5.3 14.7L6.5 15L5.3 15.3C5.05 15.35 4.85 15.55 4.8 15.8L4.5 17L4.2 15.8C4.15 15.55 3.95 15.35 3.7 15.3L2.5 15L3.7 14.7C3.95 14.65 4.15 14.45 4.2 14.2L4.5 13Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.6" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 995 B

+82
View File
@@ -0,0 +1,82 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
<!-- Background -->
<defs>
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#F0FDF4;stop-opacity:1" />
<stop offset="100%" style="stop-color:#DCFCE7;stop-opacity:1" />
</linearGradient>
</defs>
<rect width="800" height="600" fill="url(#grad1)"/>
<!-- Decorative circles -->
<circle cx="100" cy="80" r="100" fill="#10B981" opacity="0.04"/>
<circle cx="700" cy="520" r="120" fill="#10B981" opacity="0.04"/>
<!-- Title -->
<text x="400" y="70" font-family="PingFang SC, sans-serif" font-size="36" font-weight="700" fill="#065F46" text-anchor="middle">智能文档检索</text>
<text x="400" y="105" font-family="PingFang SC, sans-serif" font-size="16" fill="#059669" text-anchor="middle">多模态文档解析 • 语义理解 • 精准检索</text>
<!-- Search Interface -->
<g transform="translate(100, 150)">
<!-- Search box with icon -->
<rect width="600" height="60" rx="12" fill="white" stroke="#10B981" stroke-width="2.5" filter="drop-shadow(0 4px 20px rgba(16, 185, 129, 0.15))"/>
<circle cx="35" cy="30" r="12" stroke="#10B981" stroke-width="2.5" fill="none"/>
<line x1="44" y1="39" x2="52" y2="47" stroke="#10B981" stroke-width="2.5" stroke-linecap="round"/>
<text x="70" y="36" font-family="PingFang SC, sans-serif" font-size="16" fill="#9CA3AF">输入查询内容进行智能检索...</text>
<!-- Search button -->
<rect x="480" y="12" width="100" height="36" rx="8" fill="#10B981"/>
<text x="530" y="36" font-family="PingFang SC, sans-serif" font-size="15" font-weight="600" fill="white" text-anchor="middle">检索</text>
</g>
<!-- Document Results -->
<!-- Result 1 -->
<g transform="translate(100, 250)">
<rect width="600" height="90" rx="12" fill="white" stroke="#10B981" stroke-width="2" filter="drop-shadow(0 2px 12px rgba(16, 185, 129, 0.1))"/>
<!-- Document icon -->
<g transform="translate(25, 20)">
<rect width="50" height="50" rx="8" fill="#D1FAE5"/>
<path d="M15 15 L35 15 M15 25 L35 25 M15 35 L25 35" stroke="#059669" stroke-width="2.5" stroke-linecap="round"/>
</g>
<!-- Content -->
<text x="95" y="35" font-family="PingFang SC, sans-serif" font-size="18" font-weight="600" fill="#065F46">RAG系统技术文档.pdf</text>
<text x="95" y="57" font-family="PingFang SC, sans-serif" font-size="13" fill="#6B7280">详细介绍了检索增强生成的核心原理和实现方案...</text>
<text x="95" y="75" font-family="PingFang SC, sans-serif" font-size="12" fill="#9CA3AF">3.2 MB • 127页 • 2024-01-20</text>
</g>
<!-- Result 2 -->
<g transform="translate(100, 360)">
<rect width="600" height="90" rx="12" fill="white" stroke="#E5E7EB" stroke-width="1.5" filter="drop-shadow(0 2px 8px rgba(0, 0, 0, 0.05))"/>
<!-- Document icon -->
<g transform="translate(25, 20)">
<rect width="50" height="50" rx="8" fill="#DBEAFE"/>
<path d="M15 15 L35 15 M15 25 L35 25 M15 35 L28 35" stroke="#1E40AF" stroke-width="2.5" stroke-linecap="round"/>
</g>
<!-- Content -->
<text x="95" y="35" font-family="PingFang SC, sans-serif" font-size="18" font-weight="600" fill="#1F2937">向量检索优化方案.docx</text>
<text x="95" y="57" font-family="PingFang SC, sans-serif" font-size="13" fill="#6B7280">基于Embedding的语义检索技术实践与优化...</text>
<text x="95" y="75" font-family="PingFang SC, sans-serif" font-size="12" fill="#9CA3AF">1.8 MB • 45页 • 2024-01-19</text>
</g>
<!-- Result 3 -->
<g transform="translate(100, 470)">
<rect width="600" height="90" rx="12" fill="white" stroke="#E5E7EB" stroke-width="1.5" filter="drop-shadow(0 2px 8px rgba(0, 0, 0, 0.05))"/>
<!-- Image icon -->
<g transform="translate(25, 20)">
<rect width="50" height="50" rx="8" fill="#FEF3C7"/>
<circle cx="20" cy="28" r="5" fill="#F59E0B"/>
<path d="M12 42 L20 34 L28 42 L38 32" stroke="#F59E0B" stroke-width="2.5" fill="none" stroke-linecap="round"/>
</g>
<!-- Content -->
<text x="95" y="35" font-family="PingFang SC, sans-serif" font-size="18" font-weight="600" fill="#1F2937">知识图谱架构图.png</text>
<text x="95" y="57" font-family="PingFang SC, sans-serif" font-size="13" fill="#6B7280">展示知识图谱的节点关系和查询路径...</text>
<text x="95" y="75" font-family="PingFang SC, sans-serif" font-size="12" fill="#9CA3AF">1.2 MB • 1920×1080 • 2024-01-18</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

+154
View File
@@ -0,0 +1,154 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
<!-- Background - Same green gradient as screenshot-1 -->
<defs>
<linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#F0FDF4;stop-opacity:1" />
<stop offset="100%" style="stop-color:#DCFCE7;stop-opacity:1" />
</linearGradient>
</defs>
<rect width="800" height="600" fill="url(#grad2)"/>
<!-- Decorative circles -->
<circle cx="120" cy="90" r="110" fill="#10B981" opacity="0.04"/>
<circle cx="680" cy="510" r="130" fill="#10B981" opacity="0.04"/>
<!-- Title -->
<text x="400" y="70" font-family="PingFang SC, sans-serif" font-size="36" font-weight="700" fill="#065F46" text-anchor="middle">混合检索策略</text>
<text x="400" y="105" font-family="PingFang SC, sans-serif" font-size="16" fill="#059669" text-anchor="middle">BM25 关键词 + 向量语义 + 知识图谱</text>
<!-- Three retrieval methods -->
<!-- BM25 -->
<g transform="translate(80, 170)">
<rect width="180" height="280" rx="12" fill="white" stroke="#F59E0B" stroke-width="2.5" filter="drop-shadow(0 4px 16px rgba(245, 158, 11, 0.15))"/>
<rect width="180" height="50" rx="12" fill="#FEF3C7"/>
<text x="90" y="33" font-family="PingFang SC, sans-serif" font-size="18" font-weight="700" fill="#92400E" text-anchor="middle">BM25</text>
<!-- Icon -->
<g transform="translate(65, 70)">
<circle cx="25" cy="25" r="20" fill="#FBBF24" opacity="0.2"/>
<text x="25" y="33" font-family="Arial" font-size="24" font-weight="700" fill="#F59E0B" text-anchor="middle">K</text>
</g>
<!-- Features -->
<text x="90" y="135" font-family="PingFang SC, sans-serif" font-size="14" fill="#92400E" text-anchor="middle">关键词匹配</text>
<g transform="translate(20, 155)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#FEF3C7"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#78350F" text-anchor="middle">TF-IDF 权重</text>
</g>
<g transform="translate(20, 195)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#FEF3C7"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#78350F" text-anchor="middle">词频统计</text>
</g>
<g transform="translate(20, 235)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#FEF3C7"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#78350F" text-anchor="middle">精确匹配</text>
</g>
</g>
<!-- Vector -->
<g transform="translate(310, 170)">
<rect width="180" height="280" rx="12" fill="white" stroke="#3B82F6" stroke-width="2.5" filter="drop-shadow(0 4px 16px rgba(59, 130, 246, 0.15))"/>
<rect width="180" height="50" rx="12" fill="#DBEAFE"/>
<text x="90" y="33" font-family="PingFang SC, sans-serif" font-size="18" font-weight="700" fill="#1E40AF" text-anchor="middle">向量检索</text>
<!-- Icon - Vector space -->
<g transform="translate(65, 70)">
<circle cx="25" cy="25" r="20" fill="#60A5FA" opacity="0.2"/>
<circle cx="15" cy="20" r="3" fill="#1E40AF"/>
<circle cx="25" cy="15" r="3" fill="#1E40AF"/>
<circle cx="35" cy="20" r="3" fill="#1E40AF"/>
<circle cx="20" cy="28" r="4" fill="#3B82F6"/>
<circle cx="30" cy="28" r="4" fill="#3B82F6"/>
<circle cx="15" cy="35" r="3" fill="#1E40AF"/>
<circle cx="25" cy="38" r="3" fill="#1E40AF"/>
<circle cx="35" cy="35" r="3" fill="#1E40AF"/>
<!-- Connection lines -->
<line x1="15" y1="20" x2="25" y2="15" stroke="#3B82F6" stroke-width="1" opacity="0.5"/>
<line x1="25" y1="15" x2="35" y2="20" stroke="#3B82F6" stroke-width="1" opacity="0.5"/>
<line x1="15" y1="20" x2="20" y2="28" stroke="#3B82F6" stroke-width="1" opacity="0.5"/>
<line x1="35" y1="20" x2="30" y2="28" stroke="#3B82F6" stroke-width="1" opacity="0.5"/>
<line x1="20" y1="28" x2="15" y2="35" stroke="#3B82F6" stroke-width="1" opacity="0.5"/>
<line x1="30" y1="28" x2="35" y2="35" stroke="#3B82F6" stroke-width="1" opacity="0.5"/>
</g>
<!-- Features -->
<text x="90" y="135" font-family="PingFang SC, sans-serif" font-size="14" fill="#1E40AF" text-anchor="middle">语义理解</text>
<g transform="translate(20, 155)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#DBEAFE"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#1E3A8A" text-anchor="middle">Embedding</text>
</g>
<g transform="translate(20, 195)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#DBEAFE"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#1E3A8A" text-anchor="middle">余弦相似度</text>
</g>
<g transform="translate(20, 235)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#DBEAFE"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#1E3A8A" text-anchor="middle">ANN 检索</text>
</g>
</g>
<!-- Knowledge Graph -->
<g transform="translate(540, 170)">
<rect width="180" height="280" rx="12" fill="white" stroke="#10B981" stroke-width="2.5" filter="drop-shadow(0 4px 16px rgba(16, 185, 129, 0.15))"/>
<rect width="180" height="50" rx="12" fill="#DCFCE7"/>
<text x="90" y="33" font-family="PingFang SC, sans-serif" font-size="18" font-weight="700" fill="#065F46" text-anchor="middle">知识图谱</text>
<!-- Icon - Graph nodes -->
<g transform="translate(65, 70)">
<circle cx="25" cy="25" r="20" fill="#34D399" opacity="0.2"/>
<!-- Nodes -->
<circle cx="15" cy="15" r="5" fill="#FFFFFF" stroke="#10B981" stroke-width="2"/>
<circle cx="35" cy="15" r="5" fill="#FFFFFF" stroke="#10B981" stroke-width="2"/>
<circle cx="25" cy="28" r="6" fill="#10B981" stroke="#065F46" stroke-width="2"/>
<circle cx="15" cy="38" r="5" fill="#FFFFFF" stroke="#10B981" stroke-width="2"/>
<circle cx="35" cy="38" r="5" fill="#FFFFFF" stroke="#10B981" stroke-width="2"/>
<!-- Edges -->
<line x1="15" y1="15" x2="25" y2="28" stroke="#10B981" stroke-width="2"/>
<line x1="35" y1="15" x2="25" y2="28" stroke="#10B981" stroke-width="2"/>
<line x1="25" y1="28" x2="15" y2="38" stroke="#10B981" stroke-width="2"/>
<line x1="25" y1="28" x2="35" y2="38" stroke="#10B981" stroke-width="2"/>
</g>
<!-- Features -->
<text x="90" y="135" font-family="PingFang SC, sans-serif" font-size="14" fill="#065F46" text-anchor="middle">关系推理</text>
<g transform="translate(20, 155)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#DCFCE7"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#064E3B" text-anchor="middle">实体识别</text>
</g>
<g transform="translate(20, 195)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#DCFCE7"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#064E3B" text-anchor="middle">路径查询</text>
</g>
<g transform="translate(20, 235)">
<rect x="0" y="0" width="140" height="30" rx="6" fill="#DCFCE7"/>
<text x="70" y="20" font-family="PingFang SC, sans-serif" font-size="12" fill="#064E3B" text-anchor="middle">子图匹配</text>
</g>
</g>
<!-- Arrows to fusion -->
<path d="M170 460 L400 510" stroke="#9CA3AF" stroke-width="2.5" stroke-dasharray="5,3" marker-end="url(#arrowGray)"/>
<path d="M400 460 L400 510" stroke="#9CA3AF" stroke-width="2.5" stroke-dasharray="5,3" marker-end="url(#arrowGray)"/>
<path d="M630 460 L400 510" stroke="#9CA3AF" stroke-width="2.5" stroke-dasharray="5,3" marker-end="url(#arrowGray)"/>
<!-- Fusion result -->
<g transform="translate(250, 520)">
<rect width="300" height="50" rx="10" fill="#10B981" filter="drop-shadow(0 4px 16px rgba(16, 185, 129, 0.25))"/>
<text x="150" y="32" font-family="PingFang SC, sans-serif" font-size="16" font-weight="700" fill="white" text-anchor="middle">融合排序 → 最优结果</text>
</g>
<!-- Arrow marker -->
<defs>
<marker id="arrowGray" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#9CA3AF"/>
</marker>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 8.2 KiB

+102
View File
@@ -0,0 +1,102 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
<!-- Background - Same green gradient -->
<defs>
<linearGradient id="grad3" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#F0FDF4;stop-opacity:1" />
<stop offset="100%" style="stop-color:#DCFCE7;stop-opacity:1" />
</linearGradient>
</defs>
<rect width="800" height="600" fill="url(#grad3)"/>
<!-- Decorative circles -->
<circle cx="110" cy="85" r="105" fill="#10B981" opacity="0.04"/>
<circle cx="690" cy="515" r="125" fill="#10B981" opacity="0.04"/>
<!-- Title -->
<text x="400" y="70" font-family="PingFang SC, sans-serif" font-size="36" font-weight="700" fill="#065F46" text-anchor="middle">Agentic RAG</text>
<text x="400" y="105" font-family="PingFang SC, sans-serif" font-size="16" fill="#059669" text-anchor="middle">基于 ReAct 范式的智能检索代理</text>
<!-- Query Input -->
<g transform="translate(300, 140)">
<rect width="200" height="50" rx="10" fill="white" stroke="#10B981" stroke-width="2" filter="drop-shadow(0 4px 16px rgba(16, 185, 129, 0.15))"/>
<text x="100" y="32" font-family="PingFang SC, sans-serif" font-size="16" font-weight="600" fill="#065F46" text-anchor="middle">用户问题</text>
</g>
<!-- Arrow down -->
<path d="M400 200 L400 225" stroke="#059669" stroke-width="3" marker-end="url(#arrowGreen)"/>
<!-- ReAct Loop Container -->
<g transform="translate(120, 235)">
<rect width="560" height="240" rx="16" fill="white" stroke="#8B5CF6" stroke-width="3" stroke-dasharray="10,5" filter="drop-shadow(0 4px 20px rgba(139, 92, 246, 0.15))"/>
<text x="280" y="30" font-family="PingFang SC, sans-serif" font-size="18" font-weight="700" fill="#5B21B6" text-anchor="middle">ReAct 循环</text>
<!-- Reasoning -->
<g transform="translate(40, 55)">
<rect width="220" height="75" rx="10" fill="#EDE9FE" stroke="#8B5CF6" stroke-width="2"/>
<text x="110" y="25" font-family="PingFang SC, sans-serif" font-size="17" font-weight="700" fill="#5B21B6" text-anchor="middle">① Reasoning</text>
<text x="110" y="45" font-family="PingFang SC, sans-serif" font-size="13" fill="#6B21A8" text-anchor="middle">分析问题</text>
<text x="110" y="63" font-family="PingFang SC, sans-serif" font-size="13" fill="#6B21A8" text-anchor="middle">规划行动策略</text>
</g>
<!-- Arrow to Tools -->
<path d="M270 92 L290 92" stroke="#8B5CF6" stroke-width="2.5" marker-end="url(#arrowPurple)"/>
<!-- Acting with Tools -->
<g transform="translate(300, 55)">
<rect width="220" height="160" rx="10" fill="#FEF3C7" stroke="#F59E0B" stroke-width="2"/>
<text x="110" y="25" font-family="PingFang SC, sans-serif" font-size="17" font-weight="700" fill="#92400E" text-anchor="middle">② Acting (Tools)</text>
<!-- Tool 1 -->
<g transform="translate(20, 38)">
<rect width="180" height="28" rx="6" fill="white" stroke="#F59E0B" stroke-width="1.5"/>
<circle cx="14" cy="14" r="6" fill="#FBBF24"/>
<text x="95" y="18" font-family="PingFang SC, sans-serif" font-size="12" fill="#78350F" text-anchor="middle">🔍 向量检索</text>
</g>
<!-- Tool 2 -->
<g transform="translate(20, 73)">
<rect width="180" height="28" rx="6" fill="white" stroke="#F59E0B" stroke-width="1.5"/>
<circle cx="14" cy="14" r="6" fill="#FBBF24"/>
<text x="95" y="18" font-family="PingFang SC, sans-serif" font-size="12" fill="#78350F" text-anchor="middle">🔗 知识图谱</text>
</g>
<!-- Tool 3 -->
<g transform="translate(20, 108)">
<rect width="180" height="28" rx="6" fill="white" stroke="#F59E0B" stroke-width="1.5"/>
<circle cx="14" cy="14" r="6" fill="#FBBF24"/>
<text x="95" y="18" font-family="PingFang SC, sans-serif" font-size="12" fill="#78350F" text-anchor="middle">📊 BM25检索</text>
</g>
</g>
<!-- Arrow back to Reasoning (loop) -->
<path d="M300 160 Q 280 195 150 160" stroke="#8B5CF6" stroke-width="2.5" stroke-dasharray="5,3" fill="none" marker-end="url(#arrowPurple)"/>
<text x="220" y="200" font-family="PingFang SC, sans-serif" font-size="12" fill="#7C3AED" text-anchor="middle">迭代优化</text>
</g>
<!-- Arrow down to result -->
<path d="M400 485 L400 505" stroke="#059669" stroke-width="3" marker-end="url(#arrowGreen)"/>
<!-- Final Answer -->
<g transform="translate(250, 515)">
<rect width="300" height="50" rx="10" fill="#10B981" filter="drop-shadow(0 4px 16px rgba(16, 185, 129, 0.25))"/>
<text x="150" y="32" font-family="PingFang SC, sans-serif" font-size="16" font-weight="700" fill="white" text-anchor="middle">③ 生成增强答案</text>
</g>
<!-- Side annotation -->
<g transform="translate(50, 320)">
<text x="0" y="0" font-family="PingFang SC, sans-serif" font-size="13" font-weight="600" fill="#059669">特点:</text>
<text x="0" y="22" font-family="PingFang SC, sans-serif" font-size="12" fill="#6B7280">• 自主推理</text>
<text x="0" y="42" font-family="PingFang SC, sans-serif" font-size="12" fill="#6B7280">• 工具调用</text>
<text x="0" y="62" font-family="PingFang SC, sans-serif" font-size="12" fill="#6B7280">• 动态迭代</text>
</g>
<!-- Arrow markers -->
<defs>
<marker id="arrowGreen" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#059669"/>
</marker>
<marker id="arrowPurple" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
<polygon points="0 0, 10 3, 0 6" fill="#8B5CF6"/>
</marker>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20" width="128" height="128">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.17736 1.28207C9.32257 1.23367 9.4805 1.24024 9.6212 1.30054L18.3713 5.05054C18.5619 5.13222 18.6995 5.30316 18.7388 5.50681C18.778 5.71045 18.7136 5.9203 18.567 6.06694C18.5138 6.12012 18.4366 6.24314 18.3744 6.46076C18.3146 6.66994 18.2812 6.92361 18.2812 7.1875C18.2812 7.45139 18.3146 7.70506 18.3744 7.91424C18.4366 8.13186 18.5138 8.25487 18.567 8.30806C18.811 8.55214 18.811 8.94786 18.567 9.19194C18.5138 9.24512 18.4366 9.36814 18.3744 9.58576C18.3146 9.79494 18.2812 10.0486 18.2812 10.3125C18.2812 10.5764 18.3146 10.8301 18.3744 11.0392C18.4366 11.2569 18.5138 11.3799 18.567 11.4331C18.811 11.6771 18.811 12.0729 18.567 12.3169C18.5138 12.3701 18.4366 12.4931 18.3744 12.7108C18.3146 12.92 18.2812 13.1736 18.2812 13.4375C18.2812 13.7014 18.3146 13.955 18.3744 14.1642C18.4366 14.3819 18.5138 14.5049 18.567 14.558C18.709 14.7001 18.7741 14.9017 18.7419 15.1001C18.7097 15.2984 18.5843 15.4691 18.4045 15.559L12.1545 18.684C11.9886 18.767 11.7944 18.772 11.6245 18.6976L1.62449 14.3226C1.397 14.2231 1.25 13.9983 1.25 13.75V4.375C1.25 4.10599 1.42215 3.86715 1.67736 3.78207L9.17736 1.28207ZM2.5 5.33064L10.9868 9.04362C10.9627 9.10997 10.9413 9.1765 10.9225 9.24236C10.826 9.58006 10.7812 9.95139 10.7812 10.3125C10.7812 10.6736 10.826 11.0449 10.9225 11.3826C10.9694 11.5469 11.0321 11.7153 11.1153 11.875C11.0321 12.0347 10.9694 12.2031 10.9225 12.3674C10.826 12.705 10.7812 13.0764 10.7812 13.4375C10.7812 13.7986 10.826 14.17 10.9225 14.5076C10.9694 14.6719 11.0321 14.8403 11.1153 15C11.0321 15.1597 10.9694 15.3281 10.9225 15.4924C10.826 15.83 10.7812 16.2014 10.7812 16.5625C10.7812 16.6986 10.7876 16.8361 10.8007 16.9728L2.5 13.3413V5.33064ZM12.1275 17.3C12.1265 17.2964 12.1254 17.2929 12.1244 17.2892C12.0646 17.08 12.0312 16.8264 12.0312 16.5625C12.0312 16.2986 12.0646 16.045 12.1244 15.8358C12.1695 15.6779 12.2225 15.5697 12.2686 15.502L17.0432 13.1146C17.0351 13.2224 17.0312 13.3304 17.0312 13.4375C17.0312 13.7986 17.076 14.17 17.1725 14.5076C17.1944 14.5844 17.2198 14.662 17.249 14.7393L12.1275 17.3ZM17.249 11.6142L12.1275 14.175C12.1265 14.1714 12.1254 14.1679 12.1244 14.1642C12.0646 13.955 12.0312 13.7014 12.0312 13.4375C12.0312 13.1736 12.0646 12.92 12.1244 12.7108C12.1695 12.5529 12.2225 12.4447 12.2686 12.377L17.0432 9.98965C17.0351 10.0974 17.0312 10.2054 17.0312 10.3125C17.0312 10.6736 17.076 11.0449 17.1725 11.3826C17.1944 11.4594 17.2198 11.537 17.249 11.6142ZM17.249 8.48921L12.1275 11.05C12.1265 11.0464 12.1254 11.0428 12.1244 11.0392C12.0646 10.8301 12.0312 10.5764 12.0312 10.3125C12.0312 10.0486 12.0646 9.79494 12.1244 9.58576C12.1695 9.42785 12.2225 9.31975 12.2686 9.252L17.0432 6.86465C17.0351 6.9724 17.0312 7.0804 17.0312 7.1875C17.0312 7.54861 17.076 7.91994 17.1725 8.25764C17.1944 8.33437 17.2198 8.412 17.249 8.48921ZM16.6402 5.66864L9.34721 2.54307L3.61469 4.45391L11.8573 8.06006L16.6402 5.66864Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.3"/>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

+2 -2
View File
@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" class="gh6beppe9__design-iconfont" width="128" height="128">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 3C2 2.17157 2.67157 1.5 3.5 1.5H12C12.2761 1.5 12.5 1.72386 12.5 2V11C12.5 11.2761 12.2761 11.5 12 11.5H4C3.44772 11.5 3 11.9477 3 12.5C3 13.0523 3.44772 13.5 4 13.5H13V2.5H14V14C14 14.2761 13.7761 14.5 13.5 14.5H4C2.89543 14.5 2 13.6046 2 12.5V3ZM3 10.7676C3.29417 10.5974 3.63571 10.5 4 10.5H11.5V2.5H3.5C3.22386 2.5 3 2.72386 3 3V10.7676ZM12.5 13H3.5V12H12.5V13Z" fill="#32CE3F"></path>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="128" height="128">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 3C2 2.17157 2.67157 1.5 3.5 1.5H12C12.2761 1.5 12.5 1.72386 12.5 2V11C12.5 11.2761 12.2761 11.5 12 11.5H4C3.44772 11.5 3 11.9477 3 12.5C3 13.0523 3.44772 13.5 4 13.5H13V2.5H14V14C14 14.2761 13.7761 14.5 13.5 14.5H4C2.89543 14.5 2 13.6046 2 12.5V3ZM3 10.7676C3.29417 10.5974 3.63571 10.5 4 10.5H11.5V2.5H3.5C3.22386 2.5 3 2.72386 3 3V10.7676ZM12.5 13H3.5V12H12.5V13Z" fill="#07C05F" stroke="#07C05F" stroke-width="0.3"/>
</svg>

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 578 B