mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-11 14:50:14 +00:00
docs: fix stale platform/ paths in the GUI README
The GUI README still described the pre-split monorepo layout: every command cd'd into a platform/ directory that does not exist in this repository, so a fresh contributor following it verbatim fails at the first step. The venv, packaging scripts, and surfaces/gui all live at the repo root now — align the commands and the server_bin() dev-fallback comment with the layout the root README already documents. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
e0cb129d20
commit
6356aa6cd0
@@ -5,23 +5,23 @@ Same codebase runs in a browser (dev) and as the OpenWorker desktop app.
|
|||||||
|
|
||||||
## First time: bootstrap the Python backend
|
## First time: bootstrap the Python backend
|
||||||
|
|
||||||
A fresh checkout has no server to run — create the venv both flows below expect:
|
A fresh checkout has no server to run — create the venv both flows below expect
|
||||||
|
(from the repo root):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash platform/packaging/setup_dev_env.sh # → platform/.venv (server + this repo's aisuite)
|
bash packaging/setup_dev_env.sh # → .venv (server + aisuite)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run it (browser, two terminals)
|
## Run it (browser, two terminals)
|
||||||
|
|
||||||
1. **Start the server** (needs a model key, e.g. `OPENAI_API_KEY`, in the environment —
|
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):
|
or add one later in the app's Settings), from the repo root:
|
||||||
```bash
|
```bash
|
||||||
cd platform
|
|
||||||
./.venv/bin/openworker-server --cwd /path/to/your/project --port 8765
|
./.venv/bin/openworker-server --cwd /path/to/your/project --port 8765
|
||||||
```
|
```
|
||||||
2. **Start the UI:**
|
2. **Start the UI:**
|
||||||
```bash
|
```bash
|
||||||
cd platform/surfaces/gui
|
cd surfaces/gui
|
||||||
npm install # first time
|
npm install # first time
|
||||||
npm run dev # → http://localhost:5173
|
npm run dev # → http://localhost:5173
|
||||||
```
|
```
|
||||||
@@ -35,11 +35,11 @@ Vite if the server is restarted.
|
|||||||
|
|
||||||
The Tauri shell wraps the same UI and supervises the Python server itself — no separate
|
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;
|
terminal. It needs the Rust toolchain (`rustup`) plus the venv from the bootstrap step;
|
||||||
in dev it finds the server at `platform/.venv/bin/openworker-server` automatically (a
|
in dev it finds the server at `.venv/bin/openworker-server` automatically (a
|
||||||
packaged sidecar binary is only produced by the release scripts in `platform/packaging/`).
|
packaged sidecar binary is only produced by the release scripts in `packaging/`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd platform/surfaces/gui
|
cd surfaces/gui
|
||||||
npm install # first time
|
npm install # first time
|
||||||
npm run tauri dev # builds the shell, launches the window, starts the server
|
npm run tauri dev # builds the shell, launches the window, starts the server
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ fn launch_token() -> String {
|
|||||||
/// (next to the app exe) on Windows.
|
/// (next to the app exe) on Windows.
|
||||||
/// 3. Legacy onefile slot: `openworker-server[.exe]` next to the app binary (pre-onedir
|
/// 3. Legacy onefile slot: `openworker-server[.exe]` next to the app binary (pre-onedir
|
||||||
/// builds used Tauri externalBin).
|
/// builds used Tauri externalBin).
|
||||||
/// 4. Dev fallback: the repo venv, relative to this crate (`src-tauri` → `platform/.venv`;
|
/// 4. Dev fallback: the repo venv, relative to this crate (`src-tauri` → repo-root `.venv`;
|
||||||
/// `bin/` on POSIX, `Scripts\` on Windows).
|
/// `bin/` on POSIX, `Scripts\` on Windows).
|
||||||
fn server_bin() -> PathBuf {
|
fn server_bin() -> PathBuf {
|
||||||
if let Ok(p) = std::env::var("COWORKER_SERVER_BIN") {
|
if let Ok(p) = std::env::var("COWORKER_SERVER_BIN") {
|
||||||
|
|||||||
Reference in New Issue
Block a user