@peopl-health/nexus 2.5.5-fix-message-tracking → 2.5.5-message-tracking

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,7 +88,11 @@ const addInstructionCore = async (code, instruction, role = 'user') => {
88
88
  const thread = await getThread(code);
89
89
  if (!thread) return null;
90
90
 
91
+ const provider = createProvider({ variant: process.env.VARIANT || 'assistants' });
92
+ const threadId = thread.getConversationId();
93
+
91
94
  try {
95
+ await provider.addMessage({ threadId, messages: [{ role, content: instruction }] });
92
96
  const assistant = getAssistantById(thread.getAssistantId(), thread);
93
97
  const runResult = await runAssistantWithRetries(thread, assistant, {
94
98
  additionalInstructions: instruction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "2.5.5-fix-message-tracking",
3
+ "version": "2.5.5-message-tracking",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",