Summary
Currently session titles are set to the raw first question text (truncated at 80 chars). Instead, use a lightweight LLM call to generate a concise, descriptive title from the first question + response.
Approach
- After the first
ask() completes in wrapSession, fire a background LLM call (e.g. Haiku) with the question and response
- Generate a short title (5-10 words)
- Update the session title via
updateSessionTitle
- Title appears in sidebar after a short delay (non-blocking)
Considerations
- Adds latency and cost per new session (mitigate with a cheap/fast model)
- Should be async/non-blocking so it doesn't delay the response
- Fallback to raw question text if the LLM call fails
Priority: Low
Summary
Currently session titles are set to the raw first question text (truncated at 80 chars). Instead, use a lightweight LLM call to generate a concise, descriptive title from the first question + response.
Approach
ask()completes inwrapSession, fire a background LLM call (e.g. Haiku) with the question and responseupdateSessionTitleConsiderations
Priority: Low