@adecore/agents-react 0.39.0 → 0.40.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 (317) hide show
  1. package/dist/agents/AgentModelLabel.js +2 -1
  2. package/dist/agents/model-name.js +2 -1
  3. package/dist/agents/provider-paths.d.ts +2 -1
  4. package/dist/agents/provider-paths.js +7 -3
  5. package/dist/chat/account-choice.js +57 -28
  6. package/dist/chat/bookmarks.js +2 -1
  7. package/dist/chat/drafts.d.ts +0 -1
  8. package/dist/chat/drafts.js +9 -28
  9. package/dist/chat/logic/picker-entries.js +2 -8
  10. package/dist/chat/logic/resume-compaction.js +2 -5
  11. package/dist/chat/logic/timeline-copy.js +2 -8
  12. package/dist/chat/logic/timeline.js +9 -10
  13. package/dist/chat/logic/workflow.js +2 -4
  14. package/dist/chat/subagent-conversation.js +2 -1
  15. package/dist/chat/ui/GoalDock.js +2 -1
  16. package/dist/chat/ui/LimitState.js +4 -6
  17. package/dist/chat/ui/composer/use-continuable-turn.js +0 -1
  18. package/dist/chat/ui/composer/use-notice.js +2 -1
  19. package/dist/chat/ui/composer/use-prompt-history.js +1 -1
  20. package/dist/chat/ui/composer/use-prompt-menus.js +216 -253
  21. package/dist/chat/ui/composer/use-take-back.js +2 -2
  22. package/dist/chat/ui/diff/ApprovalReview.js +1 -1
  23. package/dist/chat/ui/highlighter.d.ts +0 -6
  24. package/dist/chat/ui/highlighter.js +0 -12
  25. package/dist/chat/ui/icons.d.ts +0 -1
  26. package/dist/chat/ui/icons.js +0 -3
  27. package/dist/chat/ui/rows/MessageRows.js +2 -5
  28. package/dist/chat/ui/rows/row-rhythm.js +2 -5
  29. package/dist/chat/ui/theme-watch.js +3 -7
  30. package/dist/prompts/logic/usePromptSession.js +2 -1
  31. package/dist/providers/AddAccountForm.js +2 -1
  32. package/dist/providers/CliDetail.js +104 -130
  33. package/dist/providers/account-actions.js +6 -9
  34. package/dist/state/chats.d.ts +1 -0
  35. package/dist/state/chats.js +6 -11
  36. package/dist/state/provider-accounts.d.ts +1 -1
  37. package/dist/state/provider-accounts.js +2 -8
  38. package/dist/transport.d.ts +2 -0
  39. package/dist/transport.js +14 -0
  40. package/dist/usage/ChartLogo.d.ts +5 -0
  41. package/dist/usage/ChartLogo.js +48 -0
  42. package/dist/usage/LimitsList.js +6 -16
  43. package/dist/usage/UsageBreakdown.js +17 -40
  44. package/dist/usage/UsageLimits.js +183 -211
  45. package/dist/usage/UsagePage.js +3 -17
  46. package/dist/usage/UsageSummary.js +4 -9
  47. package/dist/usage/limits.js +16 -31
  48. package/dist/usage/summary.d.ts +1 -1
  49. package/dist/usage/summary.js +3 -5
  50. package/package.json +27 -27
  51. package/src/agents/AccountDot.tsx +1 -0
  52. package/src/agents/AgentIcon.tsx +2 -0
  53. package/src/agents/AgentModelLabel.tsx +4 -6
  54. package/src/agents/ModelOptionControl.tsx +8 -0
  55. package/src/agents/account-limits.ts +3 -0
  56. package/src/agents/accounts.ts +12 -0
  57. package/src/agents/model-name.ts +13 -1
  58. package/src/agents/model-options.ts +2 -0
  59. package/src/agents/model-requirement.ts +4 -0
  60. package/src/agents/option-words.ts +2 -0
  61. package/src/agents/provider-paths.ts +8 -3
  62. package/src/agents/status-look.ts +1 -0
  63. package/src/chat/account-choice.ts +25 -19
  64. package/src/chat/actions.ts +5 -0
  65. package/src/chat/attachments.ts +8 -0
  66. package/src/chat/bookmarks.ts +13 -1
  67. package/src/chat/chat-client.ts +63 -0
  68. package/src/chat/chat-references.ts +3 -0
  69. package/src/chat/composer-effort.ts +5 -0
  70. package/src/chat/composer-send.ts +4 -0
  71. package/src/chat/drafts.ts +21 -17
  72. package/src/chat/forks.ts +4 -0
  73. package/src/chat/guards.ts +2 -0
  74. package/src/chat/index.ts +7 -0
  75. package/src/chat/logic/ansi.ts +47 -0
  76. package/src/chat/logic/bookmarks.ts +7 -0
  77. package/src/chat/logic/command-looks.ts +29 -0
  78. package/src/chat/logic/context-usage.ts +3 -0
  79. package/src/chat/logic/continue-after-stop.ts +5 -0
  80. package/src/chat/logic/effort.ts +4 -0
  81. package/src/chat/logic/embedded-code.ts +63 -0
  82. package/src/chat/logic/fork.ts +22 -0
  83. package/src/chat/logic/generated-image.ts +7 -0
  84. package/src/chat/logic/goal.ts +7 -0
  85. package/src/chat/logic/handback.ts +2 -0
  86. package/src/chat/logic/limit.ts +8 -0
  87. package/src/chat/logic/picker-entries.ts +16 -4
  88. package/src/chat/logic/resume-compaction.ts +22 -5
  89. package/src/chat/logic/scrubber.ts +38 -5
  90. package/src/chat/logic/thought.ts +5 -0
  91. package/src/chat/logic/thread-cards.ts +6 -0
  92. package/src/chat/logic/timeline-copy.ts +4 -9
  93. package/src/chat/logic/timeline-target.ts +15 -0
  94. package/src/chat/logic/timeline.ts +113 -10
  95. package/src/chat/logic/tools.ts +30 -0
  96. package/src/chat/logic/visual-height.ts +5 -0
  97. package/src/chat/logic/visual-viewport.ts +1 -0
  98. package/src/chat/logic/welcome.ts +3 -0
  99. package/src/chat/logic/workflow.ts +26 -7
  100. package/src/chat/mentions.ts +56 -0
  101. package/src/chat/pending-prompts.ts +16 -0
  102. package/src/chat/persisted-json.ts +15 -0
  103. package/src/chat/preferences.ts +16 -0
  104. package/src/chat/prompt-hold.ts +2 -0
  105. package/src/chat/quote.ts +7 -0
  106. package/src/chat/reading-width.ts +1 -0
  107. package/src/chat/recent-messages.ts +5 -0
  108. package/src/chat/resume-compaction-dismissals.ts +1 -0
  109. package/src/chat/stash.ts +12 -0
  110. package/src/chat/subagent-conversation.ts +24 -4
  111. package/src/chat/subagent-list.ts +14 -0
  112. package/src/chat/subagent-support.ts +1 -0
  113. package/src/chat/subagent-view.ts +9 -0
  114. package/src/chat/thumbnails.ts +14 -0
  115. package/src/chat/timeline-flash.ts +2 -0
  116. package/src/chat/timeline-scroll.ts +23 -0
  117. package/src/chat/ui/AccountPill.tsx +4 -0
  118. package/src/chat/ui/AnsiOutput.tsx +1 -0
  119. package/src/chat/ui/BookmarkMarker.tsx +5 -0
  120. package/src/chat/ui/BookmarkSubmenu.tsx +1 -0
  121. package/src/chat/ui/ChatActivity.tsx +13 -0
  122. package/src/chat/ui/CodeBlock.tsx +8 -0
  123. package/src/chat/ui/Composer.tsx +15 -0
  124. package/src/chat/ui/ComposerInput.tsx +22 -0
  125. package/src/chat/ui/DiffPool.tsx +3 -0
  126. package/src/chat/ui/EditDiff.tsx +5 -0
  127. package/src/chat/ui/GoalDock.tsx +13 -1
  128. package/src/chat/ui/ImageView.tsx +11 -0
  129. package/src/chat/ui/LimitState.tsx +23 -6
  130. package/src/chat/ui/Markdown.tsx +41 -0
  131. package/src/chat/ui/MermaidBlock.tsx +16 -0
  132. package/src/chat/ui/MessageActions.tsx +8 -0
  133. package/src/chat/ui/ModelMarks.tsx +1 -0
  134. package/src/chat/ui/Pickers.tsx +26 -0
  135. package/src/chat/ui/PromptComposer.tsx +2 -0
  136. package/src/chat/ui/PromptEditor.tsx +6 -0
  137. package/src/chat/ui/QuoteButton.tsx +12 -0
  138. package/src/chat/ui/ReferenceChip.tsx +3 -0
  139. package/src/chat/ui/ResumeCompactionDock.tsx +1 -0
  140. package/src/chat/ui/RowTime.tsx +1 -0
  141. package/src/chat/ui/RunSettings.tsx +38 -0
  142. package/src/chat/ui/Scrubber.tsx +14 -0
  143. package/src/chat/ui/SessionLine.tsx +1 -0
  144. package/src/chat/ui/ShellCommand.tsx +32 -0
  145. package/src/chat/ui/SubagentControls.tsx +7 -0
  146. package/src/chat/ui/SubagentInfo.tsx +1 -0
  147. package/src/chat/ui/SubagentStopButton.tsx +6 -0
  148. package/src/chat/ui/SubagentTimeline.tsx +10 -0
  149. package/src/chat/ui/Timeline.tsx +119 -0
  150. package/src/chat/ui/TimelineMenu.tsx +5 -0
  151. package/src/chat/ui/UnifiedDiff.tsx +6 -0
  152. package/src/chat/ui/UploadThumb.tsx +2 -0
  153. package/src/chat/ui/VisualDialogs.tsx +3 -0
  154. package/src/chat/ui/VisualFrame.tsx +15 -0
  155. package/src/chat/ui/Welcome.tsx +1 -0
  156. package/src/chat/ui/chip-clipboard.ts +20 -0
  157. package/src/chat/ui/code-lines.ts +14 -0
  158. package/src/chat/ui/code-theme.ts +1 -0
  159. package/src/chat/ui/composer/ComposerControls.tsx +5 -0
  160. package/src/chat/ui/composer/ComposerMenu.tsx +12 -0
  161. package/src/chat/ui/composer/DraftParts.tsx +2 -0
  162. package/src/chat/ui/composer/QueuedMessages.tsx +4 -0
  163. package/src/chat/ui/composer/chip-paste.ts +16 -0
  164. package/src/chat/ui/composer/chips.ts +6 -0
  165. package/src/chat/ui/composer/editor.ts +9 -0
  166. package/src/chat/ui/composer/insert.ts +2 -0
  167. package/src/chat/ui/composer/key-handler.ts +39 -0
  168. package/src/chat/ui/composer/keys.ts +23 -0
  169. package/src/chat/ui/composer/placeholder.ts +6 -0
  170. package/src/chat/ui/composer/prompt-picks.ts +1 -0
  171. package/src/chat/ui/composer/surface.ts +5 -0
  172. package/src/chat/ui/composer/use-chat-controls.ts +13 -0
  173. package/src/chat/ui/composer/use-compaction-offer.ts +3 -0
  174. package/src/chat/ui/composer/use-composer-menus.ts +2 -0
  175. package/src/chat/ui/composer/use-composer-submit.ts +27 -0
  176. package/src/chat/ui/composer/use-continuable-turn.ts +3 -5
  177. package/src/chat/ui/composer/use-draft-files.ts +24 -0
  178. package/src/chat/ui/composer/use-effort-stepper.ts +8 -0
  179. package/src/chat/ui/composer/use-notice.ts +4 -1
  180. package/src/chat/ui/composer/use-pending-requests.ts +3 -0
  181. package/src/chat/ui/composer/use-prompt-history.ts +20 -11
  182. package/src/chat/ui/composer/use-prompt-hold.ts +3 -0
  183. package/src/chat/ui/composer/use-prompt-menus.ts +34 -14
  184. package/src/chat/ui/composer/use-take-back.ts +20 -2
  185. package/src/chat/ui/diff/ApprovalReview.tsx +18 -15
  186. package/src/chat/ui/diff/DiffFallbackBoundary.tsx +1 -0
  187. package/src/chat/ui/diff/DiffOmitted.tsx +1 -0
  188. package/src/chat/ui/diff/DiffStack.tsx +2 -0
  189. package/src/chat/ui/diff/DiffUnavailable.tsx +1 -0
  190. package/src/chat/ui/diff/EditorEditDiff.tsx +13 -0
  191. package/src/chat/ui/diff/EditorPatchDiff.tsx +4 -0
  192. package/src/chat/ui/diff/LegacyDiffPool.tsx +2 -0
  193. package/src/chat/ui/diff/LegacyEditDiff.tsx +2 -0
  194. package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +8 -0
  195. package/src/chat/ui/diff/RawDiff.tsx +1 -0
  196. package/src/chat/ui/diff/ReviewDiff.tsx +1 -0
  197. package/src/chat/ui/diff/diff-source-budget.ts +8 -0
  198. package/src/chat/ui/diff/editor-edit-model.ts +4 -0
  199. package/src/chat/ui/diff/review-plan.ts +9 -0
  200. package/src/chat/ui/diff/review-settle.ts +1 -0
  201. package/src/chat/ui/diff/syntax-runtime.ts +52 -0
  202. package/src/chat/ui/diff/use-review-stack.ts +9 -0
  203. package/src/chat/ui/diff-syntax.ts +12 -0
  204. package/src/chat/ui/diff-theme.ts +2 -0
  205. package/src/chat/ui/file-links.ts +2 -0
  206. package/src/chat/ui/find-reveal.ts +1 -0
  207. package/src/chat/ui/full-diff.ts +1 -0
  208. package/src/chat/ui/highlighter.ts +29 -15
  209. package/src/chat/ui/icons.tsx +2 -4
  210. package/src/chat/ui/index.ts +4 -0
  211. package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +25 -0
  212. package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +1 -0
  213. package/src/chat/ui/intelligent-ui/UiReply.tsx +63 -0
  214. package/src/chat/ui/intelligent-ui/block-local.ts +5 -0
  215. package/src/chat/ui/intelligent-ui/chart-data.ts +15 -0
  216. package/src/chat/ui/intelligent-ui/node-text.ts +17 -0
  217. package/src/chat/ui/intelligent-ui/renderers/binding.ts +1 -0
  218. package/src/chat/ui/intelligent-ui/renderers/chart.tsx +31 -0
  219. package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -0
  220. package/src/chat/ui/intelligent-ui/renderers/content.tsx +18 -0
  221. package/src/chat/ui/intelligent-ui/renderers/data.tsx +11 -0
  222. package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +13 -0
  223. package/src/chat/ui/intelligent-ui/renderers/links.tsx +9 -0
  224. package/src/chat/ui/intelligent-ui/renderers/map-slots.ts +15 -0
  225. package/src/chat/ui/intelligent-ui/renderers/map-style.ts +15 -0
  226. package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +48 -0
  227. package/src/chat/ui/intelligent-ui/renderers/map.tsx +20 -0
  228. package/src/chat/ui/intelligent-ui/renderers/place-point.ts +3 -0
  229. package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -0
  230. package/src/chat/ui/intelligent-ui/renderers/text.tsx +8 -0
  231. package/src/chat/ui/intelligent-ui/reply-parts.ts +5 -0
  232. package/src/chat/ui/intelligent-ui/table-data.ts +17 -0
  233. package/src/chat/ui/intelligent-ui/use-in-view.ts +4 -0
  234. package/src/chat/ui/intelligent-ui/use-later.ts +4 -0
  235. package/src/chat/ui/intelligent-ui/use-truncated.ts +5 -0
  236. package/src/chat/ui/intelligent-ui/use-ui-links.ts +29 -0
  237. package/src/chat/ui/intelligent-ui/use-ui-queries.ts +60 -0
  238. package/src/chat/ui/markdown-blocks.ts +64 -0
  239. package/src/chat/ui/mermaid.ts +4 -0
  240. package/src/chat/ui/quote-selection.ts +10 -0
  241. package/src/chat/ui/rehype-chips.ts +5 -0
  242. package/src/chat/ui/rehype-fade.ts +2 -0
  243. package/src/chat/ui/remark-html-as-text.ts +5 -0
  244. package/src/chat/ui/reveal.ts +18 -0
  245. package/src/chat/ui/rows/ForksRow.tsx +5 -0
  246. package/src/chat/ui/rows/GeneratedImageRow.tsx +10 -0
  247. package/src/chat/ui/rows/MessageRows.tsx +29 -5
  248. package/src/chat/ui/rows/RowContainer.tsx +1 -0
  249. package/src/chat/ui/rows/Rows.tsx +2 -0
  250. package/src/chat/ui/rows/SubagentRow.tsx +13 -0
  251. package/src/chat/ui/rows/TaskRow.tsx +7 -0
  252. package/src/chat/ui/rows/VisualRow.tsx +4 -0
  253. package/src/chat/ui/rows/WorkRows.tsx +46 -0
  254. package/src/chat/ui/rows/WorkflowRow.tsx +10 -0
  255. package/src/chat/ui/rows/row-rhythm.ts +7 -5
  256. package/src/chat/ui/theme-watch.ts +8 -7
  257. package/src/chat/ui/thread-references.ts +7 -0
  258. package/src/chat/ui/use-diff-source-tokens.ts +8 -0
  259. package/src/chat/ui/useToggleSet.ts +3 -0
  260. package/src/chat/ui/visual-theme.ts +30 -0
  261. package/src/chat/visual-bridge.ts +23 -0
  262. package/src/chat/visual-viewport.ts +12 -0
  263. package/src/host-hooks.ts +6 -4
  264. package/src/host.ts +2 -0
  265. package/src/index.ts +3 -0
  266. package/src/lazy.tsx +9 -0
  267. package/src/mounted-registry.ts +4 -0
  268. package/src/port-transport.ts +32 -0
  269. package/src/prompts/index.ts +2 -0
  270. package/src/prompts/logic/focus.ts +5 -0
  271. package/src/prompts/logic/keys.ts +12 -0
  272. package/src/prompts/logic/prompts.ts +8 -0
  273. package/src/prompts/logic/subjects.ts +8 -0
  274. package/src/prompts/logic/useFocusAfterAnswer.ts +2 -0
  275. package/src/prompts/logic/usePromptSession.ts +13 -1
  276. package/src/prompts/ui/ApprovalBody.tsx +2 -0
  277. package/src/prompts/ui/PromptActions.tsx +2 -0
  278. package/src/prompts/ui/PromptCard.tsx +6 -0
  279. package/src/prompts/ui/PromptView.tsx +6 -0
  280. package/src/prompts/ui/QuestionBody.tsx +11 -0
  281. package/src/providers/AccountColors.tsx +1 -0
  282. package/src/providers/AccountDetail.tsx +7 -0
  283. package/src/providers/AccountVariables.tsx +2 -0
  284. package/src/providers/AddAccountForm.tsx +5 -1
  285. package/src/providers/CliDetail.tsx +6 -5
  286. package/src/providers/InstallPage.tsx +11 -0
  287. package/src/providers/ProviderList.tsx +3 -0
  288. package/src/providers/ProvidersPane.tsx +18 -0
  289. package/src/providers/account-actions.ts +10 -8
  290. package/src/providers/install-steps.ts +3 -0
  291. package/src/providers/pane-target.ts +5 -0
  292. package/src/providers/provider-abilities.ts +1 -0
  293. package/src/providers/provider-groups.ts +6 -0
  294. package/src/providers/variables.ts +12 -0
  295. package/src/scope.ts +2 -0
  296. package/src/state/chats.ts +61 -14
  297. package/src/state/index.ts +2 -0
  298. package/src/state/provider-accounts.ts +7 -9
  299. package/src/state/providers.ts +1 -0
  300. package/src/state/usage.ts +6 -0
  301. package/src/storage.ts +18 -0
  302. package/src/testing/prompts.ts +5 -0
  303. package/src/transport.ts +18 -0
  304. package/src/usage/ChartLogo.tsx +12 -0
  305. package/src/usage/LimitsList.tsx +7 -8
  306. package/src/usage/UsageBreakdown.tsx +11 -4
  307. package/src/usage/UsageChart.tsx +5 -0
  308. package/src/usage/UsageLimits.tsx +10 -7
  309. package/src/usage/UsageLimitsCard.tsx +2 -0
  310. package/src/usage/UsagePage.tsx +16 -19
  311. package/src/usage/UsageSummary.tsx +4 -5
  312. package/src/usage/UsageTiles.tsx +2 -0
  313. package/src/usage/format.ts +7 -0
  314. package/src/usage/limit-groups.ts +14 -0
  315. package/src/usage/limits.ts +11 -13
  316. package/src/usage/money.ts +1 -0
  317. package/src/usage/summary.ts +15 -7
