@ottocode/web-sdk 0.1.250 → 0.1.251
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/components/index.js +9 -18
- package/dist/components/index.js.map +5 -5
- package/dist/components/messages/AssistantMessageGroup.d.ts.map +1 -1
- package/dist/components/messages/MessagePartItem.d.ts.map +1 -1
- package/dist/hooks/index.js +7 -16
- package/dist/hooks/index.js.map +3 -3
- package/dist/hooks/useSessionStream.d.ts.map +1 -1
- package/dist/index.js +9 -18
- package/dist/index.js.map +5 -5
- package/package.json +3 -3
package/dist/components/index.js
CHANGED
|
@@ -11739,7 +11739,7 @@ var MessagePartItem = memo8(function MessagePartItem2({
|
|
|
11739
11739
|
]
|
|
11740
11740
|
});
|
|
11741
11741
|
}, (prevProps, nextProps) => {
|
|
11742
|
-
return prevProps.part.id === nextProps.part.id && prevProps.part.content === nextProps.part.content && prevProps.part.
|
|
11742
|
+
return prevProps.part.id === nextProps.part.id && prevProps.part.content === nextProps.part.content && prevProps.part.ephemeral === nextProps.part.ephemeral && prevProps.part.completedAt === nextProps.part.completedAt && prevProps.showLine === nextProps.showLine && prevProps.isLastToolCall === nextProps.isLastToolCall && prevProps.isLastProgressUpdate === nextProps.isLastProgressUpdate && prevProps.compact === nextProps.compact && prevProps.onNavigateToSession === nextProps.onNavigateToSession && prevProps.pendingApproval?.callId === nextProps.pendingApproval?.callId && prevProps.onApprove === nextProps.onApprove && prevProps.onReject === nextProps.onReject;
|
|
11743
11743
|
});
|
|
11744
11744
|
|
|
11745
11745
|
// src/components/messages/CompactActivityGroup.tsx
|
|
@@ -13389,7 +13389,7 @@ var AssistantMessageGroup = memo9(function AssistantMessageGroup2({
|
|
|
13389
13389
|
for (let i = 0;i < prevParts.length; i++) {
|
|
13390
13390
|
const prevPart = prevParts[i];
|
|
13391
13391
|
const nextPart = nextParts[i];
|
|
13392
|
-
if (prevPart.id !== nextPart.id || prevPart.index !== nextPart.index || prevPart.stepIndex !== nextPart.stepIndex || prevPart.type !== nextPart.type || prevPart.content !== nextPart.content || prevPart.
|
|
13392
|
+
if (prevPart.id !== nextPart.id || prevPart.index !== nextPart.index || prevPart.stepIndex !== nextPart.stepIndex || prevPart.type !== nextPart.type || prevPart.content !== nextPart.content || prevPart.toolName !== nextPart.toolName || prevPart.toolCallId !== nextPart.toolCallId || prevPart.ephemeral !== nextPart.ephemeral || prevPart.completedAt !== nextPart.completedAt || prevPart.startedAt !== nextPart.startedAt) {
|
|
13393
13393
|
return false;
|
|
13394
13394
|
}
|
|
13395
13395
|
}
|
|
@@ -15283,27 +15283,18 @@ function useSessionStream(sessionId, enabled = true) {
|
|
|
15283
15283
|
return typeof payload?.outputTextDelta === "string" ? payload.outputTextDelta : null;
|
|
15284
15284
|
};
|
|
15285
15285
|
const getOptimisticPartIndex = (parts, stepIndex) => {
|
|
15286
|
+
const appendIndex = (() => {
|
|
15287
|
+
const indexes = parts.map((part) => part.index).filter((index) => Number.isFinite(index));
|
|
15288
|
+
return indexes.length > 0 ? Math.max(...indexes) + 0.001 : 0;
|
|
15289
|
+
})();
|
|
15286
15290
|
if (typeof stepIndex !== "number") {
|
|
15287
|
-
return
|
|
15291
|
+
return appendIndex;
|
|
15288
15292
|
}
|
|
15289
15293
|
const sameStepIndexes = parts.filter((part) => part.stepIndex === stepIndex).map((part) => part.index).filter((index) => Number.isFinite(index));
|
|
15290
15294
|
if (sameStepIndexes.length > 0) {
|
|
15291
15295
|
return Math.max(...sameStepIndexes) + 0.001;
|
|
15292
15296
|
}
|
|
15293
|
-
|
|
15294
|
-
const nextStepIndexes = parts.filter((part) => typeof part.stepIndex === "number" && part.stepIndex > stepIndex).map((part) => part.index).filter((index) => Number.isFinite(index));
|
|
15295
|
-
const lowerBound = previousStepIndexes.length > 0 ? Math.max(...previousStepIndexes) : null;
|
|
15296
|
-
const upperBound = nextStepIndexes.length > 0 ? Math.min(...nextStepIndexes) : null;
|
|
15297
|
-
if (lowerBound !== null && upperBound !== null) {
|
|
15298
|
-
return (lowerBound + upperBound) / 2;
|
|
15299
|
-
}
|
|
15300
|
-
if (lowerBound !== null) {
|
|
15301
|
-
return lowerBound + 1;
|
|
15302
|
-
}
|
|
15303
|
-
if (upperBound !== null) {
|
|
15304
|
-
return upperBound - 1;
|
|
15305
|
-
}
|
|
15306
|
-
return parts.length;
|
|
15297
|
+
return appendIndex;
|
|
15307
15298
|
};
|
|
15308
15299
|
const applyReasoningDelta = (payload) => {
|
|
15309
15300
|
const messageId = typeof payload?.messageId === "string" ? payload.messageId : null;
|
|
@@ -27240,4 +27231,4 @@ export {
|
|
|
27240
27231
|
AssistantMessageGroup
|
|
27241
27232
|
};
|
|
27242
27233
|
|
|
27243
|
-
//# debugId=
|
|
27234
|
+
//# debugId=AE3289CF6659083164756E2164756E21
|