ChatGPT-Next-Web/app/utils
Mihail Klimin 8fa7c14f18 feat(tauri): Migrate from Tauri v1 to v2
# Summary
This commit completes the migration from Tauri v1 to v2, resolves configuration issues, upgrades Next.js, and adds test coverage for critical components to ensure stability during the transition.

# Details
## Tauri v2 Migration
- Updated Tauri dependencies to v2.3.0 series in package.json
- Restructured build configuration in `/app/config/build.ts` to align with Tauri v2 requirements
- Fixed imports and API usage patterns across the codebase
- Added compatibility layer for window.__TAURI__ references to maintain backward compatibility

## Next.js Issues
- Upgraded Next.js from 14.1.1 to 14.2.24
- Resolved caching problems with Server Actions
- Updated eslint-config-next to match the new version
- Cleared Next.js cache and temporary files to address build issues

## Testing & Stability
- Added comprehensive tests for `stream.ts` to verify streaming functionality
- Created mocks for Tauri API to support test environment
- Verified that critical functionality continues to work correctly
- Translated all comments to English for consistency

## Infrastructure
- Fixed peer dependency warnings during installation
- Ensured proper integration with Tauri v2 plugins (clipboard-manager, dialog, fs, http, notification, shell, updater, window-state)

# Approach
Prioritized stability by:
1. Making minimal necessary changes to configuration files
2. Preserving most `window.__TAURI__` calls as they still function in v2
3. Planning gradual migration to new APIs with test coverage for critical components
4. Documenting areas that will require future attention

# Testing
- Created unit tests for critical streaming functionality
- Performed manual testing of key application features
- Verified successful build and launch with Tauri v2

# Future Work
- Future PRs will gradually replace deprecated Tauri v1 API calls with v2 equivalents
- Additional test coverage will be added for other critical components
2025-03-16 02:14:47 +03:00
..
cloud fix: Fixed the issue that WebDAV synchronization could not check the status and failed during the first backup 2024-08-03 12:40:48 +08:00
audio.ts feat: add tts stt 2024-08-27 16:21:02 +08:00
auth-settings-events.ts add maidian 2024-09-25 13:08:03 +08:00
baidu.ts add missing file 2024-07-09 16:38:22 +08:00
chat.ts fix(app/utils/chat.ts): fix type error 2025-02-26 19:58:32 +08:00
clone.ts fix: #3207 ensure corner case 2023-11-10 15:15:43 +08:00
cloudflare.ts support cloudflare ai gateway 2024-07-12 12:00:25 +08:00
format.ts feat: add upstash redis cloud sync 2023-09-19 03:18:34 +08:00
hmac.ts remove hash.js 2024-08-05 11:36:35 +08:00
hooks.ts chore: remove unused imports and correct typos 2024-07-18 01:51:56 +08:00
indexedDB-storage.ts fix: safaLocalStorage 2024-09-08 13:23:40 +08:00
merge.ts Security Update 2023-08-26 22:16:29 +07:00
model.ts fix: fix isModelNotavailableInServer logic for bytedance models 2025-02-03 16:58:42 +08:00
ms_edge_tts.ts feat: add tts stt 2024-08-27 16:21:02 +08:00
object.ts feat: dev done 2024-04-07 11:32:57 +08:00
store.ts update 2024-09-04 13:00:18 +08:00
stream.ts feat(tauri): Migrate from Tauri v1 to v2 2025-03-16 02:14:47 +03:00
sync.ts feat: add upstash redis cloud sync 2023-09-19 03:18:34 +08:00
tencent.ts remove hash.js 2024-08-05 11:36:35 +08:00
token.ts