nanocoder
nanocoder copied to clipboard
[Feature] Auto-Title for /export Filenames
Description
Automatically generate a descriptive filename when exporting a session via /export, rather than defaulting to a generic timestamp-based filename.
Use Case
When users export multiple sessions, filenames like session-1623491.md make it impossible to tell what the file contains without opening it.
Proposed Solution
- When
/exportis run without a specified filename, take the first 3-4 words of the user's initial prompt in that session. - Sanitize the string (replace spaces with hyphens, remove special characters) and append the timestamp or
.mdextension (e.g.,setup-react-router.md).
Alternatives Considered
- Asking an LLM to generate the title. This is too slow and wastes tokens for a simple export command.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] This feature aligns with the project's goals (local-first AI assistance)
Implementation Notes (optional)
- Update
source/commands/export.tsx. - Use a simple regex to grab the first few alphanumeric words of
messages[0].content.
hey @akramcodez can you assign this issue to me i want to work on this issue ?
sure @tusharui 👍