Extract slash model suggestion filtering into app settings helper#160
Merged
juliusmarminge merged 1 commit intomainfrom Mar 3, 2026
Merged
Extract slash model suggestion filtering into app settings helper#160juliusmarminge merged 1 commit intomainfrom
juliusmarminge merged 1 commit intomainfrom
Conversation
- add `getSlashModelOptions` to centralize `/model` suggestion filtering - include custom saved model slugs in slash-command suggestions - update ChatView to consume shared helper and add focused tests
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
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.
Summary
/modelsuggestion filtering logic into a sharedgetSlashModelOptionshelper inappSettings.ChatViewto consume pre-filtered slash model options instead of in-component filtering.Testing
apps/web/src/appSettings.test.tsforgetSlashModelOptions:/modelsuggestions.bun lintbun typecheckNote
Low Risk
Low risk refactor that centralizes
/modelsuggestion filtering logic and adds unit coverage; behavior should remain the same aside from any subtle query-matching differences.Overview
Moves
/modelslash-command model suggestion generation/filtering out ofChatViewinto a newgetSlashModelOptionshelper inappSettings, reusinggetAppModelOptionsand applying query-based filtering there.Updates
ChatViewto memoize and consume these pre-filtered options instead of performing inline slug/name filtering, and addsvitestcoverage ensuring saved custom models appear in suggestions and that query filtering works across built-in and custom entries.Written by Cursor Bugbot for commit cdc856f. This will update automatically on new commits. Configure here.
Note
Extract filtering for /model composer suggestions into
apps/web/src/appSettings.ts:getSlashModelOptionsto include custom slugs and query matchingAdd
getSlashModelOptionsthat returns query-filtered model options, and updateChatViewto use it for/modelsuggestions; add tests for custom model inclusion and filtering in appSettings.test.ts.📍Where to Start
Start with
getSlashModelOptionsin appSettings.ts, then review its use inChatViewin ChatView.tsx, and finally the tests in appSettings.test.ts.Macroscope summarized cdc856f.