Skip to content

Conversation

@MkDev11
Copy link
Contributor

@MkDev11 MkDev11 commented Jan 23, 2026

What this does

Adds conversation persistence so Dexter remembers your previous conversations when you restart the app.

The problem

When you closed Dexter and reopened it, all conversation context was lost. The agent had no memory of what you discussed before, making follow-up questions impossible.

The solution

Now conversations are automatically saved to .dexter/context/conversation.json and restored on startup.

Example:

Session 1:
> What is the capital of France?
< Paris.
[close app]

Session 2:
> What's its population?
< Paris has a population of about 2.1 million...

The agent now understands "its" refers to Paris from the previous session.

Features

  • Auto-save: Every conversation turn is saved automatically
  • Auto-load: Previous session restored on startup
  • Smart context: Includes both questions and answer summaries
  • Size limit: Keeps only the last 50 messages to prevent large files

Files changed

  • src/utils/in-memory-chat-history.ts - Added persistence (load/save)
  • src/agent/agent.ts - Include summaries in context prompt

Closes #13

- Add load() and save() methods to InMemoryChatHistory
- Persist conversation to .dexter/context/conversation.json
- Auto-save after each message is added
- Load previous session on startup via useEffect in useModelSelection
- Stores query, answer, and LLM-generated summary for each turn

Closes virattt#13
- Add load() and save() methods to InMemoryChatHistory
- Persist conversation to .dexter/context/conversation.json
- Auto-save after each message is added
- Include query summaries in context prompt for proper follow-up understanding
- Add MAX_MESSAGES limit (50) to prevent unbounded file growth
- Load previous session on startup

Closes virattt#13
@MkDev11
Copy link
Contributor Author

MkDev11 commented Jan 24, 2026

@virattt could you please review the PR and let me know your feedback?

Copy link
Owner

@virattt virattt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments. Also, I don't think Claude Code has this functionality. Is this something we absolutely need?
Screenshot 2026-01-27 at 8 37 34 AM

@MkDev11
Copy link
Contributor Author

MkDev11 commented Jan 27, 2026

Few comments. Also, I don't think Claude Code has this functionality. Is this something we absolutely need? Screenshot 2026-01-27 at 8 37 34 AM

While Claude Code doesn't have this, I think it's actually a differentiator for Dexter. Financial research often involves follow-up questions like "what about AAPL?" or "compare that to last quarter" - having context means users don't need to repeat themselves.
That said, it's lightweight and opt-in (only saves if there's conversation). wanted to offer this as a UX improvement for multi-turn workflows.

@MkDev11
Copy link
Contributor Author

MkDev11 commented Jan 27, 2026

image

@MkDev11 MkDev11 requested a review from virattt January 27, 2026 15:48
@virattt virattt added the run-ci Runs CI label Feb 6, 2026
@MkDev11
Copy link
Contributor Author

MkDev11 commented Feb 9, 2026

Hi @virattt hope you had a good weekend. could you please review the last change? I would like to complete this and continue contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Runs CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: Resume conversations

2 participants