Generate: stateless one-shot LLM call (prompt, system, backend, model)
Route: classify task, return best backend+model from available models
Both delegate to core backend.Generate() and backend.Route().
KDE frontends can use Route as a preprocessing step before CreateSession.
When a detached process exits, formats its output and calls
InjectSystemEvent on the agent core. Also emits ProcessExited
D-Bus signal for GUI notification.
New D-Bus methods on SessionManager:
- DetachProcess(sessionID) - detach currently running process
- ListDetached(sessionID) - list detached processes (pid/cmd/started/status)
- SignalDetached(sessionID, pid, signal) - send TERM or KILL
- GetDetachedOutput(sessionID, pid) - read ring buffer output
- DismissDetached(sessionID, pid) - remove exited process from list
New signal: ProcessDetached(sessionID) emitted on detach.
Previously every streaming token fired a separate D-Bus signal,
flooding the session bus and back-pressuring the HTTP stream reader.
New chatEmitter buffers text and flushes at most every 50ms. Log
writes remain immediate so GetChat always returns current data.
flushSync() drains the buffer before StateChanged signals.
- Add SIGHUP to signal handler for non-systemd session teardown
- Detect D-Bus session bus disconnection via conn.Context().Done()
- Checkpoint individual sessions to disk on every idle transition
- Remove checkpoint files when sessions are killed
- Rebuild visible chat log from last 8 messages on restore
On shutdown (SIGTERM/SIGINT), all active sessions are persisted to
~/.local/share/ollie/active-sessions/ as JSON files containing the
full message context, backend, model, agent, and cwd metadata.
On startup, persisted sessions are automatically restored with their
complete context window, then the persist files are cleaned up.
Copilot sessions are excluded from persistence (ephemeral).
Adds a Complete method that manages a dedicated copilot session,
sends a FIM prompt with prefix/suffix context, waits for the
result, and returns cleaned completion text. Includes unit tests
for strip helpers.