@redocly/theme 0.61.1 → 0.62.0-custom.1

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 (217) hide show
  1. package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.d.ts +1 -0
  2. package/lib/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.js +12 -0
  3. package/lib/components/Badge/Badge.d.ts +2 -1
  4. package/lib/components/Badge/Badge.js +24 -2
  5. package/lib/components/Banner/Banner.js +19 -1
  6. package/lib/components/Banner/variables.js +1 -0
  7. package/lib/components/Breadcrumbs/Breadcrumb.js +1 -1
  8. package/lib/components/Breadcrumbs/BreadcrumbDropdown.js +9 -6
  9. package/lib/components/Breadcrumbs/Breadcrumbs.js +24 -15
  10. package/lib/components/Buttons/AIAssistantButton.js +7 -4
  11. package/lib/components/Buttons/EditPageButton.js +4 -26
  12. package/lib/components/Catalog/CatalogEntities.js +10 -8
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +2 -2
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +3 -3
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +6 -13
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +2 -2
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +13 -11
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +7 -5
  19. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +9 -7
  20. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +1 -1
  21. package/lib/components/Catalog/CatalogTagsWithTooltip.js +2 -2
  22. package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -1
  23. package/lib/components/CodeBlock/CodeBlockControls.js +8 -6
  24. package/lib/components/Dropdown/Dropdown.js +1 -1
  25. package/lib/components/Dropdown/variables.js +1 -0
  26. package/lib/components/Feedback/Comment.js +17 -4
  27. package/lib/components/Feedback/Mood.js +6 -3
  28. package/lib/components/Feedback/Rating.js +6 -3
  29. package/lib/components/Feedback/Scale.js +6 -3
  30. package/lib/components/Feedback/Sentiment.js +6 -3
  31. package/lib/components/Filter/FilterCheckboxes.js +1 -1
  32. package/lib/components/JsonViewer/JsonViewer.js +2 -2
  33. package/lib/components/JsonViewer/{Helpers.js → helpers.js} +2 -1
  34. package/lib/components/LanguagePicker/LanguagePicker.js +1 -1
  35. package/lib/components/Markdown/Markdown.js +2 -2
  36. package/lib/components/Menu/MenuItem.js +41 -15
  37. package/lib/components/Menu/variables.js +3 -3
  38. package/lib/components/Navbar/NavbarItem.js +1 -1
  39. package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.d.ts +1 -0
  40. package/lib/components/OpenApiDocs/hooks/AdditionalOverviewInfo.js +12 -0
  41. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +1 -0
  42. package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +6 -0
  43. package/lib/components/PageActions/PageActions.js +25 -8
  44. package/lib/components/Search/SearchAiDialog.d.ts +4 -2
  45. package/lib/components/Search/SearchAiDialog.js +23 -4
  46. package/lib/components/Search/SearchAiMessage.d.ts +4 -2
  47. package/lib/components/Search/SearchAiMessage.js +82 -23
  48. package/lib/components/Search/SearchDialog.js +50 -25
  49. package/lib/components/Select/variables.js +2 -2
  50. package/lib/components/SvgViewer/SvgViewer.d.ts +15 -0
  51. package/lib/components/SvgViewer/SvgViewer.js +312 -0
  52. package/lib/components/SvgViewer/variables.d.ts +1 -0
  53. package/lib/components/SvgViewer/variables.dark.d.ts +1 -0
  54. package/lib/components/SvgViewer/variables.dark.js +8 -0
  55. package/lib/components/SvgViewer/variables.js +17 -0
  56. package/lib/components/Tag/Tag.js +1 -1
  57. package/lib/components/Tag/variables.dark.js +6 -0
  58. package/lib/components/Tag/variables.js +6 -0
  59. package/lib/components/Tooltip/Tooltip.d.ts +2 -3
  60. package/lib/components/Tooltip/Tooltip.js +66 -113
  61. package/lib/components/Tooltip/variables.dark.js +4 -0
  62. package/lib/components/Tooltip/variables.js +3 -3
  63. package/lib/components/UserMenu/LoginButton.d.ts +8 -2
  64. package/lib/components/UserMenu/LoginButton.js +4 -3
  65. package/lib/core/constants/feedback.d.ts +2 -0
  66. package/lib/core/constants/feedback.js +6 -0
  67. package/lib/core/constants/index.d.ts +1 -0
  68. package/lib/core/constants/index.js +1 -0
  69. package/lib/core/constants/search.d.ts +5 -1
  70. package/lib/core/constants/search.js +24 -1
  71. package/lib/core/hooks/search/use-search-dialog.js +2 -2
  72. package/lib/core/hooks/use-color-switcher.js +3 -1
  73. package/lib/core/hooks/use-mcp-config.js +2 -1
  74. package/lib/core/hooks/use-modal-scroll-lock.js +24 -10
  75. package/lib/core/hooks/use-outside-click.d.ts +3 -1
  76. package/lib/core/hooks/use-outside-click.js +8 -4
  77. package/lib/core/hooks/use-page-actions.d.ts +1 -1
  78. package/lib/core/hooks/use-page-actions.js +50 -14
  79. package/lib/core/hooks/use-product-picker.js +1 -1
  80. package/lib/core/hooks/use-unique-svg-ids.d.ts +6 -0
  81. package/lib/core/hooks/use-unique-svg-ids.js +15 -0
  82. package/lib/core/openapi/index.d.ts +2 -0
  83. package/lib/core/openapi/index.js +5 -1
  84. package/lib/core/styles/dark.js +13 -0
  85. package/lib/core/styles/global.js +38 -15
  86. package/lib/core/types/catalog.d.ts +1 -1
  87. package/lib/core/types/hooks.d.ts +23 -2
  88. package/lib/core/types/l10n.d.ts +1 -1
  89. package/lib/core/types/search.d.ts +24 -0
  90. package/lib/core/types/search.js +9 -1
  91. package/lib/core/utils/content-segments.d.ts +2 -0
  92. package/lib/core/utils/content-segments.js +22 -0
  93. package/lib/core/utils/index.d.ts +1 -0
  94. package/lib/core/utils/index.js +1 -0
  95. package/lib/core/utils/transform-revisions-to-version-history.js +18 -68
  96. package/lib/ext/process-scorecard.d.ts +49 -0
  97. package/lib/ext/process-scorecard.js +12 -0
  98. package/lib/icons/DirectionRightIcon/DirectionRightIcon.d.ts +5 -0
  99. package/lib/icons/DirectionRightIcon/DirectionRightIcon.js +24 -0
  100. package/lib/icons/FitToViewIcon/FitToViewIcon.d.ts +9 -0
  101. package/lib/icons/FitToViewIcon/FitToViewIcon.js +25 -0
  102. package/lib/index.d.ts +8 -0
  103. package/lib/index.js +8 -0
  104. package/lib/layouts/DocumentationLayout.js +4 -25
  105. package/lib/layouts/DocumentationLayoutBottom.d.ts +11 -0
  106. package/lib/layouts/DocumentationLayoutBottom.js +28 -0
  107. package/lib/layouts/DocumentationLayoutTop.d.ts +13 -0
  108. package/lib/layouts/DocumentationLayoutTop.js +33 -0
  109. package/lib/layouts/Forbidden.js +22 -18
  110. package/lib/markdoc/components/Cards/Card.js +1 -0
  111. package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
  112. package/lib/markdoc/components/Heading/Heading.js +40 -2
  113. package/lib/markdoc/components/LoginButton/LoginButton.d.ts +9 -0
  114. package/lib/markdoc/components/LoginButton/LoginButton.js +48 -0
  115. package/lib/markdoc/components/Mermaid/Mermaid.js +70 -2
  116. package/lib/markdoc/components/default.d.ts +1 -0
  117. package/lib/markdoc/components/default.js +1 -0
  118. package/lib/markdoc/default.d.ts +6 -0
  119. package/lib/markdoc/default.js +2 -0
  120. package/lib/markdoc/tags/login-button.d.ts +2 -0
  121. package/lib/markdoc/tags/login-button.js +32 -0
  122. package/package.json +10 -10
  123. package/src/components/AsyncApiDocs/hooks/AfterAsyncApiChannelDescription.tsx +10 -0
  124. package/src/components/Badge/Badge.tsx +18 -2
  125. package/src/components/Banner/Banner.tsx +23 -1
  126. package/src/components/Banner/variables.ts +1 -0
  127. package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -3
  128. package/src/components/Breadcrumbs/BreadcrumbDropdown.tsx +11 -8
  129. package/src/components/Breadcrumbs/Breadcrumbs.tsx +24 -15
  130. package/src/components/Buttons/AIAssistantButton.tsx +7 -4
  131. package/src/components/Buttons/EditPageButton.tsx +13 -34
  132. package/src/components/Catalog/CatalogEntities.tsx +10 -8
  133. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +1 -1
  134. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +3 -4
  135. package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +5 -21
  136. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +1 -1
  137. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +13 -11
  138. package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +7 -5
  139. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +9 -7
  140. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -2
  141. package/src/components/Catalog/CatalogTagsWithTooltip.tsx +9 -5
  142. package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +3 -1
  143. package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
  144. package/src/components/Dropdown/Dropdown.tsx +1 -1
  145. package/src/components/Dropdown/variables.ts +1 -0
  146. package/src/components/Feedback/Comment.tsx +22 -4
  147. package/src/components/Feedback/Mood.tsx +6 -2
  148. package/src/components/Feedback/Rating.tsx +6 -2
  149. package/src/components/Feedback/Scale.tsx +6 -2
  150. package/src/components/Feedback/Sentiment.tsx +6 -2
  151. package/src/components/Filter/FilterCheckboxes.tsx +1 -1
  152. package/src/components/JsonViewer/JsonViewer.tsx +1 -2
  153. package/src/components/JsonViewer/{Helpers.tsx → helpers.tsx} +1 -0
  154. package/src/components/LanguagePicker/LanguagePicker.tsx +1 -1
  155. package/src/components/Markdown/Markdown.tsx +2 -2
  156. package/src/components/Menu/MenuItem.tsx +61 -16
  157. package/src/components/Menu/variables.ts +3 -3
  158. package/src/components/Navbar/NavbarItem.tsx +3 -1
  159. package/src/components/OpenApiDocs/hooks/AdditionalOverviewInfo.tsx +10 -0
  160. package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +2 -0
  161. package/src/components/PageActions/PageActions.tsx +38 -15
  162. package/src/components/Search/SearchAiDialog.tsx +31 -2
  163. package/src/components/Search/SearchAiMessage.tsx +103 -17
  164. package/src/components/Search/SearchDialog.tsx +70 -37
  165. package/src/components/Select/variables.ts +2 -2
  166. package/src/components/SvgViewer/SvgViewer.tsx +405 -0
  167. package/src/components/SvgViewer/variables.dark.ts +5 -0
  168. package/src/components/SvgViewer/variables.ts +14 -0
  169. package/src/components/Tag/Tag.tsx +2 -1
  170. package/src/components/Tag/variables.dark.ts +6 -0
  171. package/src/components/Tag/variables.ts +6 -0
  172. package/src/components/Tooltip/Tooltip.tsx +77 -120
  173. package/src/components/Tooltip/variables.dark.ts +4 -0
  174. package/src/components/Tooltip/variables.ts +3 -3
  175. package/src/components/UserMenu/LoginButton.tsx +23 -8
  176. package/src/core/constants/feedback.ts +2 -0
  177. package/src/core/constants/index.ts +1 -0
  178. package/src/core/constants/search.ts +27 -1
  179. package/src/core/hooks/__mocks__/use-theme-hooks.ts +10 -1
  180. package/src/core/hooks/search/use-search-dialog.ts +2 -2
  181. package/src/core/hooks/use-color-switcher.ts +3 -1
  182. package/src/core/hooks/use-mcp-config.ts +2 -1
  183. package/src/core/hooks/use-modal-scroll-lock.ts +29 -10
  184. package/src/core/hooks/use-outside-click.ts +16 -5
  185. package/src/core/hooks/use-page-actions.ts +77 -30
  186. package/src/core/hooks/use-product-picker.ts +1 -1
  187. package/src/core/hooks/use-unique-svg-ids.ts +12 -0
  188. package/src/core/openapi/index.ts +2 -0
  189. package/src/core/styles/dark.ts +14 -0
  190. package/src/core/styles/global.ts +38 -15
  191. package/src/core/types/catalog.ts +1 -1
  192. package/src/core/types/hooks.ts +29 -1
  193. package/src/core/types/l10n.ts +13 -1
  194. package/src/core/types/search.ts +19 -0
  195. package/src/core/utils/content-segments.ts +27 -0
  196. package/src/core/utils/index.ts +1 -0
  197. package/src/core/utils/transform-revisions-to-version-history.ts +19 -99
  198. package/src/ext/process-scorecard.ts +59 -0
  199. package/src/icons/DirectionRightIcon/DirectionRightIcon.tsx +35 -0
  200. package/src/icons/FitToViewIcon/FitToViewIcon.tsx +26 -0
  201. package/src/index.ts +8 -0
  202. package/src/layouts/DocumentationLayout.tsx +4 -30
  203. package/src/layouts/DocumentationLayoutBottom.tsx +42 -0
  204. package/src/layouts/DocumentationLayoutTop.tsx +52 -0
  205. package/src/layouts/Forbidden.tsx +36 -21
  206. package/src/markdoc/components/Cards/Card.tsx +1 -0
  207. package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
  208. package/src/markdoc/components/Heading/Heading.tsx +52 -4
  209. package/src/markdoc/components/LoginButton/LoginButton.tsx +38 -0
  210. package/src/markdoc/components/Mermaid/Mermaid.tsx +57 -8
  211. package/src/markdoc/components/default.ts +1 -0
  212. package/src/markdoc/default.ts +2 -0
  213. package/src/markdoc/tags/login-button.ts +30 -0
  214. package/lib/components/Tooltip/TooltipWrapper.d.ts +0 -12
  215. package/lib/components/Tooltip/TooltipWrapper.js +0 -34
  216. package/src/components/Tooltip/TooltipWrapper.tsx +0 -70
  217. /package/lib/components/JsonViewer/{Helpers.d.ts → helpers.d.ts} +0 -0
@@ -23,6 +23,7 @@ const use_mcp_config_1 = require("./use-mcp-config");
23
23
  const clipboard_service_1 = require("../utils/clipboard-service");
24
24
  const dom_1 = require("../utils/dom");
25
25
  const mcp_1 = require("../utils/mcp");
26
+ const urls_1 = require("../utils/urls");
26
27
  function createPageActionResource(pageSlug, pageUrl) {
27
28
  return {
28
29
  id: pageSlug,
@@ -37,6 +38,7 @@ const DEFAULT_ENABLED_ACTIONS = [
37
38
  'claude',
38
39
  'docs-mcp-cursor',
39
40
  'docs-mcp-vscode',
41
+ 'docs-mcp-json',
40
42
  ];
41
43
  function usePageActions(pageSlug, mcpUrl, actions) {
42
44
  var _a, _b, _c;
@@ -65,21 +67,26 @@ function usePageActions(pageSlug, mcpUrl, actions) {
65
67
  mcpConfig: config,
66
68
  translate,
67
69
  onClickCallback: isDocsMcp
68
- ? () => telemetry.sendPageActionsButtonClickedMessage(Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: `docs-mcp-${clientType}` }))
70
+ ? () => telemetry.sendPageActionsButtonClickedMessage([
71
+ Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: `docs-mcp-${clientType}` }),
72
+ ])
69
73
  : undefined,
70
74
  });
71
75
  }, [mcpUrl, mcpConfig, translate, telemetry, pageSlug]);
72
76
  const result = (0, react_1.useMemo)(() => {
73
77
  var _a, _b, _c;
74
- if (shouldHideAllActions) {
78
+ if (shouldHideAllActions && !(actions === null || actions === void 0 ? void 0 : actions.length)) {
75
79
  return [];
76
80
  }
77
81
  const origin = dom_1.IS_BROWSER
78
82
  ? window.location.origin
79
83
  : ((_a = globalThis['SSR_HOSTNAME']) !== null && _a !== void 0 ? _a : '');
80
- const normalizedSlug = pageSlug.startsWith('/') ? pageSlug : '/' + pageSlug;
81
- const pageUrl = `${origin}${normalizedSlug}`;
82
- const mdPageUrl = new URL(origin + normalizedSlug + (normalizedSlug === '/' ? 'index.html.md' : '.md')).toString();
84
+ const pathname = (0, urls_1.addTrailingSlash)(pageSlug);
85
+ const pageUrl = (0, urls_1.combineUrls)(origin, pathname);
86
+ const isRoot = (0, urls_1.withoutPathPrefix)(pathname) === '/';
87
+ const mdPageUrl = isRoot
88
+ ? (0, urls_1.combineUrls)(origin, pathname, 'index.html.md')
89
+ : (0, urls_1.combineUrls)(origin, (0, urls_1.removeTrailingSlash)(pathname) + '.md');
83
90
  const actionHandlers = {
84
91
  'docs-mcp-cursor': createMCPHandler('cursor', false),
85
92
  'docs-mcp-vscode': createMCPHandler('vscode', false),
@@ -98,7 +105,9 @@ function usePageActions(pageSlug, mcpUrl, actions) {
98
105
  }
99
106
  const text = yield result.text();
100
107
  clipboard_service_1.ClipboardService.copyCustom(text);
101
- telemetry.sendPageActionsButtonClickedMessage(Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'copy' }));
108
+ telemetry.sendPageActionsButtonClickedMessage([
109
+ Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'copy' }),
110
+ ]);
102
111
  }
103
112
  catch (error) {
104
113
  console.error(error);
@@ -112,21 +121,27 @@ function usePageActions(pageSlug, mcpUrl, actions) {
112
121
  iconComponent: MarkdownFullIcon_1.MarkdownFullIcon,
113
122
  link: mdPageUrl,
114
123
  onClick: () => {
115
- telemetry.sendPageActionsButtonClickedMessage(Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'view' }));
124
+ telemetry.sendPageActionsButtonClickedMessage([
125
+ Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'view' }),
126
+ ]);
116
127
  },
117
128
  }),
118
129
  chatgpt: () => {
119
130
  if (!isPublic) {
120
131
  return null;
121
132
  }
133
+ const link = getExternalAiPromptLink('https://chat.openai.com', mdPageUrl);
122
134
  return {
123
135
  buttonText: translate('page.actions.chatGptButtonText', 'Open in ChatGPT'),
124
136
  title: translate('page.actions.chatGptTitle', 'Open in ChatGPT'),
125
137
  description: translate('page.actions.chatGptDescription', 'Get insights from ChatGPT'),
126
138
  iconComponent: ChatGptIcon_1.ChatGptIcon,
127
- link: getExternalAiPromptLink('https://chat.openai.com', mdPageUrl),
139
+ link,
128
140
  onClick: () => {
129
- telemetry.sendPageActionsButtonClickedMessage(Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'chatgpt' }));
141
+ telemetry.sendPageActionsButtonClickedMessage([
142
+ Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'chatgpt' }),
143
+ ]);
144
+ window.location.href = link;
130
145
  },
131
146
  };
132
147
  },
@@ -134,17 +149,37 @@ function usePageActions(pageSlug, mcpUrl, actions) {
134
149
  if (!isPublic) {
135
150
  return null;
136
151
  }
152
+ const link = getExternalAiPromptLink('https://claude.ai/new', mdPageUrl);
137
153
  return {
138
154
  buttonText: translate('page.actions.claudeButtonText', 'Open in Claude'),
139
155
  title: translate('page.actions.claudeTitle', 'Open in Claude'),
140
156
  description: translate('page.actions.claudeDescription', 'Get insights from Claude'),
141
157
  iconComponent: ClaudeIcon_1.ClaudeIcon,
142
- link: getExternalAiPromptLink('https://claude.ai/new', mdPageUrl),
158
+ link,
143
159
  onClick: () => {
144
- telemetry.sendPageActionsButtonClickedMessage(Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'claude' }));
160
+ telemetry.sendPageActionsButtonClickedMessage([
161
+ Object.assign(Object.assign({}, createPageActionResource(pageSlug, pageUrl)), { action_type: 'claude' }),
162
+ ]);
163
+ window.location.href = link;
145
164
  },
146
165
  };
147
166
  },
167
+ 'docs-mcp-json': () => {
168
+ return {
169
+ buttonText: 'Copy MCP configuration',
170
+ title: 'Copy MCP JSON configuration',
171
+ description: 'Copy MCP JSON configuration',
172
+ iconComponent: CopyIcon_1.CopyIcon,
173
+ onClick: () => __awaiter(this, void 0, void 0, function* () {
174
+ clipboard_service_1.ClipboardService.copyCustom(JSON.stringify({
175
+ 'mcp-server': {
176
+ url: mcpUrl,
177
+ description: 'MCP Server',
178
+ },
179
+ }, null, 2));
180
+ }),
181
+ };
182
+ },
148
183
  };
149
184
  return (((_c = (_b = themeConfig.navigation) === null || _b === void 0 ? void 0 : _b.actions) === null || _c === void 0 ? void 0 : _c.items) || actions || DEFAULT_ENABLED_ACTIONS)
150
185
  .map((action) => { var _a; return (_a = actionHandlers[action]) === null || _a === void 0 ? void 0 : _a.call(actionHandlers); })
@@ -157,6 +192,7 @@ function usePageActions(pageSlug, mcpUrl, actions) {
157
192
  translate,
158
193
  isPublic,
159
194
  createMCPHandler,
195
+ mcpUrl,
160
196
  telemetry,
161
197
  ]);
162
198
  return result;
@@ -181,7 +217,7 @@ function createMCPAction({ clientType, mcpConfig, translate, onClickCallback, })
181
217
  return Object.assign(Object.assign({}, sharedProps), { buttonText: translate('page.actions.connectMcp.vscode', 'Connect to VS Code'), title: translate('page.actions.connectMcp.vscode', 'Connect to VS Code'), description: translate('page.actions.connectMcp.vscodeDescription', 'Install MCP server on VS Code'), iconComponent: VSCodeIcon_1.VSCodeIcon });
182
218
  }
183
219
  function shouldHidePageActions(pageProps, themeConfig, openapiExcludeFromSearch) {
184
- var _a, _b, _c, _d, _e, _f;
220
+ var _a, _b, _c, _d, _e, _f, _g;
185
221
  // Can't use any actions if no markdown files are generated for LLMs
186
222
  if ((_b = (_a = pageProps === null || pageProps === void 0 ? void 0 : pageProps.seo) === null || _a === void 0 ? void 0 : _a.llmstxt) === null || _b === void 0 ? void 0 : _b.hide) {
187
223
  return true;
@@ -191,8 +227,8 @@ function shouldHidePageActions(pageProps, themeConfig, openapiExcludeFromSearch)
191
227
  return true;
192
228
  }
193
229
  // Page is excluded from search
194
- const isPageExcludedFromSearch = ((_e = pageProps === null || pageProps === void 0 ? void 0 : pageProps.frontmatter) === null || _e === void 0 ? void 0 : _e.excludeFromSearch) ||
195
- (((_f = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _f === void 0 ? void 0 : _f.type) === 'openapi' && openapiExcludeFromSearch);
230
+ const isOpenApiPage = ((_e = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _e === void 0 ? void 0 : _e.type) === 'openapi' || ((_f = pageProps === null || pageProps === void 0 ? void 0 : pageProps.metadata) === null || _f === void 0 ? void 0 : _f.subType) === 'openapi-operation';
231
+ const isPageExcludedFromSearch = ((_g = pageProps === null || pageProps === void 0 ? void 0 : pageProps.frontmatter) === null || _g === void 0 ? void 0 : _g.excludeFromSearch) || (isOpenApiPage && openapiExcludeFromSearch);
196
232
  if (isPageExcludedFromSearch) {
197
233
  return true;
198
234
  }
@@ -15,7 +15,7 @@ function useProductPicker() {
15
15
  function setProduct(product) {
16
16
  if (!product)
17
17
  return;
18
- telemetry.sendProductPickedMessage({ product: product.slug });
18
+ telemetry.sendProductPickedMessage([{ object: 'product', product: product.slug }]);
19
19
  if (typeof document === 'undefined')
20
20
  return;
21
21
  if (product.name) {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns a function that appends a per-component-instance suffix to SVG ids.
3
+ * This prevents collisions when multiple identical SVGs are rendered on the same page,
4
+ * which can break `url(#...)` references (gradients, clipPath, masks, filters) on reflow.
5
+ */
6
+ export declare function useUniqueSvgIds(): (id: string) => string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useUniqueSvgIds = useUniqueSvgIds;
4
+ const react_1 = require("react");
5
+ /**
6
+ * Returns a function that appends a per-component-instance suffix to SVG ids.
7
+ * This prevents collisions when multiple identical SVGs are rendered on the same page,
8
+ * which can break `url(#...)` references (gradients, clipPath, masks, filters) on reflow.
9
+ */
10
+ function useUniqueSvgIds() {
11
+ const reactId = (0, react_1.useId)();
12
+ const safeSuffix = reactId.replace(/:/g, '_');
13
+ return (id) => `${id}-${safeSuffix}`;
14
+ }
15
+ //# sourceMappingURL=use-unique-svg-ids.js.map
@@ -25,3 +25,5 @@ export { SecurityVariablesEnvSuffix } from '../constants/environments';
25
25
  export { isUndefined, isString, isNotNull, isObject } from '../utils/type-guards';
26
26
  export { ThemeDataContext, type ThemeDataTransferObject } from '../contexts/ThemeDataContext';
27
27
  export { SearchSessionProvider, SearchSessionContext } from '../contexts/SearchContext';
28
+ export { useUniqueSvgIds } from '../hooks/use-unique-svg-ids';
29
+ export { trimText } from '../utils/text-trimmer';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchSessionContext = exports.SearchSessionProvider = exports.ThemeDataContext = exports.isObject = exports.isNotNull = exports.isString = exports.isUndefined = exports.SecurityVariablesEnvSuffix = exports.useDialogHotKeys = exports.useSearchDialog = exports.useModalScrollLock = exports.useActiveSectionId = exports.useOutsideClick = exports.useThemeHooks = exports.useFocusTrap = exports.getUserAgent = exports.ClipboardService = exports.getOperationColor = exports.isPrimitive = exports.breakpoints = exports.GlobalStyle = exports.useMount = exports.typedMemo = exports.capitalize = exports.withPathPrefix = exports.addTrailingSlash = exports.combineUrls = exports.getPathPrefix = exports.removeLeadingSlash = exports.addLeadingSlash = exports.IS_BROWSER = void 0;
3
+ exports.trimText = exports.useUniqueSvgIds = exports.SearchSessionContext = exports.SearchSessionProvider = exports.ThemeDataContext = exports.isObject = exports.isNotNull = exports.isString = exports.isUndefined = exports.SecurityVariablesEnvSuffix = exports.useDialogHotKeys = exports.useSearchDialog = exports.useModalScrollLock = exports.useActiveSectionId = exports.useOutsideClick = exports.useThemeHooks = exports.useFocusTrap = exports.getUserAgent = exports.ClipboardService = exports.getOperationColor = exports.isPrimitive = exports.breakpoints = exports.GlobalStyle = exports.useMount = exports.typedMemo = exports.capitalize = exports.withPathPrefix = exports.addTrailingSlash = exports.combineUrls = exports.getPathPrefix = exports.removeLeadingSlash = exports.addLeadingSlash = exports.IS_BROWSER = void 0;
4
4
  var dom_1 = require("../utils/dom");
5
5
  Object.defineProperty(exports, "IS_BROWSER", { enumerable: true, get: function () { return dom_1.IS_BROWSER; } });
6
6
  var urls_1 = require("../utils/urls");
@@ -54,4 +54,8 @@ Object.defineProperty(exports, "ThemeDataContext", { enumerable: true, get: func
54
54
  var SearchContext_1 = require("../contexts/SearchContext");
55
55
  Object.defineProperty(exports, "SearchSessionProvider", { enumerable: true, get: function () { return SearchContext_1.SearchSessionProvider; } });
56
56
  Object.defineProperty(exports, "SearchSessionContext", { enumerable: true, get: function () { return SearchContext_1.SearchSessionContext; } });
57
+ var use_unique_svg_ids_1 = require("../hooks/use-unique-svg-ids");
58
+ Object.defineProperty(exports, "useUniqueSvgIds", { enumerable: true, get: function () { return use_unique_svg_ids_1.useUniqueSvgIds; } });
59
+ var text_trimmer_1 = require("../utils/text-trimmer");
60
+ Object.defineProperty(exports, "trimText", { enumerable: true, get: function () { return text_trimmer_1.trimText; } });
57
61
  //# sourceMappingURL=index.js.map
@@ -18,6 +18,7 @@ const variables_dark_13 = require("../../components/PageActions/variables.dark")
18
18
  const variables_dark_14 = require("../../components/Tooltip/variables.dark");
19
19
  const variables_dark_15 = require("../../components/Banner/variables.dark");
20
20
  const variables_dark_16 = require("../../components/Admonition/variables.dark");
21
+ const variables_dark_17 = require("../../components/SvgViewer/variables.dark");
21
22
  const replayDarkMode = (0, styled_components_1.css) `
22
23
  /**
23
24
  * @tokens Replay Colors
@@ -45,6 +46,16 @@ const replayDarkMode = (0, styled_components_1.css) `
45
46
 
46
47
  // @tokens End
47
48
  `;
49
+ const badgesDarkMode = (0, styled_components_1.css) `
50
+ /**
51
+ * @tokens Audience Badge
52
+ */
53
+
54
+ --badge-audience-text-color: var(--text-color-secondary); // @presenter Color
55
+ --badge-audience-bg-color: var(--color-warm-grey-4); // @presenter Color
56
+
57
+ // @tokens End
58
+ `;
48
59
  exports.darkMode = (0, styled_components_1.css) `
49
60
  /* === Dark Theme Colors === */
50
61
 
@@ -331,6 +342,8 @@ exports.darkMode = (0, styled_components_1.css) `
331
342
  ${variables_dark_14.tooltipDarkMode}
332
343
  ${variables_dark_15.bannerDarkMode}
333
344
  ${variables_dark_16.admonitionDarkMode}
345
+ ${variables_dark_17.svgViewerDarkMode}
346
+ ${badgesDarkMode}
334
347
 
335
348
  /**
336
349
  * @tokens Dark Theme Scrollbar Config
@@ -44,6 +44,7 @@ const variables_39 = require("../../markdoc/components/Cards/variables");
44
44
  const variables_40 = require("../../markdoc/components/CodeWalkthrough/variables");
45
45
  const variables_41 = require("../../components/SkipContent/variables");
46
46
  const variables_42 = require("../../components/PageActions/variables");
47
+ const variables_43 = require("../../components/SvgViewer/variables");
47
48
  const dark_1 = require("./dark");
48
49
  const themeColors = (0, styled_components_1.css) `
49
50
  /* === Palette === */
@@ -814,6 +815,13 @@ const badges = (0, styled_components_1.css) `
814
815
  --badge-deprecated-bg-color: var(--color-warning-base); // @presenter Color
815
816
  --badge-deprecated-border-radius: var(--border-radius); // @presenter BorderRadius
816
817
 
818
+ /**
819
+ * @tokens Audience Badge
820
+ */
821
+
822
+ --badge-audience-text-color: var(--text-color-secondary); // @presenter Color
823
+ --badge-audience-bg-color: var(--color-warm-grey-2); // @presenter Color
824
+
817
825
  // @tokens End
818
826
  `;
819
827
  const loadProgressBar = (0, styled_components_1.css) `
@@ -958,23 +966,41 @@ const pages = (0, styled_components_1.css) `
958
966
  */
959
967
 
960
968
  --page-403-font-family: var(--font-family-base); // @presenter FontFamily
969
+ --page-403-margin-vertical: var(--spacing-xl); // @presenter Spacing
970
+ --page-403-margin-horizontal: calc(var(--spacing-xxl) * 2); // @presenter Spacing
971
+ --page-403-gap: var(--spacing-lg); // @presenter Spacing
972
+ --page-403-max-width: 680px; // @presenter Width
973
+
974
+ --page-403-status-text-color: var(--text-color-helper); // @presenter Color
975
+ --page-403-status-font-size: var(--font-size-lg); // @presenter FontSize
976
+ --page-403-status-font-weight: var(--font-weight-semibold); // @presenter FontWeight
977
+ --page-403-status-line-height: var(--line-height-lg); // @presenter LineHeight
978
+
979
+ --page-403-title-text-color: var(--text-color-primary); // @presenter Color
980
+ --page-403-title-font-size: 42px; // @presenter FontSize
981
+ --page-403-title-font-weight: var(--font-weight-bold); // @presenter FontWeight
982
+ --page-403-title-line-height: 50px; // @presenter LineHeight
983
+
984
+ --page-403-description-text-color: var(--text-color-secondary); // @presenter Color
985
+ --page-403-description-font-size: var(--font-size-xl); // @presenter FontSize
986
+ --page-403-description-font-weight: var(--font-weight-regular); // @presenter FontWeight
987
+ --page-403-description-line-height: var(--line-height-xl); // @presenter LineHeight
988
+
989
+ // @tokens End
990
+
991
+ /**
992
+ * @tokens 403 Page OIDC Forbidden
993
+ * @presenter Color
994
+ */
961
995
 
962
- --page-403-header-text-color: var(--h1-text-color);
996
+ --page-403-header-text-color: var(--h1-text-color); // @presenter Color
963
997
  --page-403-header-font-size: var(--h1-font-size); // @presenter FontSize
964
998
  --page-403-header-font-weight: var(--h1-font-weight); // @presenter FontWeight
965
999
  --page-403-header-line-height: var(--h1-line-height); // @presenter LineHeight
966
1000
  --page-403-header-margin: 0; // @presenter Spacing
967
-
968
- --page-403-description-text-color: var(--text-color-secondary);
969
- --page-403-description-font-size: 1.5em; // @presenter FontSize
970
- --page-403-description-font-weight: var(--font-weight-regular); // @presenter FontWeight
971
- --page-403-description-line-height: 1; // @presenter LineHeight
972
1001
  --page-403-description-margin: 0; // @presenter Spacing
973
-
974
- --page-403-button-margin: 4em; // @presenter Spacing
975
-
976
- --page-403-oidc-description-font-size: var(--font-size-lg);
977
- --page-403-oidc-description-margin: var(--spacing-md) var(--spacing-sm);
1002
+ --page-403-oidc-description-font-size: var(--font-size-lg); // @presenter FontSize
1003
+ --page-403-oidc-description-margin: var(--spacing-md) var(--spacing-sm); // @presenter Spacing
978
1004
 
979
1005
  // @tokens End
980
1006
 
@@ -1071,10 +1097,6 @@ const error = (0, styled_components_1.css) `
1071
1097
  --compilation-error-file-header-margin: 0 0 var(--spacing-xs) 0;
1072
1098
  `;
1073
1099
  const modal = (0, styled_components_1.css) `
1074
- body:has(.scroll-lock) {
1075
- overflow: hidden;
1076
- }
1077
-
1078
1100
  --modal-box-shadow: var(--bg-raised-shadow);
1079
1101
  --modal-bg-color: var(--bg-color);
1080
1102
  `;
@@ -1278,6 +1300,7 @@ exports.styles = (0, styled_components_1.css) `
1278
1300
  ${replay}
1279
1301
  ${variables_41.skipContent}
1280
1302
  ${variables_42.pageActions}
1303
+ ${variables_43.svgViewer}
1281
1304
 
1282
1305
  background-color: var(--bg-color);
1283
1306
  color: var(--text-color-primary);
@@ -127,7 +127,7 @@ export type BffCatalogRelatedEntity = {
127
127
  key: string;
128
128
  title: string;
129
129
  summary?: string | null;
130
- readonly source: 'api' | 'file';
130
+ readonly source: 'remote' | 'file';
131
131
  relationRole: 'source' | 'target';
132
132
  relationType: EntityRelationType;
133
133
  sourceFile?: string | null;
@@ -8,7 +8,7 @@ import type { CatalogConfig, ProductUiConfig } from '../../config';
8
8
  import type { UseCatalogResponse, FilteredCatalog, UseCatalogSortResponse, UseCatalogSearchResponse, UseCatalogProps, CatalogApiParams, CatalogApiResults } from './catalog';
9
9
  import type { UserMenuData } from './user-menu';
10
10
  import type { ItemState } from './sidebar';
11
- import type { SearchItemData, SearchFacet, SearchFilterItem, SearchFacetQuery, AiSearchConversationItem } from './search';
11
+ import type { SearchItemData, SearchFacet, SearchFilterItem, SearchFacetQuery, AiSearchConversationItem, ToolCallName, ContentSegment } from './search';
12
12
  import type { SubmitFeedbackParams } from './feedback';
13
13
  import type { TFunction } from './l10n';
14
14
  import type { BreadcrumbItem } from './breadcrumb';
@@ -96,6 +96,15 @@ export type ThemeHooks = {
96
96
  error: null | AiSearchError;
97
97
  conversation: AiSearchConversationItem[];
98
98
  setConversation: React.Dispatch<React.SetStateAction<AiSearchConversationItem[]>>;
99
+ toolCalls: Array<{
100
+ name: ToolCallName;
101
+ args: unknown;
102
+ position: number;
103
+ result?: {
104
+ documentCount: number;
105
+ };
106
+ }>;
107
+ contentSegments: ContentSegment[];
99
108
  };
100
109
  useMarkdownText: (text: string) => React.ReactNode;
101
110
  useFacetQuery: (field: string) => {
@@ -138,7 +147,19 @@ export type ThemeHooks = {
138
147
  items: BffCatalogEntityRevision[];
139
148
  };
140
149
  useCatalogClassic: (config: CatalogConfig) => FilteredCatalog;
141
- useTelemetry: () => Omit<AsyncApiRealmUI.Telemetry, 'init' | 'updateCloudEventData' | 'forceFlush' | 'startSpan' | 'constructCloudEvent' | 'sendToOtelService'>;
150
+ useTelemetry: () => Omit<AsyncApiRealmUI.Telemetry, 'init' | 'updateCloudEventData' | 'forceFlush' | 'startSpan' | 'constructCloudEvent' | 'sendToOtelService'> & {
151
+ send<TEventType extends AsyncApiRealmUI.EventType>(event: TEventType, data?: AsyncApiRealmUI.EventPayload<TEventType>): void;
152
+ /**
153
+ * @deprecated This method is deprecated. Use send(event, data) instead.
154
+ */
155
+ send<TEventType extends AsyncApiRealmUI.EventType>(params: AsyncApiRealmUI.SendEventParams<TEventType>): void;
156
+ };
157
+ /**
158
+ * @deprecated This hook is deprecated. Use `useTelemetry` instead.
159
+ */
160
+ useOtelTelemetry: () => {
161
+ send<TEventType extends AsyncApiRealmUI.EventType>(params: AsyncApiRealmUI.SendEventParams<TEventType>): void;
162
+ };
142
163
  useUserTeams: () => string[];
143
164
  usePageData: () => PageData | null;
144
165
  usePageSharedData: <T = unknown>(dataId: string) => T;
@@ -1,5 +1,5 @@
1
1
  import type { TOptions } from 'i18next';
2
- export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.tags.more' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to';
2
+ export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolResult.found' | 'search.ai.toolResult.found.documents' | 'search.ai.toolCall.searching' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.tags.more' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'mermaid.openFullscreen' | 'mermaid.zoomIn' | 'mermaid.zoomOut' | 'mermaid.reset' | 'mermaid.close' | 'mermaid.viewer';
3
3
  export type Locale = {
4
4
  code: string;
5
5
  name: string;
@@ -91,10 +91,34 @@ export type SearchAiMessageResource = {
91
91
  url: string;
92
92
  title: string;
93
93
  };
94
+ export type ToolCall = {
95
+ name: ToolCallName;
96
+ args: unknown;
97
+ position: number;
98
+ result?: {
99
+ documentCount: number;
100
+ };
101
+ };
102
+ export type ContentSegment = {
103
+ type: 'text';
104
+ text: string;
105
+ } | {
106
+ type: 'tool';
107
+ toolCall: ToolCall;
108
+ };
94
109
  export type AiSearchConversationItem = {
95
110
  role: AiSearchConversationRole;
96
111
  content: string;
97
112
  resources?: SearchAiMessageResource[];
98
113
  messageId?: string;
99
114
  feedback?: FeedbackType;
115
+ toolCalls?: ToolCall[];
116
+ contentSegments?: ContentSegment[];
100
117
  };
118
+ export declare enum ToolCallName {
119
+ SearchDocumentation = "search_documentation",
120
+ ListApis = "list-apis",
121
+ GetEndpoints = "get-endpoints",
122
+ GetSecuritySchemes = "get-security-schemes",
123
+ GetFullApiDescription = "get-full-api-description"
124
+ }
@@ -1,9 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeedbackType = void 0;
3
+ exports.ToolCallName = exports.FeedbackType = void 0;
4
4
  var FeedbackType;
5
5
  (function (FeedbackType) {
6
6
  FeedbackType["Like"] = "like";
7
7
  FeedbackType["Dislike"] = "dislike";
8
8
  })(FeedbackType || (exports.FeedbackType = FeedbackType = {}));
9
+ var ToolCallName;
10
+ (function (ToolCallName) {
11
+ ToolCallName["SearchDocumentation"] = "search_documentation";
12
+ ToolCallName["ListApis"] = "list-apis";
13
+ ToolCallName["GetEndpoints"] = "get-endpoints";
14
+ ToolCallName["GetSecuritySchemes"] = "get-security-schemes";
15
+ ToolCallName["GetFullApiDescription"] = "get-full-api-description";
16
+ })(ToolCallName || (exports.ToolCallName = ToolCallName = {}));
9
17
  //# sourceMappingURL=search.js.map
@@ -0,0 +1,2 @@
1
+ import type { ToolCall, ContentSegment } from '../types/search';
2
+ export declare function splitContentByToolCalls(content: string | undefined, toolCalls: ToolCall[] | undefined): ContentSegment[];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.splitContentByToolCalls = splitContentByToolCalls;
4
+ function splitContentByToolCalls(content, toolCalls) {
5
+ if (!toolCalls || toolCalls.length === 0) {
6
+ return [{ type: 'text', text: content || '' }];
7
+ }
8
+ const segments = [];
9
+ let lastPos = 0;
10
+ for (const toolCall of toolCalls) {
11
+ if (content && toolCall.position > lastPos) {
12
+ segments.push({ type: 'text', text: content.substring(lastPos, toolCall.position) });
13
+ }
14
+ segments.push({ type: 'tool', toolCall });
15
+ lastPos = toolCall.position;
16
+ }
17
+ if (content && lastPos < content.length) {
18
+ segments.push({ type: 'text', text: content.substring(lastPos) });
19
+ }
20
+ return segments;
21
+ }
22
+ //# sourceMappingURL=content-segments.js.map
@@ -43,3 +43,4 @@ export * from './get-operation-color';
43
43
  export * from './frontmatter-translate';
44
44
  export * from './transform-revisions-to-version-history';
45
45
  export * from './build-revision-url';
46
+ export * from './content-segments';
@@ -59,4 +59,5 @@ __exportStar(require("./get-operation-color"), exports);
59
59
  __exportStar(require("./frontmatter-translate"), exports);
60
60
  __exportStar(require("./transform-revisions-to-version-history"), exports);
61
61
  __exportStar(require("./build-revision-url"), exports);
62
+ __exportStar(require("./content-segments"), exports);
62
63
  //# sourceMappingURL=index.js.map