fix: show websearch API key visibility/copy buttons for saved providers

The buttons were hidden because v-if only checked provider.api_key,
which is always empty for saved providers (backend sanitizes it).
Now also checks api_key_configured. Copy button is disabled when
no actual key is available (only configured placeholder shown).
This commit is contained in:
erio
2026-04-14 07:22:22 +08:00
parent b402c367d3
commit 9e0d12d3b0
4 changed files with 39 additions and 10 deletions

View File

@@ -1939,7 +1939,7 @@ func (h *SettingHandler) GetWebSearchEmulationConfig(c *gin.Context) {
response.ErrorFrom(c, err)
return
}
response.Success(c, service.SanitizeWebSearchConfig(c.Request.Context(), cfg))
response.Success(c, service.PopulateWebSearchUsage(c.Request.Context(), cfg))
}
// UpdateWebSearchEmulationConfig 更新 Web Search 模拟配置