mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
96a0a37331
* Add directory picker before launching Claude terminal * fix(terminal): preserve cwd path and strip Windows verbatim prefix - Stop trimming non-empty paths so directories with leading/trailing spaces on Unix are handled correctly - Strip \\?\ extended-length prefix from canonicalized paths on Windows to prevent batch script cd failures * fix(terminal): restore UNC paths when stripping Windows verbatim prefix Handle \\?\UNC\server\share form separately from regular \\?\ prefix, converting it back to \\server\share so network/WSL directory paths remain valid in batch cd commands. * fix(terminal): use pushd for UNC paths in Windows batch launcher `cmd.exe` cannot set a UNC path (e.g. `\\wsl$\...`) as the current directory via `cd /d`; it errors with "CMD does not support UNC paths as current directories". Switch to `pushd` which temporarily maps the UNC share to a drive letter. Rename `build_windows_cd_command` → `build_windows_cwd_command` to reflect the broader semantics. Extract `build_windows_cwd_command_str` and `is_windows_unc_path` helpers for testability, and add unit tests covering drive paths, UNC paths, and batch metacharacter escaping. Also fix minor style issues: sort mod declarations alphabetically, add missing EOF newline in lightweight.rs, add explicit type annotation in streaming_responses test, and reformat tray menu builder chain.
55 lines
868 B
Rust
55 lines
868 B
Rust
#![allow(non_snake_case)]
|
|
|
|
mod auth;
|
|
mod config;
|
|
mod copilot;
|
|
mod deeplink;
|
|
mod env;
|
|
mod failover;
|
|
mod global_proxy;
|
|
mod import_export;
|
|
mod mcp;
|
|
mod misc;
|
|
mod omo;
|
|
mod openclaw;
|
|
mod plugin;
|
|
mod prompt;
|
|
mod provider;
|
|
mod proxy;
|
|
mod session_manager;
|
|
mod settings;
|
|
pub mod skill;
|
|
mod stream_check;
|
|
mod sync_support;
|
|
|
|
mod lightweight;
|
|
mod usage;
|
|
mod webdav_sync;
|
|
mod workspace;
|
|
|
|
pub use auth::*;
|
|
pub use config::*;
|
|
pub use copilot::*;
|
|
pub use deeplink::*;
|
|
pub use env::*;
|
|
pub use failover::*;
|
|
pub use global_proxy::*;
|
|
pub use import_export::*;
|
|
pub use mcp::*;
|
|
pub use misc::*;
|
|
pub use omo::*;
|
|
pub use openclaw::*;
|
|
pub use plugin::*;
|
|
pub use prompt::*;
|
|
pub use provider::*;
|
|
pub use proxy::*;
|
|
pub use session_manager::*;
|
|
pub use settings::*;
|
|
pub use skill::*;
|
|
pub use stream_check::*;
|
|
|
|
pub use lightweight::*;
|
|
pub use usage::*;
|
|
pub use webdav_sync::*;
|
|
pub use workspace::*;
|