Commit Graph
215 Commits
Author SHA1 Message Date
lzt404 6b5d88cf9b fix: preserve legacy Claude alias sources during reconfiguration
Resolve model sources before replacing role aliases and support legacy
API and OAuth configurations that retain only aliased model entries.

Add regression coverage for source priority, disabled providers,
cross-role updates, and transaction rollback.
2026-09-11 16:25:14 +08:00
lzt404 9042421292 fix(config): prevent API provider loss during alias updates and migration
- Validate provider integrity before saving alias changes
- Reject rendered YAML that differs from the expected configuration
- Abort migration when existing config cannot be read or parsed
- Remove lossy config recovery fallback
- Add regression tests for provider loss, locked files, malformed config, and repeated updates
2026-09-11 16:25:14 +08:00
lzt404 88ea6f1c9a fix(agents): rebuild desktop routes from enabled providers
Do not treat managed aliases under disabled providers as usable Desktop routes. Match each route against its source on an enabled provider, skip disabled sources when creating aliases, and exclude disabled mappings when identifying direct aliases.

Validation: four regression tests fail before the fix and pass afterward; cargo test --locked (456 passed); cargo check --locked. After migrating the two affected live routes to the existing enabled source, Haiku and Opus messages requests both returned HTTP 200.
2026-09-11 16:25:14 +08:00
lzt404 ade2d50a69 fix(aliases): clear raw options when deleting and recreating aliases
Use one cleanup path for override and override-raw across model and Fast alias creation and deletion. Remove supported effort and service-tier keys while preserving unrelated parameters, selector conditions, other protocols, and grouped models.

Validation: cargo test --locked alias_ (72 passed), including raw High/Fast deletion followed by Low/non-Fast recreation, orphaned raw rules, conditional grouped rules, and all supported effort keys.
2026-09-11 16:25:14 +08:00
lzt404 a57c81e4e1 fix(aliases): preserve payload rules for surviving channels
Scope payload cleanup to the selected OAuth protocol and retain rules still used by surviving OAuth aliases, API mappings, or real models. Preserve protocol-free shared rules while any matching mapping survives, and limit creation cleanup to its source protocol.

Validation: cargo test --locked tests::alias_delete (6 passed), including Codex/Claude collisions, wildcard selectors, same-protocol OAuth channels, and API mappings.
2026-09-11 16:25:14 +08:00
lzt404 e84e576d1d fix(aliases): delete API aliases without reasoning overrides
Determine deletability from the actual provider model mapping instead of requiring an effort payload rule. Keep source models and unrelated aliases intact.

Validation: cargo test --locked tests::alias_delete (3 passed), covering all four API provider sections, removing every option in the editor, and real-model name collisions.
2026-09-11 16:25:14 +08:00
lzt404 69cc19679c fix(agents): restore desktop core routes with configuration history
Include CPA model aliases in Desktop history previews and revision checks. Restore routes and local history through a serialized transaction, rolling core changes back when local restoration fails. Reject legacy fixed-route snapshots without mapping metadata.

Validation: cargo test --locked tests::alias_save (13 passed), including successful route restoration, stale previews, local conflicts, core write failure, and rollback.
2026-09-11 16:25:14 +08:00
lzt404 60a3683976 fix(agents): record model mapping changes without file changes
Include Claude Desktop mappings in history change detection and preserve the previous selection. Show mapping changes in history previews and invalidate previews when metadata changes.

Validation: 15 history tests pass, including identical-profile model changes and repeated no-op saves.
2026-09-11 16:25:14 +08:00
lzt404 0a019ad1d7 fix(tests): isolate agent configuration paths from user environment
Ignore inherited client configuration paths in test builds and enforce temporary-home boundaries for history fixtures.

Validation: 435 Rust tests pass, including a child-process regression with inherited client environment overrides.
2026-09-11 16:25:14 +08:00
lzt404 36d3181475 fix(aliases): prevent stale edits and preserve payload rules
- Validate configuration revisions and reject ambiguous model mappings
- Preserve raw overrides, conditions, and unchanged settings
- Serialize saves and restore configuration after write failures
- Add regression coverage and remove comments from affected files
2026-09-11 16:25:14 +08:00
lzt404 7c9b8897ed fix(aliases): preserve configuration when editing model aliases
Resolve existing aliases from their configuration, preserve metadata and unrelated payload parameters, and keep shared rules intact when renaming or changing sources.

