Commit Graph
826 Commits
Author SHA1 Message Date
LTbinglingfeng 768da13137 style: update font sizes and dimensions for improved UI consistency across components 2026-05-27 18:09:49 +08:00
LTbinglingfeng 87702bb5a0 feat(provider-stats): add total stats calculation and display for API keys in resource detail view v1.14.0 2026-05-26 04:17:06 +08:00
LTbinglingfeng d64210fd58 refactor(page-transition): enhance transition animations and reduce motion handling for improved accessibility 2026-05-26 02:17:07 +08:00
LTbinglingfeng 432438e99b style(sidebar-toggle): update positioning, size, and styles for improved usability 2026-05-26 02:00:29 +08:00
LTbinglingfeng 4d6a5da5c7 refactor(icons, layout): update SVG icons and adjust layout styles for improved UI consistency 2026-05-26 01:38:40 +08:00
LTbinglingfeng 544b365fa6 feat(nav): restructure navigation items into groups with metadata and update styles 2026-05-26 01:15:59 +08:00
LTbinglingfeng 8d3a4822db fix(auth-files): keep codex websocket labels translated 2026-05-26 00:27:33 +08:00
LTbinglingfeng 5815053346 Merge remote-tracking branch 'origin/dev' into dev 2026-05-26 00:22:25 +08:00
LTbinglingfeng c2b19d2e90 feat(providers): add authIndex to API key entries and connectivity tests 2026-05-26 00:07:34 +08:00
Luis PaterandGitHub 2c641f8e1c Merge pull request #287 from GavinKung/fix/auth-files-codex-websockets-toggle
fix(auth-files): restore Codex websockets toggle
v1.13.1
2026-05-26 00:05:54 +08:00
LTbinglingfeng 42c0e7be06 fix(providers): confirm discarding unsaved edits on category switch
Previously confirmDiscardIfDirty only fired for Sheet-driven close paths
(Cancel button, backdrop, escape). Clicking a different provider in the
left rail bypassed the prompt and silently dropped the form changes.
ProviderSheet now exposes the existing guard via an imperative handle,
which the workbench page calls before swapping the active brand.
2026-05-25 23:52:50 +08:00
LTbinglingfeng 1aa99887da fix(providers): honor authIndex for OpenAI discovery and connectivity test
- useModelDiscovery: openaiCompatibility branch now forwards
  resolvedAuthIndex into modelsApi.fetchModelsViaApiCall, mirroring the
  gemini/codex/claude branches. Configs that rely on a backend-resolved
  auth index without a local plaintext key can now list models.
- useConnectivityTest: runOpenAIKey accepts an authIndex fallback when
  entry.apiKey is empty, sets Authorization: Bearer $TOKEN$ in that
  case, and forwards authIndex on the /api-call request so the gateway
  can substitute the upstream token.
- useModelDiscovery: reset stale results when baseUrl / apiKey /
  apiKeyEntries / headers / authIndex change, so reopening the discovery
  panel after editing fields re-fetches instead of showing the previous
  endpoint's models.
2026-05-25 23:52:18 +08:00
LTbinglingfeng d2ab416f6c fix(providers): fetch recent requests on mount
The new workbench only wired refreshRecentRequests into the manual refresh
button; the hook itself just set an interval (240s). As a result the
status bar showed empty/zero until the first poll. Load on mount when
enabled (cache hit avoids a network round-trip).
2026-05-25 23:51:49 +08:00
Dylan 33df50611f fix(auth-files): restore Codex websockets toggle 2026-05-25 23:48:08 +08:00
LTbinglingfeng 0992b8b4fb chore(types): remove redundant comment about AmpcodeFormState in ModelEntryInput 2026-05-25 23:26:36 +08:00
LTbinglingfeng b9f3d181be chore(login): remove orphan Login.module.scss
The actual login page lives at src/pages/LoginPage.{tsx,module.scss};
this stale src/pages/Login/Login.module.scss has had no importers since
it was committed in 450964f.
2026-05-25 23:15:47 +08:00
LTbinglingfeng 4a7dbf2d45 chore(i18n): drop unused ai_providers namespace and providersPage orphans
- Remove the legacy ai_providers.* block (~268 keys per locale) — only
  nav.ai_providers under a different namespace is still referenced
