Skip to content

feat(agent-builder): tool listing page for agent centric UX#259066

Merged
SiddharthMantri merged 10 commits intoelastic:ab-agent-centric-ux-feature-branchfrom
SiddharthMantri:ab/13362-list-agent-tool-page
Mar 23, 2026
Merged

feat(agent-builder): tool listing page for agent centric UX#259066
SiddharthMantri merged 10 commits intoelastic:ab-agent-centric-ux-feature-branchfrom
SiddharthMantri:ab/13362-list-agent-tool-page

Conversation

@SiddharthMantri
Copy link
Copy Markdown
Contributor

@SiddharthMantri SiddharthMantri commented Mar 23, 2026

Closes https://github.com/elastic/search-team/issues/13479

Summary

This PR adds a new Tool page for the chosen agent. Agent > Customize > Advanced > Tool

Screen.Recording.2026-03-23.at.13.43.02.mov

@SiddharthMantri SiddharthMantri marked this pull request as ready for review March 23, 2026 11:50
@SiddharthMantri SiddharthMantri requested a review from a team as a code owner March 23, 2026 11:50
return (
<EuiFlyout
side="right"
size="960px"
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.

same width for all library flyouts? Shared constant 🙏🏽

Comment on lines +68 to +86
const activeTools = useMemo(() => {
if (!agent) return [];
const explicitTools = allTools.filter((t) => isToolSelected(t, agentToolSelections));
if (enableElasticCapabilities) {
const explicitIdSet = new Set(explicitTools.map((t) => t.id));
const defaultToolsNotExplicit = allTools.filter(
(t) => defaultToolIdSet.has(t.id) && !explicitIdSet.has(t.id)
);
return [...explicitTools, ...defaultToolsNotExplicit];
}
return explicitTools;
}, [allTools, agentToolSelections, agent, enableElasticCapabilities, defaultToolIdSet]);

const activeToolIdSet = useMemo(() => new Set(activeTools.map((t) => t.id)), [activeTools]);

const libraryActiveToolIdSet = useMemo(() => {
if (enableElasticCapabilities) return new Set([...activeToolIdSet, ...defaultToolIdSet]);
return activeToolIdSet;
}, [activeToolIdSet, enableElasticCapabilities, defaultToolIdSet]);
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.

This logic looks great, but it's becoming a bit complex. Can you look into seeing if any of these can be pure functions that we can unit test? getActiveTools(...) would be good. But if it's more effort than its worth, ofc skip.

</p>
</EuiText>
) : (
filteredActiveTools.map((tool) => {
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.

All this JSX is very hard to read, can we please refactor 🙏🏽

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Mar 23, 2026

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [e85d077]

History

Copy link
Copy Markdown
Contributor

@chrisbmar chrisbmar left a comment

Choose a reason for hiding this comment

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

lets gooooooo

sidebarView: 'agentSettings',
navLabel: navLabels.tools,
navIcon: 'wrench',
navSection: 'Advanced',
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.

lets move this to i18n top of the file in the navSections

@SiddharthMantri
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@SiddharthMantri SiddharthMantri merged commit 3f9a26e into elastic:ab-agent-centric-ux-feature-branch Mar 23, 2026
12 checks passed
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