|
|
||
|---|---|---|
| src | ||
| .gitignore | ||
| README.md | ||
| index.html | ||
| justfile | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||
README.md
ollie-webui
Browser-based front-end for ollie. A Preact single-page application that talks to ollie-httpgw over REST. Provides session management, a chat interface with markdown rendering, and theme switching.
Prerequisites
- Either olliesrv or ollied running (provides the D-Bus
org.ollie.SessionManagerinterface) - ollie-httpgw running (HTTP → D-Bus gateway)
Build
npm install
npm run build
Output: dist/ (static files).
Development
Vite dev server with hot reload and API proxy:
npm run dev
# Open http://localhost:5173
The proxy forwards /sessions, /backends, /agents, and /openapi.json to localhost:8011 (httpgw default with -listen :8011, or adjust vite.config.ts).
Serve (production)
dist/ is a static site. Serve with any HTTP server and proxy API paths to httpgw:
server {
listen 3000;
root /path/to/ollie/webui/dist;
index index.html;
location / { try_files $uri /index.html; }
location ~ ^/(sessions|backends|agents|openapi\.json)(/|$) {
proxy_pass http://localhost:8011;
}
}
Features
- Session list sidebar with state, backend, model, and cwd
- Create, rename, and kill sessions
- Send prompts; updates via 250ms poll
- Stop a running agent turn
- Markdown rendering of assistant responses (via marked + mermaid + KaTeX)
- Two built-in themes:
midnight(dark) andacme(Plan 9-inspired light); persisted to localStorage
Stack
File layout
webui/
├── package.json
├── vite.config.ts
├── src/
│ ├── app.tsx # Root component: session polling, routing
│ ├── style.css # Global styles
│ ├── components/
│ │ ├── ChatPane.tsx # Chat display + prompt bar
│ │ ├── PromptBar.tsx # Input field
│ │ └── NewSession.tsx # Session creation dialog
│ └── lib/
│ ├── api.ts # HTTP client (fetch wrappers for httpgw)
│ ├── chat.ts # Chat log parser
│ └── theme.ts # Theme definitions and localStorage persistence
└── dist/ # Build output (static site)
License
GPLv3