Fix dialog feedback, keyboard focus, and narrow layouts. Add regression coverage for alias edits and browser interactions.
2026-09-11 16:25:14 +08:00
FakeTrader ee223424af feat(aliases): support editing model aliases 2026-09-11 16:25:14 +08:00
lzt404 5a05ad83fa refactor: remove unused agent configuration code and fix build warnings
- Remove 3 unused functions and 2 unread fields
- Gate test-only types and helpers with #[cfg(test)]
- Verify all 403 Rust tests pass and check/release builds emit no warnings
2026-09-11 16:25:14 +08:00
lzt404 7acc0e9c74 feat(agents): improve configuration workflow and add history recovery
- Update configuration files directly while preserving custom settings
- Add versioned backups, restore previews, and managed-field recovery
- Detect first-time setup, outdated configuration, and invalid files
- Add conflict detection and rollback for multi-file updates
- Simplify configuration actions and clarify OAuth mode
- Add backend and UI regression coverage
2026-09-11 16:25:14 +08:00
lzt404 ca76f344fb fix(codex): preserve context defaults from the client model API 2026-09-11 16:25:14 +08:00
lzt404 898cf080d3 fix(core): retry Windows file replacements blocked by transient locks
- Retry errors 5, 32, 33, and 1175 up to five times with exponential backoff
- Preserve the final error and avoid retrying partial replacement failures
- Add eight regression tests covering transient and persistent file locks

Closes #241
2026-09-09 14:59:23 +08:00
lzt404 1de7e3f3bb fix(cpa-gui): update version to 0.2.81 2026-09-09 12:13:57 +08:00
lzt404 be2461befd fix(core): prevent orphaned Windows core processes from blocking updates
- Stop live core processes before updates, regardless of port availability
- Wait for process termination before replacing files
- Block new core operations and cancel startup during shutdown
- Attach the Windows Job immediately after spawning
- Abort updates and restarts when stopping the core fails
- Add lifecycle and file-lock regression tests; all 33 related tests pass
2026-09-09 12:13:57 +08:00
lzt404 5548324c8f fix: update cpa-gui version to 0.2.80 2026-09-08 19:39:34 +08:00
lzt404 70ed5bc7f2 feat(agents): update DeepSeek Harness integration for current DSH
- write credentials using the versioned refs schema
- repair misplaced EasyCLIProxyAPI credential keys
- add Web, Headless, ACP, SDK and custom profile launch options
- track and safely stop managed DSH process trees
- detect occupied Web ports before launch
- add localized UI and regression tests

Fixes #207
2026-09-08 19:39:34 +08:00
lzt404 53ef4dc264 fix(core): prevent startup failures after core updates
Atomically replace core files, recover from macOS SIGKILLs, and capture startup output for diagnostics.

Fixes #224
2026-09-08 13:35:08 +08:00
lzt404 08ee8ca8d3 fix(zcode): remove incompatible npm provider field
Stop writing the OpenCode-specific npm field and clean up values
left by earlier versions when synchronizing ZCode configuration.
Add regression coverage for both app and CLI configs.

Closes #231
2026-09-08 13:35:08 +08:00
lzt404 40ba85d6f0 fix(codex): load context defaults from CPA model definitions
- Resolve context limits from core model definitions, aliases, and configuration
- Preserve user overrides and display context sources and fallback hints
- Refresh defaults from CPA when restoring all model settings
- Keep restore-all available without customizations and remove its icon
- Allow saving restored defaults even when values remain unchanged
- Add regression coverage for context resolution and default restoration
2026-09-07 19:28:21 +08:00
lzt404 911047d009 fix: replace native dialogs and improve quota reset handling
- Use consistent in-app dialogs for confirmation actions
- Keep quota refreshes free of prompts and automatic paid probes
- Add a separate confirmation flow for xAI availability tests
- Require explicit approval for Codex resets and prevent duplicate requests
- Show reset outcomes and require a quota refresh before retrying failures
- Cover confirmation and reset flows with fully mocked tests
2026-09-07 19:28:21 +08:00
lzt404 adb708c32a fix(version): update cpa-gui version to 0.2.78 2026-09-07 19:28:21 +08:00
lzt404 6ab7af0833 fix(watcher): avoid false configuration reloads on directory events 2026-09-07 13:46:41 +08:00
lzt404 bc04b2c255 chore: update dependencies in Cargo.toml 2026-09-07 01:27:03 +08:00
lzt404 0e5b4b00ad fix(auth): rename credential file labels and highlight enable action
- Use credential-file terminology in Simplified and Traditional Chinese
- Highlight the Enable button for disabled credentials without dimming actions
- Add regression tests for terminology and button styling
2026-09-07 01:26:23 +08:00
lzt404 82268cfa6f chore: update model_price.json 2026-09-07 01:25:40 +08:00
lzt404 969e8527b3 fix(quota): use native Tauri dialogs for reset confirmation
- Replace browser confirmations and grant dialog permissions
 - Await explicit consent before consuming reset credits
 - Prevent duplicate resets and restore state on cancellation
 - Add native confirmation regression tests
