Skip to content

Add request type muxing #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 3, 2025
Merged

Add request type muxing #96

merged 4 commits into from
Mar 3, 2025

Conversation

danbarr
Copy link
Contributor

@danbarr danbarr commented Mar 1, 2025

Closes #90

Copy link

vercel bot commented Mar 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
codegate-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 4:23pm

@danbarr danbarr added the documentation Improvements or additions to documentation label Mar 3, 2025
aponcedeleonch
aponcedeleonch previously approved these changes Mar 3, 2025
Comment on lines +41 to +45
WS1 --> |FIM requests| LLM1
WS1 --> |Chat| LLM2
WS2 --> |.md files| LLM2
WS2 --> |.js files| LLM3
WS3 --> |All prompts| LLM3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one suggestion for .tsx and .ts files...actually if we have a .ts rule with an higher priority than .tsx we are going to match always the .ts rule.
So I would specify this in the doc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this part in the code, i.e. now it will correctly match .tsx and .ts

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh that's amazing @aponcedeleonch 🙌

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added a note about precedence to the PR based on @peppescg's original comment, is that not correct now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note I added says:

Keep substring matching in mind. For example, if you have a filter for .ts files placed above a rule for .tsx files, the .tsx rule cannot be reached because the .ts filter matches first.

I think that's still accurate?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my suggestion could be skipped now, cause @aponcedeleonch fixed in the code directly, sorry @danbarr 🙏

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, not accurate anymore since we're using a more explicit function to evaluate the substrings. We were using a simple in and now we use endswith. Check the following python output

>>> file = "test.tsx"
>>> ".ts" in file
True
>>> file.endswith(".ts")
False

Copy link
Contributor Author

@danbarr danbarr Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I just updated again based on our conversation, I think this is now accurate to the current behavior: 5302bb2

@danbarr danbarr merged commit 5ce37d3 into main Mar 3, 2025
6 checks passed
@danbarr danbarr deleted the muxing-v3 branch March 3, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document FIM/chat mode muxing selection
3 participants