Skip to content

refactor(snippet): implement 'use' subcommand to be more user-friendly#271

Merged
Akinator31 merged 1 commit intomainfrom
267-rework-snippet-command
Dec 3, 2025
Merged

refactor(snippet): implement 'use' subcommand to be more user-friendly#271
Akinator31 merged 1 commit intomainfrom
267-rework-snippet-command

Conversation

@Akinator31
Copy link
Copy Markdown
Member

This pull request introduces a new way to use snippets as replies in both slash and text commands, along with usability improvements and enhanced localization support. The most significant changes include adding a /snippet use <key> subcommand, allowing !snippet <key> as a shortcut for using a snippet, and updating help text and translations to reflect these new capabilities.

New snippet usage functionality:

  • Added a /snippet use <key> subcommand to the slash command, enabling users to quickly use a snippet as a reply in a ticket. This includes backend logic for handling the new subcommand and appropriate user feedback.
  • Enabled !snippet <key> (and alias !s <key>) as a text command shortcut for using a snippet, in addition to the existing !reply {key}.

Improvements to argument parsing:

  • Refined parsing logic for the create and edit text commands to handle leading whitespace more robustly and extract the snippet key/content more reliably.

Localization and help text updates:

  • Updated help and usage messages in both English and French to document the new /snippet use subcommand and the !snippet <key> shortcut, making it easier for users to discover these features.
  • Added new translation keys and messages for the new subcommand and its responses in both languages.

@Akinator31 Akinator31 self-assigned this Dec 3, 2025
@Akinator31 Akinator31 linked an issue Dec 3, 2025 that may be closed by this pull request
@Akinator31 Akinator31 merged commit d06d66d into main Dec 3, 2025
6 checks passed
@Akinator31 Akinator31 deleted the 267-rework-snippet-command branch December 3, 2025 21:44
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.

Rework snippet command

1 participant