Add revision and body excerpts to agent-mode search and list rows - #333
Merged
Conversation
roborev: Combined Review (
|
roborev: Combined Review (
|
Member
|
looking |
Both lexical search backends fold diacritics (SQLite unicode61 with remove_diacritics, PostgreSQL unaccent), so a query for "cafe" matches an issue body containing "café". The agent excerpt located its window with a plain lowercase comparison, so such a hit fell back to the start of the body and the agent could not see why the issue matched. The excerpt now strips combining marks before comparing, matching the backends. Search and list rows started exposing revision so agents can pass --if-match, but kata show --agent, documented as the complete record, did not print it. It now emits a Revision: line after Priority:. The excerpt row also passes the excerpt string straight to the existing optional-field helper, which already drops empty values. Generated with Claude Code (claude-fable-5-1) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
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.
Agents reading
kata search --agentnow get enough context to choose a result without runningkata showon every hit. Each search row appendsowner,priority,revision, and anexcerptfrom the issue body.kata list --agentrows appendrevision, andkata show --agentprints aRevision:line.Before this change, a search row carried only the id, score, status, matched fields, and title. An agent had to open each candidate to learn who owned it, how urgent it was, or what the body said. No agent-mode read exposed the revision that
--if-matchwrites need, so agents had to fall back to--jsonfor it.The excerpt is at most 160 characters. It takes up to 24 words of the body around the first word that matches a query term, with
…marking trimmed ends. If that window is still over budget, it is re-centered on the matched term so long lead-in text cannot push the match out of view. Term matching folds case and diacritics and splits on the same letter/number boundaries the lexical search backends use, socafefindscafé,foo-barfindsfoo bar, andlogdoes not match insidecatalog. When no term matches, such as a title-only or semantic hit, the excerpt is the start of the body. Empty bodies emit noexcerpt=field.All new fields are appended after the existing ones, so
agent_formatstays1and current parsers keep working.docs/reference/agent-output.mddocuments the new row shapes.