Skip to content

Commit 3ab05a7

Browse files
authored
Merge pull request #18 from lzwjava/feat/update-docs-readme
Docs: Update READMEs with Latest Features
2 parents 7214cac + a1e53e7 commit 3ab05a7

2 files changed

Lines changed: 63 additions & 36 deletions

File tree

README.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ An interactive terminal REPL for chatting with GitHub Copilot, built with Python
44

55
## Features
66

7-
- Multi-turn conversations with GitHub Copilot in your terminal
8-
- GitHub OAuth device flow authentication
9-
- Automatic Copilot token refresh during session
10-
- GPT-4o model
7+
- **Multi-turn conversations** with GitHub Copilot in your terminal.
8+
- **Native Tool Calling**: Automatically triggers web searches when real-time information is needed.
9+
- **Customizable**: Select search providers and models during the session.
10+
- **GitHub OAuth device flow** authentication.
11+
- **Automatic token refresh** during sessions.
12+
- **Modern Default**: Uses GPT-5.2 as the default model.
1113

1214
## Installation
1315

@@ -19,40 +21,50 @@ pip install -e .
1921

2022
## Usage
2123

22-
1. Authenticate with GitHub (once):
24+
1. **Authenticate with GitHub** (once):
2325
```bash
2426
mini-copilot-login
2527
```
2628
This runs the GitHub device authorization flow and saves your token to `~/.config/mini-copilot/config.json`.
2729

28-
2. Start the REPL:
30+
2. **Start the REPL**:
2931
```bash
3032
mini-copilot
3133
```
3234

33-
```
34-
> What is a closure in Python?
35-
36-
GitHub Copilot: A closure is ...
37-
38-
> Can you give me an example?
39-
40-
GitHub Copilot: Sure! Here's an example ...
41-
```
35+
### CLI Commands
36+
- `/login`: Authenticate with GitHub.
37+
- `/model`: View and switch between available models.
38+
- `/search_provider`: View and switch web search providers (default: DuckDuckGo).
39+
- `/copy`: Copy the last response to your clipboard.
40+
- `/help`: Show available commands.
41+
- `.exit`: Quit the REPL.
4242

43-
Type `.exit` or press `Ctrl+C` to quit.
43+
## Web Search (Native Tool Calling)
44+
The agent is equipped with a `web_search` tool. When you ask about recent events or real-time data, the model will autonomously invoke the tool, fetch content, and provide an answer based on live results.
4445

4546
---
4647

4748
[中文说明 (README_CN.md)](README_CN.md)
4849

49-
## Project Structure
50+
## Development
5051

52+
### Running Tests
53+
We use `unittest` and `coverage` for testing.
54+
```bash
55+
python3 -m coverage run -m unittest discover tests
56+
python3 -m coverage report -m
5157
```
52-
mini_copilot/
53-
├── main.py # Interactive REPL
54-
└── login.py # CLI login utility
5558

56-
pyproject.toml # Package metadata and entry points
59+
### Project Structure
60+
```
61+
mini_copilot/
62+
├── commands/ # Modular CLI command handlers
63+
├── main.py # Core REPL loop and tool definitions
64+
├── github_api.py # GitHub/Copilot API communication
65+
├── web_search.py # DuckDuckGo search and extraction logic
66+
└── login.py # OAuth device flow logic
67+
68+
tests/ # Unit tests
69+
integration_tests/# Network-dependent integration tests
5770
```
58-

README_CN.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
## 功能特性
66

77
- **多轮对话**:在终端中与 GitHub Copilot 进行持续对话。
8+
- **原生工具调用**:当需要实时信息时,自动触发网页搜索。
9+
- **可定制化**:在会话期间选择搜索提供商和模型。
810
- **GitHub OAuth 认证**:通过 GitHub 设备授权流程进行认证。
911
- **自动刷新**:在会话期间自动刷新 Copilot 令牌。
10-
- **使用 GPT-4o 模型**
12+
- **默认使用 GPT-5.2 模型**
1113

1214
## 安装步骤
1315

@@ -30,24 +32,37 @@ pip install -e .
3032
mini-copilot
3133
```
3234

33-
```
34-
> 什么是 Python 中的闭包?
35-
36-
GitHub Copilot: 闭包是……
35+
### 终端命令
36+
- `/login`: 进行 GitHub 认证。
37+
- `/model`: 查看并切换可用模型。
38+
- `/search_provider`: 查看并切换网页搜索提供商(默认:DuckDuckGo)。
39+
- `/copy`: 将最后一条回复复制到剪贴板。
40+
- `/help`: 显示可用命令。
41+
- `.exit`: 退出 REPL。
3742

38-
> 能给我个例子吗?
43+
## 网页搜索(原生工具调用)
44+
该代理配备了 `web_search` 工具。当您询问最近发生的事件或实时数据时,模型将自主调用该工具、获取内容并根据实时结果提供答案。
3945

40-
GitHub Copilot: 没问题!这是一个例子……
41-
```
46+
---
4247

43-
输入 `.exit` 或按下 `Ctrl+C` 即可退出。
48+
## 开发相关
4449

45-
## 项目结构
50+
### 运行测试
51+
我们使用 `unittest``coverage` 进行测试。
52+
```bash
53+
python3 -m coverage run -m unittest discover tests
54+
python3 -m coverage report -m
55+
```
4656

57+
### 项目结构
4758
```
4859
mini_copilot/
49-
├── main.py # 交互式 REPL
50-
└── login.py # CLI 登录工具
51-
52-
pyproject.toml # 项目元数据和入口点
60+
├── commands/ # 模块化 CLI 命令处理器
61+
├── main.py # 核心 REPL 循环和工具定义
62+
├── github_api.py # GitHub/Copilot API 通信
63+
├── web_search.py # DuckDuckGo 搜索和内容抓取逻辑
64+
└── login.py # OAuth 设备流程逻辑
65+
66+
tests/ # 单元测试
67+
integration_tests/# 依赖网络的集成测试
5368
```

0 commit comments

Comments
 (0)