|
@@ -1052,8 +1052,8 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
.path-probability {{
|
|
.path-probability {{
|
|
|
margin-top: 6px;
|
|
margin-top: 6px;
|
|
|
padding: 8px;
|
|
padding: 8px;
|
|
|
- background: #fef3c7;
|
|
|
|
|
- border-left: 3px solid #f59e0b;
|
|
|
|
|
|
|
+ background: #f0f9ff;
|
|
|
|
|
+ border-left: 3px solid #3b82f6;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
font-size: 11px;
|
|
font-size: 11px;
|
|
|
line-height: 1.6;
|
|
line-height: 1.6;
|
|
@@ -1061,7 +1061,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
|
|
.path-probability-label {{
|
|
.path-probability-label {{
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
- color: #92400e;
|
|
|
|
|
|
|
+ color: #2563eb;
|
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
@@ -1075,9 +1075,9 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
.path-node {{
|
|
.path-node {{
|
|
|
padding: 4px 8px;
|
|
padding: 4px 8px;
|
|
|
background: white;
|
|
background: white;
|
|
|
- border: 1px solid #fbbf24;
|
|
|
|
|
|
|
+ border: 1px solid #93c5fd;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
- color: #78350f;
|
|
|
|
|
|
|
+ color: #1e40af;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
font-size: 10px;
|
|
font-size: 10px;
|
|
|
}}
|
|
}}
|
|
@@ -1086,7 +1086,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
position: relative;
|
|
position: relative;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
height: 2px;
|
|
height: 2px;
|
|
|
- background: #fbbf24;
|
|
|
|
|
|
|
+ background: #93c5fd;
|
|
|
min-width: 30px;
|
|
min-width: 30px;
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
@@ -1097,7 +1097,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
top: -3px;
|
|
top: -3px;
|
|
|
width: 0;
|
|
width: 0;
|
|
|
height: 0;
|
|
height: 0;
|
|
|
- border-left: 6px solid #fbbf24;
|
|
|
|
|
|
|
+ border-left: 6px solid #93c5fd;
|
|
|
border-top: 4px solid transparent;
|
|
border-top: 4px solid transparent;
|
|
|
border-bottom: 4px solid transparent;
|
|
border-bottom: 4px solid transparent;
|
|
|
}}
|
|
}}
|
|
@@ -1107,7 +1107,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
top: -16px;
|
|
top: -16px;
|
|
|
left: 50%;
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
transform: translateX(-50%);
|
|
|
- background: #fbbf24;
|
|
|
|
|
|
|
+ background: #3b82f6;
|
|
|
color: white;
|
|
color: white;
|
|
|
padding: 2px 6px;
|
|
padding: 2px 6px;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
@@ -1128,11 +1128,17 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
line-height: 1.6;
|
|
line-height: 1.6;
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
|
|
+ .reasoning-header {{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+ }}
|
|
|
|
|
+
|
|
|
.reasoning-label {{
|
|
.reasoning-label {{
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
color: #2563eb;
|
|
color: #2563eb;
|
|
|
- margin-bottom: 4px;
|
|
|
|
|
- display: block;
|
|
|
|
|
|
|
+ display: inline-block;
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
.reasoning-text {{
|
|
.reasoning-text {{
|
|
@@ -1145,8 +1151,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
|
|
.reasoning-toggle {{
|
|
.reasoning-toggle {{
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
- margin-top: 6px;
|
|
|
|
|
- padding: 4px 10px;
|
|
|
|
|
|
|
+ padding: 2px 8px;
|
|
|
font-size: 11px;
|
|
font-size: 11px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
color: #3b82f6;
|
|
color: #3b82f6;
|
|
@@ -1344,21 +1349,28 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
/* 右侧栏搜索词项 */
|
|
/* 右侧栏搜索词项 */
|
|
|
.searchword-item {{
|
|
.searchword-item {{
|
|
|
padding: 12px 15px;
|
|
padding: 12px 15px;
|
|
|
- border-bottom: 1px solid #e5e7eb;
|
|
|
|
|
|
|
+ margin-bottom: 12px;
|
|
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
transition: all 0.2s;
|
|
transition: all 0.2s;
|
|
|
border-left: 3px solid transparent;
|
|
border-left: 3px solid transparent;
|
|
|
|
|
+ background: white;
|
|
|
|
|
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
.searchword-item:hover {{
|
|
.searchword-item:hover {{
|
|
|
background: #dbeafe;
|
|
background: #dbeafe;
|
|
|
border-left-color: #3b82f6;
|
|
border-left-color: #3b82f6;
|
|
|
|
|
+ box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
.searchword-item.active {{
|
|
.searchword-item.active {{
|
|
|
background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%);
|
|
background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%);
|
|
|
border-left-color: #3b82f6;
|
|
border-left-color: #3b82f6;
|
|
|
|
|
+ border-color: #3b82f6;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
+ box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
.searchword-item.active::after {{
|
|
.searchword-item.active::after {{
|
|
@@ -3260,7 +3272,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
|
|
<!-- 中间栏:base_word列表 -->
|
|
<!-- 中间栏:base_word列表 -->
|
|
|
<div class="middle-sidebar" id="middleSidebar">
|
|
<div class="middle-sidebar" id="middleSidebar">
|
|
|
- <div class="sidebar-header">人设-人设分类、标签</div>
|
|
|
|
|
|
|
+ <div class="sidebar-header">人设-人设分类、标签(匹配度TOP3)</div>
|
|
|
<div class="sidebar-content" id="middleContent"></div>
|
|
<div class="sidebar-content" id="middleContent"></div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -3954,10 +3966,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
<div class="searchword-item ${{isActive ? 'active' : ''}}"
|
|
<div class="searchword-item ${{isActive ? 'active' : ''}}"
|
|
|
onclick="selectSearchWord(${{featureIdx}}, ${{baseWordIdx}}, ${{swIdx}})"
|
|
onclick="selectSearchWord(${{featureIdx}}, ${{baseWordIdx}}, ${{swIdx}})"
|
|
|
id="searchword-${{featureIdx}}-${{baseWordIdx}}-${{swIdx}}">
|
|
id="searchword-${{featureIdx}}-${{baseWordIdx}}-${{swIdx}}">
|
|
|
- <div class="cascade-item-title">📝 ${{searchWord}}</div>
|
|
|
|
|
- <div style="font-size:11px;color:#6b7280;margin-top:4px;">
|
|
|
|
|
- 组合词: ${{sourceWord}} → [${{score.toFixed(2)}}]
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="cascade-item-title">🔍 ${{searchWord}}</div>
|
|
|
${{evalBadges ? `<div style="margin-top:4px;">${{evalBadges}}</div>` : ''}}
|
|
${{evalBadges ? `<div style="margin-top:4px;">${{evalBadges}}</div>` : ''}}
|
|
|
${{originalFeature ? `
|
|
${{originalFeature ? `
|
|
|
<div class="path-probability">
|
|
<div class="path-probability">
|
|
@@ -3973,14 +3982,16 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
` : ''}}
|
|
` : ''}}
|
|
|
${{reasoning ? `
|
|
${{reasoning ? `
|
|
|
<div class="search-word-reasoning">
|
|
<div class="search-word-reasoning">
|
|
|
- <span class="reasoning-label">💭 推荐理由</span>
|
|
|
|
|
|
|
+ <div class="reasoning-header">
|
|
|
|
|
+ <span class="reasoning-label">💭 推荐理由</span>
|
|
|
|
|
+ <div class="reasoning-toggle"
|
|
|
|
|
+ onclick="event.stopPropagation(); toggleSearchWordReasoning('${{reasoningId}}')">
|
|
|
|
|
+ 展开 ▼
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<div class="reasoning-text" id="${{reasoningId}}-text">
|
|
<div class="reasoning-text" id="${{reasoningId}}-text">
|
|
|
${{reasoning}}
|
|
${{reasoning}}
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="reasoning-toggle"
|
|
|
|
|
- onclick="event.stopPropagation(); toggleSearchWordReasoning('${{reasoningId}}')">
|
|
|
|
|
- 展开 ▼
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
` : ''}}
|
|
` : ''}}
|
|
|
</div>
|
|
</div>
|
|
@@ -4124,8 +4135,8 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
|
|
const evalDetailId = `eval-detail-${{featureIdx}}-${{baseWordIdx}}-${{swIdx}}-${{noteIdx}}`;
|
|
const evalDetailId = `eval-detail-${{featureIdx}}-${{baseWordIdx}}-${{swIdx}}-${{noteIdx}}`;
|
|
|
|
|
|
|
|
- // 检查是否有解构数据
|
|
|
|
|
- const hasDeconstruction = deconstructionData[noteId] != null;
|
|
|
|
|
|
|
+ // 检查是否有解构数据,且仅当完全匹配时显示解构按钮
|
|
|
|
|
+ const hasDeconstruction = deconstructionData[noteId] != null && matchType.includes('完全匹配');
|
|
|
|
|
|
|
|
html += `
|
|
html += `
|
|
|
<div class="note-card ${{matchClass}}" style="border:2px solid #fbbf24;border-radius:12px;overflow:hidden;background:white;transition:all 0.2s;">
|
|
<div class="note-card ${{matchClass}}" style="border:2px solid #fbbf24;border-radius:12px;overflow:hidden;background:white;transition:all 0.2s;">
|