Skip to content

feat(dataset/tag): 知识库标签过滤功能V2 - #7495

Open
SteelHe wants to merge 1 commit into
labring:mainfrom
SteelHe:feat-tag-filter
Open

feat(dataset/tag): 知识库标签过滤功能V2#7495
SteelHe wants to merge 1 commit into
labring:mainfrom
SteelHe:feat-tag-filter

Conversation

@SteelHe

@SteelHe SteelHe commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 标签类型扩展:新增 tagType 字段 (string/number/datetime/array),仅创建时确定,编辑不可修改
  • Collection 标签值:tags 字段扩展为混合格式 (string ObjectId | {tagId, value}),支持新旧共存
  • 标签管理 API (pro): batchUpsert / setCollectionTags / batchSetCollectionTags,事务保护
  • 搜索过滤增强:filterCollectionByKeyValueTags + checkValue,支持 4 类型 × 13 操作符
  • Collection 创建链路:createOneCollection 支持混合 tags 入参
  • Workflow + Agent V2:datasetSearch 节点新增 tagFilterConfig 渲染,Agent 搜索传递 collectionFilterMatch
  • UTC 时间工具:toUTCSeconds / fromUTCSeconds
  • 错误码 + i18n:501013~501023 标签错误码 × 三国语言
  • 历史数据迁移,完全向后兼容

Validate

  • pnpm --dir packages/service exec vitest run -c vitest.config.ts \ test/core/dataset/search/collectionFilter.test.ts \ test/core/dataset/utils.test.ts \ test/core/dataset/delete/processor.test.ts
  • pnpm --dir projects/app exec vitest run -c vitest.config.ts \ test/api/support/openapi/tag.test.ts \ test/api/core/dataset/collection/paths.test.ts \ test/api/core/dataset/collection/trainingStatus.test.ts
  • 集成测试

- 标签类型扩展:新增 tagType 字段 (string/number/datetime/array),仅创建时确定,编辑不可修改
- Collection 标签值:tags 字段扩展为混合格式 (string ObjectId | {tagId, value}),支持新旧共存
- 标签管理 API (pro): batchUpsert / setCollectionTags / batchSetCollectionTags,事务保护
- 搜索过滤增强:filterCollectionByKeyValueTags + checkValue,支持 4 类型 × 13 操作符
- Collection 创建链路:createOneCollection 支持混合 tags 入参
- Workflow + Agent V2:datasetSearch 节点新增 tagFilterConfig 渲染,Agent 搜索传递 collectionFilterMatch
- UTC 时间工具:toUTCSeconds / fromUTCSeconds
- 错误码 + i18n:501013~501023 标签错误码 × 三国语言
- 历史数据迁移,完全向后兼容

Co-Authored-By: Claude Code <noreply@anthropic.com>
@SteelHe SteelHe changed the title [ADD] 知识库标签过滤功能V2 fix(dataset/tag): 知识库标签过滤功能V2 Aug 12, 2026
@SteelHe SteelHe changed the title fix(dataset/tag): 知识库标签过滤功能V2 feat(dataset/tag): 知识库标签过滤功能V2 Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant