Skip to content

Commit 6f37174

Browse files
authored
feature:新增获取模型列表功能 (#46)
* resolve merge conflict in main.go, keep remote version * 已知bug修复、界面样式优化 * 新增获取模型列表功能 --------- Co-authored-by: hea7en <hea7enn@qq.com>
1 parent cdb343b commit 6f37174

File tree

13 files changed

+613
-118
lines changed

13 files changed

+613
-118
lines changed

README.md

Lines changed: 77 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,29 @@ ccNexus is a smart API endpoint rotation proxy designed for Claude Code. It help
2626

2727
## 📸 Application Interface
2828

29-
<p align="center">
30-
<img src="docs/images/EN-Light.png" alt="Light Theme" width="45%">
31-
<br/>Light Theme
32-
</p>
33-
<p align="center">
34-
<img src="docs/images/EN-Dark.png" alt="Dark Theme" width="45%">
35-
<br/>Dark Theme
36-
</p>
29+
<table>
30+
<tr>
31+
<td align="center"><img src="docs/images/EN-Light.png" alt="Light Theme" width="400"></td>
32+
<td align="center"><img src="docs/images/EN-Dark.png" alt="Dark Theme" width="400"></td>
33+
</tr>
34+
<tr>
35+
<td align="center">Light Theme</td>
36+
<td align="center">Dark Theme</td>
37+
</tr>
38+
</table>
3739

3840
## 📖 Help
3941

40-
<p align="center">
41-
<img src="frontend/public/chat.jpg" width="45%">
42-
<br/>Please join the group for problem feedback
43-
</p>
44-
<p align="center">
45-
<img src="docs/images/ME.png" width="45%">
46-
<br/>If the group chat expires, please add as friend to join
47-
</p>
42+
<table>
43+
<tr>
44+
<td align="center"><img src="frontend/public/chat.jpg" width="300"></td>
45+
<td align="center"><img src="docs/images/ME.png" width="300"></td>
46+
</tr>
47+
<tr>
48+
<td align="center">Please join the group for problem feedback</td>
49+
<td align="center">If the group chat expires, please add as friend to join</td>
50+
</tr>
51+
</table>
4852

4953
## ✨ Features
5054

@@ -242,24 +246,71 @@ ccNexus supports syncing configuration and statistics via WebDAV protocol, compa
242246

243247
## 🛠️ Development
244248

245-
### Requirements
249+
### 1. Environment Setup
246250

247-
- Go 1.22+
248-
- Node.js 18+
249-
- Wails CLI v2
251+
#### Install Go
250252

251-
### Development Mode
253+
1. Download Go 1.22+ from [Go official website](https://go.dev/dl/)
254+
2. Verify installation:
255+
```bash
256+
go version
257+
# Example output: go version go1.22.0 windows/amd64
258+
```
259+
260+
#### Install Node.js
261+
262+
1. Download LTS version (18+) from [Node.js official website](https://nodejs.org/)
263+
2. Verify installation:
264+
```bash
265+
node -v
266+
# Example output: v18.19.0
267+
268+
npm -v
269+
# Example output: 10.2.3
270+
```
271+
272+
#### Install Wails CLI
273+
274+
```bash
275+
go install github.com/wailsapp/wails/v2/cmd/wails@latest
276+
```
277+
278+
Verify installation:
279+
```bash
280+
wails version
281+
# Example output: v2.10.1
282+
```
283+
284+
Check development dependencies:
285+
```bash
286+
wails doctor
287+
```
288+
> Follow the prompts from `wails doctor` to install missing dependencies (e.g., WebView2 for Windows, GTK3 for Linux)
289+
290+
### 2. Clone Repository
252291

253292
```bash
254-
# Clone repository
255293
git clone https://github.com/lich0821/ccNexus.git
256294
cd ccNexus
295+
```
296+
297+
### 3. Development Mode
257298

258-
# Run in dev mode (auto-installs dependencies)
299+
```bash
300+
# Auto-install dependencies and start dev mode
259301
node run.mjs
260302
```
261303

262-
### Build
304+
Or manually:
305+
```bash
306+
# Install frontend dependencies
307+
cd frontend && npm install && cd ..
308+
309+
# Start dev mode (with hot reload)
310+
wails dev
311+
```
312+
313+
### 4. Build
263314

264315
```bash
265316
# Build for current platform
@@ -274,6 +325,8 @@ npm run build:macos # macOS
274325
npm run build:linux # Linux
275326
```
276327

328+
Build output is located in `build/bin/` directory.
329+
277330
### Project Structure
278331

279332
```

README_CN.md

Lines changed: 77 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,29 @@ ccNexus 是一个专为 Claude Code 设计的智能 API 端点轮换代理工具
2626

2727
## 📸 应用界面
2828

29-
<p align="center">
30-
<img src="docs/images/CN-Light.png" alt="明亮主题" width="45%">
31-
<br/>默认主题
32-
</p>
33-
<p align="center">
34-
<img src="docs/images/CN-Dark.png" alt="暗黑主题" width="45%">
35-
<br/>暗黑主题
36-
</p>
29+
<table>
30+
<tr>
31+
<td align="center"><img src="docs/images/CN-Light.png" alt="明亮主题" width="400"></td>
32+
<td align="center"><img src="docs/images/CN-Dark.png" alt="暗黑主题" width="400"></td>
33+
</tr>
34+
<tr>
35+
<td align="center">明亮主题</td>
36+
<td align="center">暗黑主题</td>
37+
</tr>
38+
</table>
3739

3840
## 📖 获取帮助
3941

40-
<p align="center">
41-
<img src="frontend/public/chat.jpg" alt="微信群" width="45%">
42-
<br/>问题反馈请加群
43-
</p>
44-
<p align="center">
45-
<img src="docs/images/ME.png" alt="个人微信" width="45%">
46-
<br/>若群聊过期,请加好友拉你入群
47-
</p>
42+
<table>
43+
<tr>
44+
<td align="center"><img src="frontend/public/chat.jpg" alt="微信群" width="300"></td>
45+
<td align="center"><img src="docs/images/ME.png" alt="个人微信" width="300"></td>
46+
</tr>
47+
<tr>
48+
<td align="center">问题反馈请加群</td>
49+
<td align="center">若群聊过期,请加好友拉入群</td>
50+
</tr>
51+
</table>
4852

4953
## ✨ 功能特性
5054

@@ -242,24 +246,71 @@ ccNexus 支持通过 WebDAV 协议同步配置和统计数据,兼容以下服
242246

243247
## 🛠️ 开发指南
244248

245-
### 环境要求
249+
### 1. 环境准备
246250

247-
- Go 1.22+
248-
- Node.js 18+
249-
- Wails CLI v2
251+
#### 安装 Go
250252

251-
### 开发运行
253+
1. 访问 [Go 官网](https://go.dev/dl/) 下载 Go 1.22+ 版本
254+
2. 安装完成后验证:
255+
```bash
256+
go version
257+
# 输出示例: go version go1.22.0 windows/amd64
258+
```
259+
260+
#### 安装 Node.js
261+
262+
1. 访问 [Node.js 官网](https://nodejs.org/) 下载 LTS 版本(18+)
263+
2. 安装完成后验证:
264+
```bash
265+
node -v
266+
# 输出示例: v18.19.0
267+
268+
npm -v
269+
# 输出示例: 10.2.3
270+
```
271+
272+
#### 安装 Wails CLI
273+
274+
```bash
275+
go install github.com/wailsapp/wails/v2/cmd/wails@latest
276+
```
277+
278+
验证安装:
279+
```bash
280+
wails version
281+
# 输出示例: v2.10.1
282+
```
283+
284+
检查开发环境依赖:
285+
```bash
286+
wails doctor
287+
```
288+
> 根据 `wails doctor` 的提示安装缺失的依赖(如 Windows 需要 WebView2,Linux 需要 GTK3 等)
289+
290+
### 2. 克隆项目
252291

253292
```bash
254-
# 克隆项目
255293
git clone https://github.com/lich0821/ccNexus.git
256294
cd ccNexus
295+
```
296+
297+
### 3. 开发模式运行
257298

258-
# 开发模式运行(自动安装依赖)
299+
```bash
300+
# 自动安装依赖并启动开发模式
259301
node run.mjs
260302
```
261303

262-
### 构建发布
304+
或手动执行:
305+
```bash
306+
# 安装前端依赖
307+
cd frontend && npm install && cd ..
308+
309+
# 启动开发模式(支持热重载)
310+
wails dev
311+
```
312+
313+
### 4. 构建发布
263314

264315
```bash
265316
# 当前平台构建
@@ -274,6 +325,8 @@ npm run build:macos # macOS
274325
npm run build:linux # Linux
275326
```
276327

328+
构建产物位于 `build/bin/` 目录下。
329+
277330
### 项目结构
278331

279332
```

0 commit comments

Comments
 (0)