Skip to content

Commit 9da1a7b

Browse files
committed
docs: add contributing guide and update environment configuration documentation
1 parent ff2a8ea commit 9da1a7b

3 files changed

Lines changed: 77 additions & 13 deletions

File tree

CONTRIBUTING.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing to AI Studio Proxy API
2+
3+
Thank you for your interest in contributing! We welcome bug reports, feature requests, and pull requests.
4+
5+
## Getting Started
6+
7+
### Fork & Clone
8+
9+
```bash
10+
git clone https://github.com/YOUR_USERNAME/AIstudioProxyAPI.git
11+
cd AIstudioProxyAPI
12+
```
13+
14+
### Install Dependencies
15+
16+
```bash
17+
# Install Poetry (if not already installed)
18+
curl -sSL https://install.python-poetry.org | python3 -
19+
20+
# Install dependencies
21+
poetry install --with dev
22+
```
23+
24+
### Run the Test Suite
25+
26+
```bash
27+
poetry run pytest
28+
```
29+
30+
## Making Changes
31+
32+
1. **Create a branch**: `git checkout -b feature/your-feature`
33+
2. **Make your changes**
34+
3. **Run checks** before committing:
35+
```bash
36+
poetry run ruff check .
37+
poetry run ruff format .
38+
poetry run pyright
39+
poetry run pytest
40+
```
41+
4. **Commit** using [Conventional Commits](https://www.conventionalcommits.org/):
42+
- `feat:` New feature
43+
- `fix:` Bug fix
44+
- `docs:` Documentation
45+
- `refactor:` Code restructuring
46+
5. **Open a Pull Request**
47+
48+
## Code Style
49+
50+
We use:
51+
52+
- **Ruff** for linting and formatting
53+
- **Pyright** for type checking
54+
- **80% test coverage** minimum for modified files
55+
56+
See [Development Guide](docs/development-guide.md) for detailed coding conventions.
57+
58+
## Reporting Issues
59+
60+
Please include:
61+
62+
- Steps to reproduce
63+
- Expected vs actual behavior
64+
- Python version and OS
65+
- Relevant logs (from `errors_py/` if available)
66+
67+
## Questions?
68+
69+
- Check [Troubleshooting Guide](docs/troubleshooting.md)
70+
- Open a Discussion or Issue
71+
72+
## License
73+
74+
Contributions are licensed under [AGPLv3](LICENSE).

docs/env-variables-reference.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,6 @@
158158
- **示例**: `AUTH_SAVE_TIMEOUT=60`
159159
- **说明**: 等待认证文件保存完成的最大时间
160160

161-
### AUTO_CONFIRM_LOGIN
162-
163-
- **用途**: 自动确认登录
164-
- **类型**: 布尔值
165-
- **默认值**: `true`
166-
- **示例**: `AUTO_CONFIRM_LOGIN=false`
167-
- **说明**: 启用后会自动点击登录确认按钮
168-
169161
### ONLY_COLLECT_CURRENT_USER_ATTACHMENTS
170162

171163
- **用途**: 仅收集当前用户附件
@@ -450,8 +442,8 @@
450442

451443
- **用途**: 是否启用油猴脚本注入功能 (v3.0)
452444
- **类型**: 布尔值
453-
- **默认值**: `true`
454-
- **示例**: `ENABLE_SCRIPT_INJECTION=false`
445+
- **默认值**: `false`
446+
- **示例**: `ENABLE_SCRIPT_INJECTION=true`
455447
- **说明**: 启用后,系统将自动从油猴脚本解析模型列表并注入到 API 响应中。v3.0 版本使用 Playwright 原生网络拦截,提供更高的可靠性。
456448

457449
### USERSCRIPT_PATH

docs/environment-configuration.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ STREAM_PORT=3120
7070
```
7171

7272
### 启动配置
73+
7374
```env
7475
# 快速启动
7576
DIRECT_LAUNCH=false
@@ -112,9 +113,6 @@ AUTO_SAVE_AUTH=false
112113
# 认证保存超时时间 (秒)
113114
AUTH_SAVE_TIMEOUT=30
114115
115-
# 自动确认登录
116-
AUTO_CONFIRM_LOGIN=true
117-
118116
# 仅收集当前用户消息中的附件(true/false)
119117
ONLY_COLLECT_CURRENT_USER_ATTACHMENTS=false
120118
```

0 commit comments

Comments
 (0)