nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Feature] Auto-Title for /export Filenames

Open akramcodez opened this issue 3 months ago • 2 comments

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 /export is 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 .md extension (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.

akramcodez avatar Aug 24 '26 09:08 akramcodez

hey @akramcodez can you assign this issue to me i want to work on this issue ?

tusharui avatar Aug 25 '26 09:08 tusharui

sure @tusharui 👍

akramcodez avatar Aug 25 '26 09:08 akramcodez