Repository navigation
feat(automations): click-to-edit prompt arguments in instructions - #3323
Merged
viniciusventura29 merged 2 commits intoMay 12, 2026
Merged
Conversation
Persist the user-supplied prompt argument values on the mention node and reopen the arguments dialog prefilled with them when the pill is clicked, updating the rendered prompt in place on save instead of forcing a delete + re-insert. If the prompt's argument schema has drifted, matching names prefill and the rest stay blank. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Contributor
Release OptionsSuggested: Minor ( React with an emoji to override the release type:
Current version:
|
When the prompts query is cold, the click handler awaits a fetch before
opening the dialog; any keystrokes during that window shifted the captured
position so the eventual setNodeMarkup silently no-op'd. Track the position
through every editor transaction (via editor.on("transaction")) until the
dialog closes, resolve it at submit time, and toast an error if the
mention disappeared instead of failing silently.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
viniciusventura29
deleted the
viniciusventura29/edit-automation-tool-modal
branch
May 12, 2026 02:20
pedrofrxncx
pushed a commit
that referenced
this pull request
May 12, 2026
) * feat(automations): click-to-edit prompt arguments in instructions Persist the user-supplied prompt argument values on the mention node and reopen the arguments dialog prefilled with them when the pill is clicked, updating the rendered prompt in place on save instead of forcing a delete + re-insert. If the prompt's argument schema has drifted, matching names prefill and the rest stay blank. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(automations): remap mention position across async dialog lifecycle When the prompts query is cold, the click handler awaits a fetch before opening the dialog; any keystrokes during that window shifted the captured position so the eventual setNodeMarkup silently no-op'd. Track the position through every editor transaction (via editor.on("transaction")) until the dialog closes, resolve it at submit time, and toast an error if the mention disappeared instead of failing silently. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.
What is this contribution about?
Lets users click a slash-prompt pill (e.g.
/Predict And Apply) inside an Automation's Instructions field and reopen its arguments dialog prefilled with the previously submitted values. Today, fixing a typo in those values requires deleting the pill and re-inserting it because the user-supplied arguments are discarded aftergetPromptis called — only the rendered MCP messages are persisted.The mention node now also stores the input
valuesalongsidemetadata, exposes a click handler that dispatches amention:editDOM event when the prompt has values, andSlashMentionlistens for it to reopenPromptArgsDialogin edit mode. On save, the existing node is updated in place viasetNodeMarkup(no duplicate pill). If the prompt's argument schema drifted on the MCP since insertion, matching names prefill and new fields stay blank.How to Test
/predict & apply); fill in a value and confirm the pill renders.Review Checklist
Summary by cubic
Click a slash-prompt pill in Automation Instructions to edit its arguments with prefilled values and update it in place; no delete/reinsert, and MCP messages stay in sync.
New Features
valueson the mention node (asdata-values) and reopen viamention:edit.setNodeMarkupand refresh fromgetPrompt(no duplicate pill).Bug Fixes
Written for commit ede1bb5. Summary will update on new commits.