@smartspace/chat-ui 1.13.1-dev.8b0255f → 1.13.1-dev.bdd70a4

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.d.ts CHANGED
@@ -34,8 +34,20 @@ type MessageListProps = {
34
34
  * sidebars, so it omits the prop and gets the natural 70% width.
35
35
  */
36
36
  expandedLayout?: boolean;
37
+ /**
38
+ * Set to `true` while the host is mid-redirect from a "no thread selected"
39
+ * route to the first thread of a workspace — the message list shows a
40
+ * loading skeleton instead of the empty-state during that brief window so
41
+ * users don't see a "No messages yet" flash.
42
+ *
43
+ * Standalone web fork passes this from `useMatch('/.../_layout/')` to
44
+ * detect the workspace-index route specifically. The sandbox/admin doesn't
45
+ * have multi-thread navigation, so it omits the prop entirely (defaults
46
+ * `false` — no router coupling).
47
+ */
48
+ isChoosingThread?: boolean;
37
49
  };
38
- declare function MessageList({ applyHostBackgroundOverride, expandedLayout, }?: MessageListProps): react_jsx_runtime.JSX.Element;
50
+ declare function MessageList({ applyHostBackgroundOverride, expandedLayout, isChoosingThread, }?: MessageListProps): react_jsx_runtime.JSX.Element;
39
51
 
40
52
  /**
41
53
  * Skeleton for the message list loading state.
package/dist/index.js CHANGED
@@ -30756,277 +30756,6 @@ var require_lib = __commonJS({
30756
30756
  exports$1.default = ace_1.default;
30757
30757
  }
30758
30758
  });
30759
-
30760
- // ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
30761
- var require_use_sync_external_store_shim_production = __commonJS({
30762
- "../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports$1) {
30763
- var React10 = __require("react");
30764
- function is2(x, y) {
30765
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
30766
- }
30767
- var objectIs = "function" === typeof Object.is ? Object.is : is2;
30768
- var useState17 = React10.useState;
30769
- var useEffect15 = React10.useEffect;
30770
- var useLayoutEffect = React10.useLayoutEffect;
30771
- var useDebugValue = React10.useDebugValue;
30772
- function useSyncExternalStore$2(subscribe, getSnapshot) {
30773
- var value = getSnapshot(), _useState = useState17({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
30774
- useLayoutEffect(
30775
- function() {
30776
- inst.value = value;
30777
- inst.getSnapshot = getSnapshot;
30778
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30779
- },
30780
- [subscribe, value, getSnapshot]
30781
- );
30782
- useEffect15(
30783
- function() {
30784
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30785
- return subscribe(function() {
30786
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30787
- });
30788
- },
30789
- [subscribe]
30790
- );
30791
- useDebugValue(value);
30792
- return value;
30793
- }
30794
- function checkIfSnapshotChanged(inst) {
30795
- var latestGetSnapshot = inst.getSnapshot;
30796
- inst = inst.value;
30797
- try {
30798
- var nextValue = latestGetSnapshot();
30799
- return !objectIs(inst, nextValue);
30800
- } catch (error) {
30801
- return true;
30802
- }
30803
- }
30804
- function useSyncExternalStore$1(subscribe, getSnapshot) {
30805
- return getSnapshot();
30806
- }
30807
- var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
30808
- exports$1.useSyncExternalStore = void 0 !== React10.useSyncExternalStore ? React10.useSyncExternalStore : shim;
30809
- }
30810
- });
30811
-
30812
- // ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
30813
- var require_use_sync_external_store_shim_development = __commonJS({
30814
- "../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports$1) {
30815
- "production" !== process.env.NODE_ENV && (function() {
30816
- function is2(x, y) {
30817
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
30818
- }
30819
- function useSyncExternalStore$2(subscribe, getSnapshot) {
30820
- didWarnOld18Alpha || void 0 === React10.startTransition || (didWarnOld18Alpha = true, console.error(
30821
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
30822
- ));
30823
- var value = getSnapshot();
30824
- if (!didWarnUncachedGetSnapshot) {
30825
- var cachedValue = getSnapshot();
30826
- objectIs(value, cachedValue) || (console.error(
30827
- "The result of getSnapshot should be cached to avoid an infinite loop"
30828
- ), didWarnUncachedGetSnapshot = true);
30829
- }
30830
- cachedValue = useState17({
30831
- inst: { value, getSnapshot }
30832
- });
30833
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
30834
- useLayoutEffect(
30835
- function() {
30836
- inst.value = value;
30837
- inst.getSnapshot = getSnapshot;
30838
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30839
- },
30840
- [subscribe, value, getSnapshot]
30841
- );
30842
- useEffect15(
30843
- function() {
30844
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30845
- return subscribe(function() {
30846
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
30847
- });
30848
- },
30849
- [subscribe]
30850
- );
30851
- useDebugValue(value);
30852
- return value;
30853
- }
30854
- function checkIfSnapshotChanged(inst) {
30855
- var latestGetSnapshot = inst.getSnapshot;
30856
- inst = inst.value;
30857
- try {
30858
- var nextValue = latestGetSnapshot();
30859
- return !objectIs(inst, nextValue);
30860
- } catch (error) {
30861
- return true;
30862
- }
30863
- }
30864
- function useSyncExternalStore$1(subscribe, getSnapshot) {
30865
- return getSnapshot();
30866
- }
30867
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
30868
- var React10 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is2, useState17 = React10.useState, useEffect15 = React10.useEffect, useLayoutEffect = React10.useLayoutEffect, useDebugValue = React10.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
30869
- exports$1.useSyncExternalStore = void 0 !== React10.useSyncExternalStore ? React10.useSyncExternalStore : shim;
30870
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
30871
- })();
30872
- }
30873
- });
30874
-
30875
- // ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js
30876
- var require_shim = __commonJS({
30877
- "../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js"(exports$1, module) {
30878
- if (process.env.NODE_ENV === "production") {
30879
- module.exports = require_use_sync_external_store_shim_production();
30880
- } else {
30881
- module.exports = require_use_sync_external_store_shim_development();
30882
- }
30883
- }
30884
- });
30885
-
30886
- // ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
30887
- var require_with_selector_production = __commonJS({
30888
- "../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js"(exports$1) {
30889
- var React10 = __require("react");
30890
- var shim = require_shim();
30891
- function is2(x, y) {
30892
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
30893
- }
30894
- var objectIs = "function" === typeof Object.is ? Object.is : is2;
30895
- var useSyncExternalStore = shim.useSyncExternalStore;
30896
- var useRef11 = React10.useRef;
30897
- var useEffect15 = React10.useEffect;
30898
- var useMemo9 = React10.useMemo;
30899
- var useDebugValue = React10.useDebugValue;
30900
- exports$1.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
30901
- var instRef = useRef11(null);
30902
- if (null === instRef.current) {
30903
- var inst = { hasValue: false, value: null };
30904
- instRef.current = inst;
30905
- } else inst = instRef.current;
30906
- instRef = useMemo9(
30907
- function() {
30908
- function memoizedSelector(nextSnapshot) {
30909
- if (!hasMemo) {
30910
- hasMemo = true;
30911
- memoizedSnapshot = nextSnapshot;
30912
- nextSnapshot = selector(nextSnapshot);
30913
- if (void 0 !== isEqual && inst.hasValue) {
30914
- var currentSelection = inst.value;
30915
- if (isEqual(currentSelection, nextSnapshot))
30916
- return memoizedSelection = currentSelection;
30917
- }
30918
- return memoizedSelection = nextSnapshot;
30919
- }
30920
- currentSelection = memoizedSelection;
30921
- if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
30922
- var nextSelection = selector(nextSnapshot);
30923
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
30924
- return memoizedSnapshot = nextSnapshot, currentSelection;
30925
- memoizedSnapshot = nextSnapshot;
30926
- return memoizedSelection = nextSelection;
30927
- }
30928
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
30929
- return [
30930
- function() {
30931
- return memoizedSelector(getSnapshot());
30932
- },
30933
- null === maybeGetServerSnapshot ? void 0 : function() {
30934
- return memoizedSelector(maybeGetServerSnapshot());
30935
- }
30936
- ];
30937
- },
30938
- [getSnapshot, getServerSnapshot, selector, isEqual]
30939
- );
30940
- var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
30941
- useEffect15(
30942
- function() {
30943
- inst.hasValue = true;
30944
- inst.value = value;
30945
- },
30946
- [value]
30947
- );
30948
- useDebugValue(value);
30949
- return value;
30950
- };
30951
- }
30952
- });
30953
-
30954
- // ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
30955
- var require_with_selector_development = __commonJS({
30956
- "../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports$1) {
30957
- "production" !== process.env.NODE_ENV && (function() {
30958
- function is2(x, y) {
30959
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
30960
- }
30961
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
30962
- var React10 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore = shim.useSyncExternalStore, useRef11 = React10.useRef, useEffect15 = React10.useEffect, useMemo9 = React10.useMemo, useDebugValue = React10.useDebugValue;
30963
- exports$1.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
30964
- var instRef = useRef11(null);
30965
- if (null === instRef.current) {
30966
- var inst = { hasValue: false, value: null };
30967
- instRef.current = inst;
30968
- } else inst = instRef.current;
30969
- instRef = useMemo9(
30970
- function() {
30971
- function memoizedSelector(nextSnapshot) {
30972
- if (!hasMemo) {
30973
- hasMemo = true;
30974
- memoizedSnapshot = nextSnapshot;
30975
- nextSnapshot = selector(nextSnapshot);
30976
- if (void 0 !== isEqual && inst.hasValue) {
30977
- var currentSelection = inst.value;
30978
- if (isEqual(currentSelection, nextSnapshot))
30979
- return memoizedSelection = currentSelection;
30980
- }
30981
- return memoizedSelection = nextSnapshot;
30982
- }
30983
- currentSelection = memoizedSelection;
30984
- if (objectIs(memoizedSnapshot, nextSnapshot))
30985
- return currentSelection;
30986
- var nextSelection = selector(nextSnapshot);
30987
- if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
30988
- return memoizedSnapshot = nextSnapshot, currentSelection;
30989
- memoizedSnapshot = nextSnapshot;
30990
- return memoizedSelection = nextSelection;
30991
- }
30992
- var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
30993
- return [
30994
- function() {
30995
- return memoizedSelector(getSnapshot());
30996
- },
30997
- null === maybeGetServerSnapshot ? void 0 : function() {
30998
- return memoizedSelector(maybeGetServerSnapshot());
30999
- }
31000
- ];
31001
- },
31002
- [getSnapshot, getServerSnapshot, selector, isEqual]
31003
- );
31004
- var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
31005
- useEffect15(
31006
- function() {
31007
- inst.hasValue = true;
31008
- inst.value = value;
31009
- },
31010
- [value]
31011
- );
31012
- useDebugValue(value);
31013
- return value;
31014
- };
31015
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
31016
- })();
31017
- }
31018
- });
31019
-
31020
- // ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js
31021
- var require_with_selector = __commonJS({
31022
- "../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js"(exports$1, module) {
31023
- if (process.env.NODE_ENV === "production") {
31024
- module.exports = require_with_selector_production();
31025
- } else {
31026
- module.exports = require_with_selector_development();
31027
- }
31028
- }
31029
- });
31030
30759
  var ChatCtx = createContext(null);
31031
30760
  function ChatProvider({
31032
30761
  service,
@@ -35171,154 +34900,6 @@ function MessageComposer({
35171
34900
  )
35172
34901
  ] });
35173
34902
  }
35174
-
35175
- // ../../node_modules/.pnpm/@tanstack+router-core@1.168.15/node_modules/@tanstack/router-core/dist/esm/isServer/server.js
35176
- var isServer = process.env.NODE_ENV === "test" ? void 0 : true;
35177
-
35178
- // ../../node_modules/.pnpm/@tanstack+router-core@1.168.15/node_modules/@tanstack/router-core/dist/esm/utils.js
35179
- var hasOwn = Object.prototype.hasOwnProperty;
35180
- var isEnumerable = Object.prototype.propertyIsEnumerable;
35181
- function replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {
35182
- if (isServer) return _next;
35183
- if (prev === _next) return prev;
35184
- if (_depth > 500) return _next;
35185
- const next2 = _next;
35186
- const array = isPlainArray(prev) && isPlainArray(next2);
35187
- if (!array && !(isPlainObject(prev) && isPlainObject(next2))) return next2;
35188
- const prevItems = array ? prev : getEnumerableOwnKeys(prev);
35189
- if (!prevItems) return next2;
35190
- const nextItems = array ? next2 : getEnumerableOwnKeys(next2);
35191
- if (!nextItems) return next2;
35192
- const prevSize = prevItems.length;
35193
- const nextSize = nextItems.length;
35194
- const copy = array ? new Array(nextSize) : _makeObj();
35195
- let equalItems = 0;
35196
- for (let i = 0; i < nextSize; i++) {
35197
- const key = array ? i : nextItems[i];
35198
- const p = prev[key];
35199
- const n = next2[key];
35200
- if (p === n) {
35201
- copy[key] = p;
35202
- if (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;
35203
- continue;
35204
- }
35205
- if (p === null || n === null || typeof p !== "object" || typeof n !== "object") {
35206
- copy[key] = n;
35207
- continue;
35208
- }
35209
- const v = replaceEqualDeep(p, n, _makeObj, _depth + 1);
35210
- copy[key] = v;
35211
- if (v === p) equalItems++;
35212
- }
35213
- return prevSize === nextSize && equalItems === prevSize ? prev : copy;
35214
- }
35215
- function getEnumerableOwnKeys(o) {
35216
- const names = Object.getOwnPropertyNames(o);
35217
- for (const name of names) if (!isEnumerable.call(o, name)) return false;
35218
- const symbols = Object.getOwnPropertySymbols(o);
35219
- if (symbols.length === 0) return names;
35220
- const keys2 = names;
35221
- for (const symbol of symbols) {
35222
- if (!isEnumerable.call(o, symbol)) return false;
35223
- keys2.push(symbol);
35224
- }
35225
- return keys2;
35226
- }
35227
- function isPlainObject(o) {
35228
- if (!hasObjectPrototype(o)) return false;
35229
- const ctor = o.constructor;
35230
- if (typeof ctor === "undefined") return true;
35231
- const prot = ctor.prototype;
35232
- if (!hasObjectPrototype(prot)) return false;
35233
- if (!prot.hasOwnProperty("isPrototypeOf")) return false;
35234
- return true;
35235
- }
35236
- function hasObjectPrototype(o) {
35237
- return Object.prototype.toString.call(o) === "[object Object]";
35238
- }
35239
- function isPlainArray(value) {
35240
- return Array.isArray(value) && value.length === Object.keys(value).length;
35241
- }
35242
-
35243
- // ../../node_modules/.pnpm/@tanstack+router-core@1.168.15/node_modules/@tanstack/router-core/dist/esm/invariant.js
35244
- function invariant() {
35245
- throw new Error("Invariant failed");
35246
- }
35247
- var routerContext = React8.createContext(null);
35248
- function useRouter(opts) {
35249
- const value = React8.useContext(routerContext);
35250
- if (process.env.NODE_ENV !== "production") {
35251
- if (!value) console.warn("Warning: useRouter must be used inside a <RouterProvider> component!");
35252
- }
35253
- return value;
35254
- }
35255
- var matchContext = React8.createContext(void 0);
35256
- var dummyMatchContext = React8.createContext(void 0);
35257
-
35258
- // ../../node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-store/dist/esm/useStore.js
35259
- var import_with_selector = __toESM(require_with_selector());
35260
- function defaultCompare(a, b) {
35261
- return a === b;
35262
- }
35263
- function useStore(atom, selector, compare = defaultCompare) {
35264
- const subscribe = useCallback(
35265
- (handleStoreChange) => {
35266
- if (!atom) {
35267
- return () => {
35268
- };
35269
- }
35270
- const { unsubscribe } = atom.subscribe(handleStoreChange);
35271
- return unsubscribe;
35272
- },
35273
- [atom]
35274
- );
35275
- const boundGetSnapshot = useCallback(() => atom?.get(), [atom]);
35276
- const selectedSnapshot = (0, import_with_selector.useSyncExternalStoreWithSelector)(
35277
- subscribe,
35278
- boundGetSnapshot,
35279
- boundGetSnapshot,
35280
- selector,
35281
- compare
35282
- );
35283
- return selectedSnapshot;
35284
- }
35285
-
35286
- // ../../node_modules/.pnpm/@tanstack+react-router@1.168.23_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-router/dist/esm/useMatch.js
35287
- var dummyStore = {
35288
- get: () => void 0,
35289
- subscribe: () => ({ unsubscribe: () => {
35290
- } })
35291
- };
35292
- function useMatch(opts) {
35293
- const router = useRouter();
35294
- const nearestMatchId = React8.useContext(opts.from ? dummyMatchContext : matchContext);
35295
- const key = opts.from ?? nearestMatchId;
35296
- const matchStore = key ? opts.from ? router.stores.getRouteMatchStore(key) : router.stores.matchStores.get(key) : void 0;
35297
- if (isServer ?? router.isServer) {
35298
- const match = matchStore?.get();
35299
- if ((opts.shouldThrow ?? true) && !match) {
35300
- if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`);
35301
- invariant();
35302
- }
35303
- if (match === void 0) return;
35304
- return opts.select ? opts.select(match) : match;
35305
- }
35306
- const previousResult = React8.useRef(void 0);
35307
- return useStore(matchStore ?? dummyStore, (match) => {
35308
- if ((opts.shouldThrow ?? true) && !match) {
35309
- if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`);
35310
- invariant();
35311
- }
35312
- if (match === void 0) return;
35313
- const selected = opts.select ? opts.select(match) : match;
35314
- if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {
35315
- const shared = replaceEqualDeep(previousResult.current, selected);
35316
- previousResult.current = shared;
35317
- return shared;
35318
- }
35319
- return selected;
35320
- });
35321
- }
35322
34903
  function getPromptSignature(m) {
35323
34904
  const prompt = m.values?.find(
35324
34905
  (v) => v.type === "Input" /* INPUT */ && v.name === "prompt"
