Skip to content

Improve code_search output formatting#595

Merged
jahooma merged 1 commit intomainfrom
jahooma/code-search-lines
May 5, 2026
Merged

Improve code_search output formatting#595
jahooma merged 1 commit intomainfrom
jahooma/code-search-lines

Conversation

@jahooma
Copy link
Copy Markdown
Contributor

@jahooma jahooma commented May 5, 2026

Updates code_search output to include a leading match count and "Line N:" labels for each result.
Passes the authoritative match count from the SDK so context lines do not inflate totals, and avoids false per-file truncation notices when results exactly equal the per-file limit.
Adds formatter and SDK tests for the new output shape, context-line counting, empty results, and exact-limit behavior.

Validation: bun test common/src/util/tests/format-code-search.test.ts sdk/src/tests/code-search.test.ts; bun run --cwd common typecheck; bun run --cwd sdk typecheck.

@jahooma jahooma merged commit 71b65a1 into main May 5, 2026
35 checks passed
@jahooma jahooma deleted the jahooma/code-search-lines branch May 5, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant