add readme and name
This commit is contained in:
parent
65e5364320
commit
048dec3e6b
4 changed files with 79 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ollama-chat"
|
name = "ollama-chat-gtk4"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
|
||||||
76
README.md
Normal file
76
README.md
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
# Minimal Ollama Gtk-4 client
|
||||||
|
|
||||||
|
A minimal, native GTK4 desktop client for Ollama with real-time streaming and markdown support.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
#### Ubuntu/Debian
|
||||||
|
```bash
|
||||||
|
sudo apt install libgtk-4-dev build-essential
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Fedora
|
||||||
|
```bash
|
||||||
|
sudo dnf install gtk4-devel gcc
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Arch Linux
|
||||||
|
```bash
|
||||||
|
sudo pacman -S gtk4 base-devel
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Configuration file is automatically created at:
|
||||||
|
- Linux: `~/.config/ollama-chat-gtk4/config.toml`
|
||||||
|
- Windows: `%APPDATA%\ollama-chat-gtk4\config.toml`
|
||||||
|
- macOS: `~/Library/Application Support/ollama-chat-gtk4/config.toml`
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Release build
|
||||||
|
cargo build --release
|
||||||
|
# or
|
||||||
|
cargo install --path . --root ~/.local
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuration Options
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[ui]
|
||||||
|
window_font_size = 16
|
||||||
|
chat_font_size = 18
|
||||||
|
input_font_size = 16
|
||||||
|
code_font_family = "BlexMono Nerd Font Mono"
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
chat_background = "#ffffff"
|
||||||
|
code_background = "#f5f5f5"
|
||||||
|
window_background = "#fafafa"
|
||||||
|
primary_text = "#333333"
|
||||||
|
code_text = "#d63384"
|
||||||
|
link_text = "#0066cc"
|
||||||
|
think_text = "#6666cc"
|
||||||
|
send_button = "#007bff"
|
||||||
|
stop_button = "#dc3545"
|
||||||
|
|
||||||
|
[ollama]
|
||||||
|
url = "http://localhost:11434"
|
||||||
|
timeout_seconds = 120
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Release build
|
||||||
|
cargo build --release
|
||||||
|
# or
|
||||||
|
cargo install --path . --root ~/.local
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
MIT licence
|
||||||
|
|
@ -124,7 +124,7 @@ impl Config {
|
||||||
fn get_config_path() -> Result<PathBuf, Box<dyn std::error::Error>> {
|
fn get_config_path() -> Result<PathBuf, Box<dyn std::error::Error>> {
|
||||||
let config_dir = dirs::config_dir()
|
let config_dir = dirs::config_dir()
|
||||||
.ok_or("Could not determine config directory")?
|
.ok_or("Could not determine config directory")?
|
||||||
.join("ollama-chat");
|
.join("ollama-chat-gtk4");
|
||||||
|
|
||||||
Ok(config_dir.join("config.toml"))
|
Ok(config_dir.join("config.toml"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ mod markdown_renderer;
|
||||||
mod ui;
|
mod ui;
|
||||||
mod config;
|
mod config;
|
||||||
|
|
||||||
const APP_ID: &str = "com.example.ollama-chat";
|
const APP_ID: &str = "com.example.ollama-chat-gtk4";
|
||||||
|
|
||||||
fn main() -> glib::ExitCode {
|
fn main() -> glib::ExitCode {
|
||||||
let app = Application::builder().application_id(APP_ID).build();
|
let app = Application::builder().application_id(APP_ID).build();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue