@raisindb/client 0.4.6 → 0.4.7

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.
package/dist/index.mjs CHANGED
@@ -3352,9 +3352,18 @@ var ConversationManager = class {
3352
3352
  async createUserMessage(conversationPath, content) {
3353
3353
  logger.debug("[ConversationManager] Creating user message", { path: conversationPath });
3354
3354
  const workspace = "raisin:access_control";
3355
+ const properties = await this.loadConversationProperties(conversationPath, workspace);
3356
+ const flowInstanceId = typeof properties?.flow_instance_id === "string" ? properties.flow_instance_id.trim() : "";
3357
+ if (flowInstanceId) {
3358
+ await this.httpRequest({
3359
+ method: "POST",
3360
+ path: `/api/flows/${this.repository}/instances/${encodeURIComponent(flowInstanceId)}/resume`,
3361
+ body: { resume_data: { message: content } }
3362
+ });
3363
+ return;
3364
+ }
3355
3365
  const { userId, userHome } = await this.ensureCurrentUser();
3356
3366
  const messageId = crypto.randomUUID();
3357
- const properties = await this.loadConversationProperties(conversationPath, workspace);
3358
3367
  const participants = Array.isArray(properties?.participants) ? properties.participants : [];
3359
3368
  let recipientId = participants.find(
3360
3369
  (p) => typeof p === "string" && p.length > 0 && p !== userId && p !== userHome