@truefoundry/trueforge-ui 0.3.0-rc.10 → 0.3.0-rc.11

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{AgentCodeSnippets-RJBB4DDE.js → AgentCodeSnippets-CHDVZHHK.js} +5 -5
  3. package/dist/AgentMetricChart-6RGWFMJE.js +15 -0
  4. package/dist/AgentOverview-3LJZ6MO7.js +311 -0
  5. package/dist/AgentOverview-3LJZ6MO7.js.map +1 -0
  6. package/dist/{AgentSessionEventTimeline-GRGIQTRE.js → AgentSessionEventTimeline-5GOJKT7D.js} +5 -5
  7. package/dist/{AgentSessionEventTimelineChart-GNF4VOUT.js → AgentSessionEventTimelineChart-UYG3JQMP.js} +5 -5
  8. package/dist/{AgentSessions-5OTF2BUW.js → AgentSessions-KUABCQ4W.js} +78 -13
  9. package/dist/AgentSessions-KUABCQ4W.js.map +1 -0
  10. package/dist/{ConnectorSettings-HDKGLDCY.js → ConnectorSettings-PED5C2P7.js} +5 -5
  11. package/dist/{DockLayout-D2FPQCAL.js → DockLayout-ACM7BVIH.js} +8 -8
  12. package/dist/{DrawerLayout-HUV7RAWL.js → DrawerLayout-SGBYRKHI.js} +9 -9
  13. package/dist/{ModelSettings-VNQ7HPKH.js → ModelSettings-GJTVFXFY.js} +5 -5
  14. package/dist/OpenUiFenceBlock-MJTC2VJ5.js +9 -0
  15. package/dist/{SandboxSettings-ZLXGMFBF.js → SandboxSettings-VETQ7UPE.js} +5 -5
  16. package/dist/SchedulesPage-LHJ3U2VM.js +15 -0
  17. package/dist/{SettingsBuilder-RVVYXOJW.js → SettingsBuilder-5ZCU66FF.js} +7 -7
  18. package/dist/{SidebarLayout-KYA76FQ7.js → SidebarLayout-TR5CAB6Q.js} +10 -10
  19. package/dist/{SkillSettings-7OHT7FPI.js → SkillSettings-TRTY2YH3.js} +5 -5
  20. package/dist/{TrueForgeUIWithRouter-LKG4XLW6.js → TrueForgeUIWithRouter-GZUSRZIR.js} +6 -6
  21. package/dist/{WidgetLayout-W2RGGOQ3.js → WidgetLayout-2TM6I4LJ.js} +8 -8
  22. package/dist/{chunk-PQ7VWBQQ.js → chunk-2MUK3SMR.js} +2 -2
  23. package/dist/{chunk-3ZW74FHC.js → chunk-5N5V7YLO.js} +6 -2
  24. package/dist/chunk-5N5V7YLO.js.map +1 -0
  25. package/dist/{chunk-PCI6VMB5.js → chunk-75YEQUUD.js} +8 -8
  26. package/dist/{chunk-JKEBMGLH.js → chunk-BXG6XN2S.js} +3 -3
  27. package/dist/chunk-GKXDRULM.js +587 -0
  28. package/dist/chunk-GKXDRULM.js.map +1 -0
  29. package/dist/{chunk-GG23N2GW.js → chunk-OH357IHR.js} +1247 -846
  30. package/dist/chunk-OH357IHR.js.map +1 -0
  31. package/dist/{chunk-KSGNKS2D.js → chunk-P6MZDITS.js} +4 -4
  32. package/dist/{chunk-CG75X77Q.js → chunk-SLMFEG7X.js} +2 -2
  33. package/dist/{chunk-EPAL2HD5.js → chunk-UWLL327M.js} +4 -4
  34. package/dist/{chunk-67ZO7Z2W.js → chunk-VAOCM3QQ.js} +8 -8
  35. package/dist/{chunk-DPPOEFBD.js → chunk-Y7O6CMC7.js} +4 -4
  36. package/dist/index.d.ts +10 -2
  37. package/dist/index.js +10 -10
  38. package/dist/plugins/trueforge-agent-server-adapter/index.js +23 -10
  39. package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
  40. package/dist/styles.css +1 -1
  41. package/package.json +3 -3
  42. package/dist/AgentMetricChart-UPGSJ2WP.js +0 -15
  43. package/dist/AgentOverview-U5WIQXZN.js +0 -169
  44. package/dist/AgentOverview-U5WIQXZN.js.map +0 -1
  45. package/dist/AgentSessions-5OTF2BUW.js.map +0 -1
  46. package/dist/OpenUiFenceBlock-KPZFLUSC.js +0 -9
  47. package/dist/SchedulesPage-QKYI2Z3A.js +0 -15
  48. package/dist/chunk-3ZW74FHC.js.map +0 -1
  49. package/dist/chunk-GG23N2GW.js.map +0 -1
  50. package/dist/chunk-JCL3Q7RW.js +0 -587
  51. package/dist/chunk-JCL3Q7RW.js.map +0 -1
  52. /package/dist/{AgentCodeSnippets-RJBB4DDE.js.map → AgentCodeSnippets-CHDVZHHK.js.map} +0 -0
  53. /package/dist/{AgentMetricChart-UPGSJ2WP.js.map → AgentMetricChart-6RGWFMJE.js.map} +0 -0
  54. /package/dist/{AgentSessionEventTimeline-GRGIQTRE.js.map → AgentSessionEventTimeline-5GOJKT7D.js.map} +0 -0
  55. /package/dist/{AgentSessionEventTimelineChart-GNF4VOUT.js.map → AgentSessionEventTimelineChart-UYG3JQMP.js.map} +0 -0
  56. /package/dist/{ConnectorSettings-HDKGLDCY.js.map → ConnectorSettings-PED5C2P7.js.map} +0 -0
  57. /package/dist/{DockLayout-D2FPQCAL.js.map → DockLayout-ACM7BVIH.js.map} +0 -0
  58. /package/dist/{DrawerLayout-HUV7RAWL.js.map → DrawerLayout-SGBYRKHI.js.map} +0 -0
  59. /package/dist/{ModelSettings-VNQ7HPKH.js.map → ModelSettings-GJTVFXFY.js.map} +0 -0
  60. /package/dist/{OpenUiFenceBlock-KPZFLUSC.js.map → OpenUiFenceBlock-MJTC2VJ5.js.map} +0 -0
  61. /package/dist/{SandboxSettings-ZLXGMFBF.js.map → SandboxSettings-VETQ7UPE.js.map} +0 -0
  62. /package/dist/{SchedulesPage-QKYI2Z3A.js.map → SchedulesPage-LHJ3U2VM.js.map} +0 -0
  63. /package/dist/{SettingsBuilder-RVVYXOJW.js.map → SettingsBuilder-5ZCU66FF.js.map} +0 -0
  64. /package/dist/{SidebarLayout-KYA76FQ7.js.map → SidebarLayout-TR5CAB6Q.js.map} +0 -0
  65. /package/dist/{SkillSettings-7OHT7FPI.js.map → SkillSettings-TRTY2YH3.js.map} +0 -0
  66. /package/dist/{TrueForgeUIWithRouter-LKG4XLW6.js.map → TrueForgeUIWithRouter-GZUSRZIR.js.map} +0 -0
  67. /package/dist/{WidgetLayout-W2RGGOQ3.js.map → WidgetLayout-2TM6I4LJ.js.map} +0 -0
  68. /package/dist/{chunk-PQ7VWBQQ.js.map → chunk-2MUK3SMR.js.map} +0 -0
  69. /package/dist/{chunk-PCI6VMB5.js.map → chunk-75YEQUUD.js.map} +0 -0
  70. /package/dist/{chunk-JKEBMGLH.js.map → chunk-BXG6XN2S.js.map} +0 -0
  71. /package/dist/{chunk-KSGNKS2D.js.map → chunk-P6MZDITS.js.map} +0 -0
  72. /package/dist/{chunk-CG75X77Q.js.map → chunk-SLMFEG7X.js.map} +0 -0
  73. /package/dist/{chunk-EPAL2HD5.js.map → chunk-UWLL327M.js.map} +0 -0
  74. /package/dist/{chunk-67ZO7Z2W.js.map → chunk-VAOCM3QQ.js.map} +0 -0
  75. /package/dist/{chunk-DPPOEFBD.js.map → chunk-Y7O6CMC7.js.map} +0 -0
@@ -5,14 +5,14 @@ import {
5
5
  useResourcePermissions,
6
6
  useSlot,
7
7
  withInitialUserMessages
8
- } from "./chunk-GG23N2GW.js";
8
+ } from "./chunk-OH357IHR.js";
9
9
  import {
10
10
  Icon,
11
11
  auiButtonClass,
12
12
  pageHeaderTitleClassName,
13
13
  sidebarRailButtonClassName,
14
14
  useDraftCatalog
15
- } from "./chunk-3ZW74FHC.js";
15
+ } from "./chunk-5N5V7YLO.js";
16
16
  import {
17
17
  isSettingsChromeEnabled,
18
18
  shellIsCreateAgent,
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  cn,
30
30
  useTheme
31
- } from "./chunk-JCL3Q7RW.js";
31
+ } from "./chunk-GKXDRULM.js";
32
32
 
33
33
  // src/atoms/NamedAgentHeaderLabel.tsx
34
34
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -293,4 +293,4 @@ export {
293
293
  ShellActions,
294
294
  AgentConfigDrawerContainer
295
295
  };
296
- //# sourceMappingURL=chunk-KSGNKS2D.js.map
296
+ //# sourceMappingURL=chunk-P6MZDITS.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  useOptionalContentClassNames
4
- } from "./chunk-JCL3Q7RW.js";
4
+ } from "./chunk-GKXDRULM.js";
5
5
 
6
6
  // src/atoms/OpenUiFenceBlock.tsx
7
7
  import { Renderer } from "@openuidev/react-lang";
@@ -21,4 +21,4 @@ function OpenUiFenceBlock({ content, isStreaming, darkTheme }) {
21
21
  export {
22
22
  OpenUiFenceBlock
23
23
  };
24
- //# sourceMappingURL=chunk-CG75X77Q.js.map
24
+ //# sourceMappingURL=chunk-SLMFEG7X.js.map
@@ -33,7 +33,7 @@ import {
33
33
  useResourcePermissions,
34
34
  useSlot,
35
35
  useToasterOptional
36
- } from "./chunk-GG23N2GW.js";
36
+ } from "./chunk-OH357IHR.js";
37
37
  import {
38
38
  findLibraryAgent,
39
39
  readScheduleShareSearch,
@@ -46,7 +46,7 @@ import {
46
46
  PageHeader,
47
47
  auiButtonClass,
48
48
  useDraftCatalog
49
- } from "./chunk-3ZW74FHC.js";
49
+ } from "./chunk-5N5V7YLO.js";
50
50
  import {
51
51
  libraryAgentId,
52
52
  useOptionalCatalogServer,
@@ -56,7 +56,7 @@ import {
56
56
  } from "./chunk-2GIZY3JJ.js";
57
57
  import {
58
58
  cn
59
- } from "./chunk-JCL3Q7RW.js";
59
+ } from "./chunk-GKXDRULM.js";
60
60
 
61
61
  // src/atoms/schedules/SchedulesPage.tsx
62
62
  import { useCallback, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "react";
@@ -1626,4 +1626,4 @@ export {
1626
1626
  ScheduleLastRunsCell,
1627
1627
  SchedulesPage
1628
1628
  };
1629
- //# sourceMappingURL=chunk-EPAL2HD5.js.map
1629
+ //# sourceMappingURL=chunk-UWLL327M.js.map
@@ -2,19 +2,19 @@ import {
2
2
  AgentConfigDrawerContainer,
3
3
  NamedAgentHeaderLabel,
4
4
  ShellActions
5
- } from "./chunk-KSGNKS2D.js";
5
+ } from "./chunk-P6MZDITS.js";
6
6
  import {
7
7
  Thread
8
- } from "./chunk-JKEBMGLH.js";
8
+ } from "./chunk-BXG6XN2S.js";
9
9
  import {
10
10
  useSlot
11
- } from "./chunk-GG23N2GW.js";
11
+ } from "./chunk-OH357IHR.js";
12
12
  import {
13
13
  Icon,
14
14
  PageHeader,
15
15
  Spinner,
16
16
  auiButtonClass
17
- } from "./chunk-3ZW74FHC.js";
17
+ } from "./chunk-5N5V7YLO.js";
18
18
  import {
19
19
  useOptionalShellMode
20
20
  } from "./chunk-2GIZY3JJ.js";
@@ -23,14 +23,14 @@ import {
23
23
  } from "./chunk-M6MHLVSO.js";
24
24
  import {
25
25
  cn
26
- } from "./chunk-JCL3Q7RW.js";
26
+ } from "./chunk-GKXDRULM.js";
27
27
 
28
28
  // src/layouts/StackChatPanel.tsx
29
29
  import { lazy, Suspense, useEffect } from "react";
30
30
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
31
- var TruefoundrySettingsBuilder = lazy(() => import("./SettingsBuilder-RVVYXOJW.js"));
31
+ var TruefoundrySettingsBuilder = lazy(() => import("./SettingsBuilder-5ZCU66FF.js"));
32
32
  var SchedulesPage = lazy(
33
- () => import("./SchedulesPage-QKYI2Z3A.js").then((m) => ({ default: m.SchedulesPage }))
33
+ () => import("./SchedulesPage-LHJ3U2VM.js").then((m) => ({ default: m.SchedulesPage }))
34
34
  );
35
35
  function StackChatPanel({ className, threadHeaderEnd }) {
36
36
  const aui = useAui();
@@ -181,4 +181,4 @@ function StackChatPanel({ className, threadHeaderEnd }) {
181
181
  export {
182
182
  StackChatPanel
183
183
  };
184
- //# sourceMappingURL=chunk-67ZO7Z2W.js.map
184
+ //# sourceMappingURL=chunk-VAOCM3QQ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  useIsMobile,
11
11
  useResourcePermissions,
12
12
  useSlot
13
- } from "./chunk-GG23N2GW.js";
13
+ } from "./chunk-OH357IHR.js";
14
14
  import {
15
15
  useSearchAgentsList
16
16
  } from "./chunk-T6QQV5LK.js";
@@ -18,7 +18,7 @@ import {
18
18
  Icon,
19
19
  auiButtonClass,
20
20
  useCompactLayout
21
- } from "./chunk-3ZW74FHC.js";
21
+ } from "./chunk-5N5V7YLO.js";
22
22
  import {
23
23
  libraryAgentId,
24
24
  useOptionalServer,
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-2GIZY3JJ.js";
27
27
  import {
28
28
  cn
29
- } from "./chunk-JCL3Q7RW.js";
29
+ } from "./chunk-GKXDRULM.js";
30
30
 
31
31
  // src/containers/ThreadListContainer.tsx
32
32
  import {
@@ -514,4 +514,4 @@ function ThreadListContainer({ onThreadOpen, variant = "default" } = {}) {
514
514
  export {
515
515
  ThreadListContainer
516
516
  };
517
- //# sourceMappingURL=chunk-DPPOEFBD.js.map
517
+ //# sourceMappingURL=chunk-Y7O6CMC7.js.map
package/dist/index.d.ts CHANGED
@@ -487,6 +487,10 @@ type AgentSessionListRowProps = {
487
487
  };
488
488
  active: boolean;
489
489
  onSelect: () => void;
490
+ /** Opens delete confirmation; does not call the API. */
491
+ onRequestDelete?: () => void;
492
+ /** When false, Delete is disabled via PermissionGuard. Defaults to true. */
493
+ canDelete?: boolean;
490
494
  };
491
495
  type AgentSessionDetailHeaderProps = {
492
496
  title: string;
@@ -680,7 +684,7 @@ declare module '../../theme/SlotsProvider.js' {
680
684
  }
681
685
  }
682
686
 
683
- declare function AgentSessionListRow({ title, agentName, sourceType, lastActivityAt, metrics, active, onSelect, }: AgentSessionListRowProps): react.JSX.Element;
687
+ declare function AgentSessionListRow({ title, agentName, sourceType, lastActivityAt, metrics, active, onSelect, onRequestDelete, canDelete, }: AgentSessionListRowProps): react.JSX.Element;
684
688
  declare module '../../theme/SlotsProvider.js' {
685
689
  interface AtomSlots {
686
690
  AgentSessionListRow: typeof AgentSessionListRow;
@@ -1054,6 +1058,8 @@ type AgentMcpEditorContentProps = {
1054
1058
  query: string;
1055
1059
  activeConnectorId: string | null;
1056
1060
  tools: McpToolSelection[];
1061
+ /** Tools already loaded per connector id, so selected servers can show approval state. */
1062
+ toolsByConnector?: Record<string, McpToolSelection[]>;
1057
1063
  connectorLoading: boolean;
1058
1064
  connectorError: string | null;
1059
1065
  toolsLoading: boolean;
@@ -1064,7 +1070,7 @@ type AgentMcpEditorContentProps = {
1064
1070
  onRefreshConnector?: () => void;
1065
1071
  onChange: (spec: AgentSpec) => void;
1066
1072
  };
1067
- declare function AgentMcpEditorContent({ spec, connectors, query, activeConnectorId, tools, connectorLoading, connectorError, toolsLoading, toolsError, onQueryChange, onSelectConnector, onRetryTools, onRefreshConnector, onChange, }: AgentMcpEditorContentProps): react.JSX.Element;
1073
+ declare function AgentMcpEditorContent({ spec, connectors, query, activeConnectorId, tools, toolsByConnector, connectorLoading, connectorError, toolsLoading, toolsError, onQueryChange, onSelectConnector, onRetryTools, onRefreshConnector, onChange, }: AgentMcpEditorContentProps): react.JSX.Element;
1068
1074
  declare module '../../theme/SlotsProvider.js' {
1069
1075
  interface AtomSlots {
1070
1076
  AgentMcpEditorContent: typeof AgentMcpEditorContent;
@@ -1126,6 +1132,7 @@ type AgentResourceConfigModalProps = {
1126
1132
  query: string;
1127
1133
  activeConnectorId: string | null;
1128
1134
  tools: McpToolSelection[];
1135
+ toolsByConnector?: Record<string, McpToolSelection[]>;
1129
1136
  connectorLoading: boolean;
1130
1137
  connectorError: string | null;
1131
1138
  toolsLoading: boolean;
@@ -1153,6 +1160,7 @@ type AgentResourceEditorContentProps = {
1153
1160
  query: string;
1154
1161
  activeConnectorId: string | null;
1155
1162
  tools: McpToolSelection[];
1163
+ toolsByConnector?: Record<string, McpToolSelection[]>;
1156
1164
  connectorLoading: boolean;
1157
1165
  connectorError: string | null;
1158
1166
  toolsLoading: boolean;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  ThreadListContainer
4
- } from "./chunk-DPPOEFBD.js";
4
+ } from "./chunk-Y7O6CMC7.js";
5
5
  import {
6
6
  ApprovalNavContainer,
7
7
  AskUserContainer,
@@ -16,12 +16,12 @@ import {
16
16
  threadHasPendingMcpAuth,
17
17
  useApprovalNav,
18
18
  useComposerPauseView
19
- } from "./chunk-JKEBMGLH.js";
19
+ } from "./chunk-BXG6XN2S.js";
20
20
  import {
21
21
  ServerInitLoader,
22
22
  TrueForgeUIShell,
23
23
  TrueFoundryChatProvider
24
- } from "./chunk-PCI6VMB5.js";
24
+ } from "./chunk-75YEQUUD.js";
25
25
  import "./chunk-DJUFS2BW.js";
26
26
  import {
27
27
  ComposerBusyProvider,
@@ -31,7 +31,7 @@ import {
31
31
  } from "./chunk-BSIPI3KV.js";
32
32
  import {
33
33
  AgentMetricChart
34
- } from "./chunk-PQ7VWBQQ.js";
34
+ } from "./chunk-2MUK3SMR.js";
35
35
  import {
36
36
  createTrueFoundryServer
37
37
  } from "./chunk-7AAO4UDQ.js";
@@ -50,7 +50,7 @@ import {
50
50
  ScheduleStatusBadge,
51
51
  SchedulesPage,
52
52
  TestScheduleScreen
53
- } from "./chunk-EPAL2HD5.js";
53
+ } from "./chunk-UWLL327M.js";
54
54
  import {
55
55
  AgentCodeBlock,
56
56
  AgentConfigEditors,
@@ -193,14 +193,14 @@ import {
193
193
  useThemeMode,
194
194
  useToaster,
195
195
  useToasterOptional
196
- } from "./chunk-GG23N2GW.js";
196
+ } from "./chunk-OH357IHR.js";
197
197
  import "./chunk-T6QQV5LK.js";
198
198
  import {
199
199
  DraftCatalogProvider,
200
200
  Icon,
201
201
  registerIcons,
202
202
  useDraftCatalog
203
- } from "./chunk-3ZW74FHC.js";
203
+ } from "./chunk-5N5V7YLO.js";
204
204
  import {
205
205
  DEFAULT_AGENT_CONFIG,
206
206
  ServerProvider,
@@ -230,7 +230,7 @@ import {
230
230
  } from "./chunk-M6MHLVSO.js";
231
231
  import {
232
232
  OpenUiFenceBlock
233
- } from "./chunk-CG75X77Q.js";
233
+ } from "./chunk-SLMFEG7X.js";
234
234
  import {
235
235
  PRESETS,
236
236
  ThemeProvider,
@@ -240,7 +240,7 @@ import {
240
240
  useOptionalContentClassNames,
241
241
  useTheme,
242
242
  useThemeIcons
243
- } from "./chunk-JCL3Q7RW.js";
243
+ } from "./chunk-GKXDRULM.js";
244
244
 
245
245
  // src/icons/agent-2.svg
246
246
  import * as React from "react";
@@ -441,7 +441,7 @@ function ToolGroupContainer({ children, group }) {
441
441
  import { lazy, Suspense } from "react";
442
442
  import { jsx as jsx12 } from "react/jsx-runtime";
443
443
  var TrueForgeUIWithRouter = lazy(
444
- () => import("./TrueForgeUIWithRouter-LKG4XLW6.js").then((m) => ({ default: m.TrueForgeUIWithRouter }))
444
+ () => import("./TrueForgeUIWithRouter-GZUSRZIR.js").then((m) => ({ default: m.TrueForgeUIWithRouter }))
445
445
  );
446
446
  function TrueForgeUI(props) {
447
447
  const isMcpAuthScreen = typeof window !== "undefined" && new URLSearchParams(window.location.search).get("screenType") === "mcp-auth";
@@ -97,15 +97,18 @@ function toUiTerminalTurnState(state) {
97
97
  }
98
98
  }
99
99
  function toUiSessionEvent(event) {
100
+ if (event.type === "turn.update") return void 0;
100
101
  if (event.type !== "turn.done") return { ...event };
101
102
  return { ...event, state: toUiTerminalTurnState(event.state) };
102
103
  }
103
104
  function toUiStreamingEvent(event) {
105
+ if (event.type === "turn.update") return void 0;
104
106
  if (event.type !== "turn.done") return { ...event };
105
107
  return { ...event, state: toUiTerminalTurnState(event.state) };
106
108
  }
107
109
  function toUiEventItem(item) {
108
- return { turnId: item.turnId, event: toUiSessionEvent(item.event) };
110
+ const event = toUiSessionEvent(item.event);
111
+ return event === void 0 ? void 0 : { turnId: item.turnId, event };
109
112
  }
110
113
 
111
114
  // src/plugins/trueforge-agent-server-adapter/chatServer.ts
@@ -177,7 +180,11 @@ function toUiTurn(turn) {
177
180
  };
178
181
  }
179
182
  function toListResult(page, map) {
180
- const data = page.data.map(map);
183
+ const data = [];
184
+ for (const item of page.data) {
185
+ const mapped = map(item);
186
+ if (mapped !== void 0) data.push(mapped);
187
+ }
181
188
  const token = page.response.pagination.nextPageToken;
182
189
  return {
183
190
  data,
@@ -266,10 +273,13 @@ function createHarnessChatServer(options = {}) {
266
273
  });
267
274
  let fallbackSequence = 0;
268
275
  for await (const item of stream.withMetadata()) {
269
- yield {
270
- sequenceNumber: sequenceNumber(item.id, fallbackSequence),
271
- event: toUiStreamingEvent(item.data)
272
- };
276
+ const event = toUiStreamingEvent(item.data);
277
+ if (event !== void 0) {
278
+ yield {
279
+ sequenceNumber: sequenceNumber(item.id, fallbackSequence),
280
+ event
281
+ };
282
+ }
273
283
  fallbackSequence += 1;
274
284
  }
275
285
  },
@@ -284,10 +294,13 @@ function createHarnessChatServer(options = {}) {
284
294
  });
285
295
  let fallbackSequence = 0;
286
296
  for await (const item of stream.withMetadata()) {
287
- yield {
288
- sequenceNumber: sequenceNumber(item.id, fallbackSequence),
289
- event: toUiStreamingEvent(item.data)
290
- };
297
+ const event = toUiStreamingEvent(item.data);
298
+ if (event !== void 0) {
299
+ yield {
300
+ sequenceNumber: sequenceNumber(item.id, fallbackSequence),
301
+ event
302
+ };
303
+ }
291
304
  fallbackSequence += 1;
292
305
  }
293
306
  },