fix(agent): full-catalog dashboard search and working LLM retry
- search_dashboards: call /api/dashboards with page_context=other and page_size=100 so the profile 'My Dashboards Only' filter can no longer hide the whole catalog; parse available_total/effective_profile_filter and report hidden-by-filter instead of a false 'no dashboards' answer - prefetch_dashboards: same full-catalog context; fix dead code where data=resp.json() sat after return '' inside the error branch, making every 200 response raise NameError and the prefetch always return '' - llm-status: ?force=1 bypasses the 30s health cache so the 'Retry now' button performs a fresh probe instead of re-reading the stale status; frontend keeps a single retry interval (previously stacked intervals decayed the countdown faster than 1/s and fired duplicate probes) - tests: agent tool/prefetch, backend route bypass + force param, frontend retry/force coverage
This commit is contained in:
@@ -42,10 +42,13 @@ _LLM_LAST_ERROR_TS_KEY = "last_llm_error_ts"
|
||||
|
||||
|
||||
# #region AgentChat.LlmHealth.Check [C:2] [TYPE Function] [SEMANTICS agent-chat,llm,health,check]
|
||||
async def _check_llm_provider_health() -> str:
|
||||
"""Check LLM provider connectivity. Cached for _LLM_CHECK_CACHE_TTL seconds."""
|
||||
async def _check_llm_provider_health(force: bool = False) -> str:
|
||||
"""Check LLM provider connectivity. Cached for _LLM_CHECK_CACHE_TTL seconds
|
||||
unless force=True bypasses the cache for an immediate probe (used by the
|
||||
frontend "Retry now" button — without force a click inside the TTL window
|
||||
returned the stale cached status and appeared to do nothing)."""
|
||||
now = time.time()
|
||||
if now - _llm_status["last_check_ts"] < _LLM_CHECK_CACHE_TTL:
|
||||
if not force and now - _llm_status["last_check_ts"] < _LLM_CHECK_CACHE_TTL:
|
||||
return _llm_status["status"]
|
||||
|
||||
# Fetch LLM config from backend's own API (same as agent container does)
|
||||
|
||||
Reference in New Issue
Block a user