Add Support for Different Types of Knowledge Bases#711
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the knowledge base creation system to support multiple knowledge base types (Vector and Azure AI Search) instead of being limited to Vector Knowledge Bases only. The changes rename components from "VECTOR_KNOWLEDGE_BASE" to "KNOWLEDGE_BASE" throughout the codebase and introduce a card-based selection UI for choosing knowledge base types.
Key Changes:
- Renamed all references from "VECTOR_KNOWLEDGE_BASE" to "KNOWLEDGE_BASE" across node types, enums, and component names
- Added a new card-based selection interface (SidePanelView.KNOWLEDGE_BASES) for choosing knowledge base types
- Updated the knowledge base form to dynamically write to connections.bal instead of the current file
- Modified the icon rendering logic to support Azure-specific icons when the module includes "azure"
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ApiCallNodeWidget.tsx | Updated node type check from VECTOR_KNOWLEDGE_BASE_CALL to KNOWLEDGE_BASE_CALL |
| NodeIcon/index.tsx | Renamed node icon mappings from VECTOR_KNOWLEDGE_BASE to KNOWLEDGE_BASE |
| KnowledgeBaseForm/index.tsx | Refactored form to use connections.bal and renamed component from VectorKnowledgeBaseForm |
| FormGenerator/index.tsx | Updated node type check and component reference |
| FlowDiagram/index.tsx | Modified navigation flow to show card selection before form display |
| PanelManager.tsx | Added KNOWLEDGE_BASES card list view and updated labels |
| bi.tsx | Added icon factory logic for Azure and knowledge base categorization |
| localStorage.ts | Updated default expanded category name |
| NodeList/index.tsx | Updated category configuration name |
| categoryConfig.ts | Renamed category title from Vector Knowledge Bases |
| CardList/index.tsx | Added tooltip support to cards |
| rpc-manager.ts | Updated console log messages |
| extended-language-client.ts | Updated API endpoint constant name |
| extended-lang-client.ts | Updated SearchKind type |
| bi.ts | Updated NodeKind type definitions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
workspaces/ballerina/ballerina-visualizer/src/views/BI/FlowDiagram/index.tsx
Outdated
Show resolved
Hide resolved
…property value logic
67216ef to
36e9c2a
Compare
kanushka
approved these changes
Oct 27, 2025
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.
Purpose
Related Issue: wso2/product-ballerina-integrator#1571
Currently, BI only supports creating
Vector Knowledge Bases. With the changes introduced in ballerina-platform/ballerina-language-server#421, support forAzure AI Search Knowledge Basesis being added.This PR extends the BI knowledge base creation logic and UI to support multiple knowledge base types, allowing easy integration of additional types in the future.
Screen.Recording.2025-10-23.at.12.29.35.AM.mov
Goals
Approach
User stories
Release note
Enhanced the Knowledge Base creation interface to support multiple knowledge base types, including Vector and Azure AI Search Knowledge Bases.