@@ -1,5 +1,5 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useId, useMemo, useState } from 'react';
2
+ import { useEffect, useId, useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { ensureSyntaxTree, syntaxTree } from '@codemirror/language';
5
5
  import { useChatHost } from '../../../host.js';
@@ -23,7 +23,7 @@ function sameQuery(left, right) {
23
23
  * follow that one.
24
24
  */
25
25
  export function usePromptMenus(t0) {
26
- const $ = _c(103);
26
+ const $ = _c(102);
27
27
  const {
28
28
  draft: t1,
29
29
  inputRef,
@@ -102,140 +102,103 @@ export function usePromptMenus(t0) {
102
102
  t4 = $[5];
103
103
  }
104
104
  useEffect(t3, t4);
105
+ let commandQuery;
105
106
  let t5;
106
- if ($[6] !== text) {
107
- t5 = text.startsWith("/") && !text.includes("\n") ? text.slice(1).trim().toLowerCase() : null;
108
- $[6] = text;
109
- $[7] = t5;
110
- } else {
111
- t5 = $[7];
112
- }
113
- const commandQuery = t5;
114
- let t6;
115
- bb0: {
116
- if (commandQuery === null) {
117
- let t7;
118
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
119
- t7 = [];
120
- $[8] = t7;
121
- } else {
122
- t7 = $[8];
123
- }
124
- t6 = t7;
125
- break bb0;
126
- }
127
- let t7;
128
- if ($[9] !== skills) {
129
- t7 = new Set(skills.map(_temp2));
130
- $[9] = skills;
131
- $[10] = t7;
132
- } else {
133
- t7 = $[10];
134
- }
135
- const known = t7;
136
- let t8;
137
- if ($[11] !== commandQuery || $[12] !== goals || $[13] !== known || $[14] !== localCommands || $[15] !== providerName || $[16] !== slashCommands || $[17] !== t) {
138
- const own = localCommands.map(name => ({
139
- name,
140
- hint: t(`composer.commands.${name}`),
141
- local: true,
142
- skill: false
143
- }));
144
- const goal = goals ? [{
145
- name: "goal",
146
- hint: t("composer.commands.goal"),
147
- local: false,
148
- skill: false
149
- }] : [];
150
- const cli = usableSlashCommands([...slashCommands]).filter(name_0 => !localCommands.includes(name_0) && (!goals || name_0 !== "goal")).map(name_1 => ({
151
- name: name_1,
152
- hint: known.has(name_1) ? t("composer.commands.skill") : t("composer.commands.cli", {
153
- cli: providerName ?? t("composer.commands.anyCli")
154
- }),
155
- local: false,
156
- skill: known.has(name_1)
157
- }));
158
- t8 = [...own, ...goal, ...cli].filter(command => command.name.startsWith(commandQuery)).slice(0, 8);
159
- $[11] = commandQuery;
160
- $[12] = goals;
161
- $[13] = known;
162
- $[14] = localCommands;
163
- $[15] = providerName;
164
- $[16] = slashCommands;
165
- $[17] = t;
166
- $[18] = t8;
167
- } else {
168
- t8 = $[18];
169
- }
170
- t6 = t8;
171
- }
172
- const commands = t6;
173
- let t7;
174
- bb1: {
175
- if (skillQuery === null) {
176
- let t8;
177
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
178
- t8 = [];
179
- $[19] = t8;
180
- } else {
181
- t8 = $[19];
182
- }
183
- t7 = t8;
184
- break bb1;
185
- }
186
- let t8;
187
- if ($[20] !== skillQuery.query || $[21] !== skills) {
188
- const query = skillQuery.query.toLowerCase();
189
- t8 = skills.filter(skill_0 => skill_0.name.toLowerCase().includes(query)).slice(0, 8);
190
- $[20] = skillQuery.query;
191
- $[21] = skills;
192
- $[22] = t8;
107
+ if ($[6] !== goals || $[7] !== localCommands || $[8] !== providerName || $[9] !== skills || $[10] !== slashCommands || $[11] !== t || $[12] !== text) {
108
+ commandQuery = text.startsWith("/") && !text.includes("\n") ? text.slice(1).trim().toLowerCase() : null;
109
+ let t6;
110
+ if ($[15] !== goals || $[16] !== localCommands || $[17] !== providerName || $[18] !== skills || $[19] !== slashCommands || $[20] !== t) {
111
+ t6 = query => {
112
+ const known = new Set(skills.map(_temp2));
113
+ const own = localCommands.map(name => ({
114
+ name,
115
+ hint: t(`composer.commands.${name}`),
116
+ local: true,
117
+ skill: false
118
+ }));
119
+ const goal = goals ? [{
120
+ name: "goal",
121
+ hint: t("composer.commands.goal"),
122
+ local: false,
123
+ skill: false
124
+ }] : [];
125
+ const cli = usableSlashCommands([...slashCommands]).filter(name_0 => !localCommands.includes(name_0) && (!goals || name_0 !== "goal")).map(name_1 => ({
126
+ name: name_1,
127
+ hint: known.has(name_1) ? t("composer.commands.skill") : t("composer.commands.cli", {
128
+ cli: providerName ?? t("composer.commands.anyCli")
129
+ }),
130
+ local: false,
131
+ skill: known.has(name_1)
132
+ }));
133
+ return [...own, ...goal, ...cli].filter(command => command.name.startsWith(query)).slice(0, 8);
134
+ };
135
+ $[15] = goals;
136
+ $[16] = localCommands;
137
+ $[17] = providerName;
138
+ $[18] = skills;
139
+ $[19] = slashCommands;
140
+ $[20] = t;
141
+ $[21] = t6;
193
142
  } else {
194
- t8 = $[22];
143
+ t6 = $[21];
195
144
  }
196
- t7 = t8;
145
+ const commandsOf = t6;
146
+ t5 = commandQuery === null ? [] : commandsOf(commandQuery);
147
+ $[6] = goals;
148
+ $[7] = localCommands;
149
+ $[8] = providerName;
150
+ $[9] = skills;
151
+ $[10] = slashCommands;
152
+ $[11] = t;
153
+ $[12] = text;
154
+ $[13] = commandQuery;
155
+ $[14] = t5;
156
+ } else {
157
+ commandQuery = $[13];
158
+ t5 = $[14];
197
159
  }
198
- const skillMatches = t7;
160
+ const commands = t5;
161
+ const skillMatches = skillQuery === null ? [] : skills.filter(skill_0 => skill_0.name.toLowerCase().includes(skillQuery.query.toLowerCase())).slice(0, 8);
199
162
  const commandMenuOpen = commandQuery !== null && commands.length > 0;
200
163
  const skillMenuOpen = !commandMenuOpen && skillQuery !== null && skillMatches.length > 0;
201
164
  const mentionMenuOpen = !commandMenuOpen && !skillMenuOpen && mention !== null;
202
165
  const files_0 = mention === null ? [] : searched.files;
203
166
  const mentionCount = files_0.length;
204
- let t8;
205
- if ($[23] !== referables.chatsOnly) {
206
- t8 = item => !referables.chatsOnly || item.kind === "chat";
207
- $[23] = referables.chatsOnly;
208
- $[24] = t8;
167
+ let t6;
168
+ if ($[22] !== referables.chatsOnly) {
169
+ t6 = item => !referables.chatsOnly || item.kind === "chat";
170
+ $[22] = referables.chatsOnly;
171
+ $[23] = t6;
209
172
  } else {
210
- t8 = $[24];
173
+ t6 = $[23];
211
174
  }
212
- const offersReferences = referables.items.some(t8);
175
+ const offersReferences = referables.items.some(t6);
213
176
  const referenceMenuOpen = !commandMenuOpen && !skillMenuOpen && !mentionMenuOpen && referenceQuery !== null && offersReferences;
214
177
  const excluded = ownId === undefined ? [...draft.chats, ...draft.references] : [ownId, ...draft.chats, ...draft.references];
215
178
  const referenceMatches = referenceMenuOpen ? referenceSuggestions(referables, referenceQuery.query, excluded, REFERENCE_RESULTS) : [];
216
- let t9;
217
- if ($[25] !== draft.chats || $[26] !== draft.referenceNames || $[27] !== draft.references || $[28] !== referables.items) {
218
- let t10;
219
- if ($[30] !== referables.items) {
220
- t10 = token => ({
179
+ let t7;
180
+ if ($[24] !== draft.chats || $[25] !== draft.referenceNames || $[26] !== draft.references || $[27] !== referables.items) {
181
+ let t8;
182
+ if ($[29] !== referables.items) {
183
+ t8 = token => ({
221
184
  ...token,
222
185
  kind: referables.items.find(item_0 => item_0.id === token.id)?.kind ?? null
223
186
  });
224
- $[30] = referables.items;
225
- $[31] = t10;
187
+ $[29] = referables.items;
188
+ $[30] = t8;
226
189
  } else {
227
- t10 = $[31];
190
+ t8 = $[30];
228
191
  }
229
- t9 = referenceTokens([...draft.chats, ...draft.references], referables.items, draft.referenceNames).map(t10);
230
- $[25] = draft.chats;
231
- $[26] = draft.referenceNames;
232
- $[27] = draft.references;
233
- $[28] = referables.items;
234
- $[29] = t9;
192
+ t7 = referenceTokens([...draft.chats, ...draft.references], referables.items, draft.referenceNames).map(t8);
193
+ $[24] = draft.chats;
194
+ $[25] = draft.referenceNames;
195
+ $[26] = draft.references;
196
+ $[27] = referables.items;
197
+ $[28] = t7;
235
198
  } else {
236
- t9 = $[29];
199
+ t7 = $[28];
237
200
  }
238
- const referenceChips = t9;
201
+ const referenceChips = t7;
239
202
  const listId = useId();
240
203
  const menuOpen = commandMenuOpen || skillMenuOpen || mentionMenuOpen || referenceMenuOpen;
241
204
  const menuCount = commandMenuOpen ? commands.length : skillMenuOpen ? skillMatches.length : mentionMenuOpen ? mentionCount : referenceMatches.length;
@@ -247,9 +210,9 @@ export function usePromptMenus(t0) {
247
210
  activeIndex,
248
211
  count: menuCount
249
212
  });
250
- let t10;
251
- if ($[32] !== cwd || $[33] !== draft.mentions || $[34] !== draft.skills || $[35] !== referenceChips) {
252
- t10 = (value, selection, state) => {
213
+ let t8;
214
+ if ($[31] !== cwd || $[32] !== draft.mentions || $[33] !== draft.skills || $[34] !== referenceChips) {
215
+ t8 = (value, selection, state) => {
253
216
  const empty = selection.from === selection.to;
254
217
  const tree = empty ? ensureSyntaxTree(state, selection.from, 50) ?? syntaxTree(state) : null;
255
218
  const caret = tree !== null && !inCode(tree, value, selection.from) ? selection.from : null;
@@ -261,41 +224,41 @@ export function usePromptMenus(t0) {
261
224
  const reference = caret === null ? null : queryOutsideChips(findReferenceQuery(value, caret), chips);
262
225
  setReferenceQuery(current_1 => sameQuery(current_1, reference) ? current_1 : reference);
263
226
  };
264
- $[32] = cwd;
265
- $[33] = draft.mentions;
266
- $[34] = draft.skills;
267
- $[35] = referenceChips;
268
- $[36] = t10;
227
+ $[31] = cwd;
228
+ $[32] = draft.mentions;
229
+ $[33] = draft.skills;
230
+ $[34] = referenceChips;
231
+ $[35] = t8;
269
232
  } else {
270
- t10 = $[36];
233
+ t8 = $[35];
271
234
  }
272
- const trackTriggers = t10;
273
- let t11;
274
- if ($[37] !== inputRef) {
275
- t11 = caret_0 => {
235
+ const trackTriggers = t8;
236
+ let t9;
237
+ if ($[36] !== inputRef) {
238
+ t9 = caret_0 => {
276
239
  requestAnimationFrame(() => inputRef.current?.setCaret(caret_0));
277
240
  };
278
- $[37] = inputRef;
279
- $[38] = t11;
241
+ $[36] = inputRef;
242
+ $[37] = t9;
280
243
  } else {
281
- t11 = $[38];
244
+ t9 = $[37];
282
245
  }
283
- const moveCaret = t11;
284
- let t12;
285
- if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
286
- t12 = () => {
246
+ const moveCaret = t9;
247
+ let t10;
248
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
249
+ t10 = () => {
287
250
  setMention(null);
288
251
  setSkillQuery(null);
289
252
  setReferenceQuery(null);
290
253
  };
291
- $[39] = t12;
254
+ $[38] = t10;
292
255
  } else {
293
- t12 = $[39];
256
+ t10 = $[38];
294
257
  }
295
- const close = t12;
296
- let t13;
297
- if ($[40] !== draft.mentions || $[41] !== mention || $[42] !== moveCaret || $[43] !== setText || $[44] !== text) {
298
- t13 = path => {
258
+ const close = t10;
259
+ let t11;
260
+ if ($[39] !== draft.mentions || $[40] !== mention || $[41] !== moveCaret || $[42] !== setText || $[43] !== text) {
261
+ t11 = path => {
299
262
  if (!mention) {
300
263
  return;
301
264
  }
@@ -304,35 +267,35 @@ export function usePromptMenus(t0) {
304
267
  setMention(null);
305
268
  moveCaret(result.caret);
306
269
  };
307
- $[40] = draft.mentions;
308
- $[41] = mention;
309
- $[42] = moveCaret;
310
- $[43] = setText;
311
- $[44] = text;
312
- $[45] = t13;
270
+ $[39] = draft.mentions;
271
+ $[40] = mention;
272
+ $[41] = moveCaret;
273
+ $[42] = setText;
274
+ $[43] = text;
275
+ $[44] = t11;
313
276
  } else {
314
- t13 = $[45];
277
+ t11 = $[44];
315
278
  }
316
- const chooseMention = t13;
317
- let t14;
318
- if ($[46] !== chooseMention || $[47] !== mention || $[48] !== searched) {
319
- t14 = index => {
279
+ const chooseMention = t11;
280
+ let t12;
281
+ if ($[45] !== chooseMention || $[46] !== mention || $[47] !== searched) {
282
+ t12 = index => {
320
283
  const path_0 = mention === null ? null : mentionPick(index, searched, mention.query);
321
284
  if (path_0 !== null) {
322
285
  chooseMention(path_0);
323
286
  }
324
287
  };
325
- $[46] = chooseMention;
326
- $[47] = mention;
327
- $[48] = searched;
328
- $[49] = t14;
288
+ $[45] = chooseMention;
289
+ $[46] = mention;
290
+ $[47] = searched;
291
+ $[48] = t12;
329
292
  } else {
330
- t14 = $[49];
293
+ t12 = $[48];
331
294
  }
332
- const chooseMentionAt = t14;
333
- let t15;
334
- if ($[50] !== moveCaret || $[51] !== referenceQuery || $[52] !== setDraft || $[53] !== text) {
335
- t15 = item_1 => {
295
+ const chooseMentionAt = t12;
296
+ let t13;
297
+ if ($[49] !== moveCaret || $[50] !== referenceQuery || $[51] !== setDraft || $[52] !== text) {
298
+ t13 = item_1 => {
336
299
  if (!referenceQuery) {
337
300
  return;
338
301
  }
@@ -352,33 +315,33 @@ export function usePromptMenus(t0) {
352
315
  setReferenceQuery(null);
353
316
  moveCaret(result_0.caret);
354
317
  };
355
- $[50] = moveCaret;
356
- $[51] = referenceQuery;
357
- $[52] = setDraft;
358
- $[53] = text;
359
- $[54] = t15;
318
+ $[49] = moveCaret;
319
+ $[50] = referenceQuery;
320
+ $[51] = setDraft;
321
+ $[52] = text;
322
+ $[53] = t13;
360
323
  } else {
361
- t15 = $[54];
324
+ t13 = $[53];
362
325
  }
363
- const chooseReference = t15;
364
- let t16;
365
- if ($[55] !== chooseReference || $[56] !== referenceMatches) {
366
- t16 = index_0 => {
326
+ const chooseReference = t13;
327
+ let t14;
328
+ if ($[54] !== chooseReference || $[55] !== referenceMatches) {
329
+ t14 = index_0 => {
367
330
  const item_2 = referenceMatches[index_0] ?? referenceMatches[0];
368
331
  if (item_2 !== undefined) {
369
332
  chooseReference(item_2);
370
333
  }
371
334
  };
372
- $[55] = chooseReference;
373
- $[56] = referenceMatches;
374
- $[57] = t16;
335
+ $[54] = chooseReference;
336
+ $[55] = referenceMatches;
337
+ $[56] = t14;
375
338
  } else {
376
- t16 = $[57];
339
+ t14 = $[56];
377
340
  }
378
- const chooseReferenceAt = t16;
379
- let t17;
380
- if ($[58] !== draft.mentions || $[59] !== draft.skills || $[60] !== moveCaret || $[61] !== setText || $[62] !== skillQuery || $[63] !== text) {
381
- t17 = name_2 => {
341
+ const chooseReferenceAt = t14;
342
+ let t15;
343
+ if ($[57] !== draft.mentions || $[58] !== draft.skills || $[59] !== moveCaret || $[60] !== setText || $[61] !== skillQuery || $[62] !== text) {
344
+ t15 = name_2 => {
382
345
  const result_1 = skillQuery ? insertSkill(text, skillQuery, name_2) : {
383
346
  text: `$${name_2} `,
384
347
  caret: name_2.length + 2
@@ -387,20 +350,20 @@ export function usePromptMenus(t0) {
387
350
  setSkillQuery(null);
388
351
  moveCaret(result_1.caret);
389
352
  };
390
- $[58] = draft.mentions;
391
- $[59] = draft.skills;
392
- $[60] = moveCaret;
393
- $[61] = setText;
394
- $[62] = skillQuery;
395
- $[63] = text;
396
- $[64] = t17;
353
+ $[57] = draft.mentions;
354
+ $[58] = draft.skills;
355
+ $[59] = moveCaret;
356
+ $[60] = setText;
357
+ $[61] = skillQuery;
358
+ $[62] = text;
359
+ $[63] = t15;
397
360
  } else {
398
- t17 = $[64];
361
+ t15 = $[63];
399
362
  }
400
- const chooseSkill = t17;
401
- let t18;
402
- if ($[65] !== chooseSkill || $[66] !== inputRef || $[67] !== setText) {
403
- t18 = (command_0, index_1) => {
363
+ const chooseSkill = t15;
364
+ let t16;
365
+ if ($[64] !== chooseSkill || $[65] !== inputRef || $[66] !== setText) {
366
+ t16 = (command_0, index_1) => {
404
367
  setMenuIndex(index_1);
405
368
  if (command_0.skill) {
406
369
  chooseSkill(command_0.name);
@@ -409,33 +372,33 @@ export function usePromptMenus(t0) {
409
372
  setText(`/${command_0.name}`);
410
373
  inputRef.current?.focus();
411
374
  };
412
- $[65] = chooseSkill;
413
- $[66] = inputRef;
414
- $[67] = setText;
415
- $[68] = t18;
375
+ $[64] = chooseSkill;
376
+ $[65] = inputRef;
377
+ $[66] = setText;
378
+ $[67] = t16;
416
379
  } else {
417
- t18 = $[68];
380
+ t16 = $[67];
418
381
  }
419
- const pickCommand = t18;
420
- let t19;
421
- if ($[69] !== chooseSkill || $[70] !== setText) {
422
- t19 = command_1 => {
382
+ const pickCommand = t16;
383
+ let t17;
384
+ if ($[68] !== chooseSkill || $[69] !== setText) {
385
+ t17 = command_1 => {
423
386
  if (command_1.skill) {
424
387
  chooseSkill(command_1.name);
425
388
  return;
426
389
  }
427
390
  setText(`/${command_1.name} `);
428
391
  };
429
- $[69] = chooseSkill;
430
- $[70] = setText;
431
- $[71] = t19;
392
+ $[68] = chooseSkill;
393
+ $[69] = setText;
394
+ $[70] = t17;
432
395
  } else {
433
- t19 = $[71];
396
+ t17 = $[70];
434
397
  }
435
- const completeCommand = t19;
436
- let t20;
437
- if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
438
- t20 = (key, count) => {
398
+ const completeCommand = t17;
399
+ let t18;
400
+ if ($[71] === Symbol.for("react.memo_cache_sentinel")) {
401
+ t18 = (key, count) => {
439
402
  if (key === "ArrowDown") {
440
403
  setMenuIndex(i => (i + 1) % count);
441
404
  return true;
@@ -446,29 +409,29 @@ export function usePromptMenus(t0) {
446
409
  }
447
410
  return false;
448
411
  };
449
- $[72] = t20;
412
+ $[71] = t18;
450
413
  } else {
451
- t20 = $[72];
414
+ t18 = $[71];
452
415
  }
453
- const moveInMenu = t20;
454
- const t21 = skills.length > 0;
455
- let t22;
456
- if ($[73] !== skills) {
457
- t22 = skills.map(_temp3);
458
- $[73] = skills;
459
- $[74] = t22;
416
+ const moveInMenu = t18;
417
+ const t19 = skills.length > 0;
418
+ let t20;
419
+ if ($[72] !== skills) {
420
+ t20 = skills.map(_temp3);
421
+ $[72] = skills;
422
+ $[73] = t20;
460
423
  } else {
461
- t22 = $[74];
424
+ t20 = $[73];
462
425
  }
463
- let t23;
464
- if ($[75] !== activeIndex || $[76] !== chooseMention || $[77] !== chooseMentionAt || $[78] !== chooseReference || $[79] !== chooseReferenceAt || $[80] !== chooseSkill || $[81] !== commandMenuOpen || $[82] !== commandQuery || $[83] !== commands || $[84] !== completeCommand || $[85] !== files_0 || $[86] !== inputAria || $[87] !== listId || $[88] !== mention || $[89] !== mentionCount || $[90] !== mentionMenuOpen || $[91] !== menuOpen || $[92] !== pickCommand || $[93] !== referables || $[94] !== referenceChips || $[95] !== referenceMatches || $[96] !== referenceMenuOpen || $[97] !== skillMatches || $[98] !== skillMenuOpen || $[99] !== t21 || $[100] !== t22 || $[101] !== trackTriggers) {
465
- t23 = {
426
+ let t21;
427
+ if ($[74] !== activeIndex || $[75] !== chooseMention || $[76] !== chooseMentionAt || $[77] !== chooseReference || $[78] !== chooseReferenceAt || $[79] !== chooseSkill || $[80] !== commandMenuOpen || $[81] !== commandQuery || $[82] !== commands || $[83] !== completeCommand || $[84] !== files_0 || $[85] !== inputAria || $[86] !== listId || $[87] !== mention || $[88] !== mentionCount || $[89] !== mentionMenuOpen || $[90] !== menuOpen || $[91] !== pickCommand || $[92] !== referables || $[93] !== referenceChips || $[94] !== referenceMatches || $[95] !== referenceMenuOpen || $[96] !== skillMatches || $[97] !== skillMenuOpen || $[98] !== t19 || $[99] !== t20 || $[100] !== trackTriggers) {
428
+ t21 = {
466
429
  listId,
467
430
  activeIndex,
468
431
  inputAria,
469
432
  menuOpen,
470
- hasSkills: t21,
471
- skillNames: t22,
433
+ hasSkills: t19,
434
+ skillNames: t20,
472
435
  commandQuery,
473
436
  commands,
474
437
  commandMenuOpen,
@@ -494,38 +457,38 @@ export function usePromptMenus(t0) {
494
457
  completeCommand,
495
458
  moveInMenu
496
459
  };
497
- $[75] = activeIndex;
498
- $[76] = chooseMention;
499
- $[77] = chooseMentionAt;
500
- $[78] = chooseReference;
501
- $[79] = chooseReferenceAt;
502
- $[80] = chooseSkill;
503
- $[81] = commandMenuOpen;
504
- $[82] = commandQuery;
505
- $[83] = commands;
506
- $[84] = completeCommand;
507
- $[85] = files_0;
508
- $[86] = inputAria;
509
- $[87] = listId;
510
- $[88] = mention;
511
- $[89] = mentionCount;
512
- $[90] = mentionMenuOpen;
513
- $[91] = menuOpen;
514
- $[92] = pickCommand;
515
- $[93] = referables;
516
- $[94] = referenceChips;
517
- $[95] = referenceMatches;
518
- $[96] = referenceMenuOpen;
519
- $[97] = skillMatches;
520
- $[98] = skillMenuOpen;
521
- $[99] = t21;
522
- $[100] = t22;
523
- $[101] = trackTriggers;
524
- $[102] = t23;
460
+ $[74] = activeIndex;
461
+ $[75] = chooseMention;
462
+ $[76] = chooseMentionAt;
463
+ $[77] = chooseReference;
464
+ $[78] = chooseReferenceAt;
465
+ $[79] = chooseSkill;
466
+ $[80] = commandMenuOpen;
467
+ $[81] = commandQuery;
468
+ $[82] = commands;
469
+ $[83] = completeCommand;
470
+ $[84] = files_0;
471
+ $[85] = inputAria;
472
+ $[86] = listId;
473
+ $[87] = mention;
474
+ $[88] = mentionCount;
475
+ $[89] = mentionMenuOpen;
476
+ $[90] = menuOpen;
477
+ $[91] = pickCommand;
478
+ $[92] = referables;
479
+ $[93] = referenceChips;
480
+ $[94] = referenceMatches;
481
+ $[95] = referenceMenuOpen;
482
+ $[96] = skillMatches;
483
+ $[97] = skillMenuOpen;
484
+ $[98] = t19;
485
+ $[99] = t20;
486
+ $[100] = trackTriggers;
487
+ $[101] = t21;
525
488
  } else {
526
- t23 = $[102];
489
+ t21 = $[101];
527
490
  }
528
- return t23;
491
+ return t21;
529
492
  }
530
493
  function _temp3(skill_2) {
531
494
  return skill_2.name;
@@ -2,7 +2,7 @@ import { useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useChatHost } from '../../../host.js';
4
4
  import { useChatScope } from '../../../scope.js';
5
- import { errorCode } from '../../../transport.js';
5
+ import { errorCode, errorMessage } from '../../../transport.js';
6
6
  import { useChatActions } from '../../actions.js';
7
7
  import { readStoredAttachments } from '../../attachments.js';
8
8
  import { takeBackIntoDraft } from '../../drafts.js';
@@ -35,7 +35,7 @@ export function useTakeBack({
35
35
  host.notify({
36
36
  kind: 'error',
37
37
  title: t('composer.queue.editFailed'),
38
- description: e instanceof Error ? e.message : String(e)
38
+ description: errorMessage(e)
39
39
  });
40
40
  };
41
41
  const readFiles = async () => {
@@ -1,5 +1,5 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useMemo, useState } from 'react';
2
+ import { useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { Button } from '@adecore/ui';
5
5
  import { formatNumber } from '@adecore/ui/format';
@@ -18,10 +18,4 @@ export declare function codeHighlighter(source?: () => Promise<Highlighter>): Co
18
18
  export declare function useCodeHighlighter(): CodeHighlighter;
19
19
  export declare function loadLanguage(lang: string): Promise<void>;
20
20
  export declare function loadTheme(theme: string, custom: ChatHost['code']['custom']): Promise<void>;
21
- export declare function readyHighlighter(langs: Iterable<string>, theme: string): Highlighter | null;
22
- export declare function loadedLanguage(lang: string): string;
23
- export declare function tokenizerFor(lang: string, theme: string): {
24
- tokenize: Tokenize<GrammarState>;
25
- fg: string | undefined;
26
- } | null;
27
21
  export declare function tokenStyle(token: CodeToken): CSSProperties | undefined;