@@ -49582,10 +49163,10 @@ function remarkGfm(options) {
49582
49163
 
49583
49164
  // src/shared/markdown/plugins/remarkFileTag.ts
49584
49165
  var FILE_TAG_RE = /\[\[file:([^|\]]+)\|([^\]]+)\]\]/g;
49585
- var escapeHtml2 = (s2) => s2.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
49586
- var renderFileTag = (id, label) => `<span class="file-tag" data-file-tag data-id="${escapeHtml2(
49166
+ var escapeHtml = (s2) => s2.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
49167
+ var renderFileTag = (id, label) => `<span class="file-tag" data-file-tag data-id="${escapeHtml(
49587
49168
  id
49588
- )}">${escapeHtml2(label)}</span>`;
49169
+ )}">${escapeHtml(label)}</span>`;
49589
49170
  var remarkFileTag = () => (tree) => {
49590
49171
  visit(tree, "text", (node2, index, parent) => {
49591
49172
  if (!parent || index == null) return;
@@ -50880,7 +50461,8 @@ var MessageItem = ({
50880
50461
  };
50881
50462
  function MessageList({
50882
50463
  applyHostBackgroundOverride = false,
50883
- expandedLayout = false
50464
+ expandedLayout = false,
50465
+ isChoosingThread = false
50884
50466
  } = {}) {
50885
50467
  const { workspaceId, threadId } = useChatContext();
50886
50468
  const contentRef = useRef(null);
@@ -50891,10 +50473,6 @@ function MessageList({
50891
50473
  const hasInitialScrollRef = useRef(false);
50892
50474
  const isMobile = useIsMobile();
50893
50475
  const { data: activeWorkspace } = useWorkspace(workspaceId);
50894
- const workspaceIndexMatch = useMatch({
50895
- from: "/_protected/workspace/$workspaceId/_layout/",
50896
- shouldThrow: false
50897
- });
50898
50476
  const [isAtBottom, setIsAtBottom] = useState(true);
50899
50477
  const {
50900
50478
  data: thread,
@@ -50964,7 +50542,6 @@ function MessageList({
50964
50542
  ro.observe(content);
50965
50543
  return () => ro.disconnect();
50966
50544
  }, [isAtBottom, scrollToBottom]);
50967
- const isChoosingThread = !!workspaceId && !threadId && !!workspaceIndexMatch;
50968
50545
  const isLoading = isChoosingThread || (threadPending || threadFetching) && !thread || (messagesPending || messagesFetching) && messages === void 0;
50969
50546
  if (isLoading) {
50970
50547
  return /* @__PURE__ */ jsx(
@@ -51292,50 +50869,6 @@ object-assign/index.js:
51292
50869
  (c) Sindre Sorhus
51293
50870
  @license MIT
51294
50871
  *)
51295
-
51296
- use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
51297
- (**
51298
- * @license React
51299
- * use-sync-external-store-shim.production.js
51300
- *
51301
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51302
- *
51303
- * This source code is licensed under the MIT license found in the
51304
- * LICENSE file in the root directory of this source tree.
51305
- *)
51306
-
51307
- use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
51308
- (**
51309
- * @license React
51310
- * use-sync-external-store-shim.development.js
51311
- *
51312
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51313
- *
51314
- * This source code is licensed under the MIT license found in the
51315
- * LICENSE file in the root directory of this source tree.
51316
- *)
51317
-
51318
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
51319
- (**
51320
- * @license React
51321
- * use-sync-external-store-shim/with-selector.production.js
51322
- *
51323
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51324
- *
51325
- * This source code is licensed under the MIT license found in the
51326
- * LICENSE file in the root directory of this source tree.
51327
- *)
51328
-
51329
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
51330
- (**
51331
- * @license React
51332
- * use-sync-external-store-shim/with-selector.development.js
51333
- *
51334
- * Copyright (c) Meta Platforms, Inc. and affiliates.
51335
- *
51336
- * This source code is licensed under the MIT license found in the
51337
- * LICENSE file in the root directory of this source tree.
51338
- *)
51339
50872
  */
51340
50873
 
51341
50874
  export { ChatProvider, ChatVariablesForm, MarkdownEditor, MessageComposer, MessageList, MessageListSkeleton, MessageMarkdown, MessageValueType, THREAD_LIST_PAGE_SIZE, applyDeltaToMessage, applyThreadToCache, downloadFileBlobOptions, filesKeys, flowRunsKeys, getModelIcon, getThreadPlaceholderFromListCache, invalidateWorkspaceThreadLists, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, setThreadOptimisticRunning, setThreadRunningInLists, taggableUsersOptions, threadDetailOptions, threadsKeys, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useMessages, useModels, useSendMessage, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, workspaceDetailOptions, workspaceKeys };