- Implement tests for anthropicMessagesTransformer including serialization and event handling in stream.test.ts.
- Add usage extraction tests for anthropicMessagesUsage in usage.test.ts.
- Create extensive tests for Gemini generate content aggregation and outbound usage in aggregator-outbound-usage.test.ts.
- Introduce tests for Gemini stream handling and payload parsing in stream.test.ts.
- Enhance OpenAI response serialization tests to ensure proper mapping of usage details and preservation of annotations in outbound.test.ts.
- Introduced `NormalizedContentBlock`, `NormalizedUsage`, and related types for structured data handling.
- Implemented utility functions for creating and merging normalized usage statistics.
- Added a new module for shared transformers to manage chat formats.
feat: Implement app local state management
- Created functions to clear application installation state and manage local storage keys.
- Added constants for theme and user profile storage keys.
test: Add tests for BrandIcon component rendering
- Implemented tests to ensure BrandIcon does not force a colored background for recognized brands.
test: Enhance ModelAnalysisPanel tests
- Added tests for rendering token summaries with compact units in ModelAnalysisPanel.
test: Add tests for ModernSelect component
- Implemented tests to verify icon rendering for selected options in ModernSelect.
test: Add number formatting tests
- Created tests for `formatCompactTokenMetric` to validate token formatting logic.
feat: Implement account creation intent handling
- Added logic to handle session and API key creation intents in the Accounts page.
test: Add tests for dashboard performance card
- Implemented tests to verify rendering of performance metrics in the dashboard.
feat: Implement default connection segment resolution
- Added logic to determine initial connection segments based on platform types.
test: Add tests for settings factory reset functionality
- Implemented tests to verify the factory reset process and local state clearing.
test: Add tests for site creation redirect logic
- Implemented tests to verify redirection based on site capabilities during creation.
test: Add tests for token routes refresh decision action
- Implemented tests to verify refresh decision actions in TokenRoutes.
test: Add tests for token routes snapshot load
- Implemented tests to verify loading of cached snapshot data in TokenRoutes.
- Added editing capabilities for route management in TokenRoutes, allowing users to modify existing routes.
- Introduced a reset function for the route form to clear inputs after adding or editing routes.
- Implemented a visibility filter for routes, ensuring exact routes covered by group routes are hidden from the main list.
- Updated tests to cover new functionalities, including editing routes and verifying visibility logic.
- Created a new helper function to build a list of visible routes based on defined criteria.
- Enhanced schema compatibility checks for site configurations, ensuring necessary columns are added to the database.
- Implement tests for the CenteredModal component to ensure it follows the shared modal shell pattern.
- Add comprehensive tests for the SearchModal results, including API interactions and UI behavior.
- Create tests for accounts batch actions, verifying the functionality of refreshing balances and selecting accounts via row clicks.
- Introduce tests for the accounts centered modal to confirm the use of CenteredModal for add/edit/rebind flows.
- Add tests for the accounts edit panel to ensure proper rendering and functionality when opening the edit modal.
- Implement tests for the accounts tokens header to verify the reuse of the accounts page header in the tokens segment.
- Create tests for the system proxy settings, ensuring the correct saving of the proxy URL.
- Add tests for the tokens actions layout to confirm the proper layout and styling of token row actions.
- Implement tests for the tokens batch actions, including deletion of selected tokens and row selection behavior.
- Introduce tests for the tokens focus navigation to ensure the correct highlighting of focused token rows.
- Removed apiKey from SiteRow type and related forms in Sites component.
- Updated site saving logic to handle site creation without apiKey.
- Adjusted tests to ensure apiKey is not included in site editor state.
- Refactored Tokens component to support embedded mode and redirect logic.
- Added migration tests for site apiKey to account migration service.
- Implemented siteApiKeyMigrationService to handle migration of apiKey to account tokens.
- Enhanced tests for segmented connections in Accounts and redirect logic for Tokens.
- Implemented afterPack script to ensure ad-hoc signature for macOS builds.
- Created macosSignUtils module to handle app path retrieval, signature inspection, and ad-hoc signing.
- Added functions to check if the app is signed and apply ad-hoc signing if necessary.
Some upstream providers (e.g. certain OpenAI-compatible aggregators)
emit thinking/reasoning tokens with the same text written to both
delta.content and delta.reasoning_content simultaneously.
When metapi forwarded these chunks as-is, downstream clients would read
delta.content and display the internal reasoning text to end users —
appearing as word-by-word "thinking narration" in chat interfaces.
Fix: after resolving both contentDelta and reasoningDelta, suppress
contentDelta when it is non-empty and identical to reasoningDelta.
This covers the duplicate-write pattern without affecting any legitimate
case (a provider would never intentionally set content == reasoning).
feat: enhance proxy usage parser to include cache read and creation tokens
feat: add billing details to ProxyLog interface and implement related formatting functions
fix: correct mojibake issues in source files and add regression test for mojibake detection
chore: add SQL migration for billing details in proxy_logs table
test: improve site speed button tests to ensure proper state updates without DOM lookups
feat: add run-server script to manage server execution and compatibility checks
feat: create main application logic for desktop with window management, server handling, and auto-updater
test: add unit tests for desktop runtime helpers
feat: implement desktop server environment configuration and health check
test: add tests for server configuration and desktop routes
feat: add native module guard for better-sqlite3 compatibility
test: add tests for native module guard functionality
test: add comprehensive tests for account verification feedback handling
feat: implement account verification feedback helpers
chore: add TypeScript configuration for desktop builds
- Added createdAt timestamps to various check-in log entries in checkinService.ts for better tracking.
- Updated i18n translations in Models.tsx to improve user experience with accurate Chinese translations.
- Reduced default page size in ProgramLogs.tsx and ProxyLogs.tsx from 80 and 100 to 50 for better performance.
- Enhanced ProxyLogs.tsx with memoization for filtered logs and summary statistics.
- Implemented support for parsing Unix timestamps and PostgreSQL-style timezone offsets in checkinLogTime.ts.
- Added comprehensive tests for database proxy query wrapper in index.proxy-wrap.test.ts to ensure functionality.
- Implement tests for retrieving and saving runtime database configuration.
- Validate handling of invalid configuration payloads.
- Utilize Fastify for API testing with Vitest.
- Ensure proper cleanup of database state between tests.
- Implemented `normalizeMigrationInput` to standardize database migration input for sqlite, mysql, and postgres.
- Added `maskConnectionString` to obscure sensitive credentials in connection strings.
- Created comprehensive tests for migration input normalization and connection string masking.
- Established database schema creation logic for multiple dialects (sqlite, mysql, postgres).
- Developed functions for managing database transactions, including begin, commit, and rollback.
- Implemented data insertion logic from backup snapshots into the target database.
- Added new utility functions for building minimal JSON headers and normalizing responses for compatibility.
- Implemented detailed error handling for unsupported media types and endpoint downgrade scenarios.
- Introduced a new endpoint flow mechanism to manage retries and downgrades between different upstream endpoints.
- Enhanced tests for endpoint flow and error summarization to cover various edge cases and scenarios.
- Updated CSS styles for accounts table to improve layout and responsiveness.
- Refactored ModelTester component to handle incremental text updates more effectively.
- Implement tests for accounts login shield detection, verifying behavior when login fails with HTML JSON parse syntax error.
- Create tests for proxy log retention service, ensuring expired logs are deleted based on retention days and that cleanup is skipped when retention is disabled.
- Add tests for token router cache, validating that route snapshots are maintained within TTL until explicitly invalidated.
- Introduce necessary mock setups and database seeding for comprehensive testing.