Skip to content

Remove the fuzzy subcommand#36

Merged
tony merged 2 commits into
masterfrom
remove-fuzzy-subcommand
May 31, 2026
Merged

Remove the fuzzy subcommand#36
tony merged 2 commits into
masterfrom
remove-fuzzy-subcommand

Conversation

@tony
Copy link
Copy Markdown
Owner

@tony tony commented May 31, 2026

Summary

Removes agentgrep fuzzy. It was a fzf --filter-shaped filter over stdinrun_fuzzy_command read sys.stdin and ignored --agent, so it never touched a Codex / Claude / Cursor / Gemini / Grok store. That placed it outside agentgrep's "search local AI-agent prompts and history" scope, and it only approximated fzf (scoring via rapidfuzz rather than fzf's own FuzzyMatchV1 / FuzzyMatchV2), so --algo / --tiebreak never matched fzf's behavior.

Removed across code and docs: src/agentgrep/fuzzy.py, the fuzzy subparser + FuzzyArgs + _build_fuzzy_args + the FuzzyAlgo / FuzzyTiebreak literals + dispatch + FUZZY_DESCRIPTION, the run_fuzzy_command / fuzzy_filter_lines / _apply_field_selection render helpers, the two fuzzy test files, and the fuzzy CLI doc page / grid card / toctree entry / TUI overlay mention.

grep and find are unaffected and stay regex-by-default (that path runs through ripgrep). rapidfuzz stays — search ranking still uses it. No MCP tool exposed fuzzy, so the MCP surface is unchanged.

Closes #35. Re-adding fuzzy with a faithful fzf port is tracked in #34.

Test plan

  • Full gate green before each commit: ruff check, ruff format, ty check, py.test --reruns 0 (814 passed), just build-docs.
  • agentgrep fuzzy foo now exits 2 (invalid choice: 'fuzzy'); agentgrep --help lists {grep,find,ui,search}; grep / find / search / ui and the grep --ui / find --ui overlays still work.
  • rg confirms no FuzzyArgs / run_fuzzy_command / agentgrep.fuzzy symbols remain in src/ or tests/.

tony added 2 commits May 31, 2026 06:33
why: `agentgrep fuzzy` filtered stdin lines — it ignored `--agent` and
never read a store — so it sat outside agentgrep's prompt/history search
scope and only approximated fzf (it scored with rapidfuzz rather than
fzf's own algorithm). Removing it keeps the CLI focused on agent-history
search; pipe through `fzf` directly for that workflow.

what:
- Delete src/agentgrep/fuzzy.py and the whole fuzzy CLI surface: the
  subparser, FuzzyArgs/_build_fuzzy_args, the FuzzyAlgo/FuzzyTiebreak
  literals, the dispatch branch, FUZZY_DESCRIPTION, and the render
  helpers (run_fuzzy_command/fuzzy_filter_lines/_apply_field_selection).
- Delete tests/test_fuzzy.py and tests/test_cli_fuzzy.py; drop fuzzy
  from the deferred-import, root-help, and --ui-overlay tests.
- Remove the fuzzy CLI doc page, its grid card and toctree entry, and
  the --ui overlay mention on the TUI page.
- rapidfuzz stays — `search` ranking still uses it; the MCP surface is
  unaffected (no fuzzy tool).
@tony tony merged commit 8a15433 into master May 31, 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.

Remove the fuzzy subcommand

1 participant