Skip to content

release: integrate AI chat memory and contextual awareness#36

Merged
salmanabdurrahman merged 4 commits intomainfrom
dev
Nov 6, 2025
Merged

release: integrate AI chat memory and contextual awareness#36
salmanabdurrahman merged 4 commits intomainfrom
dev

Conversation

@salmanabdurrahman
Copy link
Collaborator

Summary

Merge the latest development updates into the main branch, delivering a more human-like AI Coach with chat memory and contextual understanding.

Highlights

  • Persistent AI chat memory with stored message history.
  • Contextual responses powered by Gemini API.
  • Improved onboarding analysis with structured JSON output.
  • Node environment configuration added to enhance deployment flexibility.
  • Fix for temporary userId handling in auth-related requests.

Impact

  • Enables contextual, multi-turn AI conversations.
  • Improves AI reliability and response consistency.
  • Prepares backend for upcoming personalization features.

Notes

Run npx prisma migrate deploy after deployment to sync schema changes.

- add ai chat history to prisma schema
- store user and model messages in aiChatHistory table
- retrieve and format chat history for gemini api
- update system prompt to include context limitations and response guidelines
- improve onboarding analysis prompt with json output and level descriptions
- add error handling for json parsing in generateJsonContent
- add node environment variable to .env.example
- load node environment variable into config
- change `req.body.userId` to `req.body?.userId` to prevent errors when userId is not provided in the request body
- apply the fix to all controllers that use the temporary userId support
feat(ai): add chat memory and context awareness to AI coach
@salmanabdurrahman salmanabdurrahman merged commit d6237b7 into main Nov 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant