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:
wizardchen
2026-07-14 16:13:49 +08:00
committed by lyingbug
parent e1572b71b9
commit 41975abcc5
161 changed files with 1865 additions and 1770 deletions
+5 -5
View File
@@ -362,7 +362,7 @@ func (h *InitializationHandler) UpdateKBConfig(c *gin.Context) {
kb.VLMConfig.CustomInstructions = strings.TrimSpace(req.VLMConfig.CustomInstructions)
}
// 存储引擎:仅写入 provider 到新字段,参数从租户全局 StorageEngineConfig 读取
// 存储引擎:仅写入 provider 到新字段,参数从空间全局 StorageEngineConfig 读取
provider := strings.ToLower(strings.TrimSpace(req.StorageProvider))
if provider == "" {
provider = "local"
@@ -1696,7 +1696,7 @@ func (h *InitializationHandler) buildTestModel(
}
}
// resolveTenantWeKnoraCloudCreds 从当前租户上下文里取出 WeKnoraCloud 凭证,
// resolveTenantWeKnoraCloudCreds 从当前空间上下文里取出 WeKnoraCloud 凭证,
// 供测试连接端点补齐 appID/appSecret。与 service.resolveWeKnoraCloudCredentials
// 对应,但因为 handler 还没有被注入 tenantService(历史原因),暂时从
// TenantInfoFromContext 读取,等效果相同。
@@ -1751,7 +1751,7 @@ func (h *InitializationHandler) CheckRemoteModel(c *gin.Context) {
appID, appSecret, ok := h.resolveTenantWeKnoraCloudCreds(ctx)
if !ok {
logger.Error(ctx, "Tenant info not found")
c.Error(errors.NewBadRequestError("租户信息未找到"))
c.Error(errors.NewBadRequestError("空间信息未找到"))
return
}
@@ -1825,7 +1825,7 @@ func (h *InitializationHandler) TestEmbeddingModel(c *gin.Context) {
appID, appSecret, ok := h.resolveTenantWeKnoraCloudCreds(ctx)
if !ok {
logger.Error(ctx, "Tenant info not found")
c.Error(errors.NewBadRequestError("租户信息未找到"))
c.Error(errors.NewBadRequestError("空间信息未找到"))
return
}
@@ -1977,7 +1977,7 @@ func (h *InitializationHandler) CheckRerankModel(c *gin.Context) {
appID, appSecret, ok := h.resolveTenantWeKnoraCloudCreds(ctx)
if !ok {
logger.Error(ctx, "Tenant info not found")
c.Error(errors.NewBadRequestError("租户信息未找到"))
c.Error(errors.NewBadRequestError("空间信息未找到"))
return
}