- Remove providersPage.{disconnected,error,actions.back,
  actions.openModelCatalog,ampcode.behaviorSection,detail.empty,
  status.notAvailable,modelCatalog.{loading,openAction,summaryCount,
  summaryError,summaryTitle}} which were never wired up after the
  ProvidersWorkbench rewrite
2026-05-25 23:14:03 +08:00
LTbinglingfeng 4142d91e9b chore(ui): remove unused HeaderInputList and ModelInputList
These helpers were only consumed by the old AiProviders edit pages and
became orphaned after the providers refactor. modelInputListUtils.ts was
only used by ModelInputList, so it goes too.
2026-05-25 23:03:36 +08:00
LTbinglingfeng 844385e1d3 chore(providers): remove dead exports left over from refactor
- Drop empty barrel src/components/providers/index.ts (no external importers)
- Drop src/components/providers/types.ts (only referenced in a stale comment)
- Trim src/components/providers/utils.ts to the 10 exports actually used
  externally; remaining helpers (ampcode mappers, key builders, base URL
  normalizers, redundant recent-stats wrappers) were dead after the
  ProvidersWorkbench rewrite
2026-05-25 23:02:31 +08:00
LTbinglingfeng 85d6b76387 feat(select): add small size option for Select component and corresponding styles
fix(provider): update button icon styles in ProviderHeaderCard
style(provider): enhance layout and typography in ProviderHeaderCard and ProviderResourcePanel
fix(provider): update status styles in ProviderResourceTable and sharedForm
2026-05-25 03:15:35 +08:00
LTbinglingfeng 48b9879794 fix(models): add support for authIndex in request headers and signature generation 2026-05-25 02:38:42 +08:00
LTbinglingfeng cb26c96eef fix(providers): label missing authIndex as not-set instead of unavailable
The detail metadata section was rendering authIndex with the
status.notAvailable label (zh: "不可用"), which reads like the
provider doesn't support the feature at all. Every provider supports
authIndex; it's just absent until you link an auth file. Reuse the
status.notSet label so the wording matches baseUrl / proxyUrl and
makes it clear that the entry simply doesn't have a value yet.
2026-05-25 02:31:23 +08:00
LTbinglingfeng 7e9c5be640 fix(providers): forward stored apiKey and authIndex to discovery and tests
The form's apiKey field is intentionally empty in edit mode (the
placeholder reads "leave blank to keep unchanged"), so model discovery
and the Claude connectivity test were sending requests with no
credentials and getting 401 for Codex / Claude / Gemini providers.

- BaseProviderForm derives a fallbackAuthIndex from resource.raw.authIndex
  alongside the existing fallbackApiKey and passes both into the
  discovery and connectivity hooks
- modelsApi.fetch{V1,Claude,Gemini,}ModelsViaApiCall accept an optional
  authIndex and forward it on apiCallApi.request so the backend can
  inject the OAuth/auth-file token for providers that store the key
  externally
- useModelDiscovery threads the authIndex through to every brand
- useConnectivityTest threads authIndex through the Claude path and no
  longer rejects the request as "API key required" when an authIndex is
  available
2026-05-25 02:24:49 +08:00
LTbinglingfeng 87ddd62c40 feat(providers): pick the connectivity test model from a dropdown
Replace the free-form test-model input on the OpenAI-compatible and
Claude edit sheets with a Select whose options are derived from the
already-added models. An Auto entry (annotated with the first model
name) maps to an empty form.testModel so connectivity tests keep
falling back to the first configured model when the user hasn't made
an explicit pick. If an existing config carried a test model that
isn't in form.models, surface it as a custom option so the value is
preserved instead of silently dropped.
2026-05-25 02:09:06 +08:00
LTbinglingfeng 8c3c9c1ec4 fix(providers): confirm before discarding unsaved edits in the provider sheet
- BaseProviderForm and AmpcodeForm now snapshot the initial form
  signature on mount and report dirty/clean state to the parent via a
  new onDirtyChange callback
