Skip to content
kyirexyPublic

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

AI Programming Scheduling Light Client

A lightweight desktop multi-model AI programming scheduling center built with Tauri + Vue + antv/x6.

Features

  • Multi-Provider Support: Claude 4.7, Codex 5.3, MiniMax 2.5, GLM-5
  • Visual Workflow: antv/x6 based collaboration flow visualization
  • Harness Strategy Engine: Leader/Coder/Checker workflow orchestration
  • ACP Protocol: Simplified Agent Communication Protocol for model routing
  • Terminal-like Input: Command-style input for AI prompts
  • Code Output: Syntax highlighting, copy, and save functionality
  • Hot Reload Development: Instant UI updates during development
  • Observable Collaboration: Real-time workflow visualization and logging

Tech Stack

  • Frontend: Tauri 2.x + Vue 3 + TypeScript + antv/x6 + Pinia
  • Backend: Rust (Tauri) + Node.js core logic
  • Build: Vite

Quick Start

Prerequisites

  • Node.js 18+
  • Rust 1.70+
  • npm or yarn

Installation

# Install dependencies
npm install

Development

The application supports two development modes:

Standard Development Mode

npm run tauri dev

This starts the Tauri development server with hot module replacement (HMR) enabled. The frontend will reload automatically when you make changes.

Hot Reload Development Mode (Recommended)

For faster iteration, you can run the frontend and backend separately:

# Terminal 1: Start Vite dev server with HMR
npm run dev

# Terminal 2: Start Tauri in development mode
npm run tauri dev

The Vite dev server runs on port 1420 with HMR enabled. Changes to Vue components, TypeScript files, and CSS will reflect instantly without rebuilding the Tauri application.

Connecting to AI Providers

Before using the application, you need to configure your AI provider API keys:

  1. Open the application
  2. Navigate to Settings (gear icon in the header)
  3. Select the provider tab (Claude, Codex, MiniMax, or GLM)
  4. Enter your API key and configure the endpoint

Supported providers and their default endpoints:

Provider Model Default Endpoint
Claude 4.7 claude-4-20250514 https://api.anthropic.com/v1
Codex 5.3 codex-5-3 https://api.openai.com/v1
MiniMax 2.5 abab6.5s-chat https://api.minimax.chat/v1/text/chatcompletion_v2
GLM-5 glm-5 https://open.bigmodel.cn/api/paas/v4/chat/completions

Build

# Build for production
npm run tauri build

Configuration

Provider Configuration

Configure your AI model API keys through the application UI or by editing the config file directly.

Using the Settings Panel

  1. Click the Settings icon in the header
  2. Select the provider you want to configure
  3. Enter your API key (must be obtained from the respective provider)
  4. The endpoint is pre-configured but can be customized if needed
  5. Click Save to store your configuration

Environment Variables (Optional)

You can also set API keys via environment variables for development:

# Linux/macOS
export CLAUDE_API_KEY="your-claude-key"
export MINIMAX_API_KEY="your-minimax-key"

# Windows (PowerShell)
$env:CLAUDE_API_KEY="your-claude-key"
$env:MINIMAX_API_KEY="your-minimax-key"

API Key Security

API keys are encrypted using a local encryption scheme before being stored. For production use, keys are stored in the OS keychain (Windows Credential Manager / macOS Keychain / Linux Secret Service).

Project Structure

CodeLink/
├── src/
│   ├── frontend/src/        # Vue frontend
│   │   ├── components/       # Vue components
│   │   │   ├── ModelSelector.vue
│   │   │   ├── FlowVisualization.vue
│   │   │   ├── CollaborationLog.vue
│   │   │   ├── TerminalInput.vue
│   │   │   ├── CodeOutput.vue
│   │   │   └── SettingsPanel.vue
│   │   ├── stores/          # Pinia stores
│   │   └── App.vue          # Main app
│   └── core/                # Node.js core logic
│       ├── models/           # Model adapters
│       │   ├── types.ts     # Type definitions
│       │   └── adapters.ts  # Provider implementations
│       ├── harness/          # Harness engine
│       ├── protocol/         # ACP protocol
│       └── config/           # Config storage
├── src-tauri/               # Tauri backend (Rust)
├── docs/                    # Documentation
└── package.json

Usage

  1. Configure Providers: Set up your AI provider API keys in Settings
  2. Select Models: Choose AI models from the header panel
  3. Enter Prompts: Type your request in the terminal input
  4. Watch the Workflow: Observe the flow visualization as AI processes your request
  5. Review Results: Check the collaboration log for detailed progress
  6. Copy Output: Use the code output panel to copy or save generated code

Workflow

The application uses a Leader/Coder/Checker workflow:

  1. Leader: Analyzes user request, decomposes into subtasks
  2. Coder: Generates code based on subtasks
  3. Checker: Verifies code quality and suggests improvements
  4. Output: Final result with generated code
┌─────────┐    ┌─────────┐    ┌─────────┐
│ Leader  │───▶│ Coder  │───▶│ Checker │
└─────────┘    └─────────┘    └─────────┘
     │              │              │
     │ Decompose    │ Generate     │ Validate
     │ Task         │ Code         │ Output
     ▼              ▼              ▼

Hot Reload Development

CodeLink supports instant hot module replacement (HMR) during development:

  • Frontend Changes: Vue components, TypeScript files, and styles update instantly
  • No Full Rebuild: Unlike traditional Tauri development, you don't need to restart the entire application
  • Separate Server: The Vite dev server runs on port 1420 with WebSocket-based HMR

To enable hot reload:

  1. Set the TAURI_DEV_HOST environment variable
  2. Run npm run dev to start the Vite server
  3. Run npm run tauri dev in another terminal

Example:

# Linux/macOS
TAURI_DEV_HOST=localhost npm run dev

# Windows (PowerShell)
$env:TAURI_DEV_HOST="localhost"; npm run dev

Testing

# Run unit and integration tests
npm test

# Run tests in watch mode
npm run test:watch

Test Coverage

The test suite covers:

  • Unit Tests: Model adapters, Harness workflow engine, ACP protocol, config storage
  • Integration Tests: Frontend-backend Tauri command communication

API Reference

Supported Models

Model Provider Capabilities
Claude 4.7 Anthropic Reasoning, code generation, analysis
Codex 5.3 OpenAI Code generation, debugging
MiniMax 2.5 MiniMax General purpose, code generation
GLM-5 Zhipu AI General purpose, local deployment

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages