fix: Centralize filename regex into shared patterns module#19
Merged
KHAEntertainment merged 2 commits intofeature/grok-swarm-agentfrom Mar 21, 2026
Merged
fix: Centralize filename regex into shared patterns module#19KHAEntertainment merged 2 commits intofeature/grok-swarm-agentfrom
KHAEntertainment merged 2 commits intofeature/grok-swarm-agentfrom
Conversation
6 tasks
…tern_string() Co-authored-by: KHAEntertainment <43256680+KHAEntertainment@users.noreply.github.com> Agent-Logs-Url: https://github.com/KHAEntertainment/grok-multiagent-plugin/sessions/c147bc88-9dac-4881-9e47-f0f87afc51d0
Copilot
AI
changed the title
[WIP] [WIP] Fix filename pattern inconsistency in grok_bridge.py and grok_agent.py
fix: Centralize filename regex into shared patterns module
Mar 21, 2026
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.
grok_bridge.pyandgrok_agent.pyhad divergentfilename_patternregexes — the bridge includedjsx|tsx|sh|bashwhile the agent did not, causing inconsistent code-block parsing across the two modules.Changes
src/shared/patterns.py(new): CanonicalSUPPORTED_EXTENSIONSstring andget_filename_pattern_string()returning the unified regexsrc/shared/__init__.py(new): Package marker for the shared modulegrok_bridge.pyandgrok_agent.pywere already updated (prior commits) to import from this module; this PR supplies the missing implementationResult
Both modules now compile the identical regex from a single source; extension list changes need to be made in exactly one place.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.