|
Some checks are pending
CI / build-check-test (push) Waiting to run
- FIX 1: Agent constructor now wraps model/systemPrompt in initialState (was passed as top-level keys which Agent class ignores, causing it to default to Google Gemini with empty prompt and no tools) - FIX 2: chatPanel.setAgent now includes onApiKeyRequired handler using ApiKeyPromptDialog.prompt() (was missing, causing silent abort when no API key found for provider) - FIX 3: Fixed toolsFactory signature to match ChatPanel expected params (agent, iface, artifacts, runtimeFactory) instead of () => allTools - FIX 4: Removed broken allTools.map(t => t.tool) - createXxxTool() returns AgentTool directly, .tool property does not exist - FIX 5: Removed invalid convertToLlm from both Agent constructor and setAgent config (not a valid AgentOptions or setAgent config key) - FIX 6: Added pointer-events:none to empty state overlay wrapper with pointer-events:auto on interactive child to prevent input blocking |
||
|---|---|---|
| .. | ||
| public | ||
| server | ||
| src | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
Pi Web UI - Example
This is a minimal example showing how to use @jaeswift/jae-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:
- Click the settings icon (⚙️) in the chat interface
- Click "Manage API Keys"
- Add your API key for your preferred provider:
- Anthropic: Get a key from console.anthropic.com
- OpenAI: Get a key from platform.openai.com
- Google: Get a key from makersuite.google.com
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