Skip to content

fix: append skills to the prompt instead of replacing - #18756

Closed
paoloricciuti wants to merge 2 commits into
anomalyco:devfrom
paoloricciuti:append-skills
Closed

fix: append skills to the prompt instead of replacing#18756
paoloricciuti wants to merge 2 commits into
anomalyco:devfrom
paoloricciuti:append-skills

Conversation

@paoloricciuti

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes#18755

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

It appends the /skill text instead of replacing the whole prompt so that people can select the skill to "mention" in their prompt without having their prompt be wiped.

While this will not make the slash command work I think is still good enough to be able to mention a skill selecting the name from a Dialog.

How did you verify your code works?

Tried it locally with bun dev

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

HaleTom added a commit to HaleTom/opencode that referenced this pull request May 14, 2026
When selecting a skill from the skill picker, the skill name is now inserted
at the current cursor position using input.insertText() instead of replacing
the entire prompt with input.setText(). This preserves any text the user has
already typed in the prompt box.
Closesanomalyco#27160Closesanomalyco#18756Closesanomalyco#27578Closesanomalyco#18755
HaleTom added a commit to HaleTom/opencode that referenced this pull request May 14, 2026
When selecting a skill from the skill picker, the skill name is now inserted
at the current cursor position using input.insertText() instead of replacing
the entire prompt with input.setText(). This preserves any text the user has
already typed in the prompt box.
Closesanomalyco#27160Closesanomalyco#18756Closesanomalyco#27578Closesanomalyco#18755
HaleTom pushed a commit to HaleTom/opencode that referenced this pull request May 15, 2026
When selecting a skill from the TUI skill picker, the skill name is now
inserted at the cursor position using input.insertText() instead of
replacing the entire prompt with input.setText().
Previously, typing a question then selecting a skill would destructively
wipe the entire prompt.
Closes: anomalyco#27578Closes: anomalyco#27160Closes: anomalyco#18756Closes: anomalyco#18755
HaleTom added a commit to HaleTom/opencode that referenced this pull request May 15, 2026
When selecting a skill from the TUI skill picker, the skill name is now
inserted at the cursor position using input.insertText() instead of
replacing the entire prompt with input.setText().
Previously, typing a question then selecting a skill would destructively
wipe the entire prompt.
Closes: anomalyco#27578Closes: anomalyco#27160Closes: anomalyco#18756Closes: anomalyco#18755
@rekram1-node

Copy link
Copy Markdown
Collaborator

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@HaleTom

Copy link
Copy Markdown

Thanks for this work. I credited you in my PR.

Asking a favour:

Many PRs in this repo are being auto-closed because they've not received any activity. Can you please give this a thumbs-up or better: comment on this PR and ask for it to be merged?|

The PR: #27632

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selecting a skill from the dropdown completely replaces the prompt instead of "appending" to it

3 participants

@paoloricciuti@rekram1-node@HaleTom