@truefoundry/assistant-ui-runtime 0.1.4 → 0.1.5

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.js CHANGED
@@ -2051,10 +2051,10 @@ async function buildSnapshotBeforeTurnIndex(session, turnIndex, _concurrency = D
2051
2051
  }
2052
2052
  async function resolveGatewayBranchPreviousTurnId(session, turnIndex, orderedTurns) {
2053
2053
  if (turnIndex <= 0) {
2054
- return null;
2054
+ return "none";
2055
2055
  }
2056
2056
  const turns = orderedTurns ?? await listSessionTurnsOrdered(session);
2057
- return turns[turnIndex - 1]?.id ?? null;
2057
+ return turns[turnIndex - 1]?.id ?? "none";
2058
2058
  }
2059
2059
  async function resolveGatewayBranchPreviousTurnIdForTurn(session, turnId) {
2060
2060
  const turns = await listSessionTurnsOrdered(session);
@@ -2498,7 +2498,7 @@ function createTrueFoundryThreadListAdapter(options) {
2498
2498
  const threads = page.data.map((session) => ({
2499
2499
  status: "regular",
2500
2500
  remoteId: session.id,
2501
- title: session.title,
2501
+ title: session.title ?? void 0,
2502
2502
  lastMessageAt: new Date(session.updatedAt)
2503
2503
  }));
2504
2504
  return {
@@ -2515,7 +2515,7 @@ function createTrueFoundryThreadListAdapter(options) {
2515
2515
  return {
2516
2516
  status: "regular",
2517
2517
  remoteId: session.id,
2518
- title: session.title,
2518
+ title: session.title ?? void 0,
2519
2519
  lastMessageAt: new Date(session.updatedAt)
2520
2520
  };
2521
2521
  },
@@ -2830,10 +2830,9 @@ function bindAbort(session, abortSignal) {
2830
2830
  return onAbort;
2831
2831
  }
2832
2832
  async function* streamTurnContent(session, foldState, options, abortSignal, groupRootBaseline, onTurnIdAvailable) {
2833
- const previousTurnId = options.previousTurnId === null ? null : options.previousTurnId ?? "auto";
2834
2833
  const turn = session.prepareTurn({
2835
2834
  input: buildTurnInput(options),
2836
- ...previousTurnId !== void 0 ? { previousTurnId } : {}
2835
+ previousTurnId: options.previousTurnId ?? "auto"
2837
2836
  });
2838
2837
  const onAbort = bindAbort(session, abortSignal);
2839
2838
  if (abortSignal.aborted) {
@@ -3337,7 +3336,7 @@ function useTrueFoundryAgentMessages({
3337
3336
  snapshotRef.current.fold,
3338
3337
  {
3339
3338
  userMessage: options.userMessage,
3340
- ...options.previousTurnId !== void 0 ? { previousTurnId: options.previousTurnId } : isFirstTurnInSession ? { previousTurnId: null } : {},
3339
+ ...options.previousTurnId !== void 0 ? { previousTurnId: options.previousTurnId } : isFirstTurnInSession ? { previousTurnId: "none" } : {},
3341
3340
  ...streamHeaders
3342
3341
  },
3343
3342
  signal,