From 0ff1025bb98743d59f54ff2d5e3d4e18e4e8f334 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Thu, 6 Aug 2026 13:57:37 +0200 Subject: [PATCH] docs: update README for simplified kate plugin and GUI sidebar toggle --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 19c9db8..3977a11 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Every KDE component talks to `olliesrv` via 9P protocol using one of the availab - **ollie-gui** — Main Qt/QML GUI application with session management and chat interface - **krunner_ollie.so** — KRunner plugin for quick prompts and session management -- **ollie_kate.so** — Kate plugin with integrated chat panel and editor integration +- **ollie_kate.so** — Kate plugin with context actions and ghost text completion - **Dolphin service menus** — Right-click actions for files and directories **Note**: No system tray component exists. @@ -89,10 +89,12 @@ ollie-gui Features: - Session list with state indicators (idle, thinking, tool call) +- Collapsible sidebar (Ctrl+B to toggle) - Live chat view with auto-scroll - Inline prompt input - Real-time updates via 9P polling - Theme support (light/dark/system) +- Font customization ### KRunner @@ -108,15 +110,46 @@ Right-click any file or directory: ### Kate -Enable the "Ollie" plugin in Settings → Configure Kate → Plugins. Panel appears on the right with: +Enable the "Ollie" plugin in Settings → Configure Kate → Plugins. The plugin provides: -- Session indicator + CWD label -- **New** — create session in project/file directory -- **Ask File** — send current file path for description -- **Explain** — send selected text for explanation -- Prompt input for free-form messages -- Live-streaming chat view -- Editor integration (inline annotations, code block application, ghost text completion) +**Context menu actions** (right-click in editor): +- **Ask about file** — describe and explain the current file +- **Explain this** — explain selected code (or current line) +- **Fix this** — ask agent to fix selected code +- **Refactor this** — ask agent to refactor selected code +- **Add tests for this** — generate unit tests for selection +- **Document this** — add documentation comments to selection +- **Review Diff** — review a diff for issues (visible on Diff-highlighted documents) + +**Ghost text completion:** +- Inline AI code completions appear as faded text at end-of-line +- Triggered automatically after 500ms of cursor idle (at end-of-line only) +- Multi-line continuations shown when near EOF + +**Keyboard shortcuts:** + +| Key | Action | +|-----|--------| +| Tab | Accept ghost suggestion | +| Meta+O, N | Next suggestion | +| Meta+O, P | Previous suggestion | +| Meta+O, C | Toggle completion on/off | +| Meta+O, D | Dismiss suggestion | +| Meta+O, Tab | Request completion manually | + +**Agent management:** +- Auto-creates a "kate" session with one agent per project directory +- Auto-selects agent matching the current Kate project +- Status bar shows current agent (e.g. "● ollie: kate/abc123") + +**Configuration** (via environment variables): +- `OLLIE_COMPLETE_BACKEND` — completion backend override +- `OLLIE_COMPLETE_MODEL` — completion model override + +**Git++ integration:** +- "Ollie: Review Diff" action registered in Git++ plugin's diff context menu + +**Tip:** Tile the `ollie-gui` window alongside Kate to see the full chat stream from context actions. ## File Layout @@ -139,11 +172,8 @@ ollie-kde/ │ └── ollie_runner.h/cpp # KRunner plugin (9P-based) ├── kate/ │ ├── metadata.json # Plugin metadata -│ ├── ollie_kate.h/cpp # Kate plugin (9P-based) -│ ├── ollie_ghost.h/cpp # Ghost text provider (9P-based) -│ ├── chat_renderer.h/cpp # Chat rendering engine -│ ├── ktexteditor_utils.h # Editor utilities -│ └── diffparams.h # Diff viewer parameters +│ ├── ollie_kate.h/cpp # Kate plugin (context actions, agent mgmt) +│ └── ollie_ghost.h/cpp # Ghost text completion provider ├── dolphin/ │ ├── ollie-actions.desktop # Service menu entries (KF6) │ ├── ollie-actions-kf5.desktop # Service menu entries (KF5) @@ -155,8 +185,8 @@ ollie-kde/ ## Development Notes -- **All components use `ollie-9p` for 9P transport** -- The Kate plugin includes sophisticated editor integration with ghost text, inline annotations, and diff viewing +- **All components use `libollie9p.so` for 9P transport** (direct C library, no subprocess) +- The Kate plugin is lightweight: context actions + ghost text, no chat panel (use ollie-gui for chat) - The GUI application uses Qt Quick for a modern, responsive interface - Build system supports both KF6/Qt6 and KF5/Qt5 via CMake option `OLLIE_KF5` - Installation is user-local (`~/.local/`) by default, no system-wide installation needed @@ -174,6 +204,11 @@ ollie-kde/ - Check that `libollie9p.so` is installed in `~/.local/lib/` - Verify Kate is using the same Qt version as the plugin (Qt5 vs Qt6) +**Ghost text not appearing:** +- Ensure `olliesrv` is running and the 9P socket is accessible +- Ghost text only shows when cursor is at end-of-line +- Check Meta+O, C hasn't toggled completion off + **Dolphin actions not working:** - Ensure `ollie-ask` and `ollie-session-here` are installed in `~/.local/bin/` -- Check that the service menu desktop files are in `~/.local/share/kio/servicemenus/` \ No newline at end of file +- Check that the service menu desktop files are in `~/.local/share/kio/servicemenus/`