- ProviderSheet tracks the form's dirty flag and wraps the cancel
  button plus the new Sheet.confirmClose hook with a confirmation
  prompt; the prompt is skipped during submit and in detail mode
- Sheet gains an optional confirmClose hook so that Escape, overlay
  click and the close button all route through the same async check
  before starting the close animation
- Add i18n keys (en/zh-CN/zh-TW/ru) for the unsaved-changes prompt
2026-05-25 02:00:50 +08:00
LTbinglingfeng dd3c39ec32 fix(providers): retry OpenAI model discovery without auth on failure
When the OpenAI-compatible endpoint rejects the first authenticated
/models request (some upstreams expose the route unauthenticated, or
the configured key only covers chat completions), retry once with no
key and no custom headers before surfacing the original error so the
discovery panel can populate.
2026-05-25 01:55:45 +08:00
LTbinglingfeng c23fd6975e fix(providers): preserve alias when applying discovered models
ModelDiscoveryPanel now hands the full ModelInfo objects to onApply
instead of just the model names, and BaseProviderForm copies each
incoming alias into the new form.models row so suggestions from
endpoints that return alias metadata are no longer silently dropped.
2026-05-25 01:54:58 +08:00
LTbinglingfeng fafc4b78e0 feat(providers): bring back status bar, sort and model filter on the table
- Wire useProviderRecentRequests into ProvidersWorkbenchPage and pass
  usageByProvider down to the resource table; the header refresh now
  refreshes recent requests in parallel with the provider snapshot
- ProviderResourceTable status column hosts the existing status badge
  plus an inline ProviderStatusBar driven by the recent-requests usage;
  column widths rebalanced so the bar fits on a single row
- New OpenAIBrandToolbar gives the OpenAI-compatible brand a sort
  control (name / priority / recent-success with direction) and a
  multi-select model filter dropdown; ProviderResourcePanel renders it
  via the new openaiControls prop
- ProvidersWorkbenchPage computes the available model union, sorts /
  filters resources when the OpenAI brand is active, and resets the
  selected models when switching brands
- Add providerStatusBar.module.scss for the in-row status bar styling
  and i18n keys (en/zh-CN/zh-TW/ru) for the new toolbar
2026-05-25 01:34:44 +08:00
LTbinglingfeng 191a4c5cc5 feat(providers): add model discovery panel inside the models section
- New useModelDiscovery hook fans out to modelsApi.fetchGemini /
  fetchV1 / fetchClaude / fetchModels based on brand and surfaces
  loading, error and the normalized model list
- New ModelDiscoveryPanel renders an inline search, select-all and
  per-model checkboxes with an Already added marker for entries that
  already exist in form.models
- BaseProviderForm: show a Fetch from endpoint button at the top of
  the models section for the supported brands, with apply merging
  the picked names into form.models while skipping duplicates and
  replacing the empty placeholder row
- Add i18n keys (en/zh-CN/zh-TW/ru) for the discovery toolbar, list
  states and apply count
2026-05-25 01:18:06 +08:00
LTbinglingfeng 4711db9bbb fix(providers): reset connectivity status only for the changed key entry
Track per-entry signatures (apiKey + proxyUrl + headersText) so editing
one OpenAI key entry no longer clears the success/error state of the
other entries. The global signature (baseUrl/headers/models/testModel)
keeps clearing every entry as before.
2026-05-25 01:07:55 +08:00
LTbinglingfeng bf299cffdf feat(providers): add OpenAI/Claude connectivity test in edit sheet
- Introduce useConnectivityTest hook that drives per-key and bulk tests
  via apiCallApi against the chat-completions / messages endpoints, with
  signature-based status reset
- OpenAI form: each API key entry header now shows a status icon plus a
  per-key Test button, and the entries section gains a Test all button
- Claude form: enable the Test model field and add a Test button with
  inline status; falls back to the persisted apiKey when the edit form
  field is left blank
- Add ConnectivityStatusIcon, related styles (spin keyframes, buttons,
  error banner), and i18n keys (en/zh-CN/zh-TW/ru) for the test labels
  and validation messages
