Files
opencode/command/gitea-config.md
voson 43e138b19e feat: 新增对话总结命令与浏览器自动化技能
- 本地化命令描述(英文→中文)

- 删除未使用命令文件

- 新增 summarize-conversation 命令

- 更新 AI 模型配置为 DeepSeek

- 新增 agent-browser 技能

- 重构技能目录结构(重命名)
2026-01-15 17:30:39 +08:00

73 lines
1.8 KiB
Markdown

---
description: 查看当前 Gitea 配置和 Runner 状态
---
Display the current Gitea configuration and runner status.
## 工作目录
**macOS / Linux:**
```
~/.config/gitea/
```
**Windows:**
```
%USERPROFILE%\.config\gitea\
```
Please perform the following:
1. **Check if configuration exists:**
- Config file:
- macOS/Linux: `~/.config/gitea/config.env`
- Windows: `%USERPROFILE%\.config\gitea\config.env`
- If not exists, prompt user to run `/gitea-reset`
2. **Load and display configuration:**
**macOS / Linux:**
```bash
source ~/.config/gitea/config.env
```
**Windows PowerShell:**
```powershell
Get-Content "$env:USERPROFILE\.config\gitea\config.env" | ForEach-Object {
if ($_ -match '^([^=]+)=(.*)$') {
[Environment]::SetEnvironmentVariable($matches[1], $matches[2], 'Process')
}
}
```
Show in Chinese:
- Gitea URL
- Default organization (if set)
- Config file path (根据平台显示正确路径)
3. **Validate token and display user info:**
- Call API: `GET ${GITEA_URL}/api/v1/user`
- Header: `Authorization: token ${GITEA_TOKEN}`
- Show: Token status (✓ 有效 / ✗ 无效), username, email
4. **Display runner information:**
- Runners directory:
- macOS/Linux: `~/.config/gitea/runners`
- Windows: `%USERPROFILE%\.config\gitea\runners`
- Count configured runners
- List each runner with status:
- 🟢 运行中 (process running)
- 🔴 已停止 (process not running)
- ⚠️ 配置异常 (config file missing)
5. **Show management commands:**
```
管理命令:
- 重置配置: /gitea-reset
- 切换组织: /gitea-switch-org <org-name>
- 列出 Runners: /gitea-list-runners
- 创建仓库: /create-gitea-repo <repo-name>
```
Use `jq` to parse JSON responses and `pgrep` to check runner process status.