co-mono/packages/web-ui/example
Mario Zechner 3ae02a6849 feat(coding-agent): complete steer()/followUp() migration
- Update settings-manager with steeringMode/followUpMode (migrates old queueMode)
- Update sdk.ts to use new mode options
- Update settings-selector UI to show both modes
- Add Alt+Enter keybind for follow-up messages
- Update RPC API: steer/follow_up commands, set_steering_mode/set_follow_up_mode
- Update rpc-client with new methods
- Delete dead code: queue-mode-selector.ts
- Update tests for new API
- Update mom/context.ts stubs
- Update web-ui example
2026-01-03 00:13:25 +01:00
..
src feat(coding-agent): complete steer()/followUp() migration 2026-01-03 00:13:25 +01:00
.gitignore web-ui package 2025-10-05 13:30:08 +02:00
index.html Add Anthropic prompt caching, pluggable storage, and CORS proxy support 2025-10-05 23:00:36 +02:00
package.json Release v0.31.1 2026-01-02 10:39:08 +01:00
README.md docs: fix mini-lit links (#123) 2025-12-06 09:56:31 +01:00
tsconfig.json Fix web-ui and example for new agent API 2025-12-30 22:42:20 +01:00
vite.config.ts web-ui package 2025-10-05 13:30:08 +02:00

Pi Web UI - Example

This is a minimal example showing how to use @mariozechner/pi-web-ui in a web application.

Setup

npm install

Development

npm run dev

Open http://localhost:5173 in your browser.

What's Included

This example demonstrates:

  • ChatPanel - The main chat interface component
  • System Prompt - Custom configuration for the AI assistant
  • Tools - JavaScript REPL and artifacts tool

Configuration

API Keys

The example uses Direct Mode by default, which means it calls AI provider APIs directly from the browser.

To use the chat:

  1. Click the settings icon (⚙️) in the chat interface
  2. Click "Manage API Keys"
  3. Add your API key for your preferred provider:

API keys are stored in your browser's localStorage and never sent to any server except the AI provider's API.

Project Structure

example/
├── src/
│   ├── main.ts       # Main application entry point
│   └── app.css       # Tailwind CSS configuration
├── index.html        # HTML entry point
├── package.json      # Dependencies
├── vite.config.ts    # Vite configuration
└── tsconfig.json     # TypeScript configuration

Learn More