A feature-rich Rust GUI application that provides a ChatGPT-like interface using Amazon Bedrock with Claude 3.5 Sonnet.
- Multiple chat sessions - Create and switch between different conversations using tabs
- Persistent conversations - Each tab maintains its own message history and file attachments
- Loading indicators - Visual feedback while waiting for Claude's responses
- Auto-scroll - Automatically scrolls to show new messages
- Copy functionality - Copy Claude's responses or code blocks to clipboard
- Drag and drop files - Simply drag files into the window to attach them
- File picker button - Click the π button to browse and select files
- Multiple file types - Support for text files, images (PNG, JPG, JPEG), and documents
- File management - Clear attached files with one click
- Smart file handling - Automatic content extraction and appropriate formatting
- Tabbed interface - Multiple chat sessions with easy switching and "+" button for new tabs
- Adjustable font size - Slider control (10px - 24px) for better readability
- Markdown rendering - Proper formatting for Claude's responses with syntax highlighting
- Code block support - Specially formatted code blocks with copy buttons
- Tooltips - Helpful descriptions for all interactive controls
- Status bar - Shows AWS profile, model info, and real-time token usage
- Professional branding - Proper title case in application menus and title bar
- Version display - Application version shown in title bar
- Real-time monitoring - Track input and output tokens for each request
- Usage display - See total token consumption in the status bar
- Cost awareness - Monitor API usage for billing estimates
- Cumulative tracking - Tokens tracked across all chat sessions
- Modular architecture - Clean separation of concerns across multiple modules
- Clippy compliance - Passes all Rust clippy pedantic checks
- Type safety - Full Rust type system benefits with error handling
- Maintainable codebase - Well-organized structure for future development
-
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source ~/.cargo/env
-
Verify installation:
rustc --version cargo --version
-
Update Rust (if already installed):
rustup update
-
macOS: No additional dependencies required
-
Linux: Install development packages:
# Ubuntu/Debian sudo apt-get install build-essential libxcb1-dev libxrandr-dev libxss-dev libxcursor-dev libxcomposite-dev libasound2-dev libxi-dev libgl1-mesa-dev # Fedora/RHEL sudo dnf install gcc-c++ libxcb-devel libXrandr-devel libXss-devel libXcursor-devel libXcomposite-devel alsa-lib-devel libXi-devel mesa-libGL-devel
-
Configure AWS credentials:
aws configure
-
Ensure Bedrock access:
- You need access to Claude 3.5 Sonnet in Amazon Bedrock
- US East 1 (us-east-1) region is recommended
-
Build and run:
cargo run
- Type messages in the input field at the bottom
- Press Enter or click Send to submit
- Claude's responses appear with markdown formatting and syntax highlighting
- Use the π button to copy responses or code blocks to clipboard
- Drag & Drop: Drag files directly into the window
- File Picker: Click the π button to browse for files
- Supported formats: Text files, images (PNG/JPG/JPEG), PDFs, Office documents
- Management: Use Clear files to remove all attachments
- Smart processing: Images show size info, documents show type descriptions
- Click + to create a new chat session
- Click on tab names to switch between conversations
- Each tab has independent message history and file attachments
- Token usage is tracked across all sessions
- Font Size: Use the slider in the top panel to adjust text size (10px-24px)
- Token Monitoring: View real-time usage statistics in the status bar
- Tooltips: Hover over any control for helpful descriptions
make build # Build the project
make run # Run the application
make release # Build optimized release versionmake check # Check code without building
make clippy # Run clippy linter (fails on warnings)
make fmt # Format code
make test # Run tests
make qa # Run all quality checksmake clippy && make run # Only run if clippy passesmake docker-build # Build Docker image
make docker-run # Run in container (Linux with X11)
make docker-clean # Remove Docker imageNote: Docker GUI support requires X11 (Linux) or XQuartz (macOS).
src/
βββ main.rs # Application entry point
βββ app.rs # Main application logic and coordination
βββ chat/ # Chat session management
βββ bedrock/ # AWS Bedrock API integration
βββ ui/ # User interface components
βββ utils/ # Utility functions (files, clipboard)
- Framework: Built with egui/eframe for cross-platform GUI
- AWS Integration: Uses AWS SDK for Bedrock API calls
- Model: Claude 3.5 Sonnet (us.anthropic.claude-3-5-sonnet-20241022-v2:0)
- File Processing: Automatic content extraction and formatting
- Async Architecture: Non-blocking UI with tokio runtime
- Memory Management: Efficient handling of large conversations and files
- Rust 1.70+
- AWS credentials configured
- Amazon Bedrock access with Claude 3.5 Sonnet permissions