tuiapp: improve session nav (ctrl+arrows), CJK-aware sidebar, README restructure
This commit is contained in:
1 parent
eb90075f6a
commit
20553a05aa
3 files changed
+119
-59
No files matched your search
@@ -81,7 +81,7 @@ git clone https://github.com/lsdefine/GenericAgent.git
|
||||
cd GenericAgent
|
||||
|
||||
# 2. Install minimal dependencies
|
||||
pip install requests streamlit pywebview
|
||||
pip install requests streamlit pywebview textual
|
||||
|
||||
# 3. Configure API Key
|
||||
cp mykey_template.py mykey.py
|
||||
@@ -110,30 +110,26 @@ Full guide: [GETTING_STARTED.md](GETTING_STARTED.md)
|
||||
|
||||
---
|
||||
|
||||
## 🤖 Bot Interface (Optional)
|
||||
## 🖥️ Desktop Frontends
|
||||
|
||||
### Telegram Bot
|
||||
### Terminal UI (Recommended)
|
||||
|
||||
```python
|
||||
# mykey.py
|
||||
tg_bot_token = 'YOUR_BOT_TOKEN'
|
||||
tg_allowed_users = [YOUR_USER_ID]
|
||||
```
|
||||
A lightweight, keyboard-driven interface built on [Textual](https://github.com/Textualize/textual). Supports multiple concurrent sessions, real-time streaming, and runs anywhere a terminal does — no browser needed.
|
||||
|
||||
```bash
|
||||
python frontends/tgapp.py
|
||||
python frontends/tuiapp.py
|
||||
```
|
||||
|
||||
### Alternative App Frontends
|
||||
> Tip: `python frontends/tuiapp.py --demo` runs a smoke test without consuming API tokens.
|
||||
|
||||
Besides the default Streamlit web UI, you can also try other frontend styles:
|
||||
### Other Desktop Frontends
|
||||
|
||||
```bash
|
||||
python frontends/qtapp.py # Qt-based desktop app
|
||||
streamlit run frontends/stapp2.py # Alternative Streamlit UI
|
||||
```
|
||||
|
||||
### Codeg
|
||||
### Codeg
|
||||
|
||||
<table><tr>
|
||||
<td width="70%">
|
||||
@@ -150,6 +146,22 @@ Place your GenericAgent directory alongside the codeg project. Codeg will auto-d
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
---
|
||||
|
||||
## 💬 Bot Interface (IM)
|
||||
|
||||
### Telegram Bot
|
||||
|
||||
```python
|
||||
# mykey.py
|
||||
tg_bot_token = 'YOUR_BOT_TOKEN'
|
||||
tg_allowed_users = [YOUR_USER_ID]
|
||||
```
|
||||
|
||||
```bash
|
||||
python frontends/tgapp.py
|
||||
```
|
||||
|
||||
### Common Chat Commands
|
||||
|
||||
The default Streamlit desktop UI started by `python launch.pyw`, plus the QQ / Telegram / Feishu / WeCom / DingTalk frontends, support these chat commands:
|
||||
@@ -314,7 +326,7 @@ git clone https://github.com/lsdefine/GenericAgent.git
|
||||
cd GenericAgent
|
||||
|
||||
# 2. 安装最小依赖
|
||||
pip install requests streamlit pywebview
|
||||
pip install requests streamlit pywebview textual
|
||||
|
||||
# 3. 配置 API Key
|
||||
cp mykey_template.py mykey.py
|
||||
@@ -346,7 +358,45 @@ python launch.pyw
|
||||
|
||||
---
|
||||
|
||||
## 🤖 Bot 接口(可选)
|
||||
## 🖥️ 桌面前端
|
||||
|
||||
### 终端 UI(推荐)
|
||||
|
||||
基于 [Textual](https://github.com/Textualize/textual) 的轻量键盘驱动界面。支持多会话并发、实时流式输出,有终端就能跑,无需浏览器。
|
||||
|
||||
```bash
|
||||
python frontends/tuiapp.py
|
||||
```
|
||||
|
||||
> 提示:`python frontends/tuiapp.py --demo` 可在不消耗 API Token 的情况下进行冒烟测试。
|
||||
|
||||
### 其他桌面前端
|
||||
|
||||
```bash
|
||||
python frontends/qtapp.py # 基于 Qt 的桌面应用
|
||||
streamlit run frontends/stapp2.py # 另一种 Streamlit 风格 UI
|
||||
```
|
||||
|
||||
### Codeg前端
|
||||
|
||||
<table><tr>
|
||||
<td width="70%">
|
||||
|
||||
[Codeg](https://github.com/yiqi-017/codeg)(`feat/genericagent-integration` 分支)是一个桌面/Web UI,可以将 GenericAgent 与其他代理(Claude Code、Gemini、Codex 等)在统一界面中并行使用,UI 更加精美。
|
||||
|
||||
> 此集成已可使用,部分功能仍在完善中,欢迎体验反馈。
|
||||
|
||||
将 GenericAgent 目录放在 codeg 项目同级目录下,Codeg 会自动检测 `frontends/genericagent_acp_bridge.py` 并将 GenericAgent 作为本地 ACP 代理启动。
|
||||
|
||||
</td>
|
||||
<td width="30%">
|
||||
<img src="assets/demo/codeg-demo.gif" width="90%" alt="Codeg Demo">
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
---
|
||||
|
||||
## 💬 Bot 接口(IM)
|
||||
|
||||
### 微信 Bot(个人微信)
|
||||
|
||||
@@ -428,32 +478,6 @@ dingtalk_client_secret = "your_app_secret"
|
||||
dingtalk_allowed_users = ["your_staff_id"] # 或 ['*']
|
||||
```
|
||||
|
||||
### 其他 App 前端
|
||||
|
||||
除默认的 Streamlit Web UI 外,还可以尝试不同风格的前端:
|
||||
|
||||
```bash
|
||||
python frontends/qtapp.py # 基于 Qt 的桌面应用
|
||||
streamlit run frontends/stapp2.py # 另一种 Streamlit 风格 UI
|
||||
```
|
||||
|
||||
### Codeg前端
|
||||
|
||||
<table><tr>
|
||||
<td width="70%">
|
||||
|
||||
[Codeg](https://github.com/yiqi-017/codeg)(`feat/genericagent-integration` 分支)是一个桌面/Web UI,可以将 GenericAgent 与其他代理(Claude Code、Gemini、Codex 等)在统一界面中并行使用,UI 更加精美。
|
||||
|
||||
> 此集成已可使用,部分功能仍在完善中,欢迎体验反馈。
|
||||
|
||||
将 GenericAgent 目录放在 codeg 项目同级目录下,Codeg 会自动检测 `frontends/genericagent_acp_bridge.py` 并将 GenericAgent 作为本地 ACP 代理启动。
|
||||
|
||||
</td>
|
||||
<td width="30%">
|
||||
<img src="assets/demo/codeg-demo.gif" width="90%" alt="Codeg Demo">
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
### 通用聊天命令
|
||||
|
||||
默认通过 `python launch.pyw` 启动的 Streamlit 桌面 UI,以及 QQ / Telegram / 飞书 / 企业微信 / 钉钉前端,都支持以下命令:
|
||||
|
||||
Reference in new issue
Block a user