mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-06-01 02:10:22 +09:00

# 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
43 lines
1.2 KiB
TOML
43 lines
1.2 KiB
TOML
[package]
|
|
name = "nextchat"
|
|
version = "0.1.0"
|
|
description = "A cross platform app for LLM ChatBot."
|
|
authors = ["Yidadaa"]
|
|
license = "mit"
|
|
repository = ""
|
|
default-run = "nextchat"
|
|
edition = "2021"
|
|
rust-version = "1.60"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
serde_json = "1.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
tauri = { version = "2", features = [
|
|
] }
|
|
tauri-plugin-window-state = { version = "2" }
|
|
percent-encoding = "2.3.1"
|
|
reqwest = "0.11.18"
|
|
futures-util = "0.3.30"
|
|
bytes = "1.7.2"
|
|
log = "0.4.21"
|
|
tauri-plugin-dialog = "2"
|
|
tauri-plugin-shell = "2"
|
|
tauri-plugin-notification = "2"
|
|
tauri-plugin-fs = "2"
|
|
tauri-plugin-http = "2"
|
|
tauri-plugin-clipboard-manager = "2"
|
|
|
|
[features]
|
|
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
|
|
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
|
|
# DO NOT REMOVE!!
|
|
custom-protocol = ["tauri/custom-protocol"]
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
|
tauri-plugin-updater = "2"
|