Files
Lumotia/src-tauri
Jake be49bc4374 feat(auto-title): generate_title_cmd Tauri wrapper + register
Bridge LlmEngine::generate_title across the Tauri boundary. Same shape
as the existing extract_content_tags_cmd — `is_loaded` short-circuit so
the frontend can detect the "no model" case without firing a synchronous
inference, then spawn_blocking + PowerAssertion guard for the heavy work.

- src-tauri/src/commands/llm.rs: new generate_title_cmd that wraps
  `state.llm_engine.generate_title(transcript)`. Returns
  Result<String, String> — the engine's own InvalidJson / Inference /
  PromptTooLong errors are stringified at the boundary, same pattern
  as extract_content_tags_cmd at line 408.
- src-tauri/src/lib.rs: register the command in invoke_handler!,
  immediately after extract_content_tags_cmd in the LLM block.

Verified: `cargo check -p kon` passes after a `rm -rf target/.../tauri-*`
to clear stale OUT_DIR paths from the project's pre-rename location
(transcription-app used to live at ~/CORBEL-Projects/kon/). No code
behaviour change from that cleanup — Cargo just needed the cache rebuilt.

The frontend wiring follows in the next commit.
2026-04-25 19:48:10 +01:00
..