fix(chat): add prompt tools when running prompt slash commands#3012
Merged
olimorris merged 1 commit intoolimorris:mainfrom Apr 10, 2026
Merged
fix(chat): add prompt tools when running prompt slash commands#3012olimorris merged 1 commit intoolimorris:mainfrom
olimorris merged 1 commit intoolimorris:mainfrom
Conversation
Register tools declared in prompt library entries before inserting prompt content, and document the behavior with test coverage.
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.
Description
When a prompt library entry is invoked via a slash command, any tools declared
on that prompt were not being added to the active chat buffer first.
This PR fixes that by registering prompt-declared tools before the prompt
content is inserted.
Changes included:
SlashCommands.run()for prompt-library entriesprompt-library.mdThis makes slash-command usage consistent with prompt definitions that rely on
tools being available in the current chat.
AI Usage
GPT-5.4 was used mostly for tests, docs, and general boilerplate such as
docstrings.
Related Issue(s)
Screenshots
Checklist
make allto ensure docs are generated, tests pass and StyLua has formatted the code