Chat - AI Assistant
Your intelligent conversation partner
Overview
Chat is the heart of General Bots Suite - your AI-powered assistant that understands context, remembers conversations, and helps you get things done. Built with WebSocket for real-time communication and HTMX for seamless updates.
Features
Real-Time Messaging
Messages are sent and received instantly via WebSocket connection.
Voice Input
Click the microphone button to speak your message:
- Click π€ to start recording
- Speak your message clearly
- Click again to stop
- Message converts to text automatically
Quick Suggestions
Pre-built action chips for common requests:
| Chip | Action |
|---|---|
| π Tasks | Show your task list |
| π§ Check mail | Display unread emails |
| π Schedule | Todayβs calendar |
| β Help | Available commands |
Message History
- Auto-loads previous messages on page open
- Scroll up to load older messages
- Click βScroll to bottomβ button to return to latest
Markdown Support
Bot responses support full Markdown rendering:
- Bold and italic text
code snippetsand code blocks- Bullet and numbered lists
- Links and images
- Tables
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Enter | Send message |
Shift+Enter | New line (without sending) |
β (Up arrow) | Edit last message |
/ | Open command menu |
Escape | Cancel current action |
API Endpoints
WebSocket Connection
ws://your-server:8080/ws
Message Types:
TEXT (1)- Regular text messagesVOICE (2)- Voice messagesCONTINUE (3)- Continue interrupted responsesCONTEXT (4)- Context changesSYSTEM (5)- System messages
REST Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/sessions | GET | List sessions |
/api/sessions/current/message | POST | Send message (current session) |
/api/sessions/current/history | GET | Get chat history (current session) |
/api/sessions/:id | GET | Get session details |
/api/sessions/:id/history | GET | Get chat history by ID |
/api/sessions/:id/start | POST | Start session |
/api/sessions/:id/end | POST | End session |
/api/voice/start | POST | Start voice recording |
/api/voice/stop | POST | Stop voice recording |
/api/voice/status | GET | Get voice status |
Note: The frontend uses
/api/sessions/current/*endpoints which resolve to the active session automatically.
Example Conversations
Getting Information
Creating Tasks
Drafting Emails
Accessibility
- Full keyboard navigation
- Screen reader announcements for new messages
- High contrast mode support
- Adjustable font sizes
- ARIA labels on all interactive elements
Troubleshooting
Messages Not Sending
- Check connection status indicator
- Verify WebSocket is connected
- Try refreshing the page
- Check browser console for errors
Voice Not Working
- Allow microphone permissions in browser
- Check device microphone settings
- Try a different browser
- Ensure HTTPS connection (required for voice)
History Not Loading
- Check network connection
- Verify API endpoint is accessible
- Clear browser cache
- Check for JavaScript errors
See Also
- HTMX Architecture β How Chat uses HTMX
- Suite Manual β Complete user guide
- Tasks App β Create tasks from chat
- Mail App β Email integration