Skip to content

Optimize local LLM cleanup by keeping worker process alive - #7

Open
AbarnaaSree wants to merge 2 commits into
Blueturboguy07:mainfrom
AbarnaaSree:main
Open

AbarnaaSree wants to merge 2 commits into
Blueturboguy07:mainfrom
AbarnaaSree:main

Conversation

@AbarnaaSree

Copy link
Copy Markdown

Summary

This PR optimizes the local LLM worker lifecycle to improve performance and reduce unnecessary worker creation.

Changes

  • Reused the existing local LLM worker instead of creating a new instance repeatedly.
  • Improved worker detection logic.
  • Reduced redundant initialization overhead.
  • Updated related Tauri backend files.
  • Minor configuration updates.

Benefits

  • Faster response times.
  • Lower resource usage.
  • Improved stability of the local LLM pipeline.
  • Cleaner and more efficient worker management.

Testing

  • Built the application successfully.
  • Verified local LLM worker starts correctly.
  • Confirmed worker reuse across multiple requests.
  • No regressions observed in existing functionality.

nitrimandylis pushed a commit to nitrimandylis/WhimprFlow that referenced this pull request Sep 12, 2026
* port windows: complete the hotkey surface and pill controls

The Windows layer (cfg(target_os=windows), never compiled until now) was
missing the symbols lib.rs calls via hotkey::. Add them mirroring the
macOS surface:

- models_dir/model_path with language-aware model selection (honours
  Settings.whisper_model, otherwise picks .en variants for English and
  multilingual ggml-*.bin otherwise)
- read_openai_key/read_anthropic_key via env var or keyring
- real ui_start/ui_stop/ui_cancel/trigger_hands_free wired to the hook
  thread's on_ptt_* handlers (no more empty stubs)
- LAST_BAR + last_bar remembered in emit_bar
- make rebuild_asr pub
- fix the Windows re-export to match the macOS export list

Verified: cargo check --target x86_64-pc-windows-gnu -j1 (in src-tauri),
cargo check --workspace -j1, cargo test --workspace -j1. The Cargo.lock
is synced to the 1.0.0 version bump from ed09182.

* ci: add Windows build workflow (Phase 2)

Windows CI modeled on build-macos.yml: builds the whimpr-llm-worker
sidecar for x86_64-pc-windows-msvc, stages it into src-tauri/binaries,
runs cargo check/test across the workspace, and builds the frontend so
the Tauri app bundles. Runs on pull_request to gate the Windows port.

* fix: guard icon_as_template (macOS-only) on non-macOS

icon_as_template(true) is macOS-only in Tauri v2 and would panic at
startup on Windows. Apply the template only on macOS; other platforms
just set the full-color icon. Runtime fix identified in Phase 3.

* fix: normalize push-to-talk key to Right Control on Windows

The macOS-only PushToTalkKey concept (Fn / Globe, Right Command, Right
Option) leaked into the Windows settings UI: the default is 'fn', but
the Windows keyboard hook only implements Right Control (PTT_VK). The
setting was ignored on Windows, so the app advertised a key that did
nothing while only Right Control worked.

Normalize push_to_talk_key to RightControl on load and on save so every
reader (settings pane, onboarding, FlowBar, history) shows the key the
hook actually responds to. Fix found during the Phase 3 Windows runtime
pass (issue Blueturboguy07#7).

* fix: hide macOS-only keys and copy on Windows (issue Blueturboguy07#9)

* dev: add portable Windows dev launcher (dev.ps1) and README notes

* docs: dual-platform run instructions (macOS + Windows)

* docs: consolidate dual-platform Windows run instructions

* docs: add platform differences table to README

---------

Co-authored-by: skibkitty <272934292+skibkitty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant