refactor(terminology): rename user-facing tenant labels to workspace
Align product copy, API docs, Swagger descriptions, and i18n strings with workspace terminology while keeping internal tenant identifiers and headers unchanged for API compatibility.
This commit is contained in:
@@ -1002,7 +1002,7 @@ func (h *KnowledgeHandler) DeleteKnowledge(c *gin.Context) {
|
||||
effectiveTenantID, _ := effCtx.Value(types.TenantIDContextKey).(uint64)
|
||||
if effectiveTenantID == 0 {
|
||||
logger.Error(ctx, "Effective tenant ID missing after access validation")
|
||||
c.Error(errors.NewInternalServerError("tenant context unavailable"))
|
||||
c.Error(errors.NewInternalServerError("workspace context unavailable"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1341,13 +1341,13 @@ type GetKnowledgeBatchRequest struct {
|
||||
|
||||
// GetKnowledgeBatch godoc
|
||||
// @Summary 批量获取知识
|
||||
// @Description 根据ID列表批量获取知识条目。可选 kb_id:指定时按该知识库校验权限并用于共享知识库的租户解析;可选 agent_id:使用共享智能体时传此参数,后端按智能体所属租户查询(用于刷新后恢复共享知识库下的文件)
|
||||
// @Description 根据ID列表批量获取知识条目。可选 kb_id:指定时按该知识库校验权限并用于共享知识库的空间解析;可选 agent_id:使用共享智能体时传此参数,后端按智能体所属空间查询(用于刷新后恢复共享知识库下的文件)
|
||||
// @Tags 知识管理
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param ids query []string true "知识ID列表"
|
||||
// @Param kb_id query string false "可选,知识库ID(用于共享知识库时指定范围)"
|
||||
// @Param agent_id query string false "可选,共享智能体ID(用于按智能体租户批量拉取文件详情)"
|
||||
// @Param agent_id query string false "可选,共享智能体ID(用于按智能体空间批量拉取文件详情)"
|
||||
// @Success 200 {object} map[string]interface{} "知识列表"
|
||||
// @Failure 400 {object} errors.AppError "请求参数错误"
|
||||
// @Security Bearer
|
||||
@@ -1709,7 +1709,7 @@ type knowledgeTagBatchRequest struct {
|
||||
|
||||
// UpdateKnowledgeTagBatch godoc
|
||||
// @Summary 批量更新知识标签
|
||||
// @Description 批量更新知识条目的标签。可选 kb_id:指定时按该知识库校验编辑权限并用于共享知识库的租户解析
|
||||
// @Description 批量更新知识条目的标签。可选 kb_id:指定时按该知识库校验编辑权限并用于共享知识库的空间解析
|
||||
// @Tags 知识管理
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
@@ -1898,7 +1898,7 @@ func (h *KnowledgeHandler) SearchKnowledge(c *gin.Context) {
|
||||
_ = userIDVal
|
||||
currentTenantID := c.GetUint64(types.TenantIDContextKey.String())
|
||||
if currentTenantID == 0 {
|
||||
c.Error(errors.NewUnauthorizedError("tenant ID not found"))
|
||||
c.Error(errors.NewUnauthorizedError("workspace ID not found"))
|
||||
return
|
||||
}
|
||||
callerTenantRole := types.TenantRoleFromContext(ctx)
|
||||
|
||||
Reference in New Issue
Block a user