Repository navigation
Conversation
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
from
October 23, 2026 00:13
8ee503c to
fb1442a
Compare
This was referenced Oct 23, 2026
ctawiah
marked this pull request as ready for review
October 23, 2026 14:12
ctawiah
requested review from
nkester-ld and
tiffanylphan
and removed request for
a team
October 23, 2026 14:12
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
2 times, most recently
from
October 23, 2026 14:40
ab63701 to
92bc2f4
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
2 times, most recently
from
October 23, 2026 14:56
867cda0 to
62de388
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
from
October 23, 2026 17:07
62de388 to
d7a340e
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
from
October 23, 2026 21:17
d7a340e to
c05142f
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
from
October 23, 2026 21:26
c05142f to
cc56ce5
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
2 times, most recently
from
October 26, 2026 19:37
1183be9 to
6463638
Compare
ctawiah
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
11 times, most recently
from
October 27, 2026 16:22
8c033f5 to
66edf16
Compare
sync prompts add takes --content, --model-config-key, and --name, and --yes, which skips the confirmation of a create. --content turns the add into a create. The help says how the content becomes the prompt of an agent or a completion config, and has an example of a create without prompting. The project-key/config-key/variation-key form still adds variations that exist, and a create with that form is an error. The error for a variation that LaunchDarkly does not have now names the add that creates it, with --model-config-key and --content.
ctawiah
force-pushed
the
ctawiah/create-variation-flags-1e8a
branch
from
October 27, 2026 16:32
66edf16 to
79b46ff
Compare
nkester-ld
approved these changes
Oct 27, 2026
| @@ -115,7 +115,8 @@ func selectedVariations(options Options) ([]synclocal.VariationFile, error) { | |||
| }) | |||
| if index < 0 { | |||
There was a problem hiding this comment.
Should we check if the variation is in the list of archived for the project before saying it doesn't exist?
Like:
if slices.Contains(config.ArchivedVariationKeys, variationKey) {
return nil, fmt.Errorf(
"variation %q in config %q in project %q is archived in LaunchDarkly. Restore it in LaunchDarkly, or pass another --key to create a new variation.",
variationKey, configKey, selection.ProjectKey,
)
}
There was a problem hiding this comment.
Good catch. The config response already includes archived variation keys, so this path has the data that it needs. I reproduced the current “does not exist” error with TestRunExplainsThatASelectedVariationIsArchived. Fixed in 3073a87. An archived key now tells the user to restore it in LaunchDarkly or pass another --key.
nieblara
approved these changes
Oct 27, 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.
Context
The previous PR added the variation create behind
AddAction.Create. This PR adds the flags ofsync prompts add, and the hint for a variation that LaunchDarkly does not have.What changes
sync prompts addgets--content,--model-config-key,--name, and--yes.--contentturns the add into a create.project-key/config-key/variation-keyform still adds variations that exist. With a create flag, it is an error.The new example in the help:
Design notes
sync promptsalso starts this add in a repository without sync files.--projectand--config-key.Review focus
Verification
go test ./...andgolangci-lint run(v2.9.0) pass.sync prompts add, and the create input from its flagsldcliand ran a flag-only script against a stand-in for the LaunchDarkly API:--diff, no--yes, and--yesRelated changes
This stack builds on #937 to #941, which are merged.
ctawiah/fix-prompt-tool-diff-5b1c)ctawiah/plan-referenced-attachments-1e8a)ctawiah/keep-unused-attachments-1e8a)ctawiah/add-attachments-1e8a)ctawiah/route-scopes-1e8a)ctawiah/scope-commands-1e8a)ctawiah/create-attachments-1e8a)ctawiah/create-attachment-flags-1e8a)ctawiah/share-variation-selection-1e8a)ctawiah/create-variations-1e8a)ctawiah/create-variation-flags-1e8a)Note
Overview
ldcli sync prompts addcan now create a prompt variation in LaunchDarkly (not only sync existing ones).--contentswitches add into create mode;--model-config-key,--name, and--yescomplete non-interactive creation. Help and examples document agent vs completion content shapes.Shared
createInputnow mapsmodel-config-keyintosynccreate.Inputfor prompt add (alongside tools/skills). Positionalproject/config/variationselectors are rejected when any create flag is set—create targets must use--project,--config-key, and--key.Bootstrap errors for unknown variations point users at the full add command with
--model-config-keyand--content; archived keys get a separate restore-or-pick-another-key message.Reviewed by Cursor Bugbot for commit 3073a87. Bugbot is set up for automated code reviews on this repo. Configure here.