(content: string, t: (zh: string, en: string) => string)
| 4055 | } |
| 4056 | |
| 4057 | function formatMessageContent(content: string, t: (zh: string, en: string) => string) { |
| 4058 | return formatDataContent(content, t) |
| 4059 | .replaceAll("sources", t("项目", "projects")) |
| 4060 | .replaceAll("source", t("项目", "project")) |
| 4061 | .replaceAll("Sources", t("项目", "Projects")) |
| 4062 | .replaceAll("Source", t("项目", "Project")) |
| 4063 | .replaceAll("来源", t("项目", "project")) |
| 4064 | .replaceAll("trace", t("检索链路", "trace")) |
| 4065 | .replaceAll( |
| 4066 | "Mock LLM planner completed MCP tool calls.", |
| 4067 | t("模拟 LLM 规划器已完成 MCP 工具调用。", "Mock LLM planner completed MCP tool calls.") |
| 4068 | ) |
| 4069 | .replace( |
| 4070 | "当前未配置 LLM_API_KEY,已使用有限 fallback 通过真实 MCP client 测试工具。", |
| 4071 | t( |
| 4072 | "当前未配置 LLM 密钥,已使用有限本地规则回退,并通过真实 MCP 客户端测试工具。", |
| 4073 | "LLM key is not configured. A limited local rule fallback was used to test tools through the real MCP client." |
| 4074 | ) |
| 4075 | ) |
| 4076 | .replace( |
| 4077 | "当前 fallback 支持列出 sources、检索 search、查询 event。请尝试:列出 sources,并搜索 SAG multi search。", |
| 4078 | t( |
| 4079 | "当前本地规则回退支持列出项目、执行检索、查询事件。请尝试:列出项目,并搜索 SAG 多路检索。", |
| 4080 | "The local fallback supports listing projects, searching, and querying events. Try listing projects and searching SAG multi-search." |
| 4081 | ) |
| 4082 | ) |
| 4083 | .replace( |
| 4084 | "已通过 MCP 调用 sag_search,并返回检索结果和 trace。", |
| 4085 | t("已通过 MCP 调用 sag_search,并返回检索结果和检索链路。", "Called sag_search through MCP and returned retrieval results and trace.") |
| 4086 | ); |
| 4087 | } |
| 4088 | |
| 4089 | function formatDataContent(content: string, t: (zh: string, en: string) => string) { |
| 4090 | const project = t("项目", "project"); |
no test coverage detected