@assistant-ui/react 0.5.72 → 0.5.74
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/{chunk-5KIEXJRK.js → chunk-KVXP3Q6K.js} +60 -21
- package/dist/chunk-KVXP3Q6K.js.map +1 -0
- package/dist/{chunk-DC342I2Q.mjs → chunk-SNNYBBO6.mjs} +57 -18
- package/dist/chunk-SNNYBBO6.mjs.map +1 -0
- package/dist/{edge-DRioHVD9.d.mts → edge-rTP-G718.d.mts} +17 -6
- package/dist/{edge-DRioHVD9.d.ts → edge-rTP-G718.d.ts} +17 -6
- package/dist/edge.d.mts +9 -2
- package/dist/edge.d.ts +9 -2
- package/dist/edge.js +56 -17
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +56 -17
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +81 -24
- package/dist/index.d.ts +81 -24
- package/dist/index.js +275 -202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +461 -388
- package/dist/index.mjs.map +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/tailwindcss/thread.css +1 -1
- package/package.json +4 -4
- package/dist/chunk-5KIEXJRK.js.map +0 -1
- package/dist/chunk-DC342I2Q.mjs.map +0 -1
package/dist/index.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
var
|
12
|
+
var _chunkKVXP3Q6Kjs = require('./chunk-KVXP3Q6K.js');
|
13
13
|
|
14
14
|
|
15
15
|
var _chunkPZ5AY32Cjs = require('./chunk-PZ5AY32C.js');
|
@@ -672,12 +672,7 @@ var useBranchPickerCount = () => {
|
|
672
672
|
|
673
673
|
var useBranchPickerNext = () => {
|
674
674
|
const messageRuntime = useMessageRuntime();
|
675
|
-
const
|
676
|
-
const editComposerStore = useEditComposerStore();
|
677
|
-
const disabled = useCombinedStore(
|
678
|
-
[messageStore, editComposerStore],
|
679
|
-
(m, c) => c.isEditing || m.branchNumber >= m.branchCount
|
680
|
-
);
|
675
|
+
const disabled = useMessage((m) => m.branchNumber >= m.branchCount);
|
681
676
|
const callback = _react.useCallback.call(void 0, () => {
|
682
677
|
messageRuntime.switchToBranch({ position: "next" });
|
683
678
|
}, [messageRuntime]);
|
@@ -695,12 +690,7 @@ var useBranchPickerNumber = () => {
|
|
695
690
|
|
696
691
|
var useBranchPickerPrevious = () => {
|
697
692
|
const messageRuntime = useMessageRuntime();
|
698
|
-
const
|
699
|
-
const editComposerStore = useEditComposerStore();
|
700
|
-
const disabled = useCombinedStore(
|
701
|
-
[messageStore, editComposerStore],
|
702
|
-
(m, c) => c.isEditing || m.branchNumber <= 1
|
703
|
-
);
|
693
|
+
const disabled = useMessage((m) => m.branchNumber <= 1);
|
704
694
|
const callback = _react.useCallback.call(void 0, () => {
|
705
695
|
messageRuntime.switchToBranch({ position: "previous" });
|
706
696
|
}, [messageRuntime]);
|
@@ -1238,6 +1228,119 @@ var AssistantModalPrimitiveAnchor = _react.forwardRef.call(void 0,
|
|
1238
1228
|
);
|
1239
1229
|
AssistantModalPrimitiveAnchor.displayName = "AssistantModalPrimitive.Anchor";
|
1240
1230
|
|
1231
|
+
// src/primitives/attachment/index.ts
|
1232
|
+
var attachment_exports = {};
|
1233
|
+
_chunkPZ5AY32Cjs.__export.call(void 0, attachment_exports, {
|
1234
|
+
Name: () => AttachmentPrimitiveName,
|
1235
|
+
Remove: () => AttachmentPrimitiveRemove,
|
1236
|
+
Root: () => AttachmentPrimitiveRoot,
|
1237
|
+
unstable_Thumb: () => AttachmentPrimitiveThumb
|
1238
|
+
});
|
1239
|
+
|
1240
|
+
// src/primitives/attachment/AttachmentRoot.tsx
|
1241
|
+
|
1242
|
+
|
1243
|
+
|
1244
|
+
var AttachmentPrimitiveRoot = _react.forwardRef.call(void 0, (props, ref) => {
|
1245
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactprimitive.Primitive.div, { ...props, ref });
|
1246
|
+
});
|
1247
|
+
AttachmentPrimitiveRoot.displayName = "AttachmentPrimitive.Root";
|
1248
|
+
|
1249
|
+
// src/primitives/attachment/AttachmentThumb.tsx
|
1250
|
+
|
1251
|
+
|
1252
|
+
// src/context/react/AttachmentContext.ts
|
1253
|
+
|
1254
|
+
var AttachmentContext = _react.createContext.call(void 0,
|
1255
|
+
null
|
1256
|
+
);
|
1257
|
+
function useAttachmentContext(options) {
|
1258
|
+
const context = _react.useContext.call(void 0, AttachmentContext);
|
1259
|
+
if (!_optionalChain([options, 'optionalAccess', _15 => _15.optional]) && !context)
|
1260
|
+
throw new Error(
|
1261
|
+
"This component must be used within a ComposerPrimitive.Attachments or MessagePrimitive.Attachments component."
|
1262
|
+
);
|
1263
|
+
return context;
|
1264
|
+
}
|
1265
|
+
function useThreadComposerAttachmentContext(options) {
|
1266
|
+
const context = useAttachmentContext(options);
|
1267
|
+
if (!context) return null;
|
1268
|
+
if (context.source !== "thread-composer")
|
1269
|
+
throw new Error(
|
1270
|
+
"This component must be used within a thread's ComposerPrimitive.Attachments component."
|
1271
|
+
);
|
1272
|
+
return context;
|
1273
|
+
}
|
1274
|
+
function useEditComposerAttachmentContext(options) {
|
1275
|
+
const context = useAttachmentContext(options);
|
1276
|
+
if (!context) return null;
|
1277
|
+
if (context.source !== "edit-composer")
|
1278
|
+
throw new Error(
|
1279
|
+
"This component must be used within a messages's ComposerPrimitive.Attachments component."
|
1280
|
+
);
|
1281
|
+
return context;
|
1282
|
+
}
|
1283
|
+
function useMessageAttachmentContext(options) {
|
1284
|
+
const context = useAttachmentContext(options);
|
1285
|
+
if (!context) return null;
|
1286
|
+
if (context.source !== "message")
|
1287
|
+
throw new Error(
|
1288
|
+
"This component must be used within a MessagePrimitive.Attachments component."
|
1289
|
+
);
|
1290
|
+
return context;
|
1291
|
+
}
|
1292
|
+
function useAttachmentRuntime(options) {
|
1293
|
+
const attachmentRuntime = useAttachmentContext(options);
|
1294
|
+
if (!attachmentRuntime) return null;
|
1295
|
+
return attachmentRuntime.useAttachmentRuntime();
|
1296
|
+
}
|
1297
|
+
var { useAttachment } = createContextStoreHook(
|
1298
|
+
useAttachmentContext,
|
1299
|
+
"useAttachment"
|
1300
|
+
);
|
1301
|
+
var { useAttachment: useThreadComposerAttachment } = createContextStoreHook(useThreadComposerAttachmentContext, "useAttachment");
|
1302
|
+
var { useAttachment: useEditComposerAttachment } = createContextStoreHook(useEditComposerAttachmentContext, "useAttachment");
|
1303
|
+
var { useAttachment: useMessageAttachment } = createContextStoreHook(
|
1304
|
+
useMessageAttachmentContext,
|
1305
|
+
"useAttachment"
|
1306
|
+
);
|
1307
|
+
|
1308
|
+
// src/primitives/attachment/AttachmentThumb.tsx
|
1309
|
+
|
1310
|
+
|
1311
|
+
var AttachmentPrimitiveThumb = _react.forwardRef.call(void 0, () => {
|
1312
|
+
const ext = useAttachment((a) => a.name.split(".").pop());
|
1313
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactprimitive.Primitive.div, { children: [
|
1314
|
+
".",
|
1315
|
+
ext
|
1316
|
+
] });
|
1317
|
+
});
|
1318
|
+
AttachmentPrimitiveThumb.displayName = "AttachmentPrimitive.Thumb";
|
1319
|
+
|
1320
|
+
// src/primitives/attachment/AttachmentName.tsx
|
1321
|
+
|
1322
|
+
var AttachmentPrimitiveName = () => {
|
1323
|
+
const name = useAttachment((a) => a.name);
|
1324
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: name });
|
1325
|
+
};
|
1326
|
+
AttachmentPrimitiveName.displayName = "AttachmentPrimitive.Name";
|
1327
|
+
|
1328
|
+
// src/primitive-hooks/attachment/useAttachmentRemove.ts
|
1329
|
+
|
1330
|
+
var useAttachmentRemove = () => {
|
1331
|
+
const attachmentRuntime = useAttachmentRuntime();
|
1332
|
+
const handleRemoveAttachment = _react.useCallback.call(void 0, () => {
|
1333
|
+
attachmentRuntime.remove();
|
1334
|
+
}, [attachmentRuntime]);
|
1335
|
+
return handleRemoveAttachment;
|
1336
|
+
};
|
1337
|
+
|
1338
|
+
// src/primitives/attachment/AttachmentRemove.tsx
|
1339
|
+
var AttachmentPrimitiveRemove = createActionButton(
|
1340
|
+
"AttachmentPrimitive.Remove",
|
1341
|
+
useAttachmentRemove
|
1342
|
+
);
|
1343
|
+
|
1241
1344
|
// src/primitives/branchPicker/index.ts
|
1242
1345
|
var branchPicker_exports = {};
|
1243
1346
|
_chunkPZ5AY32Cjs.__export.call(void 0, branchPicker_exports, {
|
@@ -1341,9 +1444,9 @@ var useIsHoveringRef = () => {
|
|
1341
1444
|
);
|
1342
1445
|
return useManagedRef(callbackRef);
|
1343
1446
|
};
|
1344
|
-
var MessagePrimitiveRoot = _react.forwardRef.call(void 0, (props,
|
1447
|
+
var MessagePrimitiveRoot = _react.forwardRef.call(void 0, (props, forwardRef35) => {
|
1345
1448
|
const isHoveringRef = useIsHoveringRef();
|
1346
|
-
const ref = _reactcomposerefs.useComposedRefs.call(void 0,
|
1449
|
+
const ref = _reactcomposerefs.useComposedRefs.call(void 0, forwardRef35, isHoveringRef);
|
1347
1450
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactprimitive.Primitive.div, { ...props, ref });
|
1348
1451
|
});
|
1349
1452
|
MessagePrimitiveRoot.displayName = "MessagePrimitive.Root";
|
@@ -1434,7 +1537,7 @@ var withSmoothContextProvider = (Component) => {
|
|
1434
1537
|
};
|
1435
1538
|
function useSmoothContext(options) {
|
1436
1539
|
const context = _react.useContext.call(void 0, SmoothContext);
|
1437
|
-
if (!_optionalChain([options, 'optionalAccess',
|
1540
|
+
if (!_optionalChain([options, 'optionalAccess', _16 => _16.optional]) && !context)
|
1438
1541
|
throw new Error(
|
1439
1542
|
"This component must be used within a SmoothContextProvider."
|
1440
1543
|
);
|
@@ -1644,7 +1747,7 @@ var BaseSubject = (_class2 = class {constructor() { _class2.prototype.__init5.ca
|
|
1644
1747
|
if (this._connection) return;
|
1645
1748
|
this._connection = this._connect();
|
1646
1749
|
} else {
|
1647
|
-
_optionalChain([this, 'access',
|
1750
|
+
_optionalChain([this, 'access', _17 => _17._connection, 'optionalCall', _18 => _18()]);
|
1648
1751
|
this._connection = void 0;
|
1649
1752
|
}
|
1650
1753
|
}
|
@@ -1743,40 +1846,40 @@ var EMPTY_ARRAY = Object.freeze([]);
|
|
1743
1846
|
var getThreadComposerState = (runtime, focus, onFocus) => {
|
1744
1847
|
return Object.freeze({
|
1745
1848
|
type: "thread",
|
1746
|
-
isEditing: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1747
|
-
canCancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1748
|
-
isEmpty: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1749
|
-
text: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1750
|
-
attachments: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1751
|
-
attachmentAccept: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1752
|
-
value: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1753
|
-
setValue: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1754
|
-
setText: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1849
|
+
isEditing: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _19 => _19.isEditing]), () => ( false)),
|
1850
|
+
canCancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _20 => _20.canCancel]), () => ( false)),
|
1851
|
+
isEmpty: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _21 => _21.isEmpty]), () => ( true)),
|
1852
|
+
text: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _22 => _22.text]), () => ( "")),
|
1853
|
+
attachments: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _23 => _23.attachments]), () => ( EMPTY_ARRAY)),
|
1854
|
+
attachmentAccept: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _24 => _24.attachmentAccept]), () => ( "*")),
|
1855
|
+
value: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _25 => _25.text]), () => ( "")),
|
1856
|
+
setValue: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _26 => _26.setText, 'access', _27 => _27.bind, 'call', _28 => _28(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1857
|
+
setText: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _29 => _29.setText, 'access', _30 => _30.bind, 'call', _31 => _31(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1755
1858
|
// edit: beginEdit,
|
1756
|
-
send: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1757
|
-
cancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1859
|
+
send: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _32 => _32.send, 'access', _33 => _33.bind, 'call', _34 => _34(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1860
|
+
cancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _35 => _35.cancel, 'access', _36 => _36.bind, 'call', _37 => _37(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1758
1861
|
focus,
|
1759
1862
|
onFocus,
|
1760
|
-
reset: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1761
|
-
addAttachment: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1762
|
-
removeAttachment: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1863
|
+
reset: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _38 => _38.reset, 'access', _39 => _39.bind, 'call', _40 => _40(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1864
|
+
addAttachment: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _41 => _41.addAttachment, 'access', _42 => _42.bind, 'call', _43 => _43(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1865
|
+
removeAttachment: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _44 => _44.removeAttachment, 'access', _45 => _45.bind, 'call', _46 => _46(runtime)]), () => ( METHOD_NOT_SUPPORTED))
|
1763
1866
|
});
|
1764
1867
|
};
|
1765
1868
|
var getEditComposerState = (runtime, beginEdit) => {
|
1766
1869
|
return Object.freeze({
|
1767
1870
|
type: "edit",
|
1768
|
-
isEditing: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1769
|
-
canCancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1770
|
-
isEmpty: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1771
|
-
text: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1772
|
-
attachments: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1773
|
-
attachmentAccept: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1774
|
-
value: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1775
|
-
setValue: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1776
|
-
setText: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1871
|
+
isEditing: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _47 => _47.isEditing]), () => ( false)),
|
1872
|
+
canCancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _48 => _48.canCancel]), () => ( false)),
|
1873
|
+
isEmpty: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _49 => _49.isEmpty]), () => ( true)),
|
1874
|
+
text: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _50 => _50.text]), () => ( "")),
|
1875
|
+
attachments: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _51 => _51.attachments]), () => ( EMPTY_ARRAY)),
|
1876
|
+
attachmentAccept: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _52 => _52.attachmentAccept]), () => ( "*")),
|
1877
|
+
value: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _53 => _53.text]), () => ( "")),
|
1878
|
+
setValue: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _54 => _54.setText, 'access', _55 => _55.bind, 'call', _56 => _56(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1879
|
+
setText: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _57 => _57.setText, 'access', _58 => _58.bind, 'call', _59 => _59(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1777
1880
|
edit: beginEdit,
|
1778
|
-
send: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1779
|
-
cancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
1881
|
+
send: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _60 => _60.send, 'access', _61 => _61.bind, 'call', _62 => _62(runtime)]), () => ( METHOD_NOT_SUPPORTED)),
|
1882
|
+
cancel: _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _63 => _63.cancel, 'access', _64 => _64.bind, 'call', _65 => _65(runtime)]), () => ( METHOD_NOT_SUPPORTED))
|
1780
1883
|
});
|
1781
1884
|
};
|
1782
1885
|
var ComposerRuntimeImpl = class {
|
@@ -1889,7 +1992,7 @@ var ThreadComposerRuntimeImpl = (_class5 = class extends ComposerRuntimeImpl {
|
|
1889
1992
|
this._getState = stateBinding.getState.bind(stateBinding);
|
1890
1993
|
}
|
1891
1994
|
get attachments() {
|
1892
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
1995
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _66 => _66.getState, 'call', _67 => _67(), 'optionalAccess', _68 => _68.attachments]), () => ( EMPTY_ARRAY));
|
1893
1996
|
}
|
1894
1997
|
getState() {
|
1895
1998
|
return this._getState();
|
@@ -1991,19 +2094,19 @@ var NestedSubscriptionSubject = class extends BaseSubject {
|
|
1991
2094
|
this.notifySubscribers();
|
1992
2095
|
};
|
1993
2096
|
let lastState = this.binding.getState();
|
1994
|
-
let innerUnsubscribe = _optionalChain([lastState, 'optionalAccess',
|
2097
|
+
let innerUnsubscribe = _optionalChain([lastState, 'optionalAccess', _69 => _69.subscribe, 'call', _70 => _70(callback)]);
|
1995
2098
|
const onRuntimeUpdate = () => {
|
1996
2099
|
const newState = this.binding.getState();
|
1997
2100
|
if (newState === lastState) return;
|
1998
2101
|
lastState = newState;
|
1999
|
-
_optionalChain([innerUnsubscribe, 'optionalCall',
|
2000
|
-
innerUnsubscribe = _optionalChain([this, 'access',
|
2102
|
+
_optionalChain([innerUnsubscribe, 'optionalCall', _71 => _71()]);
|
2103
|
+
innerUnsubscribe = _optionalChain([this, 'access', _72 => _72.binding, 'access', _73 => _73.getState, 'call', _74 => _74(), 'optionalAccess', _75 => _75.subscribe, 'call', _76 => _76(callback)]);
|
2001
2104
|
callback();
|
2002
2105
|
};
|
2003
2106
|
const outerUnsubscribe = this.binding.subscribe(onRuntimeUpdate);
|
2004
2107
|
return () => {
|
2005
|
-
_optionalChain([outerUnsubscribe, 'optionalCall',
|
2006
|
-
_optionalChain([innerUnsubscribe, 'optionalCall',
|
2108
|
+
_optionalChain([outerUnsubscribe, 'optionalCall', _77 => _77()]);
|
2109
|
+
_optionalChain([innerUnsubscribe, 'optionalCall', _78 => _78()]);
|
2007
2110
|
};
|
2008
2111
|
}
|
2009
2112
|
};
|
@@ -2120,7 +2223,7 @@ var MessageRuntimeImpl = (_class6 = class {
|
|
2120
2223
|
new ShallowMemoizeSubject({
|
2121
2224
|
getState: () => {
|
2122
2225
|
const attachments = this.getState().attachments;
|
2123
|
-
const attachment = _optionalChain([attachments, 'optionalAccess',
|
2226
|
+
const attachment = _optionalChain([attachments, 'optionalAccess', _79 => _79[idx]]);
|
2124
2227
|
if (!attachment) return SKIP_UPDATE;
|
2125
2228
|
return {
|
2126
2229
|
...attachment,
|
@@ -2209,7 +2312,7 @@ var MessageContentPartImpl = ({
|
|
2209
2312
|
};
|
2210
2313
|
var MessageContentPart = _react.memo.call(void 0,
|
2211
2314
|
MessageContentPartImpl,
|
2212
|
-
(prev, next) => prev.partIndex === next.partIndex && _optionalChain([prev, 'access',
|
2315
|
+
(prev, next) => prev.partIndex === next.partIndex && _optionalChain([prev, 'access', _80 => _80.components, 'optionalAccess', _81 => _81.Text]) === _optionalChain([next, 'access', _82 => _82.components, 'optionalAccess', _83 => _83.Text]) && _optionalChain([prev, 'access', _84 => _84.components, 'optionalAccess', _85 => _85.Image]) === _optionalChain([next, 'access', _86 => _86.components, 'optionalAccess', _87 => _87.Image]) && _optionalChain([prev, 'access', _88 => _88.components, 'optionalAccess', _89 => _89.UI]) === _optionalChain([next, 'access', _90 => _90.components, 'optionalAccess', _91 => _91.UI]) && _optionalChain([prev, 'access', _92 => _92.components, 'optionalAccess', _93 => _93.tools]) === _optionalChain([next, 'access', _94 => _94.components, 'optionalAccess', _95 => _95.tools])
|
2213
2316
|
);
|
2214
2317
|
var MessagePrimitiveContent = ({
|
2215
2318
|
components
|
@@ -2228,62 +2331,6 @@ MessagePrimitiveInProgress.displayName = "MessagePrimitive.InProgress";
|
|
2228
2331
|
// src/primitives/message/MessageAttachments.tsx
|
2229
2332
|
|
2230
2333
|
|
2231
|
-
// src/context/react/AttachmentContext.ts
|
2232
|
-
|
2233
|
-
var AttachmentContext = _react.createContext.call(void 0,
|
2234
|
-
null
|
2235
|
-
);
|
2236
|
-
function useAttachmentContext(options) {
|
2237
|
-
const context = _react.useContext.call(void 0, AttachmentContext);
|
2238
|
-
if (!_optionalChain([options, 'optionalAccess', _95 => _95.optional]) && !context)
|
2239
|
-
throw new Error(
|
2240
|
-
"This component must be used within a ComposerPrimitive.Attachments or MessagePrimitive.Attachments component."
|
2241
|
-
);
|
2242
|
-
return context;
|
2243
|
-
}
|
2244
|
-
function useThreadComposerAttachmentContext(options) {
|
2245
|
-
const context = useAttachmentContext(options);
|
2246
|
-
if (!context) return null;
|
2247
|
-
if (context.source !== "thread-composer")
|
2248
|
-
throw new Error(
|
2249
|
-
"This component must be used within a thread's ComposerPrimitive.Attachments component."
|
2250
|
-
);
|
2251
|
-
return context;
|
2252
|
-
}
|
2253
|
-
function useEditComposerAttachmentContext(options) {
|
2254
|
-
const context = useAttachmentContext(options);
|
2255
|
-
if (!context) return null;
|
2256
|
-
if (context.source !== "edit-composer")
|
2257
|
-
throw new Error(
|
2258
|
-
"This component must be used within a messages's ComposerPrimitive.Attachments component."
|
2259
|
-
);
|
2260
|
-
return context;
|
2261
|
-
}
|
2262
|
-
function useMessageAttachmentContext(options) {
|
2263
|
-
const context = useAttachmentContext(options);
|
2264
|
-
if (!context) return null;
|
2265
|
-
if (context.source !== "message")
|
2266
|
-
throw new Error(
|
2267
|
-
"This component must be used within a MessagePrimitive.Attachments component."
|
2268
|
-
);
|
2269
|
-
return context;
|
2270
|
-
}
|
2271
|
-
function useAttachmentRuntime(options) {
|
2272
|
-
const attachmentRuntime = useAttachmentContext(options);
|
2273
|
-
if (!attachmentRuntime) return null;
|
2274
|
-
return attachmentRuntime.useAttachmentRuntime();
|
2275
|
-
}
|
2276
|
-
var { useAttachment } = createContextStoreHook(
|
2277
|
-
useAttachmentContext,
|
2278
|
-
"useAttachment"
|
2279
|
-
);
|
2280
|
-
var { useAttachment: useThreadComposerAttachment } = createContextStoreHook(useThreadComposerAttachmentContext, "useAttachment");
|
2281
|
-
var { useAttachment: useEditComposerAttachment } = createContextStoreHook(useEditComposerAttachmentContext, "useAttachment");
|
2282
|
-
var { useAttachment: useMessageAttachment } = createContextStoreHook(
|
2283
|
-
useMessageAttachmentContext,
|
2284
|
-
"useAttachment"
|
2285
|
-
);
|
2286
|
-
|
2287
2334
|
// src/context/providers/AttachmentRuntimeProvider.tsx
|
2288
2335
|
|
2289
2336
|
|
@@ -3109,7 +3156,7 @@ var DefaultThreadComposerRuntimeCore = (_class9 = class extends BaseComposerRunt
|
|
3109
3156
|
var ProxyConfigProvider = (_class10 = class {constructor() { _class10.prototype.__init19.call(this); }
|
3110
3157
|
__init19() {this._providers = /* @__PURE__ */ new Set()}
|
3111
3158
|
getModelConfig() {
|
3112
|
-
return
|
3159
|
+
return _chunkKVXP3Q6Kjs.mergeModelConfigs.call(void 0, this._providers);
|
3113
3160
|
}
|
3114
3161
|
registerModelConfigProvider(provider) {
|
3115
3162
|
this._providers.add(provider);
|
@@ -3687,7 +3734,7 @@ var ThreadRuntimeImpl = (_class12 = class {
|
|
3687
3734
|
}, _class12);
|
3688
3735
|
|
3689
3736
|
// src/runtimes/edge/converters/fromLanguageModelMessages.ts
|
3690
|
-
var fromLanguageModelMessages = (lm, {
|
3737
|
+
var fromLanguageModelMessages = (lm, { mergeSteps }) => {
|
3691
3738
|
const messages2 = [];
|
3692
3739
|
for (const lmMessage of lm) {
|
3693
3740
|
const role = lmMessage.role;
|
@@ -3750,7 +3797,7 @@ var fromLanguageModelMessages = (lm, { mergeRoundtrips }) => {
|
|
3750
3797
|
}
|
3751
3798
|
return part;
|
3752
3799
|
});
|
3753
|
-
if (
|
3800
|
+
if (mergeSteps) {
|
3754
3801
|
const previousMessage = messages2[messages2.length - 1];
|
3755
3802
|
if (_optionalChain([previousMessage, 'optionalAccess', _181 => _181.role]) === "assistant") {
|
3756
3803
|
previousMessage.content.push(...newContent);
|
@@ -3841,14 +3888,14 @@ function streamPartDecoderStream() {
|
|
3841
3888
|
controller.enqueue(decodeStreamPart(chunk));
|
3842
3889
|
}
|
3843
3890
|
});
|
3844
|
-
return new (0,
|
3891
|
+
return new (0, _chunkKVXP3Q6Kjs.PipeableTransformStream)((readable) => {
|
3845
3892
|
return readable.pipeThrough(new TextDecoderStream()).pipeThrough(chunkByLineStream()).pipeThrough(decodeStream);
|
3846
3893
|
});
|
3847
3894
|
}
|
3848
3895
|
|
3849
3896
|
// src/runtimes/edge/streams/utils/index.ts
|
3850
3897
|
var streamUtils = {
|
3851
|
-
streamPartEncoderStream:
|
3898
|
+
streamPartEncoderStream: _chunkKVXP3Q6Kjs.streamPartEncoderStream,
|
3852
3899
|
streamPartDecoderStream
|
3853
3900
|
};
|
3854
3901
|
|
@@ -3861,7 +3908,7 @@ function assistantDecoderStream() {
|
|
3861
3908
|
let currentToolCall;
|
3862
3909
|
return new TransformStream({
|
3863
3910
|
transform({ type, value }, controller) {
|
3864
|
-
if (currentToolCall && type !== "
|
3911
|
+
if (currentToolCall && type !== "c" /* ToolCallDelta */ && type !== "3" /* Error */) {
|
3865
3912
|
controller.enqueue({
|
3866
3913
|
type: "tool-call",
|
3867
3914
|
toolCallType: "function",
|
@@ -3879,48 +3926,82 @@ function assistantDecoderStream() {
|
|
3879
3926
|
});
|
3880
3927
|
break;
|
3881
3928
|
}
|
3882
|
-
case "
|
3883
|
-
const { id, name } = value;
|
3929
|
+
case "b" /* ToolCallBegin */: {
|
3930
|
+
const { toolCallId: id, toolName: name } = value;
|
3884
3931
|
toolCallNames.set(id, name);
|
3885
3932
|
currentToolCall = { id, name, argsText: "" };
|
3886
3933
|
break;
|
3887
3934
|
}
|
3888
|
-
case "
|
3889
|
-
const
|
3890
|
-
currentToolCall.
|
3935
|
+
case "c" /* ToolCallDelta */: {
|
3936
|
+
const { toolCallId, argsTextDelta } = value;
|
3937
|
+
if (_optionalChain([currentToolCall, 'optionalAccess', _183 => _183.id]) !== toolCallId) {
|
3938
|
+
throw new Error(
|
3939
|
+
`Received tool call delta for unknown tool call "${toolCallId}".`
|
3940
|
+
);
|
3941
|
+
}
|
3942
|
+
currentToolCall.argsText += argsTextDelta;
|
3891
3943
|
controller.enqueue({
|
3892
3944
|
type: "tool-call-delta",
|
3893
3945
|
toolCallType: "function",
|
3894
3946
|
toolCallId: currentToolCall.id,
|
3895
3947
|
toolName: currentToolCall.name,
|
3896
|
-
argsTextDelta
|
3948
|
+
argsTextDelta
|
3897
3949
|
});
|
3898
3950
|
break;
|
3899
3951
|
}
|
3900
|
-
case "
|
3952
|
+
case "a" /* ToolCallResult */: {
|
3901
3953
|
controller.enqueue({
|
3902
3954
|
type: "tool-result",
|
3903
3955
|
toolCallType: "function",
|
3904
|
-
toolCallId: value.
|
3905
|
-
toolName: toolCallNames.get(value.
|
3956
|
+
toolCallId: value.toolCallId,
|
3957
|
+
toolName: toolCallNames.get(value.toolCallId),
|
3906
3958
|
result: value.result
|
3907
3959
|
});
|
3908
3960
|
break;
|
3909
3961
|
}
|
3910
|
-
case "
|
3962
|
+
case "d" /* Finish */: {
|
3911
3963
|
controller.enqueue({
|
3912
3964
|
type: "finish",
|
3913
3965
|
...value
|
3914
3966
|
});
|
3915
3967
|
break;
|
3916
3968
|
}
|
3917
|
-
case "
|
3969
|
+
case "3" /* Error */: {
|
3918
3970
|
controller.enqueue({
|
3919
3971
|
type: "error",
|
3920
3972
|
error: value
|
3921
3973
|
});
|
3922
3974
|
break;
|
3923
3975
|
}
|
3976
|
+
case "9" /* ToolCall */: {
|
3977
|
+
const { toolCallId, toolName, args } = value;
|
3978
|
+
const argsText = JSON.stringify(args);
|
3979
|
+
controller.enqueue({
|
3980
|
+
type: "tool-call-delta",
|
3981
|
+
toolCallType: "function",
|
3982
|
+
toolCallId,
|
3983
|
+
toolName,
|
3984
|
+
argsTextDelta: argsText
|
3985
|
+
});
|
3986
|
+
controller.enqueue({
|
3987
|
+
type: "tool-call",
|
3988
|
+
toolCallType: "function",
|
3989
|
+
toolCallId,
|
3990
|
+
toolName,
|
3991
|
+
args: argsText
|
3992
|
+
});
|
3993
|
+
break;
|
3994
|
+
}
|
3995
|
+
case "e" /* StepFinish */: {
|
3996
|
+
controller.enqueue({
|
3997
|
+
type: "step-finish",
|
3998
|
+
...value
|
3999
|
+
});
|
4000
|
+
break;
|
4001
|
+
}
|
4002
|
+
// TODO
|
4003
|
+
case "2" /* Data */:
|
4004
|
+
break;
|
3924
4005
|
default: {
|
3925
4006
|
const unhandledType = type;
|
3926
4007
|
throw new Error(`Unhandled chunk type: ${unhandledType}`);
|
@@ -3957,8 +4038,8 @@ var EdgeChatAdapter = class {
|
|
3957
4038
|
credentials: _nullishCoalesce(this.options.credentials, () => ( "same-origin")),
|
3958
4039
|
body: JSON.stringify({
|
3959
4040
|
system: config.system,
|
3960
|
-
messages:
|
3961
|
-
tools: config.tools ?
|
4041
|
+
messages: _chunkKVXP3Q6Kjs.toCoreMessages.call(void 0, messages2),
|
4042
|
+
tools: config.tools ? _chunkKVXP3Q6Kjs.toLanguageModelTools.call(void 0, config.tools) : [],
|
3962
4043
|
...config.callSettings,
|
3963
4044
|
...config.config,
|
3964
4045
|
...this.options.body
|
@@ -3968,7 +4049,7 @@ var EdgeChatAdapter = class {
|
|
3968
4049
|
if (!result.ok) {
|
3969
4050
|
throw new Error(`Status ${result.status}: ${await result.text()}`);
|
3970
4051
|
}
|
3971
|
-
const stream = result.body.pipeThrough(streamPartDecoderStream()).pipeThrough(assistantDecoderStream()).pipeThrough(
|
4052
|
+
const stream = result.body.pipeThrough(streamPartDecoderStream()).pipeThrough(assistantDecoderStream()).pipeThrough(_chunkKVXP3Q6Kjs.toolResultStream.call(void 0, config.tools, abortSignal)).pipeThrough(_chunkKVXP3Q6Kjs.runResultStream.call(void 0, ));
|
3972
4053
|
let update;
|
3973
4054
|
for await (update of asAsyncIterable(stream)) {
|
3974
4055
|
yield update;
|
@@ -3980,9 +4061,14 @@ var EdgeChatAdapter = class {
|
|
3980
4061
|
|
3981
4062
|
// src/runtimes/local/LocalRuntimeOptions.tsx
|
3982
4063
|
var splitLocalRuntimeOptions = (options) => {
|
3983
|
-
const { initialMessages, maxToolRoundtrips, adapters, ...rest } = options;
|
4064
|
+
const { initialMessages, maxToolRoundtrips, maxSteps, adapters, ...rest } = options;
|
3984
4065
|
return {
|
3985
|
-
localRuntimeOptions: {
|
4066
|
+
localRuntimeOptions: {
|
4067
|
+
initialMessages,
|
4068
|
+
maxToolRoundtrips,
|
4069
|
+
maxSteps,
|
4070
|
+
adapters
|
4071
|
+
},
|
3986
4072
|
otherOptions: rest
|
3987
4073
|
};
|
3988
4074
|
};
|
@@ -3995,7 +4081,7 @@ var useEdgeRuntime = (options) => {
|
|
3995
4081
|
};
|
3996
4082
|
|
3997
4083
|
// src/runtimes/local/shouldContinue.tsx
|
3998
|
-
var shouldContinue = (result) => _optionalChain([result, 'access',
|
4084
|
+
var shouldContinue = (result) => _optionalChain([result, 'access', _184 => _184.status, 'optionalAccess', _185 => _185.type]) === "requires-action" && result.status.reason === "tool-calls" && result.content.every((c) => c.type !== "tool-call" || !!c.result);
|
3999
4085
|
|
4000
4086
|
// src/runtimes/composer/DefaultEditComposerRuntimeCore.tsx
|
4001
4087
|
var DefaultEditComposerRuntimeCore = class extends BaseComposerRuntimeCore {
|
@@ -4083,18 +4169,18 @@ var LocalThreadRuntimeCore = (_class13 = class {
|
|
4083
4169
|
set options({ initialMessages, ...options }) {
|
4084
4170
|
this._options = options;
|
4085
4171
|
let hasUpdates = false;
|
4086
|
-
const canSpeak = _optionalChain([options, 'access',
|
4172
|
+
const canSpeak = _optionalChain([options, 'access', _186 => _186.adapters, 'optionalAccess', _187 => _187.speech]) !== void 0;
|
4087
4173
|
if (this.capabilities.speak !== canSpeak) {
|
4088
4174
|
this.capabilities.speak = canSpeak;
|
4089
4175
|
hasUpdates = true;
|
4090
4176
|
}
|
4091
|
-
this.composer.setAttachmentAdapter(_optionalChain([options, 'access',
|
4092
|
-
const canAttach = _optionalChain([options, 'access',
|
4177
|
+
this.composer.setAttachmentAdapter(_optionalChain([options, 'access', _188 => _188.adapters, 'optionalAccess', _189 => _189.attachments]));
|
4178
|
+
const canAttach = _optionalChain([options, 'access', _190 => _190.adapters, 'optionalAccess', _191 => _191.attachments]) !== void 0;
|
4093
4179
|
if (this.capabilities.attachments !== canAttach) {
|
4094
4180
|
this.capabilities.attachments = canAttach;
|
4095
4181
|
hasUpdates = true;
|
4096
4182
|
}
|
4097
|
-
const canFeedback = _optionalChain([options, 'access',
|
4183
|
+
const canFeedback = _optionalChain([options, 'access', _192 => _192.adapters, 'optionalAccess', _193 => _193.feedback]) !== void 0;
|
4098
4184
|
if (this.capabilities.feedback !== canFeedback) {
|
4099
4185
|
this.capabilities.feedback = canFeedback;
|
4100
4186
|
hasUpdates = true;
|
@@ -4153,33 +4239,25 @@ var LocalThreadRuntimeCore = (_class13 = class {
|
|
4153
4239
|
}
|
4154
4240
|
async performRoundtrip(parentId, message) {
|
4155
4241
|
const messages2 = this.repository.getMessages();
|
4156
|
-
_optionalChain([this, 'access',
|
4242
|
+
_optionalChain([this, 'access', _194 => _194.abortController, 'optionalAccess', _195 => _195.abort, 'call', _196 => _196()]);
|
4157
4243
|
this.abortController = new AbortController();
|
4158
4244
|
const initialContent = message.content;
|
4159
|
-
const
|
4160
|
-
const initalCustom = _optionalChain([message, 'access',
|
4245
|
+
const initialSteps = _optionalChain([message, 'access', _197 => _197.metadata, 'optionalAccess', _198 => _198.steps]);
|
4246
|
+
const initalCustom = _optionalChain([message, 'access', _199 => _199.metadata, 'optionalAccess', _200 => _200.custom]);
|
4161
4247
|
const updateMessage = (m) => {
|
4248
|
+
const newSteps = _optionalChain([m, 'access', _201 => _201.metadata, 'optionalAccess', _202 => _202.steps]) || _optionalChain([m, 'access', _203 => _203.metadata, 'optionalAccess', _204 => _204.roundtrips]);
|
4249
|
+
const steps2 = newSteps ? [..._nullishCoalesce(initialSteps, () => ( [])), ...newSteps] : void 0;
|
4162
4250
|
message = {
|
4163
4251
|
...message,
|
4164
4252
|
...m.content ? { content: [...initialContent, ..._nullishCoalesce(m.content, () => ( []))] } : void 0,
|
4165
4253
|
status: _nullishCoalesce(m.status, () => ( message.status)),
|
4166
4254
|
// TODO deprecated, remove in v0.6
|
4167
|
-
...
|
4168
|
-
roundtrips: [
|
4169
|
-
..._nullishCoalesce(initialRoundtrips, () => ( [])),
|
4170
|
-
...m.metadata.roundtrips
|
4171
|
-
]
|
4172
|
-
} : void 0,
|
4255
|
+
...steps2 ? { roundtrips: steps2 } : void 0,
|
4173
4256
|
...m.metadata ? {
|
4174
4257
|
metadata: {
|
4175
4258
|
...message.metadata,
|
4176
|
-
...
|
4177
|
-
|
4178
|
-
..._nullishCoalesce(initialRoundtrips, () => ( [])),
|
4179
|
-
...m.metadata.roundtrips
|
4180
|
-
]
|
4181
|
-
} : void 0,
|
4182
|
-
..._optionalChain([m, 'access', _202 => _202.metadata, 'optionalAccess', _203 => _203.custom]) ? {
|
4259
|
+
...steps2 ? { roundtrips: steps2, steps: steps2 } : void 0,
|
4260
|
+
..._optionalChain([m, 'access', _205 => _205.metadata, 'optionalAccess', _206 => _206.custom]) ? {
|
4183
4261
|
custom: { ..._nullishCoalesce(initalCustom, () => ( {})), ...m.metadata.custom }
|
4184
4262
|
} : void 0
|
4185
4263
|
}
|
@@ -4188,9 +4266,9 @@ var LocalThreadRuntimeCore = (_class13 = class {
|
|
4188
4266
|
this.repository.addOrUpdateMessage(parentId, message);
|
4189
4267
|
this.notifySubscribers();
|
4190
4268
|
};
|
4191
|
-
const
|
4192
|
-
const
|
4193
|
-
if (
|
4269
|
+
const maxSteps = this.options.maxSteps ? this.options.maxSteps : (_nullishCoalesce(this.options.maxToolRoundtrips, () => ( 1))) + 1;
|
4270
|
+
const steps = _nullishCoalesce(_optionalChain([message, 'access', _207 => _207.metadata, 'optionalAccess', _208 => _208.steps, 'optionalAccess', _209 => _209.length]), () => ( 0));
|
4271
|
+
if (steps >= maxSteps) {
|
4194
4272
|
updateMessage({
|
4195
4273
|
status: {
|
4196
4274
|
type: "incomplete",
|
@@ -4288,7 +4366,7 @@ var LocalThreadRuntimeCore = (_class13 = class {
|
|
4288
4366
|
// TODO lift utterance state to thread runtime
|
4289
4367
|
|
4290
4368
|
speak(messageId) {
|
4291
|
-
const adapter = _optionalChain([this, 'access',
|
4369
|
+
const adapter = _optionalChain([this, 'access', _210 => _210.options, 'access', _211 => _211.adapters, 'optionalAccess', _212 => _212.speech]);
|
4292
4370
|
if (!adapter) throw new Error("Speech adapter not configured");
|
4293
4371
|
const { message } = this.repository.getMessage(messageId);
|
4294
4372
|
if (this._utterance) {
|
@@ -4305,7 +4383,7 @@ var LocalThreadRuntimeCore = (_class13 = class {
|
|
4305
4383
|
return this._utterance;
|
4306
4384
|
}
|
4307
4385
|
submitFeedback({ messageId, type }) {
|
4308
|
-
const adapter = _optionalChain([this, 'access',
|
4386
|
+
const adapter = _optionalChain([this, 'access', _213 => _213.options, 'access', _214 => _214.adapters, 'optionalAccess', _215 => _215.feedback]);
|
4309
4387
|
if (!adapter) throw new Error("Feedback adapter not configured");
|
4310
4388
|
const { message } = this.repository.getMessage(messageId);
|
4311
4389
|
adapter.submit({ message, type });
|
@@ -4352,7 +4430,7 @@ var LocalRuntimeCore = class extends BaseAssistantRuntimeCore {
|
|
4352
4430
|
const messages2 = fromCoreMessages(initialMessages);
|
4353
4431
|
this.thread.import({
|
4354
4432
|
messages: messages2.map((m, idx) => ({
|
4355
|
-
parentId: _nullishCoalesce(_optionalChain([messages2, 'access',
|
4433
|
+
parentId: _nullishCoalesce(_optionalChain([messages2, 'access', _216 => _216[idx - 1], 'optionalAccess', _217 => _217.id]), () => ( null)),
|
4356
4434
|
message: m
|
4357
4435
|
}))
|
4358
4436
|
});
|
@@ -4486,7 +4564,7 @@ var fromThreadMessageLike = (like, fallbackId, fallbackStatus) => {
|
|
4486
4564
|
// src/runtimes/external-store/ExternalStoreThreadRuntimeCore.tsx
|
4487
4565
|
var EMPTY_ARRAY2 = Object.freeze([]);
|
4488
4566
|
var hasUpcomingMessage = (isRunning, messages2) => {
|
4489
|
-
return isRunning && _optionalChain([messages2, 'access',
|
4567
|
+
return isRunning && _optionalChain([messages2, 'access', _218 => _218[messages2.length - 1], 'optionalAccess', _219 => _219.role]) !== "assistant";
|
4490
4568
|
};
|
4491
4569
|
var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
4492
4570
|
constructor(configProvider, store) {;_class15.prototype.__init33.call(this);_class15.prototype.__init34.call(this);_class15.prototype.__init35.call(this);_class15.prototype.__init36.call(this);_class15.prototype.__init37.call(this);_class15.prototype.__init38.call(this);_class15.prototype.__init39.call(this);_class15.prototype.__init40.call(this);_class15.prototype.__init41.call(this);_class15.prototype.__init42.call(this);
|
@@ -4552,12 +4630,12 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4552
4630
|
reload: this._store.onReload !== void 0,
|
4553
4631
|
cancel: this._store.onCancel !== void 0,
|
4554
4632
|
speak: this._store.onSpeak !== void 0,
|
4555
|
-
unstable_copy: _optionalChain([this, 'access',
|
4633
|
+
unstable_copy: _optionalChain([this, 'access', _223 => _223._store, 'access', _224 => _224.unstable_capabilities, 'optionalAccess', _225 => _225.copy]) !== false,
|
4556
4634
|
// default true
|
4557
|
-
attachments: !!_optionalChain([this, 'access',
|
4558
|
-
feedback: !!_optionalChain([this, 'access',
|
4635
|
+
attachments: !!_optionalChain([this, 'access', _226 => _226.store, 'access', _227 => _227.adapters, 'optionalAccess', _228 => _228.attachments]),
|
4636
|
+
feedback: !!_optionalChain([this, 'access', _229 => _229.store, 'access', _230 => _230.adapters, 'optionalAccess', _231 => _231.feedback])
|
4559
4637
|
};
|
4560
|
-
this.composer.setAttachmentAdapter(_optionalChain([this, 'access',
|
4638
|
+
this.composer.setAttachmentAdapter(_optionalChain([this, 'access', _232 => _232._store, 'access', _233 => _233.adapters, 'optionalAccess', _234 => _234.attachments]));
|
4561
4639
|
if (oldStore) {
|
4562
4640
|
if (oldStore.convertMessage !== store.convertMessage) {
|
4563
4641
|
this._converter = new ThreadMessageConverter();
|
@@ -4583,7 +4661,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4583
4661
|
for (let i = 0; i < messages2.length; i++) {
|
4584
4662
|
const message = messages2[i];
|
4585
4663
|
const parent = messages2[i - 1];
|
4586
|
-
this.repository.addOrUpdateMessage(_nullishCoalesce(_optionalChain([parent, 'optionalAccess',
|
4664
|
+
this.repository.addOrUpdateMessage(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _235 => _235.id]), () => ( null)), message);
|
4587
4665
|
}
|
4588
4666
|
if (this.assistantOptimisticId) {
|
4589
4667
|
this.repository.deleteMessage(this.assistantOptimisticId);
|
@@ -4591,7 +4669,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4591
4669
|
}
|
4592
4670
|
if (hasUpcomingMessage(isRunning, messages2)) {
|
4593
4671
|
this.assistantOptimisticId = this.repository.appendOptimisticMessage(
|
4594
|
-
_nullishCoalesce(_optionalChain([messages2, 'access',
|
4672
|
+
_nullishCoalesce(_optionalChain([messages2, 'access', _236 => _236.at, 'call', _237 => _237(-1), 'optionalAccess', _238 => _238.id]), () => ( null)),
|
4595
4673
|
{
|
4596
4674
|
role: "assistant",
|
4597
4675
|
content: []
|
@@ -4599,7 +4677,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4599
4677
|
);
|
4600
4678
|
}
|
4601
4679
|
this.repository.resetHead(
|
4602
|
-
_nullishCoalesce(_nullishCoalesce(this.assistantOptimisticId, () => ( _optionalChain([messages2, 'access',
|
4680
|
+
_nullishCoalesce(_nullishCoalesce(this.assistantOptimisticId, () => ( _optionalChain([messages2, 'access', _239 => _239.at, 'call', _240 => _240(-1), 'optionalAccess', _241 => _241.id]))), () => ( null))
|
4603
4681
|
);
|
4604
4682
|
this.messages = this.repository.getMessages();
|
4605
4683
|
this.notifySubscribers();
|
@@ -4620,7 +4698,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4620
4698
|
this.updateMessages(this.repository.getMessages());
|
4621
4699
|
}
|
4622
4700
|
async append(message) {
|
4623
|
-
if (message.parentId !== (_nullishCoalesce(_optionalChain([this, 'access',
|
4701
|
+
if (message.parentId !== (_nullishCoalesce(_optionalChain([this, 'access', _242 => _242.messages, 'access', _243 => _243.at, 'call', _244 => _244(-1), 'optionalAccess', _245 => _245.id]), () => ( null)))) {
|
4624
4702
|
if (!this._store.onEdit)
|
4625
4703
|
throw new Error("Runtime does not support editing messages.");
|
4626
4704
|
await this._store.onEdit(message);
|
@@ -4643,7 +4721,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4643
4721
|
}
|
4644
4722
|
let messages2 = this.repository.getMessages();
|
4645
4723
|
const previousMessage = messages2[messages2.length - 1];
|
4646
|
-
if (_optionalChain([previousMessage, 'optionalAccess',
|
4724
|
+
if (_optionalChain([previousMessage, 'optionalAccess', _246 => _246.role]) === "user" && previousMessage.id === _optionalChain([messages2, 'access', _247 => _247.at, 'call', _248 => _248(-1), 'optionalAccess', _249 => _249.id])) {
|
4647
4725
|
this.repository.deleteMessage(previousMessage.id);
|
4648
4726
|
if (!this.composer.text.trim()) {
|
4649
4727
|
this.composer.setText(getThreadMessageText(previousMessage));
|
@@ -4668,7 +4746,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4668
4746
|
return this._store.onSpeak(message);
|
4669
4747
|
}
|
4670
4748
|
submitFeedback({ messageId, type }) {
|
4671
|
-
const adapter = _optionalChain([this, 'access',
|
4749
|
+
const adapter = _optionalChain([this, 'access', _250 => _250._store, 'access', _251 => _251.adapters, 'optionalAccess', _252 => _252.feedback]);
|
4672
4750
|
if (!adapter) throw new Error("Feedback adapter not configured");
|
4673
4751
|
const { message } = this.repository.getMessage(messageId);
|
4674
4752
|
adapter.submit({ message, type });
|
@@ -4678,7 +4756,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
|
|
4678
4756
|
return () => this._subscriptions.delete(callback);
|
4679
4757
|
}
|
4680
4758
|
__init42() {this.updateMessages = (messages2) => {
|
4681
|
-
_optionalChain([this, 'access',
|
4759
|
+
_optionalChain([this, 'access', _253 => _253._store, 'access', _254 => _254.setMessages, 'optionalCall', _255 => _255(
|
4682
4760
|
messages2.flatMap(getExternalStoreMessage).filter((m) => m != null)
|
4683
4761
|
)]);
|
4684
4762
|
}}
|
@@ -4902,18 +4980,18 @@ var DangerousInBrowserAdapter = class {
|
|
4902
4980
|
this.options = options;
|
4903
4981
|
}
|
4904
4982
|
async *run({ messages: messages2, abortSignal, config }) {
|
4905
|
-
const res = await
|
4983
|
+
const res = await _chunkKVXP3Q6Kjs.getEdgeRuntimeStream.call(void 0, {
|
4906
4984
|
options: this.options,
|
4907
4985
|
abortSignal,
|
4908
4986
|
requestData: {
|
4909
4987
|
system: config.system,
|
4910
|
-
messages:
|
4911
|
-
tools: config.tools ?
|
4988
|
+
messages: _chunkKVXP3Q6Kjs.toCoreMessages.call(void 0, messages2),
|
4989
|
+
tools: config.tools ? _chunkKVXP3Q6Kjs.toLanguageModelTools.call(void 0, config.tools) : [],
|
4912
4990
|
...config.callSettings,
|
4913
4991
|
...config.config
|
4914
4992
|
}
|
4915
4993
|
});
|
4916
|
-
const stream = res.pipeThrough(
|
4994
|
+
const stream = res.pipeThrough(_chunkKVXP3Q6Kjs.toolResultStream.call(void 0, config.tools, abortSignal)).pipeThrough(_chunkKVXP3Q6Kjs.runResultStream.call(void 0, ));
|
4917
4995
|
for await (const update of asAsyncIterable(stream)) {
|
4918
4996
|
yield update;
|
4919
4997
|
}
|
@@ -5133,7 +5211,7 @@ var ThreadConfigProvider = ({
|
|
5133
5211
|
}) => {
|
5134
5212
|
const hasAssistant = !!useAssistantRuntime({ optional: true });
|
5135
5213
|
const configProvider = config && Object.keys(_nullishCoalesce(config, () => ( {}))).length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadConfigContext.Provider, { value: config, children }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
|
5136
|
-
if (!_optionalChain([config, 'optionalAccess',
|
5214
|
+
if (!_optionalChain([config, 'optionalAccess', _256 => _256.runtime])) return configProvider;
|
5137
5215
|
if (hasAssistant) {
|
5138
5216
|
throw new Error(
|
5139
5217
|
"You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed."
|
@@ -5461,7 +5539,7 @@ var AssistantMessageContent = _react.forwardRef.call(void 0, ({ components: comp
|
|
5461
5539
|
{
|
5462
5540
|
components: {
|
5463
5541
|
...componentsProp,
|
5464
|
-
Text: _nullishCoalesce(_nullishCoalesce(_optionalChain([componentsProp, 'optionalAccess',
|
5542
|
+
Text: _nullishCoalesce(_nullishCoalesce(_optionalChain([componentsProp, 'optionalAccess', _257 => _257.Text]), () => ( components.Text)), () => ( content_part_default.Text)),
|
5465
5543
|
tools: toolsComponents
|
5466
5544
|
}
|
5467
5545
|
}
|
@@ -5511,15 +5589,13 @@ CircleStopIcon.displayName = "CircleStopIcon";
|
|
5511
5589
|
|
5512
5590
|
|
5513
5591
|
|
5514
|
-
var ComposerAttachmentRoot = withDefaults(
|
5592
|
+
var ComposerAttachmentRoot = withDefaults(attachment_exports.Root, {
|
5515
5593
|
className: "aui-composer-attachment-root"
|
5516
5594
|
});
|
5517
5595
|
ComposerAttachmentRoot.displayName = "ComposerAttachmentRoot";
|
5518
5596
|
var ComposerAttachment2 = () => {
|
5519
|
-
const attachment = useThreadComposerAttachment((a) => a.attachment);
|
5520
5597
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ComposerAttachmentRoot, { children: [
|
5521
|
-
|
5522
|
-
attachment.name.split(".").pop(),
|
5598
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, attachment_exports.unstable_Thumb, {}),
|
5523
5599
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ComposerAttachmentRemove, {})
|
5524
5600
|
] });
|
5525
5601
|
};
|
@@ -5530,22 +5606,17 @@ var ComposerAttachmentRemove = _react.forwardRef.call(void 0, (props, ref) => {
|
|
5530
5606
|
composer: { removeAttachment: { tooltip = "Remove file" } = {} } = {}
|
5531
5607
|
} = {}
|
5532
5608
|
} = useThreadConfig();
|
5533
|
-
|
5534
|
-
const handleRemoveAttachment = () => {
|
5535
|
-
attachmentRuntime.remove();
|
5536
|
-
};
|
5537
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
5609
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, attachment_exports.Remove, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
5538
5610
|
TooltipIconButton,
|
5539
5611
|
{
|
5540
5612
|
tooltip,
|
5541
5613
|
className: "aui-composer-attachment-remove",
|
5542
5614
|
side: "top",
|
5543
5615
|
...props,
|
5544
|
-
onClick: handleRemoveAttachment,
|
5545
5616
|
ref,
|
5546
5617
|
children: _nullishCoalesce(props.children, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CircleXIcon, {})))
|
5547
5618
|
}
|
5548
|
-
);
|
5619
|
+
) });
|
5549
5620
|
});
|
5550
5621
|
ComposerAttachmentRemove.displayName = "ComposerAttachmentRemove";
|
5551
5622
|
var exports5 = {
|
@@ -5603,7 +5674,7 @@ var ComposerAttachments = ({ components }) => {
|
|
5603
5674
|
{
|
5604
5675
|
components: {
|
5605
5676
|
...components,
|
5606
|
-
Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
5677
|
+
Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _258 => _258.Attachment]), () => ( composer_attachment_default))
|
5607
5678
|
}
|
5608
5679
|
}
|
5609
5680
|
) });
|
@@ -5729,7 +5800,7 @@ var ThreadWelcomeSuggestions = () => {
|
|
5729
5800
|
const suggestions2 = useThread((t) => t.suggestions);
|
5730
5801
|
const { welcome: { suggestions } = {} } = useThreadConfig();
|
5731
5802
|
const finalSuggestions = suggestions2.length ? suggestions2 : suggestions;
|
5732
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestionContainer, { children: _optionalChain([finalSuggestions, 'optionalAccess',
|
5803
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestionContainer, { children: _optionalChain([finalSuggestions, 'optionalAccess', _259 => _259.map, 'call', _260 => _260((suggestion, idx) => {
|
5733
5804
|
const key = `${suggestion.prompt}-${idx}`;
|
5734
5805
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestion, { suggestion }, key);
|
5735
5806
|
})]) });
|
@@ -5783,16 +5854,12 @@ var user_action_bar_default = Object.assign(UserActionBar, exports8);
|
|
5783
5854
|
|
5784
5855
|
// src/ui/user-message-attachment.tsx
|
5785
5856
|
|
5786
|
-
var UserMessageAttachmentRoot = withDefaults(
|
5857
|
+
var UserMessageAttachmentRoot = withDefaults(attachment_exports.Root, {
|
5787
5858
|
className: "aui-user-message-attachment-root"
|
5788
5859
|
});
|
5789
5860
|
UserMessageAttachmentRoot.displayName = "UserMessageAttachmentRoot";
|
5790
5861
|
var UserMessageAttachment = () => {
|
5791
|
-
|
5792
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, UserMessageAttachmentRoot, { children: [
|
5793
|
-
".",
|
5794
|
-
attachment.name.split(".").pop()
|
5795
|
-
] });
|
5862
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserMessageAttachmentRoot, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, attachment_exports.unstable_Thumb, {}) });
|
5796
5863
|
};
|
5797
5864
|
UserMessageAttachment.displayName = "UserMessageAttachment";
|
5798
5865
|
var exports9 = {
|
@@ -5828,7 +5895,7 @@ var UserMessageContent = _react.forwardRef.call(void 0,
|
|
5828
5895
|
{
|
5829
5896
|
components: {
|
5830
5897
|
...components,
|
5831
|
-
Text: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
5898
|
+
Text: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _261 => _261.Text]), () => ( content_part_default.Text))
|
5832
5899
|
}
|
5833
5900
|
}
|
5834
5901
|
) });
|
@@ -5846,7 +5913,7 @@ var UserMessageAttachments = ({
|
|
5846
5913
|
{
|
5847
5914
|
components: {
|
5848
5915
|
...components,
|
5849
|
-
Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
5916
|
+
Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _262 => _262.Attachment]), () => ( user_message_attachment_default))
|
5850
5917
|
}
|
5851
5918
|
}
|
5852
5919
|
) }) });
|
@@ -5915,9 +5982,14 @@ var edit_composer_default = Object.assign(EditComposer, exports11);
|
|
5915
5982
|
// src/ui/thread.tsx
|
5916
5983
|
|
5917
5984
|
var Thread = (config) => {
|
5918
|
-
const {
|
5985
|
+
const {
|
5986
|
+
components: {
|
5987
|
+
Composer: ComposerComponent = composer_default,
|
5988
|
+
ThreadWelcome: ThreadWelcomeComponent = thread_welcome_default
|
5989
|
+
} = {}
|
5990
|
+
} = config;
|
5919
5991
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadRoot, { config, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ThreadViewport, { children: [
|
5920
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
5992
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeComponent, {}),
|
5921
5993
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadMessages, {}),
|
5922
5994
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadFollowupSuggestions, {}),
|
5923
5995
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ThreadViewportFooter, { children: [
|
@@ -5950,10 +6022,10 @@ var ThreadMessages = ({ components, unstable_flexGrowDiv: flexGrowDiv = true, ..
|
|
5950
6022
|
thread_exports.Messages,
|
5951
6023
|
{
|
5952
6024
|
components: {
|
5953
|
-
UserMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
5954
|
-
EditComposer: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
5955
|
-
AssistantMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
5956
|
-
SystemMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess',
|
6025
|
+
UserMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _263 => _263.UserMessage]), () => ( user_message_default)),
|
6026
|
+
EditComposer: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _264 => _264.EditComposer]), () => ( edit_composer_default)),
|
6027
|
+
AssistantMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _265 => _265.AssistantMessage]), () => ( assistant_message_default)),
|
6028
|
+
SystemMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _266 => _266.SystemMessage]), () => ( SystemMessage))
|
5957
6029
|
},
|
5958
6030
|
...rest
|
5959
6031
|
}
|
@@ -5964,7 +6036,7 @@ var ThreadMessages = ({ components, unstable_flexGrowDiv: flexGrowDiv = true, ..
|
|
5964
6036
|
ThreadMessages.displayName = "ThreadMessages";
|
5965
6037
|
var ThreadFollowupSuggestions = () => {
|
5966
6038
|
const suggestions = useThread((t) => t.suggestions);
|
5967
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, thread_exports.If, { empty: false, running: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aui-thread-followup-suggestions", children: _optionalChain([suggestions, 'optionalAccess',
|
6039
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, thread_exports.If, { empty: false, running: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aui-thread-followup-suggestions", children: _optionalChain([suggestions, 'optionalAccess', _267 => _267.map, 'call', _268 => _268((suggestion, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
5968
6040
|
thread_exports.Suggestion,
|
5969
6041
|
{
|
5970
6042
|
className: "aui-thread-followup-suggestion",
|
@@ -6192,5 +6264,6 @@ var assistant_modal_default = Object.assign(AssistantModal, exports13);
|
|
6192
6264
|
|
6193
6265
|
|
6194
6266
|
|
6195
|
-
|
6267
|
+
|
6268
|
+
exports.ActionBarPrimitive = actionBar_exports; exports.AssistantActionBar = assistant_action_bar_default; exports.AssistantMessage = assistant_message_default; exports.AssistantModal = assistant_modal_default; exports.AssistantModalPrimitive = assistantModal_exports; exports.AssistantRuntimeProvider = AssistantRuntimeProvider; exports.AttachmentPrimitive = attachment_exports; exports.BranchPicker = branch_picker_default; exports.BranchPickerPrimitive = branchPicker_exports; exports.Composer = composer_default; exports.ComposerAttachment = composer_attachment_default; exports.ComposerPrimitive = composer_exports; exports.CompositeAttachmentAdapter = CompositeAttachmentAdapter; exports.ContentPart = content_part_default; exports.ContentPartPrimitive = contentPart_exports; exports.EdgeChatAdapter = EdgeChatAdapter; exports.EditComposer = edit_composer_default; exports.INTERNAL = internal_exports; exports.MessagePrimitive = message_exports; exports.SimpleImageAttachmentAdapter = SimpleImageAttachmentAdapter; exports.SimpleTextAttachmentAdapter = SimpleTextAttachmentAdapter; exports.TextContentPartProvider = TextContentPartProvider; exports.Thread = thread_default; exports.ThreadConfigProvider = ThreadConfigProvider; exports.ThreadPrimitive = thread_exports; exports.ThreadWelcome = thread_welcome_default; exports.UserActionBar = user_action_bar_default; exports.UserMessage = user_message_default; exports.UserMessageAttachment = user_message_attachment_default; exports.WebSpeechSynthesisAdapter = WebSpeechSynthesisAdapter; exports.fromCoreMessage = fromCoreMessage; exports.fromCoreMessages = fromCoreMessages; exports.fromLanguageModelMessages = fromLanguageModelMessages; exports.fromLanguageModelTools = fromLanguageModelTools; exports.getExternalStoreMessage = getExternalStoreMessage; exports.makeAssistantTool = makeAssistantTool; exports.makeAssistantToolUI = makeAssistantToolUI; exports.streamUtils = streamUtils; exports.subscribeToMainThread = subscribeToMainThread; exports.toCoreMessage = _chunkKVXP3Q6Kjs.toCoreMessage; exports.toCoreMessages = _chunkKVXP3Q6Kjs.toCoreMessages; exports.toLanguageModelMessages = _chunkKVXP3Q6Kjs.toLanguageModelMessages; exports.toLanguageModelTools = _chunkKVXP3Q6Kjs.toLanguageModelTools; exports.useActionBarCopy = useActionBarCopy; exports.useActionBarEdit = useActionBarEdit; exports.useActionBarFeedbackNegative = useActionBarFeedbackNegative; exports.useActionBarFeedbackPositive = useActionBarFeedbackPositive; exports.useActionBarReload = useActionBarReload; exports.useActionBarSpeak = useActionBarSpeak; exports.useActionBarStopSpeaking = useActionBarStopSpeaking; exports.useAppendMessage = useAppendMessage; exports.useAssistantActions = useAssistantActions; exports.useAssistantActionsStore = useAssistantActionsStore; exports.useAssistantContext = useAssistantContext; exports.useAssistantInstructions = useAssistantInstructions; exports.useAssistantRuntime = useAssistantRuntime; exports.useAssistantRuntimeStore = useAssistantRuntimeStore; exports.useAssistantTool = useAssistantTool; exports.useAssistantToolUI = useAssistantToolUI; exports.useBranchPickerCount = useBranchPickerCount; exports.useBranchPickerNext = useBranchPickerNext; exports.useBranchPickerNumber = useBranchPickerNumber; exports.useBranchPickerPrevious = useBranchPickerPrevious; exports.useComposer = useComposer; exports.useComposerAddAttachment = useComposerAddAttachment; exports.useComposerCancel = useComposerCancel; exports.useComposerContext = useComposerContext; exports.useComposerIf = useComposerIf; exports.useComposerRuntime = useComposerRuntime; exports.useComposerSend = useComposerSend; exports.useComposerStore = useComposerStore; exports.useContentPart = useContentPart; exports.useContentPartContext = useContentPartContext; exports.useContentPartDisplay = useContentPartDisplay; exports.useContentPartImage = useContentPartImage; exports.useContentPartRuntime = useContentPartRuntime; exports.useContentPartStore = useContentPartStore; exports.useContentPartText = useContentPartText; exports.useDangerousInBrowserRuntime = useDangerousInBrowserRuntime; exports.useEdgeRuntime = useEdgeRuntime; exports.useEditComposer = useEditComposer; exports.useEditComposerStore = useEditComposerStore; exports.useExternalMessageConverter = useExternalMessageConverter; exports.useExternalStoreRuntime = useExternalStoreRuntime; exports.useLocalRuntime = useLocalRuntime; exports.useMessage = useMessage; exports.useMessageContext = useMessageContext; exports.useMessageIf = useMessageIf; exports.useMessageRuntime = useMessageRuntime; exports.useMessageStore = useMessageStore; exports.useMessageUtils = useMessageUtils; exports.useMessageUtilsStore = useMessageUtilsStore; exports.useSwitchToNewThread = useSwitchToNewThread; exports.useThread = useThread; exports.useThreadActions = useThreadActions; exports.useThreadActionsStore = useThreadActionsStore; exports.useThreadComposer = useThreadComposer; exports.useThreadComposerStore = useThreadComposerStore; exports.useThreadConfig = useThreadConfig; exports.useThreadContext = useThreadContext; exports.useThreadEmpty = useThreadEmpty; exports.useThreadIf = useThreadIf; exports.useThreadMessages = useThreadMessages; exports.useThreadMessagesStore = useThreadMessagesStore; exports.useThreadRuntime = useThreadRuntime; exports.useThreadRuntimeStore = useThreadRuntimeStore; exports.useThreadScrollToBottom = useThreadScrollToBottom; exports.useThreadStore = useThreadStore; exports.useThreadSuggestion = useThreadSuggestion; exports.useThreadViewport = useThreadViewport; exports.useThreadViewportStore = useThreadViewportStore; exports.useToolUIs = useToolUIs; exports.useToolUIsStore = useToolUIsStore;
|
6196
6269
|
//# sourceMappingURL=index.js.map
|