MCP tool results used Markdown ATX headings (##/###/####) for section headers — the status summary, each search hit, every file section in an exploration — which Markdown-rendering clients (e.g. the Claude Code VSCode extension) blow up to H1–H4 font size, filling the transcript with oversized lines (worst on search/explore, where the noise scales with result count). Swap them all for bold labels, which render at body size while keeping the same structure. CLI/TTY output (ContextBuilder) is unchanged — the issue notes it's fine. The format is parse-coupled, so kept in sync: - The explore truncation boundary and the offload chunker (reasoning/reasoner.ts) both key off the per-file header, now a unique `**`-prefixed marker emitted via a shared fileSectionHeader() helper. - Updated the offload strip regexes and switched the opt-in report-style prompt off ATX headings (same client, same rendering issue). - Updated test helpers (sectionFor, sourcedFiles, the callers section-boundary scan) that scanned the old markers. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ace8d8a0d0
commit
3e1547bbe1
@@ -175,7 +175,7 @@ describe('MCP staleness banner', () => {
|
||||
|
||||
const res = await handler.execute('codegraph_status', {});
|
||||
const text = res.content[0].text;
|
||||
expect(text).toContain('### Pending sync:');
|
||||
expect(text).toContain('**Pending sync:');
|
||||
expect(text).toContain('src/charlie-only.ts');
|
||||
// Status embeds the info first-class, so the auto-banner is suppressed.
|
||||
expect(text.startsWith('⚠️')).toBe(false);
|
||||
@@ -204,7 +204,7 @@ describe('MCP staleness banner', () => {
|
||||
|
||||
const res = await handler.execute('codegraph_status', {});
|
||||
const text = res.content[0].text;
|
||||
expect(text).toContain('### Auto-sync disabled:');
|
||||
expect(text).toContain('**Auto-sync disabled:');
|
||||
expect(text).toContain('OS watch/file limit exhausted');
|
||||
// status renders the notice inline, so the auto-banner is not also prepended.
|
||||
expect(text.startsWith('⚠️')).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user