mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
docs: add OpenClaw coverage and complete settings docs for user manual
- Add OpenClaw as the 5th supported app across all doc chapters (1-3, 5) - Add OpenClaw provider presets table to 2.1-add.md (30 presets) - Add OpenClaw config section to 5.1-config-files.md (JSON5 format) - Complete 1.5-settings.md with missing sections: app visibility, skill sync method, terminal settings, proxy tab, WebDAV cloud sync, backup/restore, and log configuration - Fix deeplink parser.rs to accept 'opencode' and 'openclaw' app types - Update 5.3-deeplink.md with new app type parameters - Remove incorrect OpenCode references from proxy docs (4.1-4.4)
This commit is contained in:
@@ -79,9 +79,12 @@ fn parse_provider_deeplink(
|
||||
.clone();
|
||||
|
||||
// Validate app type
|
||||
if app != "claude" && app != "codex" && app != "gemini" {
|
||||
if !matches!(
|
||||
app.as_str(),
|
||||
"claude" | "codex" | "gemini" | "opencode" | "openclaw"
|
||||
) {
|
||||
return Err(AppError::InvalidInput(format!(
|
||||
"Invalid app type: must be 'claude', 'codex', or 'gemini', got '{app}'"
|
||||
"Invalid app type: must be 'claude', 'codex', 'gemini', 'opencode', or 'openclaw', got '{app}'"
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -185,9 +188,12 @@ fn parse_prompt_deeplink(
|
||||
.clone();
|
||||
|
||||
// Validate app type
|
||||
if app != "claude" && app != "codex" && app != "gemini" {
|
||||
if !matches!(
|
||||
app.as_str(),
|
||||
"claude" | "codex" | "gemini" | "opencode" | "openclaw"
|
||||
) {
|
||||
return Err(AppError::InvalidInput(format!(
|
||||
"Invalid app type: must be 'claude', 'codex', or 'gemini', got '{app}'"
|
||||
"Invalid app type: must be 'claude', 'codex', 'gemini', 'opencode', or 'openclaw', got '{app}'"
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -254,9 +260,12 @@ fn parse_mcp_deeplink(
|
||||
// Validate apps format
|
||||
for app in apps.split(',') {
|
||||
let trimmed = app.trim();
|
||||
if trimmed != "claude" && trimmed != "codex" && trimmed != "gemini" {
|
||||
if !matches!(
|
||||
trimmed,
|
||||
"claude" | "codex" | "gemini" | "opencode" | "openclaw"
|
||||
) {
|
||||
return Err(AppError::InvalidInput(format!(
|
||||
"Invalid app in 'apps': must be 'claude', 'codex', or 'gemini', got '{trimmed}'"
|
||||
"Invalid app in 'apps': must be 'claude', 'codex', 'gemini', 'opencode', or 'openclaw', got '{trimmed}'"
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user