@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.
- package/dist/agents/AgentModelLabel.js +2 -1
- package/dist/agents/model-name.js +2 -1
- package/dist/agents/provider-paths.d.ts +2 -1
- package/dist/agents/provider-paths.js +7 -3
- package/dist/chat/account-choice.js +57 -28
- package/dist/chat/bookmarks.js +2 -1
- package/dist/chat/drafts.d.ts +0 -1
- package/dist/chat/drafts.js +9 -28
- package/dist/chat/logic/picker-entries.js +2 -8
- package/dist/chat/logic/resume-compaction.js +2 -5
- package/dist/chat/logic/timeline-copy.js +2 -8
- package/dist/chat/logic/timeline.js +9 -10
- package/dist/chat/logic/workflow.js +2 -4
- package/dist/chat/subagent-conversation.js +2 -1
- package/dist/chat/ui/GoalDock.js +2 -1
- package/dist/chat/ui/LimitState.js +4 -6
- package/dist/chat/ui/composer/use-continuable-turn.js +0 -1
- package/dist/chat/ui/composer/use-notice.js +2 -1
- package/dist/chat/ui/composer/use-prompt-history.js +1 -1
- package/dist/chat/ui/composer/use-prompt-menus.js +216 -253
- package/dist/chat/ui/composer/use-take-back.js +2 -2
- package/dist/chat/ui/diff/ApprovalReview.js +1 -1
- package/dist/chat/ui/highlighter.d.ts +0 -6
- package/dist/chat/ui/highlighter.js +0 -12
- package/dist/chat/ui/icons.d.ts +0 -1
- package/dist/chat/ui/icons.js +0 -3
- package/dist/chat/ui/rows/MessageRows.js +2 -5
- package/dist/chat/ui/rows/row-rhythm.js +2 -5
- package/dist/chat/ui/theme-watch.js +3 -7
- package/dist/prompts/logic/usePromptSession.js +2 -1
- package/dist/providers/AddAccountForm.js +2 -1
- package/dist/providers/CliDetail.js +104 -130
- package/dist/providers/account-actions.js +6 -9
- package/dist/state/chats.d.ts +1 -0
- package/dist/state/chats.js +6 -11
- package/dist/state/provider-accounts.d.ts +1 -1
- package/dist/state/provider-accounts.js +2 -8
- package/dist/transport.d.ts +2 -0
- package/dist/transport.js +14 -0
- package/dist/usage/ChartLogo.d.ts +5 -0
- package/dist/usage/ChartLogo.js +48 -0
- package/dist/usage/LimitsList.js +6 -16
- package/dist/usage/UsageBreakdown.js +17 -40
- package/dist/usage/UsageLimits.js +183 -211
- package/dist/usage/UsagePage.js +3 -17
- package/dist/usage/UsageSummary.js +4 -9
- package/dist/usage/limits.js +16 -31
- package/dist/usage/summary.d.ts +1 -1
- package/dist/usage/summary.js +3 -5
- package/package.json +27 -27
- package/src/agents/AccountDot.tsx +1 -0
- package/src/agents/AgentIcon.tsx +2 -0
- package/src/agents/AgentModelLabel.tsx +4 -6
- package/src/agents/ModelOptionControl.tsx +8 -0
- package/src/agents/account-limits.ts +3 -0
- package/src/agents/accounts.ts +12 -0
- package/src/agents/model-name.ts +13 -1
- package/src/agents/model-options.ts +2 -0
- package/src/agents/model-requirement.ts +4 -0
- package/src/agents/option-words.ts +2 -0
- package/src/agents/provider-paths.ts +8 -3
- package/src/agents/status-look.ts +1 -0
- package/src/chat/account-choice.ts +25 -19
- package/src/chat/actions.ts +5 -0
- package/src/chat/attachments.ts +8 -0
- package/src/chat/bookmarks.ts +13 -1
- package/src/chat/chat-client.ts +63 -0
- package/src/chat/chat-references.ts +3 -0
- package/src/chat/composer-effort.ts +5 -0
- package/src/chat/composer-send.ts +4 -0
- package/src/chat/drafts.ts +21 -17
- package/src/chat/forks.ts +4 -0
- package/src/chat/guards.ts +2 -0
- package/src/chat/index.ts +7 -0
- package/src/chat/logic/ansi.ts +47 -0
- package/src/chat/logic/bookmarks.ts +7 -0
- package/src/chat/logic/command-looks.ts +29 -0
- package/src/chat/logic/context-usage.ts +3 -0
- package/src/chat/logic/continue-after-stop.ts +5 -0
- package/src/chat/logic/effort.ts +4 -0
- package/src/chat/logic/embedded-code.ts +63 -0
- package/src/chat/logic/fork.ts +22 -0
- package/src/chat/logic/generated-image.ts +7 -0
- package/src/chat/logic/goal.ts +7 -0
- package/src/chat/logic/handback.ts +2 -0
- package/src/chat/logic/limit.ts +8 -0
- package/src/chat/logic/picker-entries.ts +16 -4
- package/src/chat/logic/resume-compaction.ts +22 -5
- package/src/chat/logic/scrubber.ts +38 -5
- package/src/chat/logic/thought.ts +5 -0
- package/src/chat/logic/thread-cards.ts +6 -0
- package/src/chat/logic/timeline-copy.ts +4 -9
- package/src/chat/logic/timeline-target.ts +15 -0
- package/src/chat/logic/timeline.ts +113 -10
- package/src/chat/logic/tools.ts +30 -0
- package/src/chat/logic/visual-height.ts +5 -0
- package/src/chat/logic/visual-viewport.ts +1 -0
- package/src/chat/logic/welcome.ts +3 -0
- package/src/chat/logic/workflow.ts +26 -7
- package/src/chat/mentions.ts +56 -0
- package/src/chat/pending-prompts.ts +16 -0
- package/src/chat/persisted-json.ts +15 -0
- package/src/chat/preferences.ts +16 -0
- package/src/chat/prompt-hold.ts +2 -0
- package/src/chat/quote.ts +7 -0
- package/src/chat/reading-width.ts +1 -0
- package/src/chat/recent-messages.ts +5 -0
- package/src/chat/resume-compaction-dismissals.ts +1 -0
- package/src/chat/stash.ts +12 -0
- package/src/chat/subagent-conversation.ts +24 -4
- package/src/chat/subagent-list.ts +14 -0
- package/src/chat/subagent-support.ts +1 -0
- package/src/chat/subagent-view.ts +9 -0
- package/src/chat/thumbnails.ts +14 -0
- package/src/chat/timeline-flash.ts +2 -0
- package/src/chat/timeline-scroll.ts +23 -0
- package/src/chat/ui/AccountPill.tsx +4 -0
- package/src/chat/ui/AnsiOutput.tsx +1 -0
- package/src/chat/ui/BookmarkMarker.tsx +5 -0
- package/src/chat/ui/BookmarkSubmenu.tsx +1 -0
- package/src/chat/ui/ChatActivity.tsx +13 -0
- package/src/chat/ui/CodeBlock.tsx +8 -0
- package/src/chat/ui/Composer.tsx +15 -0
- package/src/chat/ui/ComposerInput.tsx +22 -0
- package/src/chat/ui/DiffPool.tsx +3 -0
- package/src/chat/ui/EditDiff.tsx +5 -0
- package/src/chat/ui/GoalDock.tsx +13 -1
- package/src/chat/ui/ImageView.tsx +11 -0
- package/src/chat/ui/LimitState.tsx +23 -6
- package/src/chat/ui/Markdown.tsx +41 -0
- package/src/chat/ui/MermaidBlock.tsx +16 -0
- package/src/chat/ui/MessageActions.tsx +8 -0
- package/src/chat/ui/ModelMarks.tsx +1 -0
- package/src/chat/ui/Pickers.tsx +26 -0
- package/src/chat/ui/PromptComposer.tsx +2 -0
- package/src/chat/ui/PromptEditor.tsx +6 -0
- package/src/chat/ui/QuoteButton.tsx +12 -0
- package/src/chat/ui/ReferenceChip.tsx +3 -0
- package/src/chat/ui/ResumeCompactionDock.tsx +1 -0
- package/src/chat/ui/RowTime.tsx +1 -0
- package/src/chat/ui/RunSettings.tsx +38 -0
- package/src/chat/ui/Scrubber.tsx +14 -0
- package/src/chat/ui/SessionLine.tsx +1 -0
- package/src/chat/ui/ShellCommand.tsx +32 -0
- package/src/chat/ui/SubagentControls.tsx +7 -0
- package/src/chat/ui/SubagentInfo.tsx +1 -0
- package/src/chat/ui/SubagentStopButton.tsx +6 -0
- package/src/chat/ui/SubagentTimeline.tsx +10 -0
- package/src/chat/ui/Timeline.tsx +119 -0
- package/src/chat/ui/TimelineMenu.tsx +5 -0
- package/src/chat/ui/UnifiedDiff.tsx +6 -0
- package/src/chat/ui/UploadThumb.tsx +2 -0
- package/src/chat/ui/VisualDialogs.tsx +3 -0
- package/src/chat/ui/VisualFrame.tsx +15 -0
- package/src/chat/ui/Welcome.tsx +1 -0
- package/src/chat/ui/chip-clipboard.ts +20 -0
- package/src/chat/ui/code-lines.ts +14 -0
- package/src/chat/ui/code-theme.ts +1 -0
- package/src/chat/ui/composer/ComposerControls.tsx +5 -0
- package/src/chat/ui/composer/ComposerMenu.tsx +12 -0
- package/src/chat/ui/composer/DraftParts.tsx +2 -0
- package/src/chat/ui/composer/QueuedMessages.tsx +4 -0
- package/src/chat/ui/composer/chip-paste.ts +16 -0
- package/src/chat/ui/composer/chips.ts +6 -0
- package/src/chat/ui/composer/editor.ts +9 -0
- package/src/chat/ui/composer/insert.ts +2 -0
- package/src/chat/ui/composer/key-handler.ts +39 -0
- package/src/chat/ui/composer/keys.ts +23 -0
- package/src/chat/ui/composer/placeholder.ts +6 -0
- package/src/chat/ui/composer/prompt-picks.ts +1 -0
- package/src/chat/ui/composer/surface.ts +5 -0
- package/src/chat/ui/composer/use-chat-controls.ts +13 -0
- package/src/chat/ui/composer/use-compaction-offer.ts +3 -0
- package/src/chat/ui/composer/use-composer-menus.ts +2 -0
- package/src/chat/ui/composer/use-composer-submit.ts +27 -0
- package/src/chat/ui/composer/use-continuable-turn.ts +3 -5
- package/src/chat/ui/composer/use-draft-files.ts +24 -0
- package/src/chat/ui/composer/use-effort-stepper.ts +8 -0
- package/src/chat/ui/composer/use-notice.ts +4 -1
- package/src/chat/ui/composer/use-pending-requests.ts +3 -0
- package/src/chat/ui/composer/use-prompt-history.ts +20 -11
- package/src/chat/ui/composer/use-prompt-hold.ts +3 -0
- package/src/chat/ui/composer/use-prompt-menus.ts +34 -14
- package/src/chat/ui/composer/use-take-back.ts +20 -2
- package/src/chat/ui/diff/ApprovalReview.tsx +18 -15
- package/src/chat/ui/diff/DiffFallbackBoundary.tsx +1 -0
- package/src/chat/ui/diff/DiffOmitted.tsx +1 -0
- package/src/chat/ui/diff/DiffStack.tsx +2 -0
- package/src/chat/ui/diff/DiffUnavailable.tsx +1 -0
- package/src/chat/ui/diff/EditorEditDiff.tsx +13 -0
- package/src/chat/ui/diff/EditorPatchDiff.tsx +4 -0
- package/src/chat/ui/diff/LegacyDiffPool.tsx +2 -0
- package/src/chat/ui/diff/LegacyEditDiff.tsx +2 -0
- package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +8 -0
- package/src/chat/ui/diff/RawDiff.tsx +1 -0
- package/src/chat/ui/diff/ReviewDiff.tsx +1 -0
- package/src/chat/ui/diff/diff-source-budget.ts +8 -0
- package/src/chat/ui/diff/editor-edit-model.ts +4 -0
- package/src/chat/ui/diff/review-plan.ts +9 -0
- package/src/chat/ui/diff/review-settle.ts +1 -0
- package/src/chat/ui/diff/syntax-runtime.ts +52 -0
- package/src/chat/ui/diff/use-review-stack.ts +9 -0
- package/src/chat/ui/diff-syntax.ts +12 -0
- package/src/chat/ui/diff-theme.ts +2 -0
- package/src/chat/ui/file-links.ts +2 -0
- package/src/chat/ui/find-reveal.ts +1 -0
- package/src/chat/ui/full-diff.ts +1 -0
- package/src/chat/ui/highlighter.ts +29 -15
- package/src/chat/ui/icons.tsx +2 -4
- package/src/chat/ui/index.ts +4 -0
- package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +25 -0
- package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +1 -0
- package/src/chat/ui/intelligent-ui/UiReply.tsx +63 -0
- package/src/chat/ui/intelligent-ui/block-local.ts +5 -0
- package/src/chat/ui/intelligent-ui/chart-data.ts +15 -0
- package/src/chat/ui/intelligent-ui/node-text.ts +17 -0
- package/src/chat/ui/intelligent-ui/renderers/binding.ts +1 -0
- package/src/chat/ui/intelligent-ui/renderers/chart.tsx +31 -0
- package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -0
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +18 -0
- package/src/chat/ui/intelligent-ui/renderers/data.tsx +11 -0
- package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +13 -0
- package/src/chat/ui/intelligent-ui/renderers/links.tsx +9 -0
- package/src/chat/ui/intelligent-ui/renderers/map-slots.ts +15 -0
- package/src/chat/ui/intelligent-ui/renderers/map-style.ts +15 -0
- package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +48 -0
- package/src/chat/ui/intelligent-ui/renderers/map.tsx +20 -0
- package/src/chat/ui/intelligent-ui/renderers/place-point.ts +3 -0
- package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -0
- package/src/chat/ui/intelligent-ui/renderers/text.tsx +8 -0
- package/src/chat/ui/intelligent-ui/reply-parts.ts +5 -0
- package/src/chat/ui/intelligent-ui/table-data.ts +17 -0
- package/src/chat/ui/intelligent-ui/use-in-view.ts +4 -0
- package/src/chat/ui/intelligent-ui/use-later.ts +4 -0
- package/src/chat/ui/intelligent-ui/use-truncated.ts +5 -0
- package/src/chat/ui/intelligent-ui/use-ui-links.ts +29 -0
- package/src/chat/ui/intelligent-ui/use-ui-queries.ts +60 -0
- package/src/chat/ui/markdown-blocks.ts +64 -0
- package/src/chat/ui/mermaid.ts +4 -0
- package/src/chat/ui/quote-selection.ts +10 -0
- package/src/chat/ui/rehype-chips.ts +5 -0
- package/src/chat/ui/rehype-fade.ts +2 -0
- package/src/chat/ui/remark-html-as-text.ts +5 -0
- package/src/chat/ui/reveal.ts +18 -0
- package/src/chat/ui/rows/ForksRow.tsx +5 -0
- package/src/chat/ui/rows/GeneratedImageRow.tsx +10 -0
- package/src/chat/ui/rows/MessageRows.tsx +29 -5
- package/src/chat/ui/rows/RowContainer.tsx +1 -0
- package/src/chat/ui/rows/Rows.tsx +2 -0
- package/src/chat/ui/rows/SubagentRow.tsx +13 -0
- package/src/chat/ui/rows/TaskRow.tsx +7 -0
- package/src/chat/ui/rows/VisualRow.tsx +4 -0
- package/src/chat/ui/rows/WorkRows.tsx +46 -0
- package/src/chat/ui/rows/WorkflowRow.tsx +10 -0
- package/src/chat/ui/rows/row-rhythm.ts +7 -5
- package/src/chat/ui/theme-watch.ts +8 -7
- package/src/chat/ui/thread-references.ts +7 -0
- package/src/chat/ui/use-diff-source-tokens.ts +8 -0
- package/src/chat/ui/useToggleSet.ts +3 -0
- package/src/chat/ui/visual-theme.ts +30 -0
- package/src/chat/visual-bridge.ts +23 -0
- package/src/chat/visual-viewport.ts +12 -0
- package/src/host-hooks.ts +6 -4
- package/src/host.ts +2 -0
- package/src/index.ts +3 -0
- package/src/lazy.tsx +9 -0
- package/src/mounted-registry.ts +4 -0
- package/src/port-transport.ts +32 -0
- package/src/prompts/index.ts +2 -0
- package/src/prompts/logic/focus.ts +5 -0
- package/src/prompts/logic/keys.ts +12 -0
- package/src/prompts/logic/prompts.ts +8 -0
- package/src/prompts/logic/subjects.ts +8 -0
- package/src/prompts/logic/useFocusAfterAnswer.ts +2 -0
- package/src/prompts/logic/usePromptSession.ts +13 -1
- package/src/prompts/ui/ApprovalBody.tsx +2 -0
- package/src/prompts/ui/PromptActions.tsx +2 -0
- package/src/prompts/ui/PromptCard.tsx +6 -0
- package/src/prompts/ui/PromptView.tsx +6 -0
- package/src/prompts/ui/QuestionBody.tsx +11 -0
- package/src/providers/AccountColors.tsx +1 -0
- package/src/providers/AccountDetail.tsx +7 -0
- package/src/providers/AccountVariables.tsx +2 -0
- package/src/providers/AddAccountForm.tsx +5 -1
- package/src/providers/CliDetail.tsx +6 -5
- package/src/providers/InstallPage.tsx +11 -0
- package/src/providers/ProviderList.tsx +3 -0
- package/src/providers/ProvidersPane.tsx +18 -0
- package/src/providers/account-actions.ts +10 -8
- package/src/providers/install-steps.ts +3 -0
- package/src/providers/pane-target.ts +5 -0
- package/src/providers/provider-abilities.ts +1 -0
- package/src/providers/provider-groups.ts +6 -0
- package/src/providers/variables.ts +12 -0
- package/src/scope.ts +2 -0
- package/src/state/chats.ts +61 -14
- package/src/state/index.ts +2 -0
- package/src/state/provider-accounts.ts +7 -9
- package/src/state/providers.ts +1 -0
- package/src/state/usage.ts +6 -0
- package/src/storage.ts +18 -0
- package/src/testing/prompts.ts +5 -0
- package/src/transport.ts +18 -0
- package/src/usage/ChartLogo.tsx +12 -0
- package/src/usage/LimitsList.tsx +7 -8
- package/src/usage/UsageBreakdown.tsx +11 -4
- package/src/usage/UsageChart.tsx +5 -0
- package/src/usage/UsageLimits.tsx +10 -7
- package/src/usage/UsageLimitsCard.tsx +2 -0
- package/src/usage/UsagePage.tsx +16 -19
- package/src/usage/UsageSummary.tsx +4 -5
- package/src/usage/UsageTiles.tsx +2 -0
- package/src/usage/format.ts +7 -0
- package/src/usage/limit-groups.ts +14 -0
- package/src/usage/limits.ts +11 -13
- package/src/usage/money.ts +1 -0
- 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,
|
|
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(
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
$[
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
143
|
+
t6 = $[21];
|
|
195
144
|
}
|
|
196
|
-
|
|
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
|
|
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
|
|
205
|
-
if ($[
|
|
206
|
-
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
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
|
-
|
|
173
|
+
t6 = $[23];
|
|
211
174
|
}
|
|
212
|
-
const offersReferences = referables.items.some(
|
|
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
|
|
217
|
-
if ($[
|
|
218
|
-
let
|
|
219
|
-
if ($[
|
|
220
|
-
|
|
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
|
-
$[
|
|
225
|
-
$[
|
|
187
|
+
$[29] = referables.items;
|
|
188
|
+
$[30] = t8;
|
|
226
189
|
} else {
|
|
227
|
-
|
|
190
|
+
t8 = $[30];
|
|
228
191
|
}
|
|
229
|
-
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
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
|
-
|
|
199
|
+
t7 = $[28];
|
|
237
200
|
}
|
|
238
|
-
const referenceChips =
|
|
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
|
|
251
|
-
if ($[
|
|
252
|
-
|
|
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
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
227
|
+
$[31] = cwd;
|
|
228
|
+
$[32] = draft.mentions;
|
|
229
|
+
$[33] = draft.skills;
|
|
230
|
+
$[34] = referenceChips;
|
|
231
|
+
$[35] = t8;
|
|
269
232
|
} else {
|
|
270
|
-
|
|
233
|
+
t8 = $[35];
|
|
271
234
|
}
|
|
272
|
-
const trackTriggers =
|
|
273
|
-
let
|
|
274
|
-
if ($[
|
|
275
|
-
|
|
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
|
-
$[
|
|
279
|
-
$[
|
|
241
|
+
$[36] = inputRef;
|
|
242
|
+
$[37] = t9;
|
|
280
243
|
} else {
|
|
281
|
-
|
|
244
|
+
t9 = $[37];
|
|
282
245
|
}
|
|
283
|
-
const moveCaret =
|
|
284
|
-
let
|
|
285
|
-
if ($[
|
|
286
|
-
|
|
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
|
-
$[
|
|
254
|
+
$[38] = t10;
|
|
292
255
|
} else {
|
|
293
|
-
|
|
256
|
+
t10 = $[38];
|
|
294
257
|
}
|
|
295
|
-
const close =
|
|
296
|
-
let
|
|
297
|
-
if ($[
|
|
298
|
-
|
|
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
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
270
|
+
$[39] = draft.mentions;
|
|
271
|
+
$[40] = mention;
|
|
272
|
+
$[41] = moveCaret;
|
|
273
|
+
$[42] = setText;
|
|
274
|
+
$[43] = text;
|
|
275
|
+
$[44] = t11;
|
|
313
276
|
} else {
|
|
314
|
-
|
|
277
|
+
t11 = $[44];
|
|
315
278
|
}
|
|
316
|
-
const chooseMention =
|
|
317
|
-
let
|
|
318
|
-
if ($[
|
|
319
|
-
|
|
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
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
288
|
+
$[45] = chooseMention;
|
|
289
|
+
$[46] = mention;
|
|
290
|
+
$[47] = searched;
|
|
291
|
+
$[48] = t12;
|
|
329
292
|
} else {
|
|
330
|
-
|
|
293
|
+
t12 = $[48];
|
|
331
294
|
}
|
|
332
|
-
const chooseMentionAt =
|
|
333
|
-
let
|
|
334
|
-
if ($[
|
|
335
|
-
|
|
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
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
318
|
+
$[49] = moveCaret;
|
|
319
|
+
$[50] = referenceQuery;
|
|
320
|
+
$[51] = setDraft;
|
|
321
|
+
$[52] = text;
|
|
322
|
+
$[53] = t13;
|
|
360
323
|
} else {
|
|
361
|
-
|
|
324
|
+
t13 = $[53];
|
|
362
325
|
}
|
|
363
|
-
const chooseReference =
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
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
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
335
|
+
$[54] = chooseReference;
|
|
336
|
+
$[55] = referenceMatches;
|
|
337
|
+
$[56] = t14;
|
|
375
338
|
} else {
|
|
376
|
-
|
|
339
|
+
t14 = $[56];
|
|
377
340
|
}
|
|
378
|
-
const chooseReferenceAt =
|
|
379
|
-
let
|
|
380
|
-
if ($[
|
|
381
|
-
|
|
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
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
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
|
-
|
|
361
|
+
t15 = $[63];
|
|
399
362
|
}
|
|
400
|
-
const chooseSkill =
|
|
401
|
-
let
|
|
402
|
-
if ($[
|
|
403
|
-
|
|
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
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
375
|
+
$[64] = chooseSkill;
|
|
376
|
+
$[65] = inputRef;
|
|
377
|
+
$[66] = setText;
|
|
378
|
+
$[67] = t16;
|
|
416
379
|
} else {
|
|
417
|
-
|
|
380
|
+
t16 = $[67];
|
|
418
381
|
}
|
|
419
|
-
const pickCommand =
|
|
420
|
-
let
|
|
421
|
-
if ($[
|
|
422
|
-
|
|
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
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
392
|
+
$[68] = chooseSkill;
|
|
393
|
+
$[69] = setText;
|
|
394
|
+
$[70] = t17;
|
|
432
395
|
} else {
|
|
433
|
-
|
|
396
|
+
t17 = $[70];
|
|
434
397
|
}
|
|
435
|
-
const completeCommand =
|
|
436
|
-
let
|
|
437
|
-
if ($[
|
|
438
|
-
|
|
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
|
-
$[
|
|
412
|
+
$[71] = t18;
|
|
450
413
|
} else {
|
|
451
|
-
|
|
414
|
+
t18 = $[71];
|
|
452
415
|
}
|
|
453
|
-
const moveInMenu =
|
|
454
|
-
const
|
|
455
|
-
let
|
|
456
|
-
if ($[
|
|
457
|
-
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
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
|
-
|
|
424
|
+
t20 = $[73];
|
|
462
425
|
}
|
|
463
|
-
let
|
|
464
|
-
if ($[
|
|
465
|
-
|
|
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:
|
|
471
|
-
skillNames:
|
|
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
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
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
|
-
|
|
489
|
+
t21 = $[101];
|
|
527
490
|
}
|
|
528
|
-
return
|
|
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:
|
|
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 {
|
|
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;
|