Skip to content

fix(search): セマンティック検索にスニペット対応 (#179)#182

Merged
Kewton merged 1 commit intodevelopfrom
fix/issue-179-semantic-snippet
Mar 25, 2026
Merged

fix(search): セマンティック検索にスニペット対応 (#179)#182
Kewton merged 1 commit intodevelopfrom
fix/issue-179-semantic-snippet

Conversation

@Kewton
Copy link
Copy Markdown
Owner

@Kewton Kewton commented Mar 25, 2026

Closes #179
🤖 Generated with Claude Code

Semantic search results now include body snippets instead of returning
only headings with estimated tokens ~0. SnippetConfig and LlmFormatOptions
are propagated through run_semantic_search() and format_semantic_results()
to all output formatters (human/llm/json).

Changes:
- format_semantic_human(): accept SnippetConfig, replace hardcoded (2, 120)
- format_semantic_llm(): accept LlmFormatOptions, apply truncate_body_for_llm
- format_semantic_results(): accept SnippetConfig and LlmFormatOptions
- run_semantic_search(): accept and forward snippet/llm options
- enrich_with_metadata(): fallback to first section body on heading mismatch
- main.rs: construct LlmFormatOptions in semantic branch, pass snippet_config
- Add 3 new tests for semantic snippet functionality

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Kewton Kewton merged commit 7a79c92 into develop Mar 25, 2026
3 checks passed
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