重构: tool_registry拆分及多批改进

This commit is contained in:
lxy
2026-06-19 00:10:14 +08:00
parent a2871a66e0
commit 60b01d03ee
33 changed files with 703 additions and 247 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export function stripMd(text: string | null | undefined): string {
return text
.replace(/!\[([^\]]*)\]\([^)]*\)/g, '$1') // 图片 alt
.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1') // 链接文本
.replace(/```[a-zA-Z]*\n?/g, '') // 代码块围栏开
.replace(/```[^\n]*\n?/g, '') // 代码块围栏开(含任意 infostring 至换行,如 rust,norun)
.replace(/```/g, '') // 代码块围栏闭
.replace(/`([^`]+)`/g, '$1') // 行内代码
.replace(/^\s{0,3}>\s?/gm, '') // 引用