Commit Graph

11 Commits

Author SHA1 Message Date
Levi Neely bb1454f85a fix: ollie_ghost compile — stripPrefixEcho signature and forward declarations 2026-08-07 08:59:03 +02:00
Levi Neely 08ec46027e kate: replace ollie-9p complete with generate for code completions
- Build the completion prompt inline (mirrors agent/complete.go prompt)
- Call ollie-9p rdwr generate instead of ollie-9p rdwr complete
- Pass backend/model as JSON fields in the generate request
- StripCompletionNoise and stripPrefixEcho moved into C++ helpers
2026-08-07 07:37:42 +02:00
Levi Neely c1160a468a ghost: add tinted background to multi-line overlay
The overlay now draws a semi-opaque background (editor base color
tinted slightly toward highlight) so continuation lines are clearly
distinguished from the underlying document text. Re-enabled the
multi-line overlay since it's now visually distinct from real content.

- Background at 92% opacity with subtle highlight tint
- Ghost text at 60% opacity (up from 40%)
- Small padding around overlay content
2026-08-06 16:54:02 +02:00
Levi Neely d90a2e6f27 ghost: fix completion overlapping existing document text
- Don't show inline ghost note when cursor is mid-line (text exists
  after cursor) — the ghost would visually conflict with real content
- Only show multi-line overlay when cursor is near EOF, so continuation
  lines don't paint on top of existing document lines
- Tab-accept still works regardless of visual display
2026-08-06 13:49:22 +02:00
Levi Neely ce36dcde52 Update KDE README and remove D-Bus dependencies
- Rewrite README.md with accurate 9P-based architecture
- Remove all D-Bus dependencies:
  - Update dolphin/ollie-ask to use ollie-9p rdwr generate
  - Update kate/ollie_ghost.cpp to use ollie-9p rdwr complete
  - Remove QDBusInterface from ollie_ghost.h
  - Fix OllieGhostProvider constructor in ollie_kate.cpp
  - Remove D-Bus comments from gui/main.cpp and kate/ollie_kate.cpp
  - Remove QtDBus from CMakeLists.txt (KF5 and KF6)
  - Delete D-Bus test scripts test-e2e.sh and test-peers.sh
- Clarify no system tray component exists
- Update build/install instructions with just commands
2026-08-05 18:53:30 +02:00
Levi Neely d5e27f1c82 fix kate crash 2026-07-15 17:55:14 +02:00
Levi Neely 455d9c9190 kate: fix use-after-free crash in setupGhostProvider
m_ghost was parented to the view, so Qt parent-child cleanup could
destroy it when a view was replaced. The raw pointer remained non-null,
causing a double-free on the next viewChanged signal.

Fix by using QPointer<OllieGhostProvider> which auto-nulls on destroy.

Also replace qobject_cast with dynamic_cast for KF5 KTextEditor
interfaces to avoid crashes when qt_metacast accesses uninitialized
KateViewConfig during early view activation.
2026-07-15 11:06:20 +02:00
Levi Neely 5d18806ad6 kate: add KF5 preprocessor guards for InlineNote and completion APIs
KF5's KTextEditor uses interface classes (InlineNoteInterface,
CodeCompletionInterface, ConfigInterface) accessed via qobject_cast,
whereas KF6 puts these methods directly on View. Wrap the differences
with #if KTEXTEDITOR_VERSION_MAJOR >= 6 so both build paths compile.

Fixes:
- inlineNotes() return type: QVector<int> (KF5) vs QList<int> (KF6)
- paintInlineNote() signature: 2 params (KF5) vs 3 params (KF6)
- register/unregisterInlineNoteProvider via InlineNoteInterface
- isCompletionActive via CodeCompletionInterface
- configValue via ConfigInterface
2026-07-15 09:59:56 +02:00
Levi Neely 1552fce126 kate: fix crash on document close (dangling overlay pointer)
The GhostOverlay is parented to the view widget and gets destroyed by
Qt child cleanup before ~OllieGhostProvider runs. Stop calling
hideOverlay() in destructor, connect destroyed() signal to null the
pointer.
2026-07-14 14:58:40 +02:00
Levi Neely b67e82dca0 kate: fix ghost text provider, add multi-line overlay and config
- Fix parent not passed to InlineNoteProvider causing provider recreation
  on every viewChanged signal (killed debounce timer, no completions fired)
- Add view() accessor, use it in setupGhostProvider check
- Null-check focusProxy() to prevent crash during early viewChanged
- Multi-line completions: first line as inline note, continuation lines
  rendered via GhostOverlay floating widget
- Guard event filter and signal handlers against active completion popups
- Add suggestion cycling (Meta+O,N / Meta+O,P) with history
- Add Meta+O,C to toggle completions on/off with status bar indicator
- Add Meta+O,D to dismiss current suggestion
- Add Meta+O,Tab to manually trigger a completion
- Add config page for completion backend and model override
- Pass backend/model config via D-Bus Complete context parameter
2026-07-14 13:24:03 +02:00
Levi Neely 16e8fc7a75 feat: ghost-text code completion via InlineNoteProvider
Adds OllieGhostProvider that renders AI completions as translucent
gray text after the cursor. Uses the new Complete D-Bus method with
500ms debounce. Tab accepts, Escape dismisses, any edit clears.
Works on both KF5 and KF6 builds.
2026-07-14 12:30:18 +02:00