Skip to content

Commit 2e6de83

Browse files
committed
v0.7.0: Add Antigravity Provider, dynamic routes, pre-commit hooks
Features: - Add Antigravity Provider for Google internal Gemini 3 Pro API - Add dynamic route support (/:selector/v1/messages) - Add protocol converter for Antigravity - Add protocol selector for smart conversion path Improvements: - Add pre-commit hooks for local lint/format checks - Simplify CI to only build check (lint moved to pre-commit) - Update frontend with Antigravity support Breaking Changes: - Route parameter syntax changed from {param} to :param for Axum 0.7
1 parent f3272b9 commit 2e6de83

38 files changed

Lines changed: 2828 additions & 739 deletions

.github/workflows/ci.yml

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -10,80 +10,9 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
lint:
14-
name: Lint & Format
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- name: Setup Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: '20'
25-
cache: 'npm'
26-
27-
- name: Setup Rust
28-
uses: dtolnay/rust-toolchain@stable
29-
with:
30-
components: clippy, rustfmt
31-
32-
- name: Setup Rust cache
33-
uses: Swatinem/rust-cache@v2
34-
with:
35-
workspaces: src-tauri
36-
shared-key: "rust-cache-lint"
37-
38-
- name: Install system dependencies (Linux)
39-
run: |
40-
sudo apt-get update
41-
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev
42-
43-
- name: Install frontend dependencies
44-
run: npm ci
45-
46-
- name: Build frontend
47-
run: npm run build
48-
49-
- name: Check formatting
50-
working-directory: src-tauri
51-
run: cargo fmt --all -- --check
52-
53-
- name: Run Clippy
54-
working-directory: src-tauri
55-
run: cargo clippy --all-targets --all-features -- -D warnings
56-
57-
frontend-lint:
58-
name: Frontend Lint
59-
runs-on: ubuntu-latest
60-
61-
steps:
62-
- name: Checkout
63-
uses: actions/checkout@v4
64-
65-
- name: Setup Node.js
66-
uses: actions/setup-node@v4
67-
with:
68-
node-version: '20'
69-
cache: 'npm'
70-
71-
- name: Install dependencies
72-
run: npm ci
73-
74-
- name: TypeScript check
75-
run: npx tsc --noEmit
76-
77-
- name: ESLint check
78-
run: npm run lint
79-
80-
- name: Prettier check
81-
run: npx prettier --check "src/**/*.{ts,tsx,css}"
82-
8313
build-check:
8414
name: Build Check
8515
runs-on: ubuntu-latest
86-
needs: [lint, frontend-lint]
8716

8817
steps:
8918
- name: Checkout

.husky/pre-commit

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/sh
2+
3+
echo "🔍 Running pre-commit checks..."
4+
5+
# 前端检查
6+
echo "📦 Checking frontend..."
7+
8+
# TypeScript 检查
9+
echo " → TypeScript check..."
10+
npx tsc --noEmit
11+
if [ $? -ne 0 ]; then
12+
echo "❌ TypeScript check failed!"
13+
exit 1
14+
fi
15+
16+
# ESLint 检查
17+
echo " → ESLint check..."
18+
npm run lint
19+
if [ $? -ne 0 ]; then
20+
echo "❌ ESLint check failed!"
21+
exit 1
22+
fi
23+
24+
# Prettier 检查
25+
echo " → Prettier check..."
26+
npx prettier --check "src/**/*.{ts,tsx,css}"
27+
if [ $? -ne 0 ]; then
28+
echo "❌ Prettier check failed! Run 'npm run format' to fix."
29+
exit 1
30+
fi
31+
32+
# Rust 检查
33+
echo "🦀 Checking Rust..."
34+
35+
# Rust 格式检查
36+
echo " → Rust format check..."
37+
cd src-tauri
38+
cargo fmt --all -- --check
39+
if [ $? -ne 0 ]; then
40+
echo "❌ Rust format check failed! Run 'cargo fmt' in src-tauri to fix."
41+
exit 1
42+
fi
43+
44+
# Rust 编译检查 (不使用严格的 clippy)
45+
echo " → Rust build check..."
46+
cargo check --all-targets
47+
if [ $? -ne 0 ]; then
48+
echo "❌ Rust build check failed!"
49+
exit 1
50+
fi
51+
52+
cd ..
53+
54+
echo "✅ All pre-commit checks passed!"

package-lock.json

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "proxycast",
33
"private": true,
4-
"version": "0.6.1",
4+
"version": "0.7.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
99
"preview": "vite preview",
1010
"tauri": "tauri",
1111
"lint": "eslint src --max-warnings 0",
12-
"format": "prettier --write \"src/**/*.{ts,tsx,css}\""
12+
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
13+
"prepare": "husky"
1314
},
1415
"dependencies": {
1516
"@radix-ui/react-dialog": "^1.1.2",
@@ -45,6 +46,7 @@
4546
"eslint-plugin-react-hooks": "^5.0.0",
4647
"eslint-plugin-react-refresh": "^0.4.14",
4748
"globals": "^15.12.0",
49+
"husky": "^9.1.7",
4850
"postcss": "^8.4.47",
4951
"prettier": "^3.3.3",
5052
"tailwindcss": "^3.4.14",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "proxycast"
3-
version = "0.6.1"
3+
version = "0.7.0"
44
description = "AI API Proxy Desktop App"
55
authors = ["you"]
66
edition = "2021"

0 commit comments

Comments
 (0)