feat(apollo-react): add Skills resource type to AgentFlow canvas#850
feat(apollo-react): add Skills resource type to AgentFlow canvas#850CalebMartinUiPath wants to merge 1 commit into
Conversation
Adds an opt-in third "+" add-button on the top edge of the agent node
(alongside Memory and Escalations) for a new "skills" resource type.
- New ResourceNodeType.Skills (top edge) with position/order entries
- AgentFlowSkillsResource + SkillsResourceData added to the resource
and node-data unions; AgentFlowResourceType now includes 'skills'
- New enableSkills prop (mirrors enableMemory) gates the button so it
is opt-in per consumer; off by default
- skills label added to AgentNodeTranslations (+ default "Skills")
- Clicking the button fires onAddResource('skills'); no node rendering
paths are required since consumers drive the resulting UI
- Storybook wrapper wired with enableSkills for visual testing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
📦 Dev Packages
|
There was a problem hiding this comment.
Pull request overview
This PR adds an opt-in Skills resource type to the AgentFlow canvas, introducing a third “+” handle on the top edge of the agent node (alongside Memory and Escalations) and propagating the new 'skills' type through the AgentFlow resource/type unions and Storybook wiring.
Changes:
- Added
ResourceNodeType.Skillsand integrated it into handle position/order + auto-layout grouping. - Extended AgentFlow public types/unions to include
'skills'(resources, node data, initial selection, translations) and introducedenableSkills?: boolean. - Updated AgentNode/AgentFlow wiring to show the Skills top handle when enabled and to emit
onAddResource('skills'); Storybook wrapper passesenableSkills.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/utils/auto-layout.ts | Adds Skills to resource-handle grouping used by auto-layout. |
| packages/apollo-react/src/canvas/types.ts | Introduces Skills resource/node-data types, new enableSkills flag, and translations key. |
| packages/apollo-react/src/canvas/components/AgentCanvas/nodes/AgentNode.tsx | Adds Skills handle visibility and onAddResource('skills') dispatch. |
| packages/apollo-react/src/canvas/components/AgentCanvas/AgentFlow.tsx | Threads enableSkills through AgentFlow and filters skills nodes when disabled. |
| packages/apollo-react/src/canvas/components/AgentCanvas/AgentFlow.stories.tsx | Story wrapper now accepts/passes enableSkills. |
| packages/apollo-react/src/canvas/components/AgentCanvas/AgentFlow.constants.ts | Adds Skills enum entry plus top-edge position/order configuration. |
| | AgentFlowToolResource | ||
| | AgentFlowMemorySpaceResource | ||
| | AgentFlowA2aResource; | ||
| | AgentFlowA2aResource | ||
| | AgentFlowSkillsResource; |
| context: string; | ||
| tools: string; | ||
| memory: string; | ||
| skills: string; | ||
| instructions: string; |
| enableMcpTools?: boolean; | ||
| /** TODO: Remove once memory feature is fully implemented */ | ||
| enableMemory?: boolean; | ||
| /** Enables the "Skills" add-button on the top edge of the agent node. */ |
| const groups: Record<ResourceNodeType, AgentFlowCustomNode[]> = { | ||
| [ResourceNodeType.Context]: [], | ||
| [ResourceNodeType.Escalation]: [], | ||
| [ResourceNodeType.MCP]: [], | ||
| [ResourceNodeType.Tool]: [], | ||
| [ResourceNodeType.MemorySpace]: [], | ||
| [ResourceNodeType.A2A]: [], | ||
| [ResourceNodeType.Skills]: [], | ||
| }; |
| onAddResource={handleAddResourceRequest} | ||
| onRemoveResource={handleRemoveResource} | ||
| onSelectResource={handleSelectResource} | ||
| enableTimelinePlayer={mode === 'view' && enableTimelinePlayer} | ||
| enableMemory={enableMemory} | ||
| enableSkills={enableSkills} | ||
| enableStickyNotes={enableStickyNotes} | ||
| enableInstructions={enableInstructions} | ||
| stickyNotes={stickyNotes} |
| const displayMemory = | ||
| enableMemory === true && (mode === 'design' || (mode === 'view' && hasMemory)); | ||
| const displaySkills = | ||
| enableSkills === true && (mode === 'design' || (mode === 'view' && hasSkills)); | ||
| const displayContext = mode === 'design' || (mode === 'view' && hasContext); |
DRAFT - STILL ITERATING
Adds an opt-in third "+" add-button on the top edge of the agent node (alongside Memory and Escalations) for a new "skills" resource type.