@convex-dev/agent 0.0.14-alpha.4 → 0.0.14

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.
@@ -471,6 +471,7 @@ async function getMaxMessage(
471
471
  }
472
472
 
473
473
  const addStepArgs = {
474
+ userId: v.optional(v.string()),
474
475
  threadId: v.id("threads"),
475
476
  messageId: v.id("messages"),
476
477
  step: vStepWithMessages,
@@ -515,9 +516,11 @@ async function addStepHandler(
515
516
  step,
516
517
  });
517
518
  await addMessagesHandler(ctx, {
519
+ userId: args.userId,
518
520
  threadId: args.threadId,
519
- parentMessageId: args.messageId,
520
521
  stepId,
522
+ parentMessageId: args.messageId,
523
+ agentName: parentMessage.agentName,
521
524
  messages,
522
525
  pending: step.finishReason === "stop" ? false : true,
523
526
  failPendingSteps: false,
@@ -21,11 +21,8 @@ export const schema = defineSchema({
21
21
  title: v.optional(v.string()),
22
22
  summary: v.optional(v.string()),
23
23
  status: vThreadStatus,
24
- // If this is a thread continuation, we can use this to find context from
25
- // the parent thread(s). There are multiple if the thread is a merging of
26
- // multiple threads.
27
- parentThreadIds: v.optional(v.array(v.id("threads"))),
28
24
  // DEPRECATED
25
+ parentThreadIds: v.optional(v.array(v.id("threads"))),
29
26
  order: /*DEPRECATED*/ v.optional(v.number()),
30
27
  }).index("userId", ["userId"]),
31
28
  // TODO: text search on title/ summary