refactor(aisidebar): restructure project and implement reasoning mode toggle
- Reorganize project structure and file locations - Add ReasoningController to manage model selection and reasoning mode - Update design and requirements for reasoning mode toggle - Implement model switching between Qwen3-4B-Instruct and Qwen3-4B-Thinking models - Remove deprecated files and consolidate project layout - Add new steering and specification documentation - Clean up and remove unnecessary files and directories - Prepare for enhanced AI sidebar functionality with more flexible model handling
This commit is contained in:
124
README.md
Normal file
124
README.md
Normal file
@@ -0,0 +1,124 @@
|
||||
## AI Sidebar for Ignis
|
||||
|
||||
A sleek AI chat sidebar that integrates with your Ignis desktop, sliding in from the left side with Ollama AI integration.
|
||||
|
||||
### Features
|
||||
|
||||
- **Slide-in Animation**: Smoothly slides in from the left side (opposite of QuickCenter)
|
||||
- **Ollama Integration**: Chat with local AI models via Ollama
|
||||
- **Conversation Persistence**: Your conversations are automatically saved and restored
|
||||
- **Material Design 3**: Matches your existing Ignis theme perfectly
|
||||
- **Keyboard Toggle**: Bind a key to toggle the sidebar visibility
|
||||
|
||||
### How to Use
|
||||
|
||||
#### Open/Close the Sidebar
|
||||
|
||||
You can toggle the sidebar using:
|
||||
1. **Python/Script**: Call `window_manager.toggle_window("AISidebar")`
|
||||
2. **Keyboard Shortcut**: Add a binding in your window manager config
|
||||
|
||||
#### Setting up a Keyboard Shortcut
|
||||
|
||||
For **Niri**, add this to your `~/.config/niri/config.kdl`:
|
||||
|
||||
```kdl
|
||||
binds {
|
||||
// ... your other bindings
|
||||
|
||||
// Toggle AI Sidebar with Super+G (or any key you prefer)
|
||||
Mod+G { spawn "ignis" "run" "ignis.window_manager.WindowManager.get_default().toggle_window('AISidebar')"; }
|
||||
}
|
||||
```
|
||||
|
||||
For **Hyprland**, add this to your `~/.config/hypr/hyprland.conf`:
|
||||
|
||||
```conf
|
||||
# Toggle AI Sidebar with Super+G
|
||||
bind = SUPER, G, exec, ignis run "ignis.window_manager.WindowManager.get_default().toggle_window('AISidebar')"
|
||||
```
|
||||
|
||||
For **Sway**, add this to your `~/.config/sway/config`:
|
||||
|
||||
```
|
||||
# Toggle AI Sidebar with Super+G
|
||||
bindsym $mod+G exec ignis run "ignis.window_manager.WindowManager.get_default().toggle_window('AISidebar')"
|
||||
```
|
||||
|
||||
### Requirements
|
||||
|
||||
- **Ignis** desktop environment
|
||||
- **Python 3.10+**
|
||||
- **Ollama** with at least one model installed
|
||||
- **ollama Python package**: `pip install ollama`
|
||||
|
||||
### Configuration
|
||||
|
||||
The sidebar will automatically:
|
||||
- Detect your default Ollama model
|
||||
- Store conversations in `~/.config/ignis/modules/aisidebar/data/conversations/`
|
||||
- Apply your current Ignis theme colors
|
||||
|
||||
### Customization
|
||||
|
||||
#### Change Width
|
||||
|
||||
Edit `aisidebar.py` line 19:
|
||||
```python
|
||||
self.content_box.width_request = 400 # Change to desired width
|
||||
```
|
||||
|
||||
#### Change Animation Speed
|
||||
|
||||
Edit `aisidebar.py` line 24:
|
||||
```python
|
||||
transition_duration=300, # Change to desired milliseconds
|
||||
```
|
||||
|
||||
#### Custom CSS Styling
|
||||
|
||||
Edit `~/.config/ignis/styles/aisidebar.scss` to customize:
|
||||
- Colors (uses Material Design 3 color tokens)
|
||||
- Border radius
|
||||
- Padding/margins
|
||||
- Message bubble styling
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**Sidebar doesn't appear:**
|
||||
- Restart Ignis: `ignis reload`
|
||||
- Check Ollama is running: `curl http://127.0.0.1:11434/api/tags`
|
||||
- Check console for errors: `ignis`
|
||||
|
||||
**No AI responses:**
|
||||
- Ensure Ollama is running
|
||||
- Ensure `ollama` Python package is installed in Ignis's Python environment
|
||||
- Check that you have at least one model: `ollama list`
|
||||
|
||||
**CSS not applying:**
|
||||
- Restart Ignis: `ignis reload`
|
||||
- Check SCSS compilation: Look for errors in Ignis console output
|
||||
|
||||
### Architecture
|
||||
|
||||
```
|
||||
~/.config/ignis/modules/aisidebar/
|
||||
├── __init__.py # Module exports
|
||||
├── aisidebar.py # Main RevealerWindow class
|
||||
├── chat_widget.py # Chat UI widget
|
||||
├── ollama_client.py # Ollama API wrapper
|
||||
├── conversation_manager.py # Conversation persistence
|
||||
└── data/
|
||||
└── conversations/ # Saved conversations (auto-created)
|
||||
```
|
||||
|
||||
### Visual Design
|
||||
|
||||
The AI Sidebar follows the same visual language as QuickCenter:
|
||||
- Material Design 3 color system
|
||||
- 20px border radius on container
|
||||
- Surface elevation with shadows
|
||||
- Smooth slide-in transitions
|
||||
- Translucent overlay backdrop
|
||||
|
||||
Clicking outside the sidebar will close it (same as QuickCenter behavior).
|
||||
Reference in New Issue
Block a user