2026-09-06 19:02:49 +08:00
lzt404 34cab99a0a fix(agents): detect the correct Codex App version on Windows 2026-09-06 19:02:49 +08:00
lzt404 08c915b18b fix(linux): prevent core shutdown when worker threads exit
- Spawn Linux core processes on a dedicated, persistent thread instead of temporary background workers.
- Preserve parent-death signaling to stop the core when the GUI exits.
- Keep existing process management and Windows/macOS launch behavior unchanged.
- Add regression tests for launcher thread exit, runtime shutdown, spawn failure recovery, and parent-process termination.
2026-09-06 13:18:44 +08:00
lzt404 584c63bf2a fix(version): update cpa-gui version to 0.2.73 2026-09-06 01:28:58 +08:00
lzt404 9cf3878b28 perf: reduce background overhead and improve UI responsiveness
- Move blocking usage queries and core lifecycle operations to background
  workers, limit concurrency, and prevent overlapping core operations
- Coalesce statistics refreshes and consolidate category aggregations,
  reducing unfiltered analysis queries from 11 to 4
- Cache bundled model prices, reuse management API connections, and reduce
  redundant checks in the usage collector
- Throttle download progress and guide positioning updates, and avoid
  redundant renders when core status is unchanged
- Bound and coalesce configuration watcher events, and reuse a single
  model catalog refresh worker
- Stop scheduling remaining health checks when the dialog closes and
  limit backend health-check concurrency
- Replace overlapping OAuth polling with sequential requests, retry
  backoff, timeouts, and stale callback protection
- Add regression tests and a statistics benchmark script, and move
  performance verification documentation to agent_docs
2026-09-06 01:28:58 +08:00
lzt404 8575f4e17e fix(version): update cpa-gui version to 0.2.72 2026-09-05 18:05:57 +08:00
lzt404 673a322c00 feat(codex): add customizable model catalog editor
- add per-model context, reasoning, modality, visibility, and parallel tool settings
- persist customizations separately and apply them during catalog generation
- support restoring individual or all models to official fallback templates
- expose full fallback reasoning levels while keeping Fast available
- add localized UI, validation, documentation, and regression tests
2026-09-05 18:05:57 +08:00
lzt404 c370c17ff0 feat(codex): sync official model templates and isolate fallback config
- Sync all 11 dedicated model templates from the upstream Codex catalog
- Preserve official context windows, prompts, capabilities, and reasoning levels
- Remove the custom Spark and DeepSeek dedicated templates
- Move fallback model metadata into a standalone embedded resource
- Prevent remote catalogs and local caches from overriding fallback configuration
- Add catalog revision checks to prevent older templates from replacing newer ones
- Keep Fast mode available for both dedicated and fallback models
- Add regression coverage for Astra generation, catalog revisions, and fallback isolation