2026-05-25 01:02:47 +08:00
LTbinglingfeng 47ba6ab91c feat(providers): expose inline enable/disable toggle in resource table
- Wire useProviderWorkbench.toggleDisabled through ProviderResourcePanel
  to ProviderResourceTable as an inline ToggleSwitch in the actions cell
- Hide the toggle for the Ampcode singleton brand
- Add toast on success/failure and i18n keys (en/zh-CN/zh-TW/ru) for the
  enable/disable labels and a toggleFailed error message
2026-05-25 00:43:13 +08:00
LTbinglingfeng 1ceb7e15f5 feat: enhance metrics display in ProviderResourceTable and update localization keys 2026-05-25 00:10:35 +08:00
LTbinglingfeng 34a050dffa refactor: remove deprecated AI provider edit pages and related stores
- Deleted AiProvidersVertexEditPage and its associated routes.
- Consolidated AI provider routes under ProvidersWorkbenchPage.
- Removed Claude and OpenAI draft stores as they are no longer in use.
- Updated theme styles to include new workbench tokens for UI consistency.
2026-05-24 03:08:08 +08:00
LTbinglingfeng 9a5c2b0ea4 feat: add xAI/Grok quota management
- Introduced new quota management for xAI/Grok, including types, API calls, and UI components.
- Added localization support for xAI quota in English, Russian, Chinese (Simplified and Traditional).
- Updated styles for xAI quota cards and sections.
- Integrated xAI quota fetching and rendering logic into existing quota management system.
- Enhanced auth file handling to support xAI files.
v1.13.0
2026-05-24 01:08:04 +08:00
LTbinglingfeng a44bcd3337 feat(providers): enhance provider configuration handling and serialization 2026-05-24 00:51:09 +08:00
LTbinglingfeng 57a30634fc chore: update package manager to bun@1.3.14 in package.json 2026-05-23 22:46:21 +08:00
LTbinglingfeng 0fa6b741b2 chore: remove unused hooks and utils 2026-05-21 01:29:27 +08:00
LTbinglingfeng eab19952e0 fix(routes): strictly parse provider edit indexes 2026-05-20 01:29:55 +08:00
LTbinglingfeng 2cb98ad118 fix(config): preserve source draft on visual save 2026-05-20 01:27:19 +08:00
LTbinglingfeng 075c2fa980 fix: improve error messages for login and add backend response details 2026-05-20 01:12:50 +08:00
LTbinglingfeng ef7b63ef22 update package.json 2026-05-19 01:33:39 +08:00
LTbinglingfeng 65f8b23aae fix(docs): correct minimum required version and update TypeScript version in README v1.12.0 2026-05-19 01:25:04 +08:00
LTbinglingfeng f8fdd9bb29 chore: update dependencies and remove baseUrl from tsconfig 2026-05-19 01:23:43 +08:00
Supra4E8CandGitHub 9a7cb37bed Merge pull request #279 from ZHOUKAILIAN/fix/auth-file-html-challenge-ui
fix(auth-files): handle HTML challenge content in editor
2026-05-19 01:08:48 +08:00
LTbinglingfeng 77e7dd0e62 feat: enhance filter controls with search functionality and style adjustments 2026-05-19 00:58:25 +08:00
LTbinglingfeng f0d669f98a feat: remove Home control plane configuration and related validation logic 2026-05-19 00:25:45 +08:00
zhoukailian bb0c0a7738 fix(auth-files): keep invalid content copyable 2026-05-18 15:19:42 +08:00
zhoukailian 300f73e5e0 fix(auth-files): handle html challenge content 2026-05-18 15:09:05 +08:00
LTbinglingfeng d6f5c45aa5 feat(i18n): add Home control plane settings and various enhancements
- Introduced Home control plane configuration options in English, Russian, Simplified Chinese, and Traditional Chinese locales.
- Added new fields for error log retention, usage statistics, and image generation settings in visual configuration.
- Enhanced payload model entries to include header management and condition matching capabilities.
- Updated default visual configuration values to accommodate new settings.
2026-05-18 03:08:05 +08:00