fix: 在 markdown 渲染前清理裸来源标注词(覆盖句尾。工单等情况)
This commit is contained in:
@@ -70,15 +70,15 @@
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
"path": "langgraph/src/hooks/useConversation.ts",
|
||||
"accessCount": 24,
|
||||
"lastAccessed": 1776194468880,
|
||||
"path": "langgraph/src/components/MessageBubble.tsx",
|
||||
"accessCount": 26,
|
||||
"lastAccessed": 1776195092384,
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
"path": "langgraph/src/components/MessageBubble.tsx",
|
||||
"accessCount": 22,
|
||||
"lastAccessed": 1776194486314,
|
||||
"path": "langgraph/src/hooks/useConversation.ts",
|
||||
"accessCount": 24,
|
||||
"lastAccessed": 1776194468880,
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"session_id":"21541d1e-def5-45d0-b75c-f06b026903cc","transcript_path":"/Users/gongzhiyong/.claude/projects/-Users-gongzhiyong/21541d1e-def5-45d0-b75c-f06b026903cc.jsonl","cwd":"/Users/gongzhiyong/go/SOC","model":{"id":"claude-opus-4-6[1m]","display_name":"Opus 4.6 (1M context)"},"workspace":{"current_dir":"/Users/gongzhiyong/go/SOC","project_dir":"/Users/gongzhiyong","added_dirs":[]},"version":"2.1.92","output_style":{"name":"default"},"cost":{"total_cost_usd":99.30370910000003,"total_duration_ms":88430596,"total_api_duration_ms":8765898,"total_lines_added":1789,"total_lines_removed":425},"context_window":{"total_input_tokens":17929,"total_output_tokens":366203,"context_window_size":1000000,"current_usage":{"input_tokens":3,"output_tokens":31,"cache_creation_input_tokens":394,"cache_read_input_tokens":333438},"used_percentage":33,"remaining_percentage":67},"exceeds_200k_tokens":true,"rate_limits":{"five_hour":{"used_percentage":65,"resets_at":1776200400},"seven_day":{"used_percentage":19,"resets_at":1776668400}}}
|
||||
{"session_id":"21541d1e-def5-45d0-b75c-f06b026903cc","transcript_path":"/Users/gongzhiyong/.claude/projects/-Users-gongzhiyong/21541d1e-def5-45d0-b75c-f06b026903cc.jsonl","cwd":"/Users/gongzhiyong/go/SOC","model":{"id":"claude-opus-4-6[1m]","display_name":"Opus 4.6 (1M context)"},"workspace":{"current_dir":"/Users/gongzhiyong/go/SOC","project_dir":"/Users/gongzhiyong","added_dirs":[]},"version":"2.1.92","output_style":{"name":"default"},"cost":{"total_cost_usd":102.64743005000004,"total_duration_ms":89029398,"total_api_duration_ms":9035874,"total_lines_added":1797,"total_lines_removed":427},"context_window":{"total_input_tokens":18070,"total_output_tokens":375763,"context_window_size":1000000,"current_usage":{"input_tokens":1,"output_tokens":37,"cache_creation_input_tokens":1270,"cache_read_input_tokens":337571},"used_percentage":34,"remaining_percentage":66},"exceeds_200k_tokens":true,"rate_limits":{"five_hour":{"used_percentage":67,"resets_at":1776200400},"seven_day":{"used_percentage":20,"resets_at":1776668400}}}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"lastSentAt": "2026-04-14T19:21:02.733Z",
|
||||
"repoSignature": "{\"repo\":\"Fasthei/so-c-chat-clone\",\"headSha\":\"99b3cda23c30677406c5c1cfcd47e9b31419b58d\",\"dirty\":true,\"openPrNumbers\":[],\"openIssueNumbers\":[],\"failingRunIds\":[24417020265,24417020324]}",
|
||||
"lastSentAt": "2026-04-14T19:31:12.714Z",
|
||||
"repoSignature": "{\"repo\":\"Fasthei/so-c-chat-clone\",\"headSha\":\"2574dd2bbff6664ebf01209e0bcbeede34d03dbc\",\"dirty\":true,\"openPrNumbers\":[],\"openIssueNumbers\":[],\"failingRunIds\":[24417020265,24417020324]}",
|
||||
"backlogZero": false
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"updatedAt": "2026-04-14T19:20:46.567Z",
|
||||
"updatedAt": "2026-04-14T19:30:59.734Z",
|
||||
"missions": [
|
||||
{
|
||||
"id": "session:21541d1e-def5-45d0-b75c-f06b026903cc:none",
|
||||
@@ -7,15 +7,15 @@
|
||||
"name": "none",
|
||||
"objective": "Session mission",
|
||||
"createdAt": "2026-04-13T19:38:14.188Z",
|
||||
"updatedAt": "2026-04-14T19:20:46.567Z",
|
||||
"updatedAt": "2026-04-14T19:30:59.734Z",
|
||||
"status": "running",
|
||||
"workerCount": 75,
|
||||
"workerCount": 78,
|
||||
"taskCounts": {
|
||||
"total": 75,
|
||||
"total": 78,
|
||||
"pending": 0,
|
||||
"blocked": 0,
|
||||
"inProgress": 5,
|
||||
"completed": 70,
|
||||
"completed": 73,
|
||||
"failed": 0
|
||||
},
|
||||
"agents": [
|
||||
@@ -763,37 +763,67 @@
|
||||
"name": "fixer-final:a5e29da",
|
||||
"role": "fixer-final",
|
||||
"ownership": "a5e29daab35e6112b",
|
||||
"status": "done",
|
||||
"currentStep": null,
|
||||
"latestUpdate": "completed",
|
||||
"completedSummary": null,
|
||||
"updatedAt": "2026-04-14T19:22:08.133Z"
|
||||
},
|
||||
{
|
||||
"name": "fixer-final:ae37418",
|
||||
"role": "fixer-final",
|
||||
"ownership": "ae37418ee405b2657",
|
||||
"status": "done",
|
||||
"currentStep": null,
|
||||
"latestUpdate": "completed",
|
||||
"completedSummary": null,
|
||||
"updatedAt": "2026-04-14T19:22:12.430Z"
|
||||
},
|
||||
{
|
||||
"name": "verifier:ac63455",
|
||||
"role": "verifier",
|
||||
"ownership": "ac63455dd785a09ab",
|
||||
"status": "done",
|
||||
"currentStep": null,
|
||||
"latestUpdate": "completed",
|
||||
"completedSummary": null,
|
||||
"updatedAt": "2026-04-14T19:30:33.139Z"
|
||||
},
|
||||
{
|
||||
"name": "fixer-final:ac70f45",
|
||||
"role": "fixer-final",
|
||||
"ownership": "ac70f451cc2e8b9f0",
|
||||
"status": "running",
|
||||
"currentStep": null,
|
||||
"latestUpdate": null,
|
||||
"completedSummary": null,
|
||||
"updatedAt": "2026-04-14T19:20:46.567Z"
|
||||
"updatedAt": "2026-04-14T19:30:59.734Z"
|
||||
}
|
||||
],
|
||||
"timeline": [
|
||||
{
|
||||
"id": "session-start:a043a52a4617f83e4:2026-04-14T19:20:10.270Z",
|
||||
"at": "2026-04-14T19:20:10.270Z",
|
||||
"id": "session-start:ac63455dd785a09ab:2026-04-14T19:22:16.130Z",
|
||||
"at": "2026-04-14T19:22:16.130Z",
|
||||
"kind": "update",
|
||||
"agent": "verifier:a043a52",
|
||||
"detail": "started verifier:a043a52",
|
||||
"sourceKey": "session-start:a043a52a4617f83e4"
|
||||
"agent": "verifier:ac63455",
|
||||
"detail": "started verifier:ac63455",
|
||||
"sourceKey": "session-start:ac63455dd785a09ab"
|
||||
},
|
||||
{
|
||||
"id": "session-stop:a043a52a4617f83e4:2026-04-14T19:20:17.627Z",
|
||||
"at": "2026-04-14T19:20:17.627Z",
|
||||
"id": "session-stop:ac63455dd785a09ab:2026-04-14T19:30:33.139Z",
|
||||
"at": "2026-04-14T19:30:33.139Z",
|
||||
"kind": "completion",
|
||||
"agent": "verifier:a043a52",
|
||||
"agent": "verifier:ac63455",
|
||||
"detail": "completed",
|
||||
"sourceKey": "session-stop:a043a52a4617f83e4"
|
||||
"sourceKey": "session-stop:ac63455dd785a09ab"
|
||||
},
|
||||
{
|
||||
"id": "session-start:a5e29daab35e6112b:2026-04-14T19:20:46.567Z",
|
||||
"at": "2026-04-14T19:20:46.567Z",
|
||||
"id": "session-start:ac70f451cc2e8b9f0:2026-04-14T19:30:59.734Z",
|
||||
"at": "2026-04-14T19:30:59.734Z",
|
||||
"kind": "update",
|
||||
"agent": "fixer-final:a5e29da",
|
||||
"detail": "started fixer-final:a5e29da",
|
||||
"sourceKey": "session-start:a5e29daab35e6112b"
|
||||
"agent": "fixer-final:ac70f45",
|
||||
"detail": "started fixer-final:ac70f45",
|
||||
"sourceKey": "session-start:ac70f451cc2e8b9f0"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -672,11 +672,38 @@
|
||||
"agent_type": "fixer-final",
|
||||
"started_at": "2026-04-14T19:20:46.567Z",
|
||||
"parent_mode": "none",
|
||||
"status": "completed",
|
||||
"completed_at": "2026-04-14T19:22:08.133Z",
|
||||
"duration_ms": 81566
|
||||
},
|
||||
{
|
||||
"agent_id": "ae37418ee405b2657",
|
||||
"agent_type": "fixer-final",
|
||||
"started_at": "2026-04-14T19:22:08.382Z",
|
||||
"parent_mode": "none",
|
||||
"status": "completed",
|
||||
"completed_at": "2026-04-14T19:22:12.430Z",
|
||||
"duration_ms": 4048
|
||||
},
|
||||
{
|
||||
"agent_id": "ac63455dd785a09ab",
|
||||
"agent_type": "verifier",
|
||||
"started_at": "2026-04-14T19:22:16.130Z",
|
||||
"parent_mode": "none",
|
||||
"status": "completed",
|
||||
"completed_at": "2026-04-14T19:30:33.139Z",
|
||||
"duration_ms": 497009
|
||||
},
|
||||
{
|
||||
"agent_id": "ac70f451cc2e8b9f0",
|
||||
"agent_type": "fixer-final",
|
||||
"started_at": "2026-04-14T19:30:59.734Z",
|
||||
"parent_mode": "none",
|
||||
"status": "running"
|
||||
}
|
||||
],
|
||||
"total_spawned": 74,
|
||||
"total_completed": 71,
|
||||
"total_spawned": 77,
|
||||
"total_completed": 74,
|
||||
"total_failed": 0,
|
||||
"last_updated": "2026-04-14T19:20:46.670Z"
|
||||
"last_updated": "2026-04-14T19:30:59.836Z"
|
||||
}
|
||||
@@ -309,6 +309,11 @@ export default function MessageBubble({ content: rawContent, role, isStreaming,
|
||||
content = String(rawContent ?? "");
|
||||
}
|
||||
|
||||
// Strip bare source annotation words from content before markdown rendering
|
||||
content = content
|
||||
.replace(/([。!?.!?])\s*(工单|知识库|网络|推断)\s*$/gm, '$1')
|
||||
.replace(/\s+(工单|知识库|网络|推断)\s*$/gm, '');
|
||||
|
||||
// 思考计时器
|
||||
const [thinkingDuration, setThinkingDuration] = useState(0);
|
||||
const thinkingTimerRef = useRef<ReturnType<typeof setInterval> | undefined>(undefined);
|
||||
|
||||
Reference in New Issue
Block a user