Validation: all 332 backend tests pass.
2026-09-05 18:05:57 +08:00
lzt404 3f03158f5e fix(codex): align fallback metadata and remove stale models automatically
- Align fallback defaults and instruction structure with upstream Codex while preserving Fast availability for all models
- Stop forcing fallback reasoning levels or inferring original-image support
- Sync managed catalogs on model refresh, configuration changes, and every 30 seconds
- Remove unavailable models, replace missing defaults, and handle empty-list recovery
- Preserve existing configuration on request failures or invalid responses
- Serialize refreshes, update UI model lists, and preserve backups across restarts
- Add regression coverage for fallback compatibility, stale-model cleanup, and configuration recovery
2026-09-05 18:05:57 +08:00
lzt404 ca4a3307f3 fix: resolve the core logs directory from the auth directory 2026-09-04 02:12:03 +08:00
lzt404 ae55150b19 fix(version): update cpa-gui version to 0.2.71 2026-09-04 01:50:46 +08:00
lzt404 ccbe3a5625 fix(update): retry core downloads across available sources 2026-09-04 01:50:46 +08:00
lzt404 bf6177e15a fix(codex): preserve OAuth configuration across updates
- preserve the active Codex OAuth mode in legacy configuration paths
- retain unsaved OAuth selection when navigating between clients
- add regression coverage to prevent OAuth credentials from being overwritten
2026-09-04 01:50:46 +08:00
lzt404 e3551f0e3c feat(config): complete logging and diagnostics management
- persist and migrate CPA logging settings with validation and rollback
- add logging controls, commercial-mode restart, and log-folder access
- streamline diagnostics UI and update localized copy
- move test-only catalog helper to eliminate dead-code warnings
2026-09-04 01:50:45 +08:00
lzt404 2c40691240 feat(settings): add request log diagnostics toggle
- add log diagnostics card under basic settings
- persist and synchronize CPA request-log configuration
- support configuration migration and rollback on save failure
- add localized UI copy and responsive styles
- add tests for request-log parsing and YAML merging
2026-09-04 01:50:45 +08:00
lzt404 64ea12fede fix(codex): preserve model IDs and expose all reasoning levels
- use the original model slug as the catalog display name
- expose all standard reasoning levels for every model
- prevent upstream metadata from restricting reasoning options
- update catalog generation tests
2026-09-04 01:50:45 +08:00
lzt404 3695e19cb4 fix(dependencies): update cpa-gui version to 0.2.70 2026-09-03 02:44:48 +08:00
lzt404 cff6a21974 feat(model-aliases): restore Fast service-tier option
- enable Fast for Codex API, OpenAI-compatible, and Codex OAuth sources
- apply service_tier=priority as an independent payload override
- support Fast-only and reasoning-effort combinations
- disable Fast until a supported model source is selected
2026-09-03 02:44:48 +08:00
lzt404 708a834e24 Dev (#198)
* fix(gitignore): add .codex to ignored files

* feat(settings): add configurable default terminal for CLI agents

- Add default terminal selector under Advanced Settings > Software Settings
- Detect available terminals across macOS, Windows, and Linux
- Persist and migrate the default-terminal configuration
- Apply the selected terminal when launching CLI agents
- Add localized labels and regression tests

Fixes #179

* feat(easy-mode): improve API onboarding and agent configuration flow

- Fix management API 404 errors when saving API providers
- Simplify the model list and support custom model IDs
- Adjust API field order and default provider selection
- Reuse the full agent configuration page and restore agent detection

* refactor(agents): simplify embedded beginner mode UI

* style(easy-mode): align onboarding heading typography

* fix(easy-mode): refine API onboarding actions and notifications

- Reveal model selection and save actions only after fetching models
- Move the API save success toast to the bottom-right corner
- Auto-dismiss the success notification after a short delay
- Remove icons from the model fetch and save buttons

* feat(easy-mode): refine guided setup flow and spotlight positioning

- Enforce completion of each selection, input, and configuration step
- Align OAuth, API access, and agent setup guidance with actual UI actions
- Prevent guidance cards from overlapping highlighted areas
- Improve bilingual step descriptions and completion states

* feat(easy-mode): refine onboarding flow and navigation controls

- Enforce accurate step validation for OAuth and API setup
- Select all fetched API models by default
- Prevent guide cards from overlapping highlighted areas
- Improve onboarding copy and remove unnecessary dashboard actions
- Reposition and highlight guide and exit controls

* fix(usage): filter control messages and repair unknown records

- filter empty, null, refresh, and support_refresh messages before persistence
- require request_id for usage records
- repair Claude cache token accounting
- delete historical unknown records
- show deleted record count in usage management

* fix(ui): improve auth file and core install notifications

- show auth file operation notices as auto-dismiss toasts
- prevent duplicate core install completion notifications
- close the install dialog automatically after successful installation
- bump core version to 7.2.146

* fix(ui): improve responsive layouts and core install notifications

- add workspace container breakpoints for management and usage pages
- make the usage table fill the available viewport height
- reduce unnecessary blank space in usage records
- silence automatic bundled core install completion notifications
- deduplicate manual core install completion feedback

* chore(version): update core version to 7.2.147

* fix(management): bypass system proxy for local Core requests

* fix(claude-desktop): support Claude OAuth model aliases

- Resolve Claude Desktop model sources from all OAuth definitions
- Write managed aliases to the matching OAuth channel
- Preserve alias metadata and add regression coverage

* test(claude-desktop): cover xAI OAuth model aliases

* feat(config): add disable cooling toggle to retry settings

* feat(config): add disable cooling toggle and refine settings layout

* fix(dependencies): update cpa-gui version to 0.2.69
2026-09-02 16:59:09 +08:00
lzt404 cbd82386d5 fix(usage): filter control messages and repair unknown records
- filter empty, null, refresh, and support_refresh messages before persistence
- require request_id for usage records
- repair Claude cache token accounting
- delete historical unknown records
- show deleted record count in usage management
2026-09-01 23:32:26 +08:00
lzt404 79b50b7a2b feat(settings): add configurable default terminal for CLI agents
- Add default terminal selector under Advanced Settings > Software Settings
- Detect available terminals across macOS, Windows, and Linux
- Persist and migrate the default-terminal configuration
- Apply the selected terminal when launching CLI agents
- Add localized labels and regression tests

Fixes #179
2026-08-30 18:48:01 +08:00