⚠️
This feature is planned but not yet available. The information below describes the intended design.
Storing Chat History
Conversations with Claude will be preserved as part of the story’s development record, aligning with Writan’s principle that the story is a process, not a document.
Planned Design
Chat interactions will be logged in the generation layer of the relevant node. The TypeScript shape for this already exists in the schema:
{
timestamp: string,
promptSummary: string,
rulesApplied: string[],
previousProse: string,
}Why This Matters
Storing chat history serves the non-destructive editing principle. You’ll be able to trace back to understand:
- What AI assistance was used at each point
- What the text looked like before AI changes
- Which writing rules informed the generation
- The decisions made along the way
Current State
The generation.aiPrompts array exists in the node schema but is not yet populated by any code path. The generation API endpoint returns a promptSummary and usage but does not persist these to the database.