mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-22 19:56:01 +00:00
70a20f6ac7
Session titles were the truncated first prompt, so the picker filled with 'Reply with exactly: OK' and five identical 'hows esphome' rows. OpenCode background-generates a short title after the first exchange; Pulse now does the equivalent: once the done event has reached the client, the chat runtime asks the configured chat model for a <=50-char title from the first user message and reply, then renames the session. - Runs only on the first exchange; any customized title is left alone, with a re-check before persisting to lose races against a concurrent rename. Failure or timeout keeps the placeholder. - Title requests pass the model-boundary sanitizer like normal turns and record usage as assistant_session_title. - Synchronous after done (no user-visible latency, no goroutine racing service teardown), bounded at 20s for slow reasoning routes. Verified by tests end-to-end (hook through Rename); live verification on a real provider route pending while the dev backend sits in mock assistant mode, which intercepts turns before the agentic path.