feat(knowledge/designer): Adding knowledge hub configuration support in agent loop actions#8977
feat(knowledge/designer): Adding knowledge hub configuration support in agent loop actions#8977preetriti1 wants to merge 5 commits intomainfrom
Conversation
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | Title is fine; optionally make it slightly more explicit about upload support. |
| Commit Type | ✅ | Correct (feature). |
| Risk Level | ✅ | High — label matches body and is appropriate. |
| What & Why | ✅ | Good; consider adding one-line note about ARM uploads. |
| Impact of Change | ✅ | Good detail provided. |
| Test Plan | ✅ | Unit tests exist; update PR body to remove contradictory text and list test locations; plan E2E for upload. |
| Contributors | ✅ | Good. |
| Screenshots/Videos | ✅ | Screenshot included. |
Final message: This PR passes the PR title/body checklist. The advised risk level is risk:high which matches your selection and is appropriate for the scope of changes. Before merge, please address the runtime/token wiring concerns outlined above (environment token usage, Authorization header in client, and ensuring WorkflowService.uploadFileArtifact is available at runtime) and update the PR Test Plan text to reflect the unit tests you added and the plan for E2E/integration coverage. Thank you for the detailed PR and added tests — great work!
Last updated: Sat, 28 Mar 2026 06:47:57 GMT
There was a problem hiding this comment.
Pull request overview
Adds Knowledge Hub configuration to the Agent Loop action parameter UI by introducing a custom “knowledgebase” editor and refactoring existing Knowledge Hub connection/file upload UX to be reusable in both panels and modal dialogs.
Changes:
- Introduces
knowledgeBaseNameparameter in the Agent Loop manifest using a newknowledgebaseeditor. - Refactors Knowledge Hub “add files” experience into reusable components and adds modal-based entry points (connection + file upload).
- Extends designer service initialization and workflow services to support ResourceService usage and knowledge artifact uploads.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/logic-apps-shared/src/designer-client-services/lib/workflow.ts | Extends IWorkflowService with getLogicAppId and uploadFileArtifact for Knowledge Hub integration. |
| libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/agentloop.ts | Adds knowledgeBaseName parameter using x-ms-editor: knowledgebase. |
| libs/designer/src/lib/ui/knowledge/wizard/knowledgehub.tsx | Adjusts wizard container height. |
| libs/designer/src/lib/ui/knowledge/panel/styles.ts | Updates panel body overflow/height constraints to allow scrolling. |
| libs/designer/src/lib/ui/knowledge/panel/panelroot.tsx | Updates Add Files panel import path after refactor. |
| libs/designer/src/lib/ui/knowledge/panel/files/uploadfile.tsx | New reusable file upload section component (group selection + dropzone + file list). |
| libs/designer/src/lib/ui/knowledge/panel/files/filelist.tsx | New reusable file list table with validation for artifact names. |
| libs/designer/src/lib/ui/knowledge/panel/files/addfile.tsx | New Add Files drawer panel rebuilt to use FileUpload. |
| libs/designer/src/lib/ui/knowledge/panel/files/test/addfile.spec.tsx | Fixes import path after Add Files refactor. |
| libs/designer/src/lib/ui/knowledge/panel/connection/usepaneltabs.tsx | Refactors tab hook to accept selectTab/close callbacks for reuse outside Redux panel. |
| libs/designer/src/lib/ui/knowledge/panel/connection/tabs/model.tsx | Updates model tab to use injected selectTab callback. |
| libs/designer/src/lib/ui/knowledge/panel/connection/tabs/basics.tsx | Updates basics tab to use injected close callback. |
| libs/designer/src/lib/ui/knowledge/panel/connection/create.tsx | Adapts create connection drawer panel to new hook signature (passes callbacks). |
| libs/designer/src/lib/ui/knowledge/panel/addfile.tsx | Removes legacy monolithic Add Files panel implementation (moved into /files). |
| libs/designer/src/lib/ui/knowledge/modals/creategroup.tsx | Updates create-group dialog configuration (modalType). |
| libs/designer/src/lib/ui/knowledge/editor/styles.ts | Adds styling for the new Knowledge Hub parameter editor and connection modal content. |
| libs/designer/src/lib/ui/knowledge/editor/index.tsx | Adds KnowledgeHubEditor custom parameter editor (connection + hub selection + artifacts + upload modal). |
| libs/designer/src/lib/ui/knowledge/editor/files.tsx | Adds AddFilesModal dialog wrapper around the reusable FileUpload component. |
| libs/designer/src/lib/ui/knowledge/editor/connection.tsx | Adds CreateConnectionModal dialog wrapper around existing connection panel tabs. |
| libs/designer/src/lib/ui/DesignerDialog.tsx | Adds a designer-level dialog host for the knowledge connection modal. |
| libs/designer/src/lib/ui/Designer.tsx | Mounts DesignerDialog so knowledge modals can portal correctly. |
| libs/designer/src/lib/core/utils/parameters/helper.ts | Wires new knowledgebase editor to the parameter rendering system. |
| libs/designer/src/lib/core/state/modal/modalSlice.ts | Adds Redux state/actions to open/close the knowledge connection modal. |
| libs/designer/src/lib/core/state/designerOptions/designerOptionsSlice.ts | Initializes resourceService to support Knowledge Hub queries. |
| libs/designer/src/lib/core/state/designerOptions/designerOptionsInterfaces.ts | Adds resourceService to service initialization options. |
| libs/designer/src/lib/common/constants.ts | Adds EDITOR.KNOWLEDGE_BASE. |
| libs/designer-ui/src/lib/constants.ts | Adds PARAMETER.EDITOR.KNOWLEDGE_BASE to shared designer-ui constants. |
| apps/Standalone/src/knowledge/app/KnowledgeHub.tsx | Switches Knowledge Hub upload implementation to shared uploadFileToKnowledgeHub. |
| apps/Standalone/src/designer/app/AzureLogicAppsDesigner/laDesigner.tsx | Implements getLogicAppId/uploadFileArtifact on workflow service and initializes BaseResourceService. |
| apps/Standalone/src/designer/app/AzureLogicAppsDesigner/Services/customConnectionParameterEditorService.tsx | Adjusts editor override logic for agent connection parameters based on parameterKey. |
| apps/Standalone/src/designer/app/AzureLogicAppsDesigner/Services/WorkflowAndArtifacts.tsx | Adds exported uploadFileToKnowledgeHub implementation used by workflow service + standalone knowledge app. |
| Localize/lang/strings.json | Adds new localized strings for the knowledge base editor and modals. |
libs/logic-apps-shared/src/designer-client-services/lib/standard/manifest/agentloop.ts
Show resolved
Hide resolved
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
|
|
||
| expect(screen.getByText('Knowledge base')).toBeInTheDocument(); | ||
| expect( | ||
| screen.getByText('Create a connection and add knowledge hub sources your agent will use to generate responses.') |
There was a problem hiding this comment.
`'Set up your database and model connections. Add knowledge base sources that your agent uses to generate responses.'
|
|
||
| renderComponent(); | ||
|
|
||
| expect(screen.getByText('Please create a connection to add knowledge hubs.')).toBeInTheDocument(); |
There was a problem hiding this comment.
Where exactly does this text appear? I didn't see it in the video. I need better context for more accurate text. Right now, I can only suggest the following, which seems ambiguous to me.
'Create a connection to add knowledge bases.'
|
|
||
| renderComponent(); | ||
|
|
||
| expect(screen.getByText('Select a knowledge hub')).toBeInTheDocument(); |
| fireEvent.click(dropdown); | ||
|
|
||
| await waitFor(() => { | ||
| expect(screen.getByText('No hub artifacts found. You can create hub and upload files to get started.')).toBeInTheDocument(); |
There was a problem hiding this comment.
'Can't find knowledge base artifacts. Create a knowledge base and upload files to get started.'
| description: 'Text for learn more link', | ||
| }), | ||
| emptyArtifacts: intl.formatMessage({ | ||
| defaultMessage: 'No hub artifacts found. You can create hub and upload files to get started.', |
There was a problem hiding this comment.
'Can't find knowledge base artifacts. Create a knowledge base and upload files to get started.'`
| description: 'Text to indicate that there are no artifacts in the knowledge hub', | ||
| }), | ||
| noConnectionMessage: intl.formatMessage({ | ||
| defaultMessage: 'Please create a connection to add knowledge hubs.', |
There was a problem hiding this comment.
Same question. Create what kind of connection? I need more context.
'Create a connection to add knowledge hubs.'
There was a problem hiding this comment.
It is a knowledge hub connection not the action connection. Also @ecfan, I can address the content changes in next PR.. need to get this checked in for the release fork which is waiting on this pr for vendor test pass. I am not sending any more iterations in this PR for a quick checkin.
Commit Type
Risk Level
What & Why
Refactored existing create connection and upload file panels for knowledge to be reused in modal dialogs.
Added knowledge hub editor in designer parameters ui for agent loop for users to configure knowledge hub in their action.
This also marks as an entry point for users to configure their knowledge base and create knowledge hub connection.
No edit support will be present in the designer.
Impact of Change
Test Plan
Tests will be added in next iteration
Contributors
@bonicaayala @divyaswarnkar
Screenshots/Videos