Commit Graph

1121 Commits

  • fix(openclaw): enable scrolling on config panels
    Add overflow-y-auto to main content area so OpenClaw panels
    (Env, Tools, Agents) can scroll when content exceeds viewport.
  • feat(openclaw): add Env/Tools/Agents config panels
    - Migrate OpenClaw commands from provider.rs to dedicated commands/openclaw.rs
    - Add backend types and read/write for env, tools, agents.defaults sections
    - Create EnvPanel (API key + custom vars KV editor)
    - Create ToolsPanel (profile selector + allow/deny lists)
    - Create AgentsDefaultsPanel (default model + runtime parameters)
    - Extend App.tsx menu bar with Env/Tools/Agents buttons
    - Remove Prompts button for OpenClaw (overlaps with Workspace AGENTS.md)
  • feat(openclaw): extend workspace files with HEARTBEAT/BOOTSTRAP/BOOT
    Add 3 new markdown files to the workspace whitelist and frontend grid:
    - HEARTBEAT.md: activity runlist
    - BOOTSTRAP.md: first-run ritual
    - BOOT.md: gateway restart checklist
    
    Update i18n for all 3 locales (zh, en, ja).
  • feat(openclaw): show only Workspace button in menu bar
    Hide Skills, Prompts, Sessions, and MCP buttons when OpenClaw is active,
    as it only needs Workspace file management functionality.
  • feat(openclaw): add Workspace Files panel for managing bootstrap md files
    Add a dedicated panel to read/write OpenClaw's 6 workspace bootstrap files
    (AGENTS.md, SOUL.md, USER.md, IDENTITY.md, TOOLS.md, MEMORY.md) directly
    from ~/.openclaw/workspace/, with a whitelist-secured backend and Markdown
    editor UI. Also fix prompt auto-import missing OpenCode/OpenClaw and the
    PromptFormPanel filenameMap type exclusion.
  • fix(openclaw): add openclaw to all Record<AppId, T> usages
    Expand McpApps interface, APP_IDS, APP_ICON_MAP, enabledCounts
    initializers, and test mock data to include the openclaw key,
    resolving TypeScript errors after AppId union was extended.
  • perf: remove unnecessary query cache for Tauri local IPC
    Tauri IPC calls are in-process (microsecond latency), so the 5-minute
    staleTime and disabled refetchOnWindowFocus from web app templates are
    counterproductive. Set staleTime to 0 and enable refetchOnWindowFocus
    so external config changes are reflected immediately.
  • feat(openclaw): add default model button and fix sessionsApi export
    - Add "Enable as Default" button to OpenClaw provider cards
    - Place enable button before add/remove button for better UX
    - Disable remove button when provider is set as default
    - Add sessionsApi re-export from api barrel file to fix white screen
    - Add i18n keys for default model feature (zh/en/ja)
  • fix(openclaw,opencode): correct Opus pricing and upgrade to Opus 4.6
    - Fix Opus pricing from $15/$75 (Opus 4 price) to $5/$25 in openclaw presets
    - Upgrade model ID from claude-opus-4-5-20251101 to claude-opus-4-6
    - Update all suggestedDefaults references (fallbacks + modelCatalog)
    - Apply same model upgrade in opencode presets (7 providers)
  • feat(openclaw): register suggested models to allowlist on provider add
    When adding an OpenClaw provider with suggestedDefaults, automatically
    merge its model catalog into the allowlist and set the default model
    if not already configured.
  • fix(openclaw): update button state and toast message after switch
    Add cache invalidation for openclawLiveProviderIds in useSwitchProviderMutation
    to ensure button state updates correctly after adding/removing providers.
    
    Also fix toast message to show "已添加到配置" for OpenClaw (same as OpenCode).
  • feat(openclaw): add providerKey input field with validation
    - Add providerKey input field in ProviderForm for OpenClaw
    - Implement duplicate key detection by querying existing providers
    - Add format validation (lowercase letters, numbers, hyphens only)
    - Disable field in edit mode (key cannot be changed after creation)
    - Update mutations.ts to support OpenClaw providerKey
    - Add i18n translations for zh/en/ja
  • fix(openclaw): pass providerKey in AddProviderDialog submit handler
    The providerKey was only being passed for opencode, causing openclaw
    provider creation to fail with "Provider key is required" error.
  • fix(openclaw): prevent creating default provider on first launch
    Add additive mode guard in import_default_config() to skip OpenCode
    and OpenClaw apps, which should use their dedicated import functions.
  • fix(openclaw): update API protocol values in provider presets
    Update anthropic -> anthropic-messages to match OpenClaw gateway config
  • feat(openclaw): add provider form fields and UI components
    - Add OpenClawFormFields component for provider configuration
    - Add Collapsible UI component (radix-ui dependency)
    - Update ProviderForm with OpenClaw-specific handlers and preset logic
    - Extend OpenClawModel type with reasoning, input, maxTokens fields
    - Exclude OpenClaw from universal provider tab in AddProviderDialog
  • feat(openclaw): add additive mode frontend support
    - Add getOpenClawLiveProviderIds() API for querying live config
    - Update ProviderList to query OpenClaw live IDs
    - Rename isOpenCodeMode to isAdditiveMode (covers OpenCode + OpenClaw)
    - Update ProviderCard shouldAutoQuery and isActiveProvider logic
    - Update App.tsx onRemoveFromConfig and invalidateQueries for OpenClaw
  • feat(openclaw): add agents.defaults config support
    - Add types for default model config (primary + fallbacks)
    - Add types for model catalog/allowlist with aliases
    - Extend OpenClawModelEntry with cost and contextWindow fields
    - Add Tauri commands: get/set_openclaw_default_model, get/set_openclaw_model_catalog
    - Create frontend API (src/lib/api/openclaw.ts)
    - Add suggestedDefaults to provider presets with model metadata
    - Add i18n translations (zh/en/ja) for openclawConfig.*
  • fix(ui): update OpenClaw icon in icon index
    Replace old pixel-art style icon with new gradient lobster icon
    to match the SVG added in 2dad4729.
  • fix(ui): add OpenClaw to app switcher
    Add "openclaw" to ALL_APPS array so OpenClaw appears in the main
    interface app switcher when enabled in visibility settings.
  • chore(openclaw): remove dead code functions from openclaw_config
    Remove 6 unused functions marked with #[allow(dead_code)]:
    - get_openclaw_skills_dir: Skills not supported
    - get_env_vars/set_env_var: Environment vars unused
    - get_mcp_servers/set_mcp_server/remove_mcp_server: MCP not supported
    
    OpenClaw integration only requires provider management functionality.
  • fix(tests): add mcp_servers table to v4 migration test fixture
    Also includes OpenClaw icon that was added in previous commits.
  • fix(openclaw): remove MCP/Skills/Prompts support from OpenClaw
    OpenClaw only needs provider management functionality, not MCP, Skills,
    or Prompts features. This commit removes the incorrectly added support:
    
    - Revert SCHEMA_VERSION from 6 to 5 (remove v5->v6 migration)
    - Remove enabled_openclaw field from mcp_servers and skills tables
    - Remove openclaw field from McpApps and SkillApps structs
    - Update DAO queries to exclude enabled_openclaw column
    - Fix frontend components and types to exclude openclaw from MCP/Prompts
    - Update all related test files
  • feat(i18n): add OpenClaw translations
    - Add "openclaw": "OpenClaw" to apps translations in zh.json
    - Add "openclaw": "OpenClaw" to apps translations in en.json
    - Add "openclaw": "OpenClaw" to apps translations in ja.json
  • feat(ui): add OpenClaw support to frontend components
    - Update App.tsx with openclaw visibility and skills fallback
    - Add OpenClaw to AppSwitcher icon and display name maps
    - Update McpFormModal with openclaw in enabled apps
    - Update PromptFormModal/Panel with openclaw filename map
    - Update EndpointSpeedTest with openclaw timeout
    - Update AppVisibilitySettings with openclaw toggle
    - Update test state with openclaw defaults
  • feat(presets): add OpenClaw provider presets
    - Create openclawProviderPresets.ts with provider templates
    - Include Chinese officials (DeepSeek, Zhipu, Qwen, Kimi, MiniMax)
    - Include aggregators (AiHubMix, DMXAPI, OpenRouter, ModelScope)
    - Include third party partners (PackyCode, Cubence, AIGoCode)
    - Include OpenAI Compatible custom template
  • feat(types): add OpenClaw TypeScript type definitions
    - Add OpenClawProviderConfig and OpenClawModel interfaces
    - Add openclaw to McpApps, VisibleApps, ProxyTakeoverStatus
    - Add "openclaw" to AppId union type
    - Add openclaw to SkillApps interface
  • feat(backend): add OpenClaw support to commands and deeplinks
    - Register openclaw_config module in lib.rs
    - Add OpenClaw commands and provider import on startup
    - Add OpenClaw branches to config and provider commands
    - Add build_openclaw_settings() for deeplink imports
    - Update MCP handlers with openclaw field in McpApps
    - Add OpenClaw prompt file path
  • feat(services): add OpenClaw branches to backend services
    - Add OpenClaw branches to proxy service (not supported)
    - Add OpenClaw to MCP service (skip sync, MCP still in development)
    - Add OpenClaw skills directory path
    - Update ProxyTakeoverStatus with openclaw field
    - Add OpenClaw to stream check (not supported)
  • feat(provider): add OpenClaw provider service support
    - Add import_openclaw_providers_from_live() function
    - Add remove_openclaw_provider_from_live() function
    - Update write_live_snapshot() for OpenClaw
    - Add openclaw fields to VisibleApps and AppSettings
    - Add get_openclaw_override_dir() function
  • feat(openclaw): add OpenClaw configuration module
    - Create openclaw_config.rs for reading/writing OpenClaw config
    - Support JSON5 format (~/.openclaw/openclaw.json)
    - Implement provider CRUD operations for additive mode
    - Add json5 dependency to Cargo.toml
  • feat(core): add OpenClaw to AppType enum and database schema
    - Add OpenClaw variant to AppType enum
    - Update is_additive_mode() to return true for OpenClaw
    - Update McpApps, SkillApps, McpRoot, PromptRoot structs
    - Add database migration v5 to v6 for enabled_openclaw columns
    - Update mcp_servers and skills table definitions
  • Webdav (#923)
    * feat: WebDAV backup/restore
    
    - Add WebDAV test/backup/restore commands and settings\n- Fix ja i18n missing keys; decode PROPFIND href as UTF-8\n- Stabilize Windows prompt auto-import tests via CC_SWITCH_TEST_HOME
    
    * chore: format and minor cleanups
    
    * fix: update build config
    
    * feat(webdav): unify sync UX and hardening fixes
    
    * fix(webdav): harden sync flow and stabilize sync UX/tests
    
    * fix(webdav): add resource limits to skills.zip extraction
    
    Prevent zip bomb / resource exhaustion by enforcing:
    - MAX_EXTRACT_ENTRIES (10,000 files)
    - MAX_EXTRACT_BYTES (512 MB cumulative)
    
    * refactor(webdav): drop deviceId and display deviceName only
    
    ---------
    
    Co-authored-by: small-lovely-cat <77799160+small-lovely-cat@users.noreply.github.com>
    Co-authored-by: saladday <1203511142@qq.com>
  • fix(linux): disable WebKitGTK hardware acceleration to prevent white screen (#986)
    On some Linux systems with AMD GPUs (e.g., AMD Cezanne/Radeon Vega),
    WebKitGTK's GPU process fails to initialize EGL, causing the app to
    show a white screen on startup.
    
    Root cause: `amdgpu_query_info(ACCEL_WORKING)` returns EACCES (-13),
    which causes EGL display creation to fail with EGL_BAD_PARAMETER,
    crashing the GPU process.
    
    Fix: Use WebKitGTK's `set_hardware_acceleration_policy(Never)` API to
    disable GPU acceleration on Linux, falling back to software rendering.
    This is applied at startup via Tauri's `with_webview` API.
    
    Co-authored-by: Naozhong AI <oursnoah@gmail.com>
    Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
  • feat(proxy): fix thinking rectifiers and resolve clippy warnings (#1005)
    * feat(proxy): align thinking rectifiers and resolve clippy warnings
    
    - add thinking budget rectifier flow with single retry on anthropic budget errors
    
    - align thinking signature rectification behavior with adaptive-safe handling
    
    - expose requestThinkingBudget in settings/ui/i18n and default rectifier config to disabled
    
    - fix clippy warnings in model_mapper format args and RectifierConfig default derive
    
    * fix(proxy): thinking rectifiers
  • feat(omo): improve agent model selection UX and fix lowercase keys (#1004)
    * fix(omo): use lowercase keys for builtin agent definitions
    
    OMO config schema expects all agent keys to be lowercase.
    Updated OMO_BUILTIN_AGENTS keys (Sisyphus → sisyphus, Hephaestus →
    hephaestus, etc.) and aligned Rust test fixtures accordingly.
    
    * feat(omo): add i18n support and tooltips for agent/category descriptions
    
    * feat(omo): add preset model variants for thinking level support
    
    Add OPENCODE_PRESET_MODEL_VARIANTS constant with variant definitions
    for Google, OpenAI, and Anthropic models. The omoModelVariantsMap
    builder now falls back to presets when config-defined variants are
    absent, enabling the variant selector for supported models.
    
    * feat(omo): replace model select with searchable combobox and improve fallback handling
    
    * feat(omo): enrich preset model defaults and metadata fallback
    
    * fix(omo): preserve custom fields and align otherFields import/validation
    
    * fix: resolve omo clippy warnings and include app update
  • fix(ui): only show session manager button for Claude and Codex apps
    Session manager backend only supports Claude and Codex providers.
    Hide the nav button for Gemini/OpenCode with animated transition,
    and auto-fallback to providers view when switching apps.
  • docs: add user manual documentation (#979)
    * docs: add user manual documentation
    
    Add comprehensive user manual covering getting started, provider management,
    extensions (MCP/prompts/skills), proxy configuration, and FAQ sections.
    Includes screenshots and a README index.
    
    * fix(docs): align user manual with v3.10.3 codebase
    
    - Add OpenCode as 4th supported app throughout all docs
    - Fix proxy default port 15762 → 15721
    - Update Claude presets (9 → 26), Codex (3 → 10), Gemini (3 → 7)
    - Add OpenCode presets (25 entries)
    - Fix timeout defaults and ranges (stream first byte 60s/90s, etc.)
    - Fix circuit breaker defaults with per-app values (Claude vs general)
    - Fix Skills support: all 4 apps, not just Claude/Codex
    - Remove non-existent Gemini authMode field
    - Fix prompt deletion behavior: enabled prompts cannot be deleted
    - Remove non-existent Legacy deeplink protocol, use V1 only
    - Fix DB table names (usage_logs → proxy_request_logs) and add missing tables
    - Fix migration version v3.8.0 → v3.7.0
    - Add missing V1 deeplink parameters (config, configFormat, etc.)
    - Update doc version v3.9.1 → v3.10.3
    - Add claude-opus-4-1 to pricing table
    - Fix recovery wait time range 10-300 → 0-300
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>
  • fix(skill): correct skill doc URL branch and path resolution (#977)
    Use the actual branch returned by download_repo instead of the
    configured branch, fixing 404s when repos default to master but
    the URL was hardcoded to main. Also switch URL format from /tree/
    to /blob/ and always point to the SKILL.md file.
    
    Closes farion1231/cc-switch#968
  • feat(omo): integrate Oh My OpenCode profile management (#972)
    * feat(omo): integrate Oh My OpenCode profile management into Provider system
    
    Adds full-stack OMO support: backend config read/write/import, OMO-specific
    provider CRUD with exclusive switching, frontend profile editor with
    agent/category/model configuration, global config management, and i18n support.
    
    * feat(omo): add model/variant dropdowns from enabled providers
    
    Replace model text inputs with Select dropdowns sourced from enabled
    OpenCode providers, add thinking-level variant selection, and prevent
    auto-enabling newly added OMO providers.
    
    * fix(omo): use standard provider action styles for OMO switch button
    
    * fix(omo): replace hardcoded isZh strings with proper i18n t() calls
  • feat: rename Qwen Coder preset to Bailian (#965)
    - replace Qwen Coder preset with Bailian for Claude and OpenCode
    - add Bailian icon asset and metadata mapping
    - remove Bailian preset default model values
    - rename Claude preset Kimi k2 to Kimi