You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(zoo-gateway): settings UI, validation, and i18n (#345)
* feat(zoo-gateway): add provider types, handler, and model fetcher
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(zoo-gateway): respect readonly client, real version header, safer fetch
- Stop reassigning RouterProvider.client; thread Zoo enrichment headers
through openAiHeaders so a single OpenAI client is used.
- Replace npm_package_version (never populated at extension runtime)
with Package.version from the shared package shim.
- Default the model list to [] on a structurally broken response so we
log and recover instead of crashing on response.data.data being
undefined.
- Bypass inFlightRefresh de-duplication for zoo-gateway: a refresh
triggered after sign-out/sign-in must not return the previous user's
in-flight response.
- Add fetcher unit tests covering auth header, timeout, error
redaction, and bad-response handling.
Co-authored-by: Cursor <cursoragent@cursor.com>
* test(zoo-gateway): mock cached-token + clear-token auth helpers
The downstream stack (settings-ui) calls getCachedZooCodeToken and
clearZooCodeToken from the auth handler. CI on stacked PRs merges base
into head so this spec runs against the cached-token-aware handler;
expand the auth module mock so the auth guard test exercises the real
throw path instead of vitest's missing-mock-export error.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(zoo-gateway): add settings UI, validation, and i18n
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(zoo-gateway): dynamic dashboard URL and cached-token fallback
- Resolve ModelPicker serviceUrl from zooCodeBaseUrl so staging/dev
environments link to the matching dashboard.
- Fall back to getCachedZooCodeToken() in the handler and model fetcher
when the profile has not been seeded yet (auth before webview open).
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(deps): drop stale webview-ui package.json drift that broke frozen-lockfile installs
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(i18n): restore googleCloudCredentialsPathWarning and automaticFetch 'free' search hint dropped on rebase
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(zoo-gateway): pick default model from fetched list, prefer Sonnet 4.5
Resolves Sonnet 4.5 from the gateway model catalog instead of a static Vercel slug so test (Bedrock) and live accounts both get a valid default. Reassigns stale profile model IDs when they are not in the catalog.
Co-authored-by: Cursor <cursoragent@cursor.com>
* test(zoo-gateway): cover dynamic default model picker for codecov patch
Exports pickZooGatewayDefaultModelId so the helper is unit-testable and adds
component tests for the auto-default useEffect (no-op while catalog loads,
auto-pick on empty profile, repair stale id, no-op when valid).
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(i18n): restore UTF-8 for Google Cloud warning and model picker strings
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(zoo-gateway): settings UI sign-in button, validation tests, defer auth
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor(zoo-gateway): localize auth-state UX to provider component
Move the zoo-gateway sign-in error out of the shared form-validation effect
in ApiOptions and into ZooGateway.tsx, where it renders inline via
ApiErrorMessage. ApiOptions can then drop zooCodeIsAuthenticated from its
useEffect dependency list, and validateApiConfigurationExcludingModelErrors
short-circuits zoo-gateway entirely.
Also rename the inline isSonnet45ModelId helper to isClaudeSonnetModelId
and let pickZooGatewayDefaultModelId express the version-priority order
directly, so the helper has no version baked into its name.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(zoo-gateway): enforce org provider check, simplify sign-in copy
The settings-form short-circuit for zoo-gateway also bypassed the
organization PROVIDER_NOT_ALLOWED check, so a workspace that disallows
zoo-gateway could not surface that error. Scope the short-circuit to
the keys/sign-in check only and let the org allowlist check run for
every provider.
Drop the quoted CTA from zooGatewaySignIn in all 18 locales: the
sign-in button is rendered immediately below the inline error, so a
duplicate label was just a drift hazard.
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor(webview): move provider model config + docs slugs out of ApiOptions
Lift the inline PROVIDER_MODEL_CONFIG map and the docs-slug lookup out
of ApiOptions.tsx into webview-ui/src/components/settings/utils/providerModelConfig.ts
behind getProviderModelConfig and getProviderDocsSlug helpers. ApiOptions
now reads provider-specific model fields, defaults, and docs slugs through
those helpers, leaving the component focused on rendering.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(i18n): align French zooGatewaySignIn to formal vous register
validation.zooGatewaySignIn used "Connecte-toi" while
providers.zooGateway.signInDescription uses "Connectez-vous".
Use vous consistently across both strings.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: James Mtendamema <jmtendamema@geologicai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments