The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling and reframing distorted thinking when you've been thinking this way your whole life. The CDJ can help with that 🧠✨ -- v2 is in development!
This PR refactors update operations in controllers/entry into separate functions and moves them to a new file /models/services/entry/entry.ts. It also adds unit tests for the update service functions.
This PR also refactors EntryAnalysis.getAnalysisContent and EntryChat.getChatContent by moving them from their model files and into a new service file, /models/services/CdGpt.ts, which will act as the interface with the LLM. Unit tests were moved from the models into a new test file for /models/services/CdGpt.ts.
This PR refactors update operations in controllers/entry into separate functions and moves them to a new file /models/services/entry/entry.ts. It also adds unit tests for the update service functions.
This PR also refactors EntryAnalysis.getAnalysisContent and EntryChat.getChatContent by moving them from their model files and into a new service file, /models/services/CdGpt.ts, which will act as the interface with the LLM. Unit tests were moved from the models into a new test file for /models/services/CdGpt.ts.