Repository navigation
feat: window placement, Wayland, vision, voice approvals, wake word, signing and model uninstall - #37
Merged
Merged
Conversation
window_control gains move (x, y), resize (width, height) and snap (left, right, top, bottom, the four corners, or center). Coordinates are relative to the usable area of the window's screen (without the taskbar or menu bar), and placements stay inside it with a 200 px minimum size, so a window can't end up off screen. - Windows uses SetWindowPos with the monitor's work area. - macOS uses System Events, below the menu bar. - Linux uses wmctrl -e with the desktop's work area.
window_control on Linux used wmctrl, which only works on X11. On a Wayland session it now talks to the compositor: - Sway uses swaymsg (minimize moves to the scratchpad). - Hyprland uses hyprctl (minimize uses a special workspace, since Hyprland has none). - KDE Plasma uses kdotool. Move, resize and snap use the focused screen's area. GNOME doesn't let apps control other windows, so the tool says so, and it names the tool to install when one is missing.
The agent could take a screenshot but only got its file path back. Now: - screenshot takes look=true and also returns the screen as a base64 JPEG of at most 1280 px a side (Pillow is already in the server and desktop extras). - After each round of tools, the orchestrator shows the model any images the tools returned, as one user message, since tool messages can't carry images in most chat APIs. - Agent and developer mode tell the agent whether the model can see images (Ollama's vision capability), so a text-only model gets only the text.
The desktop app sizes its default model by memory, which gives qwen3.5:4b on 16 GB machines, and small models often miss or garble tool calls. Agent mode now recommends a better model: - GET /v1/agent-model picks the largest installed model of 7B or more that fits in memory. Otherwise it suggests qwen3.5:9b from 12 GB (qwen3.5:4b from 8 GB, with a warning), and says when the computer has too little memory. - With Agent mode on and a model under 7B, the chat input shows the suggestion with one click: Use it if it's installed, or Download and use it. - Cloud and custom models with no size in their name aren't flagged.
During a hands-free turn, an approval was the one step that still needed
the mouse. Now Locus also reads the step aloud ("Locus wants to set the
volume to 30%. Should I go ahead? Say yes or no.") and listens for the
answer:
- Yes, okay, go ahead or allow approves; no, don't, stop or cancel
denies. An unclear answer ("yes no wait") falls back to the buttons.
- Commands and code (run-level steps) are read out but always need a
click, so nothing risky runs on a misheard word.
- The on-screen buttons keep working the whole time.
Adds speakAndWait() to the TTS store, which resolves when playback ends.
Hands-free voice needed the shortcut to start. With Say "Hey Locus" on (Settings > Speech, under Hands-free voice), saying "Hey Locus" starts listening, and "Hey Locus, mute the sound" sends the command straight away. There's no separate wake-word model: - A segmenter finds short bursts of speech against a noise floor that follows quiet moments. - Only bursts of 0.3-3.5 s are transcribed, by the local faster-whisper backend, and checked for the name. Common mishearings like "Lokus" and "Hey Lotus" count; "the locus of control" doesn't. - It refuses to run with a cloud speech backend, so audio never leaves the computer. - It pauses while Locus is listening, answering or speaking. It's off by default, and the microphone stays on while it's on.
macOS signing and notarization were already wired to the APPLE_* secrets, but Windows installers were always unsigned, so SmartScreen warned on first launch. A new "Configure Windows signing" step supports either: - a code-signing certificate (WINDOWS_CERTIFICATE, base64 .pfx, and WINDOWS_CERTIFICATE_PASSWORD), imported for the build and used by thumbprint with SHA-256 and a DigiCert timestamp, or - Azure Trusted Signing (AZURE_* secrets and variables) through trusted-signing-cli as Tauri's signCommand. It adds the setting to tauri.release.conf.json. With neither set, it warns on release tags and builds unsigned, as before. The release checklist documents every secret for Windows and macOS.
Models could only be removed with a hidden, unconfirmed trash icon in
the model picker. Settings listed them by calling Ollama's port
directly, which fails on a custom host.
- Settings > Models lists installed models with their sizes and an In
use badge. Uninstall asks inline ("Uninstall and free 6.6 GB?")
first, then reports the space freed. If chat was using the model, it
switches to another installed chat model, or says to download one.
- The model picker's bin is visible now and needs a second click to
confirm. Errors show instead of being swallowed.
- GET /v1/models/installed lists models through the server, with
sizes, parameter counts and which one Locus started with.
- DELETE /v1/models/{name} now returns freed_bytes and was_default,
gives a 404 for a model that isn't installed, and clears the cached
vision capability. The size lookup is best-effort, so it can't block
an uninstall.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fills the gaps left after 1.0.8, and adds model uninstall. Each part is its own commit.
Desktop control
window_controlgainsmove,resizeandsnap(halves, quarters, center). Positions are relative to the screen's usable area, windows stay on screen, and the minimum size is 200 px. Windows usesSetWindowPos, macOS uses System Events, and Linux useswmctrl -e.swaymsg.hyprctl.kdotool.screenshottakeslook=trueand returns a JPEG of at most 1280 px. After each round of tools, the orchestrator adds tool images as one user message. Agent and developer mode send them only when the model has Ollama'svisioncapability.Models
GET /v1/agent-modelsuggests the largest installed model of 7B or more that fits in memory. Otherwise it suggestsqwen3.5:9bfrom 12 GB, orqwen3.5:4bfrom 8 GB with a warning. With Agent mode on and a model under 7B, the chat input offers Use or Download and use.GET /v1/models/installedis new.DELETE /v1/models/{name}now returnsfreed_bytesandwas_default, gives a 404 for a model that isn't installed, and clears the cached vision capability. Its size lookup is best-effort.Voice
faster-whisperbackend. It refuses to run with cloud speech backends and pauses while Locus is busy. "Hey Locus, mute the sound" sends the command directly.Release
desktop.ymlsigns Windows installers with either a .pfx (WINDOWS_CERTIFICATEandWINDOWS_CERTIFICATE_PASSWORD) or Azure Trusted Signing (AZURE_*). With neither, it builds unsigned and warns on tags, as before. macOS signing was already wired to theAPPLE_*secrets.docs/development/release-checklist.mdlists every secret.Things a reviewer should know
How was this tested?
screenshot look=true/v1/agent-modeltests/server/test_uninstall_models.py, against a fake Ollamatsc -bis clean.main, mostly because thelocus_rustextension isn't installed locally. The exception istest_tool_timeout.py::test_repeated_timeouts_use_bounded_workers, which depends on test order and passes alone.qwen3.5:9b, which reportstoolsandvisioncapabilitiesChecklist
uv run pytest tests/ -v): new and changed suites pass; remaining failures also fail onmainruff checkon changed files)