Skip to content

fix(chat): wire up Skills Editor prompt + and ▶ buttons#489

Open
anfibiacreativa wants to merge 1 commit into
mainfrom
ew-fix-prompt-buttons
Open

fix(chat): wire up Skills Editor prompt + and ▶ buttons#489
anfibiacreativa wants to merge 1 commit into
mainfrom
ew-fix-prompt-buttons

Conversation

@anfibiacreativa
Copy link
Copy Markdown
Member

The Skills Editor (ew-extensions) prompt cards dispatch prompt-add / prompt-send on a da-skills-editor BroadcastChannel and as window CustomEvents, but nx-chat never subscribed — so clicking + or ▶ was a no-op on the chat side. Add a small bridge in connectedCallback that listens on both transports, dedupes the editor's double-dispatch, and routes prompt-add to fill the input only and prompt-send to fill + submit.

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):

The Skills Editor (ew-extensions) prompt cards dispatch `prompt-add` /
`prompt-send` on a `da-skills-editor` BroadcastChannel and as window
CustomEvents, but `nx-chat` never subscribed — so clicking + or ▶ was a
no-op on the chat side. Add a small bridge in connectedCallback that
listens on both transports, dedupes the editor's double-dispatch, and
routes prompt-add to fill the input only and prompt-send to fill +
submit.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Jun 2, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

Comment thread nx2/blocks/chat/chat.js
// The editor's `+` (add) and `▶` (run) buttons post `prompt-add` / `prompt-send`
// on this BroadcastChannel and as window CustomEvents.
const SKILLS_CHANNEL = 'da-skills-editor';
const SKILLS_PROMPT_ADD_EVENTS = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this code should know about the skills editor. We should just have a generic event that we can send on the chat component that sets the prompt.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - I would look into extending the existing add-to-chat event to also accept prompt instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a PR for that here: #490

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 we should proceed with the generic approach which can be used by others as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants