@flytedan/flytebot-design-system 0.75.0 → 0.76.0

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.cjs CHANGED
@@ -14240,6 +14240,14 @@ function useChatEngine(opts) {
14240
14240
  if (!fail(err)) setStatus("ready");
14241
14241
  }
14242
14242
  }, [loadThread]);
14243
+ const refresh2 = React75.useCallback(async () => {
14244
+ if (!threadRef.current) return;
14245
+ try {
14246
+ await mergeThread();
14247
+ } catch (err) {
14248
+ fail(err);
14249
+ }
14250
+ }, [apiAdapter]);
14243
14251
  return {
14244
14252
  status,
14245
14253
  threadId,
@@ -14256,6 +14264,7 @@ function useChatEngine(opts) {
14256
14264
  removeQueued,
14257
14265
  setFeedback,
14258
14266
  reload,
14267
+ refresh: refresh2,
14259
14268
  canSend: status === "ready"
14260
14269
  };
14261
14270
  }
@@ -15072,6 +15081,7 @@ function AgentChatPanel({
15072
15081
  draftOwner,
15073
15082
  apiAdapter,
15074
15083
  threadId,
15084
+ reloadKey,
15075
15085
  /* identity + chrome */
15076
15086
  title = "Assistant",
15077
15087
  subtitle,
@@ -15164,6 +15174,13 @@ function AgentChatPanel({
15164
15174
  onClear,
15165
15175
  onFeedback
15166
15176
  });
15177
+ const { refresh: refresh2 } = engine;
15178
+ const lastReloadKey = React80.useRef(reloadKey);
15179
+ React80.useEffect(() => {
15180
+ if (lastReloadKey.current === reloadKey) return;
15181
+ lastReloadKey.current = reloadKey;
15182
+ refresh2();
15183
+ }, [reloadKey, refresh2]);
15167
15184
  const narrow = surface === "sidebar" ? panelWidth < NARROW_PANEL_WIDTH : surface === "sheet";
15168
15185
  const ctx = {
15169
15186
  assistantName,