feat(semantic): add domain crud#8
Merged
Merged
Conversation
lzq986
previously approved these changes
Jun 6, 2026
VLSMB
reviewed
Jun 9, 2026
lzq986
approved these changes
Jun 10, 2026
VLSMB
approved these changes
Jun 10, 2026
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.
新增数据领域(Domain)管理模块:
在后端,新增了 DomainInfo 实体、DomainInfoMapper (及其XML)、DomainService 和 DomainController,实现了对数据领域信息的增删改查(CRUD)功能,包括分页查询。
新增了相关的DTOs (DomainCreateRequest, DomainPageQuery, DomainUpdateRequest) 用于数据传输和校验。
前端增加了 语义管理 页面 (SemanticManage.vue) 及其子组件 DomainManage.vue,提供了友好的UI界面来展示、创建、编辑和删除数据领域。
前端 src/api/domain.ts 中定义了与后端领域管理API交互的接口和方法。
更新了前端导航栏 (AppSidebar.vue) 和路由配置 (index.ts),以便用户可以访问新的语义管理页面。
数据查询工具 (GetTablesTool) 增强:
GetTablesTool.java 中的 getTables 方法现在支持传入一个可选的 domains 列表参数,允许Agent根据指定的领域过滤查询表信息。
TableSemanticService 和 TableSemanticServiceImpl 中新增了 listTableInfosByDomains 方法来支持按领域过滤表。
TableSemanticServiceImpl 增加了 normalizeDomain 方法,确保领域名处理的规范性(如果为空则默认为 "default")。
新增获取领域工具 (GetDomainsTool):
引入了新的 GetDomainsTool.java 工具,允许Agent首先获取所有可用的数据领域名称,为后续的按领域查询表提供前提。
数据库结构更新:
sql/data_source.sql 文件中添加了 domain_info 表的创建语句,并为 name 字段添加了唯一索引。
同时,在数据库初始化时,会自动插入一个名为 "default" 的默认领域。
Agent工作流更新:
skills/data-query/SKILL.md 更新了数据查询Agent的工作流程,指导Agent首先使用 get_domains 获取领域,然后根据用户问题选择相关领域调用 get_tables(domains=[...]),从而提升Agent的智能性和准确性。
相关联的issue:
#7