cache: diacritic-insensitive matching, typing, validation#2231
Merged
cache: diacritic-insensitive matching, typing, validation#2231
Conversation
Agent-Logs-Url: https://github.com/microsoft/TypeAgent/sessions/ffed37bc-04b5-40e4-a31d-0b28a392e95c Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
…ectType - Remove three TODO typing comments - Use ParamObjectType cast instead of 'as any' in ensureProperties - Add direct unit tests for getActionProperty and ensureProperties Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use normalizeParamString (NFD + combining mark removal) in MatchSet construction so that accented variants (e.g. "Beyoncé" vs "Beyonce") match interchangeably. Normalize request before matching in both Construction.match() and ConstructionCache.match() using a separate variable so the original cased request is preserved in the result. Update grammar.spec.ts to use normalizeParamString instead of toLowerCase for the lower-case roundtrip test. Mark related TODOs done. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extend the explainable-value check to also verify that number parameter values appear literally in the request string, mirroring the existing string check. Update the test that was previously documenting the broken behavior to assert the correct behavior, and add a passing case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ression The previous approach normalized MatchSet entries and request strings (stripping diacritics on both sides). That broke the grammar matcher tests because the generated grammar uses MatchSet entries as literal tokens and the grammar matcher is only case-insensitive — not diacritic-insensitive — so stripped tokens like "beyonce" could not match input "Beyoncé". Keep MatchSet.matches as the lowercased original text (unchanged from main) and instead make the MatchSet regex accept both forms per character via a (?:<accented>|<base>) alternation for characters that carry combining marks. Request strings are no longer normalized before matching. The construction cache still gets diacritic-insensitive matching, and the grammar path continues to behave as before. Also revert the grammar.spec.ts lower-case round-trip assertion back to toLowerCase since the grammar matcher does not strip diacritics. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- knowPro/collections: matchesWithMinHitCount condition > 0 → > 1 (optimization, all matches already have hitCount ≥ 1 by design) - dispatcher/unknownSwitcher: parallelize assistant-selection partitions via Promise.all; extract selectFromPartitions() for testability - knowledgeProcessor actions/entities: addMultiple concurrency 1 → settings.concurrency - cache/explainWorkQueue: extend parameter-value-in-request check to cover numbers - azure-ai-foundry/wikipedia: add optional locale param (default "en") to getPageObject and getPageMarkdown Each fix is covered by new or updated unit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent-Logs-Url: https://github.com/microsoft/TypeAgent/sessions/40c35148-43e0-467e-83d5-276e04185071 Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
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.
MatchSetregex to avoid grammar regression)explainWorkQueueas anywithParamObjectTypeinvalidateExplanationSplit from #2210.