feat(coding-agent): added fuzzy token matching in coding-agent components

- Added fuzzy token matching in agent-dashboard, state-manager, and tree-selector, replacing lowercased checks.
- Added search-query state and fuzzy-filter helpers to hook, oauth, and user-message selectors for query filtering.
- Updated filtered selectors to render match results, status lines, no-match text, and move selection within results.
- Added `overflowSearch` and filter state to `SelectList`, switching overflowing list matching to fuzzy checks.
- Configured `SelectList` input flow and fixed cancel so Escape/Ctrl+C closes lists when no matches exist.
- Updated changelogs and added tests for fuzzy-filter behavior in hook, oauth, user-message, and list selectors.
This commit is contained in:
can1357
2026-05-31 07:45:22 +02:00
parent ae5139358c
commit 42b79bc696
14 changed files with 541 additions and 94 deletions
@@ -3,6 +3,7 @@
* Handles data loading, tree building, filtering, and toggle persistence.
*/
import * as path from "node:path";
import { fuzzyMatch } from "@oh-my-pi/pi-tui";
import { logger } from "@oh-my-pi/pi-utils";
import type { ContextFile } from "../../../capability/context-file";
import type { ExtensionModule } from "../../../capability/extension-module";
@@ -404,11 +405,9 @@ export function applyFilter(extensions: Extension[], query: string): Extension[]
ext.trigger || "",
ext.source.providerName,
ext.kind,
]
.join(" ")
.toLowerCase();
].join(" ");
return tokens.every(token => searchable.includes(token));
return tokens.every(token => fuzzyMatch(token, searchable).matches);
});
}