-
Notifications
You must be signed in to change notification settings - Fork 4k
chore: Enable templates for agents #40214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5ecbe77
filter out normal templates for agents
jsartisan 4247afe
add the missing code
jsartisan f7f512b
hide building blocks
jsartisan 7a34b9e
update selector for templates
jsartisan 88d42c7
fix test
jsartisan 35ab1cd
wip
jsartisan bbe7fca
add check for build blocks
jsartisan 4df9dc9
add check for horizontal line
jsartisan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
New selector function for template filtering based on AI agent flow.
This selector implements a centralized filtering mechanism that:
The comments explain the filtering logic well, including the TODO note about future refactoring once a new entity for AI agents is implemented.
🏁 Script executed:
Length of output: 124
Selector Verification Update – Revised Verification Command
The new selector function in app/client/src/selectors/templatesSelectors.tsx (lines 31–53) correctly implements:
Since the previous verification command failed due to file type issues with TSX files, please re-run the revised script above. If no output is produced, it confirms that all references to
state.ui.templates.templates
are appropriately routed throughgetTemplatesSelector
.🏁 Script executed:
Length of output: 541
Attention: Inconsistent Selector Usage Detected
The new selector in app/client/src/selectors/templatesSelectors.tsx (lines 31–53) correctly encapsulates the filtering logic for Agent-related templates when AI agent flow is enabled and consistently excludes the "AI Agent" template. However, our verification reveals several direct references to
state.ui.templates.templates
in other parts of the codebase, including:(state: AppState) => state.ui.templates.templates.length
).find()
and.filter()
state.ui.templates.templatesModal
)Action Items:
getTemplatesSelector
for consistent filtering logic.Please address these discrepancies to maintain consistency and ensure that the new centralized filtering is fully leveraged.