Commit Graph

7 Commits

  • chore(lint): remove ESLint configuration file and update lint scripts
    - Deleted the .eslintrc.cjs file to simplify configuration management.
    - Updated lint scripts in package.json to remove unnecessary extensions for linting.
    - Added new devDependencies for ESLint and globals to enhance linting capabilities.
  • fix(app): scope header overrides to gateway URLs only
    - The session.webRequest.onHeadersReceived was stripping X-Frame-Options
      and modifying CSP for ALL responses including the Vite dev server,
      which could break the main app rendering. Now only applies to
      gateway URLs (127.0.0.1:18789 / localhost:18789).
    - Dashboard: only fetch channels/skills when gateway is running
    - Dashboard: guard against non-array channels/skills data
    - Gateway store: use dynamic import() instead of require() for chat
      store to avoid ESM/CJS issues in Vite
  • feat(chat): write API keys to OpenClaw and embed Control UI for chat
    Part 1: API Key Integration
    - Create electron/utils/openclaw-auth.ts to write keys to
      ~/.openclaw/agents/main/agent/auth-profiles.json
    - Update provider:save and provider:setApiKey IPC handlers to
      persist keys to OpenClaw auth-profiles alongside ClawX storage
    - Save API key to OpenClaw on successful validation in Setup wizard
    - Pass provider API keys as environment variables when starting
      the Gateway process (ANTHROPIC_API_KEY, OPENROUTER_API_KEY, etc.)
    
    Part 2: Embed OpenClaw Control UI for Chat
    - Replace custom Chat UI with <webview> embedding the Gateway's
      built-in Control UI at http://127.0.0.1:{port}/?token={token}
    - Add gateway:getControlUiUrl IPC handler to provide tokenized URL
    - Enable webviewTag in Electron BrowserWindow preferences
    - Override X-Frame-Options/CSP headers to allow webview embedding
    - Suppress noisy control-ui token_mismatch stderr messages
    - Add loading/error states for the embedded webview
    
    This fixes the "No API key found for provider" error and replaces
    the buggy custom chat implementation with OpenClaw's battle-tested
    Control UI.
  • feat(update): implement auto-update functionality with electron-updater
    - Add AppUpdater module with update lifecycle management
    - Create UpdateSettings UI component with progress display
    - Add Progress UI component based on Radix UI
    - Create update Zustand store for state management
    - Register update IPC handlers in main process
    - Auto-check for updates on production startup
    - Add commit documentation for commits 2-6
  • feat(core): initialize project skeleton with Electron + React + TypeScript
    Set up the complete project foundation for ClawX, a graphical AI assistant:
    
    - Electron main process with IPC handlers, menu, tray, and gateway management
    - React renderer with routing, layout components, and page scaffolding
    - Zustand state management for gateway, settings, channels, skills, chat, and cron
    - shadcn/ui components with Tailwind CSS and CSS variable theming
    - Build tooling with Vite, electron-builder, and TypeScript configuration
    - Testing setup with Vitest and Playwright
    - Development configurations (ESLint, Prettier, gitignore, env example)