fix(db): 移除查询结果与 schema 输出中的 markdown 加粗标记 - #22
Merged
Conversation
终端不渲染 markdown 加粗:`**` 在 db_query / db_tables 工具结果展开态 (tool-result-render 的 TruncatedMultiline 原文渲染)会以字面量显示, 且这些标记对 LLM 无信息量。从共享的 llm-zh 装配层移除: - formatting/result-document.ts:连接/数据库/SQL/行数标签去加粗 - formatting/schema-table.ts:索引标题去加粗 - 同步更新两个测试文件的断言
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
移除查询结果文档与 schema 表格中的 markdown 加粗标记(
**),改为纯文本标签。终端不渲染 markdown 加粗:
**在db_query/db_tables工具结果展开态(tool-result-render的TruncatedMultiline原文渲染)会以字面量显示,如**连接**:main。这些标记对 LLM 无信息量,故从共享的 llm-zh 装配层直接移除:formatting/result-document.ts:连接/数据库/SQL/行数标签去加粗(消费方:db_query工具输出、/db queryLLM 上下文消息)formatting/schema-table.ts:索引标题去加粗(消费方:db_tables工具 schema 模式、/db schema命令消息)分析要点
/db schema等display: true消息路径走 pi 的Markdown组件(支持strong),本就渲染正常;字面**仅出现在工具结果展开态(纯文本渲染,与 pi 平台对工具输出的默认行为一致)。Markdown组件渲染,结论是不引入:平台惯例(工具结果纯文本)、展开态保真价值(WYSIWYG 核对 LLM 所见)、窄终端下 7 列 schema 表折行退化(实测 width 60 时值破碎、行高翻倍)。验证方式