feat: OpenMesh 基础平台与 MD/PDF 转换技能
- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理 - 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类) - 技能: md-to-office (pandoc + wkhtmltopdf) - 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/ - 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
This commit is contained in:
52
surfaces/gui/README.md
Normal file
52
surfaces/gui/README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# coworker GUI (React + Tauri)
|
||||
|
||||
A thin client of the coworker server (OpenAI-compatible API + WS event/approval stream).
|
||||
Same codebase runs in a browser (dev) and as the OpenWorker desktop app.
|
||||
|
||||
## First time: bootstrap the Python backend
|
||||
|
||||
A fresh checkout has no server to run — create the venv both flows below expect
|
||||
(from the repo root):
|
||||
|
||||
```bash
|
||||
bash packaging/setup_dev_env.sh # → .venv (server + aisuite)
|
||||
```
|
||||
|
||||
## Run it (browser, two terminals)
|
||||
|
||||
1. **Start the server** (needs a model key, e.g. `OPENAI_API_KEY`, in the environment —
|
||||
or add one later in the app's Settings), from the repo root:
|
||||
```bash
|
||||
./.venv/bin/openworker-server --cwd /path/to/your/project --port 8765
|
||||
```
|
||||
2. **Start the UI:**
|
||||
```bash
|
||||
cd surfaces/gui
|
||||
npm install # first time
|
||||
npm run dev # → http://localhost:5173
|
||||
```
|
||||
|
||||
Open http://localhost:5173. The UI talks to `http://127.0.0.1:8765` (override with
|
||||
`VITE_COWORKER_HTTP` / `VITE_COWORKER_WS`). Start the server before Vite so the
|
||||
UI can read its per-launch token from `<state-dir>/sidecar-8765.token`; restart
|
||||
Vite if the server is restarted.
|
||||
|
||||
## Run the desktop app from source
|
||||
|
||||
The Tauri shell wraps the same UI and supervises the Python server itself — no separate
|
||||
terminal. It needs the Rust toolchain (`rustup`) plus the venv from the bootstrap step;
|
||||
in dev it finds the server at `.venv/bin/openworker-server` automatically (a
|
||||
packaged sidecar binary is only produced by the release scripts in `packaging/`).
|
||||
|
||||
```bash
|
||||
cd surfaces/gui
|
||||
npm install # first time
|
||||
npm run tauri dev # builds the shell, launches the window, starts the server
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
npx tsc --noEmit && npx vitest run # typecheck + unit
|
||||
npx playwright test # hermetic e2e (mocked /v1 + WS, no Python needed)
|
||||
```
|
||||
Reference in New Issue
Block a user