Repository navigation
fix(acp-registry): Cursor can pick reasoning effort per model again #24729
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
Closed
only21mil
wants to merge
16
commits into
pingdotgg:main
from
only21mil:fix/i24371-cursor-via-acp-registry-can-t-pick-reaso
+214
−2
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4b87733
fix(acp-registry): Cursor offers a reasoning effort picker per model
only21mil 4742a78
Merge remote-tracking branch 'github/main' into maria/takeover-pr-24729
maria-rcks 391e70f
fix(acp-registry): preserve saved Cursor preset options
maria-rcks 41f15c6
Merge remote-tracking branch 'github/main' into maria/takeover-pr-24729
maria-rcks 61bf784
fix(acp-registry): retain native saved Cursor selections
maria-rcks 02f104d
fix(web): limit saved ACP presets to Cursor
maria-rcks 478e6ef
fix(acp): merge main and validate normalized cursor presets
maria-rcks 507caef
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pic…
only21mil 45a15f8
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pic…
only21mil b4068d5
Merge remote-tracking branch 'origin/main' into fix/i24371-cursor-via…
juliusmarminge e7e7a42
test(acp-registry): trim redundant Cursor preset cases
juliusmarminge eed68a8
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pic…
only21mil 39ace1d
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pic…
only21mil d621b24
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pic…
only21mil 2bafe26
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pic…
only21mil 5512bb2
test(web): drop model selection rows main now covers
only21mil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import type { ModelSelection } from "@t3tools/contracts"; | ||
| import type { AcpRegistrySettings } from "../settings.ts"; | ||
|
|
||
| // Without this flag Cursor lists one fixed preset per model, such as | ||
| // `claude-opus-5-5[context=300k,effort=medium,fast=false]`. With it Cursor lists | ||
| // plain model ids and reports effort, context and fast as config options. | ||
| export const cursorClientCapabilitiesMeta = { parameterizedModelPicker: true }; | ||
|
|
||
| // Local installs launch the `cursor-agent` binary directly with no registry id. | ||
| export function isCursorAcpAgent(settings: AcpRegistrySettings): boolean { | ||
| return ( | ||
| (settings.source !== "local" && settings.agentId === "cursor") || | ||
| (settings.source === "local" && | ||
| /^cursor-agent(\.exe|\.cmd)?$/i.test(settings.commandPath.split(/[\\/]/).pop() ?? "")) | ||
| ); | ||
| } | ||
|
|
||
| // Preserve preset values when opening threads saved before parameterized negotiation. | ||
| export function normalizeCursorModelSelection(selection: ModelSelection): ModelSelection { | ||
| const preset = /^(.*)\[([^\]]*)\]$/.exec(selection.model); | ||
| if (preset === null) return selection; | ||
| const explicit = selection.options ?? []; | ||
| const options = preset[2]!.split(",").flatMap((entry) => { | ||
| const [id, value] = entry.split("="); | ||
| return id !== undefined && | ||
| ["reasoning", "effort", "reasoning_effort", "context", "fast"].includes(id) && | ||
| value && | ||
| !explicit.some((option) => option.id === id) | ||
| ? [{ id, value }] | ||
| : []; | ||
| }); | ||
| return { ...selection, model: preset[1]!, options: [...options, ...explicit] }; | ||
| } |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont care about this. cursor sdk is the blessed path for cursor.