ListView.positionViewAtEnd() causes freezes by forcing instantiation
of all delegates to measure total height. Flickable+Column avoids this
- contentHeight is computed directly from Column.implicitHeight
- Scroll to bottom is just contentY = contentHeight - height
- No virtualization needed with only 20 blocks
- Eliminates all positionViewAtEnd and _scrolling guard complexity
- Code blocks show plain text immediately, highlight via Timer after
150ms (prevents blocking the render thread during initial load)
- Reduced initial blocks from 40 to 20
- Detect append vs full reset in setRawText for better session switch
- Model shows last 40 blocks initially, positioned at end
- Scrolling near top triggers loadEarlier() which prepends 30 blocks
- Scroll position maintained after prepend via contentY adjustment
- All blocks still parsed (for searching later) but only tail rendered
- Reduced initial render cost significantly
With 300KB+ chat logs producing hundreds of blocks, instantiating all
delegates was causing unresponsiveness. Cap the model at the last 80
blocks and set cacheBuffer: 200 to limit off-screen rendering.
- Cache parseSubBlocks per block (only reparse when content changes)
- Cache highlightedHtml results (code+language key)
- Prevents expensive KSyntaxHighlighting and regex on every render
- Also fixes scroll loop with _scrolling guard
- ChatBlockModel::reparse() now does incremental diffs instead of
beginResetModel which destroys all delegates and resets scroll
- ListView scroll uses _scrolling guard to prevent infinite loop
from positionViewAtEnd triggering contentHeightChanged
- Loader delegate: set explicit height from item.implicitHeight so
ListView can calculate correct contentHeight for scrolling
- Prose sub-blocks: escape HTML, convert newlines to <br> before
linkifying paths (RichText ignores bare newlines)
Replace flat TextArea chat view with structured ListView:
- ChatBlockModel parses raw chat text into typed blocks (user,
assistant, reasoning, call, tool, error, info)
- Sub-blocks parsed from markdown: prose, fenced code, diffs
- Code blocks rendered with KSyntaxHighlighting (auto light/dark theme)
- Diff blocks with red/green line coloring
- Copy button on code and diff blocks
- File paths linkified and clickable (opens with xdg-open)
- Reasoning/call/tool blocks collapsible (click to expand)
- User blocks highlighted with subtle accent background
- Error blocks in red
- Scroll pinning preserved (auto-scroll when at bottom)
Replace single-line TextField/QLineEdit with multi-line TextArea/QPlainTextEdit.
Enter sends, Shift+Enter and Ctrl+J insert newlines. Max height capped so the
input area does not take over the panel.
Scan ~/.local/share/color-schemes/ in addition to /usr/share/color-schemes/
so user-installed themes (e.g. Catppuccin) are discovered. Mode is now any
scheme name rather than just system/light/dark. Settings dialog uses a
ComboBox listing all available schemes plus "System".
- Kate: add always-visible stop button next to prompt input
- All front-ends: sort sessions alphabetically by ID
- All front-ends: only auto-scroll chat if at bottom, show
floating go-to-bottom button when scrolled away
- CMakeLists: set KDE_INSTALL_PLUGINDIR to QT6_INSTALL_PLUGINS
so plugins install to lib64/qt6/plugins/ (where Kate looks)
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.
Replace KirigamiDelegates.RoundedItemDelegate (not available in all
Kirigami versions) with PlasmaComponents.ItemDelegate. Add explicit
highlightedTextColor bindings to labels and icon in the session list
delegate for both KF5 and KF6 builds.
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.
- Add Default Backend / Default Model config for chat sessions
(overrides OLLIE_BACKEND / OLLIE_MODEL env vars)
- Pass configured backend/model to CreateSession D-Bus call
- Move "Completion enabled on startup" checkbox below text fields
- Deduplicate status bar indicator when multiple views exist
- Make install target depend on build
- Remove Escape-to-dismiss (conflicts with Kate popups)
- 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
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.
- Makefile: directly install plasmoid to /usr/share instead of using
kpackagetool5 (which doesn't overwrite existing files, causing the
KF6 main.qml to persist over the KF5 version)
- olliedbusclient: fix portal FileChooser race condition by connecting
to Response signal before making the OpenFile call using a
predictable handle_token
- Remove placeholderText from QML palette block (not available in Qt5)
- Use theme.placeholderTextColor directly instead of palette.placeholderText
- Add Qt version guards for QFontDatabase static vs instance API
- Add Qt version guard for QVariant::typeId vs QVariant::type
- Link KF5::ConfigCore for ollie-gui KF5 build
Installs ollie.svg to hicolor scalable apps and org.ollie.gui.desktop
to /usr/share/applications. Sets desktopFileName so Plasma can match
the running window to the .desktop entry when pinned.
Session list with create/kill/rename, chat view, prompt input,
folder dialogs for cwd. Reuses OllieDBusClient from plasmoid plugin.
Supports both Qt5 (KF5) and Qt6 (KF6) builds.
Without -g, kpackagetool installs to the running user HOME.
Since the Makefile runs as root, the package ended up in
/root/.local/share/ instead of /usr/share/plasma/plasmoids/.
The remove+install approach could leave stale QML when the install
path changed. Using -u updates in-place, falling back to -i for
first-time installs.
plasmashell is QGuiApplication so QFileDialog (QtWidgets) cannot work.
Use org.freedesktop.portal.FileChooser.OpenFile via D-Bus instead.
Also fix StandardPaths ReferenceError in main.qml.
QML FolderDialog does not work inside the plasmoid sandbox.
Move folder selection to C++ via QFileDialog::getExistingDirectory
and expose as createSessionWithDialog(). Applies to both kf5 and kf6.
- New session button opens a FolderDialog to choose the working directory before creating the session.
- Fix chat truncation: use toUtf8().size() for offset tracking to match the server byte-based offsets. QString::size() (UTF-16 code units) caused drift on non-ASCII characters, leading to stalled output.
All synchronous QDBusInterface::call() replaced with asyncCall() +
QDBusPendingCallWatcher. Adds coalescing flags to prevent piling up
refreshSessions/fetchChat requests during rapid signal bursts.
Also removes build dependency from install targets to prevent cmake
re-running over read-only installed artifacts.