{"id":31767975,"url":"https://github.com/n-engine/geany-ai-chat","last_synced_at":"2026-06-12T05:31:13.895Z","repository":{"id":314161593,"uuid":"1054429638","full_name":"n-engine/geany-ai-chat","owner":"n-engine","description":"Geany plugin for AI-powered chat functionality. The plugin allows users to interact with an AI chatbot using emojis and text input.","archived":false,"fork":false,"pushed_at":"2025-11-25T22:32:09.000Z","size":200,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-29T02:53:53.860Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n-engine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING-codex.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-10T20:28:27.000Z","updated_at":"2025-11-25T22:23:42.000Z","dependencies_parsed_at":"2025-09-11T00:28:08.139Z","dependency_job_id":"caa503ab-d237-45f8-86b0-843268767a2d","html_url":"https://github.com/n-engine/geany-ai-chat","commit_stats":null,"previous_names":["n-engine/geany-ai-chat"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/n-engine/geany-ai-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-engine%2Fgeany-ai-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-engine%2Fgeany-ai-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-engine%2Fgeany-ai-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-engine%2Fgeany-ai-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n-engine","download_url":"https://codeload.github.com/n-engine/geany-ai-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-engine%2Fgeany-ai-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34231214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T01:50:36.401Z","updated_at":"2026-06-12T05:31:13.866Z","avatar_url":"https://github.com/n-engine.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI](https://github.com/n-engine/geany-ai-chat/actions/workflows/ci.yml/badge.svg?branch=main)\n![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)\n![Release](https://img.shields.io/github/v/release/n-engine/geany-ai-chat?display_name=tag)\n![Geany AI Chat](docs/screenshot.png)\n\n# AI Chat (Geany Plugin)\n\n\u003e Local AI chat inside Geany — streaming responses, send editor selection, stop, pretty code blocks (GtkSourceView), copy/insert into editor.\n\n**Author:** GPT-5 Thinking (ChatGPT)  \n**License:** MIT\n\n**Languages:** [English](#english) · [Français](#français)\n\n---\n\n## English\n\n### ✨ Features\n- Chat pane in Geany's Message Window (bottom panel)\n- **Streaming** replies (Ollama JSON-lines / OpenAI-compatible SSE)\n- **Append editor selection** to the input box\n- **Stop** ongoing generation\n- Markdown **```fences```** with **syntax highlighting** (GtkSourceView)\n- Heuristic language detection when fence lacks a `lang` hint\n- Per-block **Copy** and **Insert into editor**\n- **Copy all** preserves fenced code languages (```lang)\n- **Clickable links** in messages (Markdown `[text](url)` and bare URLs)\n- Visual **blockquotes** (`\u003e`) with styling\n- **Auto-scroll** during streaming\n- Basic on-disk **preferences** (URL, model, temperature, streaming, API key)\n- Light/Dark theme toggle (scoped to chat pane)\n- **Model dropdown** with auto-fetch from API (+ manual entry)\n- **System prompt presets**: create, rename, delete, and switch between saved prompts\n- **Backend presets**: save and quickly switch between API configurations (URL, model, temperature, API key)\n- **Export conversation** to Markdown file\n- **Network settings**: configurable timeout and HTTP proxy\n- **Links toggle**: enable/disable clickable URLs in messages\n- **Keyboard shortcuts**: Enter to send, Escape to stop, Ctrl+Shift+C to copy all\n\n---\n\n### 📦 Dependencies (Debian/Ubuntu)\n```bash\nsudo apt update\nsudo apt install -y   build-essential pkg-config   libgtk-3-dev libcurl4-openssl-dev   libgeany-dev libgtksourceview-3.0-dev\n# Optional runtime:\n#   ollama  (for local models)\n```\n\u003e If your distro ships GtkSourceView 4, use `libgtksourceview-4-dev` and replace `gtksourceview-3.0` with `gtksourceview-4` in the Makefile.\n\n---\n\n### 🛠️ Build \u0026 Install\n```bash\nmake\nmake install   # installs ai_chat.so to ~/.config/geany/plugins/\n```\nSystem-wide (path may vary by distro):\n```bash\nsudo mkdir -p /usr/lib/x86_64-linux-gnu/geany\nsudo cp ai_chat.so /usr/lib/x86_64-linux-gnu/geany/\n# or sometimes:\n# sudo cp ai_chat.so /usr/lib/geany/\n```\n\n---\n\n### 🚀 Use\n1. Open Geany → **Tools → Plugin Manager** → enable **AI Chat (pro)**.  \n2. Open the **Chat IA** tab in the bottom panel.  \n3. Configure:\n   - **Backend:** *Ollama* or *OpenAI-compatible*\n   - **Base URL:** e.g. `http://127.0.0.1:11434` (Ollama) or your API host\n   - **Model:** select from dropdown (click **↻** to refresh) or type manually\n   - **Temperature, Streaming, API Key** (if needed)\n4. Type your message and press **Enter** to send (**Shift+Enter** for newline).\n5. Use **Send selection** to append the current editor selection into the input box.\n6. Use **Context…** to manage system prompts:\n   - Select a preset or \"(Custom)\"\n   - **+** to create a new preset from current text\n   - **−** to delete, **✎** to rename\n7. In replies:\n   - Code blocks have **Copy** \u0026 **Insert into editor** buttons.\n8. **Stop** cancels the current request. **Reset history** clears memory (system prompt remains).\n\n---\n\n### ⚙️ Configuration\nA config file is stored at:\n```\n~/.config/geany/ai_chat.conf\n```\nIt keeps: backend, base URL, model, temperature, streaming flag, API key, dark theme, current system prompt, and all saved presets.\n\n---\n\n### 🩺 Troubleshooting\n- **Plugin doesn’t show up**\n  - Verify `ai_chat.so` is in `~/.config/geany/plugins/` (or the system plugin dir).\n  - Make sure `libgeany-dev` and Geany (GTK3) are installed for your version.\n- **“requires executable stack” linker warning**\n  - The build uses hardening flags (`-Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now`).\n- **Clicks in the chat try to open a file in Geany**\n  - The chat UI swallows those events; if you still see “File not found”, ensure you’re on the latest build.\n- **Weird escape sequences in replies (e.g., `\\u003e`, `\\\"`)**\n  - Handled: JSON strings are fully un-escaped in the stream.\n- **HTTP errors**\n  - Now include error codes and curl messages; check Base URL / model and credentials.\n  - Switching API or model resets history to avoid mixed contexts.\n\n---\n\n### 🔐 Notes\n- Requests are sent to your configured endpoint (local Ollama or remote API).\n- No telemetry, no background network activity beyond your explicit prompts.\n\n---\n\n### 🗺️ Roadmap\n- Project folder as knowledge base (RAG)\n- Link hover style  \n\n---\n\n### 🤝 Contributing\nPRs welcome! Please include:\n- OS/distro, Geany version, GtkSourceView version (3 or 4)\n- Steps to reproduce issues\n- Minimal patches (keep GTK main-loop thread safety via `g_idle_add`)\n\n---\n\n### 📜 License\nMIT — see `LICENSE`.\n\n---\n\n## Français\n\n### ✨ Fonctionnalités\n- Onglet de chat dans la **fenêtre de messages** de Geany (panneau bas)\n- Réponses en **streaming** (JSON-lines Ollama / SSE OpenAI-compatible)\n- **Ajouter la sélection** de l'éditeur dans la zone de saisie\n- **Stop** pour annuler la génération\n- **Blocs ```code```** avec **coloration syntaxique** (GtkSourceView)\n- Détection heuristique du langage quand la fence n'indique pas `lang`\n- Boutons par bloc : **Copier** \u0026 **Insérer dans l'éditeur**\n- **Copier tout** préserve la langue des fences (```lang)\n- **Liens cliquables** dans les messages (Markdown `[texte](url)` et URLs simples)\n- **Blockquotes** (`\u003e`) avec style visuel\n- **Auto-scroll** pendant le stream\n- **Préférences** sur disque (URL, modèle, température, streaming, clé)\n- Bascule thème clair/sombre (portée à l'onglet de chat)\n- **Liste déroulante des modèles** avec récupération depuis l'API (+ saisie manuelle)\n- **Presets de prompts système** : créer, renommer, supprimer et basculer entre prompts sauvegardés\n- **Presets de backends** : sauvegarder et basculer rapidement entre configurations API (URL, modèle, température, clé)\n- **Export de conversation** en fichier Markdown\n- **Paramètres réseau** : timeout et proxy HTTP configurables\n- **Toggle liens** : activer/désactiver les URLs cliquables\n- **Raccourcis clavier** : Entrée pour envoyer, Escape pour arrêter, Ctrl+Shift+C pour tout copier\n\n---\n\n### 📦 Dépendances (Debian/Ubuntu)\n```bash\nsudo apt update\nsudo apt install -y   build-essential pkg-config   libgtk-3-dev libcurl4-openssl-dev   libgeany-dev libgtksourceview-3.0-dev\n# Optionnel à l’exécution :\n#   ollama  (pour modèles locaux)\n```\n\u003e Si votre distribution fournit GtkSourceView 4, utilisez `libgtksourceview-4-dev` et remplacez `gtksourceview-3.0` par `gtksourceview-4` dans le Makefile.\n\n---\n\n### 🛠️ Compilation \u0026 Installation\n```bash\nmake\nmake install   # installe ai_chat.so dans ~/.config/geany/plugins/\n```\nInstallation système (le chemin peut varier) :\n```bash\nsudo mkdir -p /usr/lib/x86_64-linux-gnu/geany\nsudo cp ai_chat.so /usr/lib/x86_64-linux-gnu/geany/\n# ou parfois :\n# sudo cp ai_chat.so /usr/lib/geany/\n```\n\n---\n\n### 🚀 Utilisation\n1. Ouvrir Geany → **Outils → Gestionnaire de plugins** → activer **AI Chat (pro)**.  \n2. Ouvrir l’onglet **Chat IA** (panneau du bas).  \n3. Paramétrer :\n   - **Backend** : *Ollama* ou *OpenAI-compatible*\n   - **URL** : ex. `http://127.0.0.1:11434` (Ollama) ou votre API\n   - **Modèle** : sélectionner dans la liste (clic **↻** pour rafraîchir) ou saisir manuellement\n   - **Température, Streaming, Clé API** (si besoin)\n4. Saisir le message, **Entrée** pour envoyer (**Shift+Entrée** pour retour à la ligne).\n5. **Envoyer sélection** ajoute la sélection de l'éditeur à la zone de saisie.\n6. Bouton **Contexte…** pour gérer les prompts système :\n   - Sélectionner un preset ou \"(Personnalisé)\"\n   - **+** pour créer un nouveau preset à partir du texte actuel\n   - **−** pour supprimer, **✎** pour renommer\n7. Dans les réponses :\n   - Les blocs de code ont **Copier** \u0026 **Insérer dans l’éditeur**.\n8. **Stop** annule la requête en cours, **Réinit. histo** vide l’historique (le contexte système reste).\n\n---\n\n### ⚙️ Configuration\nFichier :\n```\n~/.config/geany/ai_chat.conf\n```\nContient : backend, URL, modèle, température, streaming, clé API, thème sombre, prompt système actuel et tous les presets sauvegardés.\n\n---\n\n### 🩺 Dépannage\n- **Le plugin n’apparaît pas**\n  - Vérifiez `~/.config/geany/plugins/ai_chat.so` (ou le répertoire système).\n  - Assurez-vous que `libgeany-dev` et Geany (GTK3) sont installés pour votre version.\n- **Avertissement “executable stack”**\n  - Le link inclut `-Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now`.\n- **Cliquer dans le chat ouvre “Fichier non trouvé”**\n  - Les clics sont neutralisés dans notre onglet ; mettez à jour si besoin.\n- **Séquences d’échappement visibles (`\\u003e`, `\\\"`)**\n  - Géré : les chaînes JSON sont dés-échappées pendant le stream.\n- **Erreurs HTTP**\n  - Désormais avec codes et messages; vérifiez URL / modèle et clés.\n  - Le changement d’API ou de modèle réinitialise l’historique pour éviter les contextes mélangés.\n\n---\n\n### 🔐 Notes\n- Les requêtes partent vers l’endpoint configuré (Ollama local ou API distante).\n- Aucune télémétrie, pas d’activité réseau hors envoi explicite.\n\n---\n\n### 🗺️ Feuille de route\n- Dossier projet comme base de connaissances (RAG)\n- Style de survol des liens  \n\n---\n\n### 🤝 Contribuer\nPRs bienvenues ! Merci d’indiquer :\n- OS/distro, version de Geany, version GtkSourceView (3 ou 4)\n- Étapes de reproduction\n- Patches minimalistes (respect des mises à jour UI via `g_idle_add`)\n\n---\n\n### 📜 Licence\nMIT — voir `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-engine%2Fgeany-ai-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn-engine%2Fgeany-ai-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-engine%2Fgeany-ai-chat/lists"}