feat(chat): click prompt chip in editor to edit its arguments#3384
Open
viniciusventura29 wants to merge 2 commits into
Open
feat(chat): click prompt chip in editor to edit its arguments#3384viniciusventura29 wants to merge 2 commits into
viniciusventura29 wants to merge 2 commits into
Conversation
Persist user-supplied prompt argument values on mention nodes so chips
inserted via "/" (or the tools popover / ice-breakers) can be clicked
to re-open PromptArgsDialog pre-filled, and replace the chip in place
on submit. Adds a "kind" discriminator ("prompt" | "resource") so only
prompt chips become clickable; resources and "@" agent chips do not.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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:
|
Contributor
There was a problem hiding this comment.
1 issue found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/mesh/src/web/components/chat/tiptap/mention-slash.tsx">
<violation number="1" location="apps/mesh/src/web/components/chat/tiptap/mention-slash.tsx:156">
P2: Handle errors in the async chip-edit dispatcher; otherwise failed prompt fetches can produce unhandled promise rejections and silently fail to open the edit dialog.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Re-trigger cubic
Prompt lookup in the edit-on-click flow can throw if listPrompts fails; wrap it in try/catch so the user gets a toast instead of an unhandled rejection and a silently broken click. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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?
Slash-prompt chips in the Tiptap editor (e.g.
/Predict And Applyin the automation Instructions field, or in chat) are now clickable. Clicking a prompt chip re-opensPromptArgsDialogpre-filled with the values the user originally typed and, on submit, replaces the chip in place with refreshed metadata. Mention nodes now persistkind("prompt" | "resource") andargsso the edit flow knows what to pre-fill and can ignore non-editable chips.Screenshots/Demonstration
N/A — pure UX wiring on existing components.
How to Test
bun run dev, open an automation that has a slash-prompt with arguments (e.g./Predict And Apply) in its Instructions./-mentions withkind: "resource") and@agent chips should remain non-clickable.Migration Notes
Backward compatible: existing chips in the DB have no
kind/args. They are still clickable; the dialog opens with empty values on first edit, and from then on the args are stored.Review Checklist
Summary by cubic
Slash-prompt chips are now clickable to edit arguments in place via
PromptArgsDialog; submit refreshes the chip. Resource and@chips remain non-clickable; backward compatible (old chips open blank on first edit).New Features
PromptArgsDialogpre-filled; submit replaces the chip in place with refreshed metadata.kind("prompt"|"resource") andargs; only prompt chips are clickable.PromptArgsDialogacceptsdefaultValues; added click-to-edit bridge fromMentionNodetoSlashMention. Ice breakers and tools popover now setkindandargson insert.Bug Fixes
Written for commit b279797. Summary will update on new commits. Review in cubic