@adecore/agents-react 0.31.11 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/AccountDot.js +57 -6
- package/dist/agents/AgentIcon.js +88 -12
- package/dist/agents/ModelOptionControl.js +153 -18
- package/dist/agents/ProviderLogo.js +49 -4
- package/dist/agents/account-limits.js +17 -14
- package/dist/agents/accounts.js +99 -67
- package/dist/agents/agent-marks.js +5 -3
- package/dist/agents/model-name.js +42 -31
- package/dist/agents/model-options.js +8 -8
- package/dist/agents/model-requirement.js +17 -14
- package/dist/agents/option-words.d.ts +7 -0
- package/dist/agents/option-words.js +35 -0
- package/dist/agents/provider-paths.js +6 -6
- package/dist/agents/status-look.js +32 -12
- package/dist/chat/account-choice.d.ts +13 -0
- package/dist/chat/account-choice.js +90 -20
- package/dist/chat/actions.js +126 -59
- package/dist/chat/activity.js +5 -5
- package/dist/chat/attachments.js +74 -53
- package/dist/chat/bookmarks.js +58 -48
- package/dist/chat/chat-client.js +344 -263
- package/dist/chat/chat-references.js +3 -3
- package/dist/chat/composer-effort.d.ts +5 -0
- package/dist/chat/composer-effort.js +26 -0
- package/dist/chat/composer-send.js +13 -13
- package/dist/chat/drafts.js +115 -79
- package/dist/chat/forks.js +81 -24
- package/dist/chat/guards.js +15 -43
- package/dist/chat/index.d.ts +3 -1
- package/dist/chat/index.js +3 -2
- package/dist/chat/logic/ansi.js +170 -167
- package/dist/chat/logic/answers.js +2 -2
- package/dist/chat/logic/bookmarks.js +19 -19
- package/dist/chat/logic/command-looks.js +138 -96
- package/dist/chat/logic/context-usage.js +13 -9
- package/dist/chat/logic/continue-after-stop.js +15 -19
- package/dist/chat/logic/effort.d.ts +14 -0
- package/dist/chat/logic/effort.js +34 -0
- package/dist/chat/logic/embedded-code.js +387 -326
- package/dist/chat/logic/fork.js +134 -110
- package/dist/chat/logic/generated-image.js +54 -23
- package/dist/chat/logic/goal.js +28 -20
- package/dist/chat/logic/handback.js +6 -6
- package/dist/chat/logic/json.js +2 -2
- package/dist/chat/logic/limit.js +46 -30
- package/dist/chat/logic/picker-entries.d.ts +5 -3
- package/dist/chat/logic/picker-entries.js +83 -43
- package/dist/chat/logic/resume-compaction.d.ts +14 -1
- package/dist/chat/logic/resume-compaction.js +93 -24
- package/dist/chat/logic/scrubber.js +188 -136
- package/dist/chat/logic/thought.js +13 -16
- package/dist/chat/logic/thread-cards.js +60 -48
- package/dist/chat/logic/timeline-copy.js +30 -38
- package/dist/chat/logic/timeline-target.js +92 -63
- package/dist/chat/logic/timeline.js +499 -355
- package/dist/chat/logic/tool-catalog.js +54 -34
- package/dist/chat/logic/tools.js +106 -82
- package/dist/chat/logic/visual-height.js +18 -18
- package/dist/chat/logic/visual-viewport.js +6 -3
- package/dist/chat/logic/welcome.js +9 -9
- package/dist/chat/logic/workflow.js +45 -34
- package/dist/chat/mentions.js +149 -109
- package/dist/chat/persisted-json.js +51 -54
- package/dist/chat/preferences.d.ts +4 -0
- package/dist/chat/preferences.js +162 -84
- package/dist/chat/prompt-hold.js +9 -9
- package/dist/chat/quote.js +21 -30
- package/dist/chat/reading-width.js +12 -10
- package/dist/chat/recent-messages.js +34 -21
- package/dist/chat/resume-compaction-dismissals.js +25 -5
- package/dist/chat/runtime-modes.js +3 -3
- package/dist/chat/send-key.js +11 -7
- package/dist/chat/stash.js +89 -69
- package/dist/chat/subagent-conversation.js +181 -139
- package/dist/chat/subagent-list.js +65 -67
- package/dist/chat/subagent-support.js +12 -7
- package/dist/chat/subagent-view.js +132 -44
- package/dist/chat/thumbnails.js +88 -60
- package/dist/chat/timeline-flash.js +24 -12
- package/dist/chat/timeline-scroll.js +116 -86
- package/dist/chat/ui/AccountPill.js +126 -15
- package/dist/chat/ui/AnsiOutput.js +62 -6
- package/dist/chat/ui/BookmarkMarker.js +231 -41
- package/dist/chat/ui/BookmarkSubmenu.js +165 -18
- package/dist/chat/ui/ChatActivity.js +649 -70
- package/dist/chat/ui/ChatReferenceChip.js +104 -9
- package/dist/chat/ui/CodeBlock.js +132 -58
- package/dist/chat/ui/Composer.js +866 -132
- package/dist/chat/ui/ComposerInput.js +309 -120
- package/dist/chat/ui/DiffPool.js +75 -14
- package/dist/chat/ui/EditDiff.js +160 -21
- package/dist/chat/ui/FadingWords.js +32 -3
- package/dist/chat/ui/GoalDock.js +235 -42
- package/dist/chat/ui/ImageView.js +617 -61
- package/dist/chat/ui/LimitState.js +446 -72
- package/dist/chat/ui/Markdown.js +991 -173
- package/dist/chat/ui/MermaidBlock.js +238 -68
- package/dist/chat/ui/MessageActions.js +251 -39
- package/dist/chat/ui/ModelMarks.js +55 -5
- package/dist/chat/ui/Pickers.js +664 -113
- package/dist/chat/ui/PromptComposer.js +281 -51
- package/dist/chat/ui/QuoteButton.js +151 -57
- package/dist/chat/ui/ResumeCompactionDock.d.ts +6 -2
- package/dist/chat/ui/ResumeCompactionDock.js +141 -6
- package/dist/chat/ui/RowTime.js +59 -5
- package/dist/chat/ui/RunSettings.js +1744 -154
- package/dist/chat/ui/Scrubber.js +517 -88
- package/dist/chat/ui/ShellCommand.js +183 -107
- package/dist/chat/ui/SubagentControls.js +212 -24
- package/dist/chat/ui/SubagentInfo.js +170 -13
- package/dist/chat/ui/SubagentStopButton.js +115 -24
- package/dist/chat/ui/SubagentTimeline.js +357 -91
- package/dist/chat/ui/Timeline.js +988 -476
- package/dist/chat/ui/TimelineMenu.js +552 -37
- package/dist/chat/ui/UnifiedDiff.js +234 -27
- package/dist/chat/ui/UploadThumb.js +37 -7
- package/dist/chat/ui/VisualDialogs.js +251 -20
- package/dist/chat/ui/VisualFrame.js +321 -95
- package/dist/chat/ui/Welcome.js +72 -7
- package/dist/chat/ui/chips.js +1 -1
- package/dist/chat/ui/code-lines.js +36 -36
- package/dist/chat/ui/code-streaming.js +1 -1
- package/dist/chat/ui/code-theme.js +7 -7
- package/dist/chat/ui/composer/ComposerControls.js +329 -21
- package/dist/chat/ui/composer/ComposerMenu.js +358 -30
- package/dist/chat/ui/composer/DraftParts.js +185 -11
- package/dist/chat/ui/composer/QueuedMessages.js +138 -13
- package/dist/chat/ui/composer/chips.js +29 -19
- package/dist/chat/ui/composer/editor.js +79 -63
- package/dist/chat/ui/composer/insert.js +26 -12
- package/dist/chat/ui/composer/key-handler.js +180 -127
- package/dist/chat/ui/composer/keys.js +90 -73
- package/dist/chat/ui/composer/menu-aria.js +18 -9
- package/dist/chat/ui/composer/placeholder.js +78 -31
- package/dist/chat/ui/composer/surface.js +13 -37
- package/dist/chat/ui/composer/use-chat-controls.js +230 -90
- package/dist/chat/ui/composer/use-compaction-offer.js +50 -18
- package/dist/chat/ui/composer/use-composer-draft.js +65 -34
- package/dist/chat/ui/composer/use-composer-menus.js +478 -193
- package/dist/chat/ui/composer/use-composer-submit.js +251 -109
- package/dist/chat/ui/composer/use-continuable-turn.js +33 -6
- package/dist/chat/ui/composer/use-draft-files.js +245 -93
- package/dist/chat/ui/composer/use-effort-stepper.d.ts +13 -0
- package/dist/chat/ui/composer/use-effort-stepper.js +88 -0
- package/dist/chat/ui/composer/use-notice.js +61 -16
- package/dist/chat/ui/composer/use-pending-requests.js +38 -17
- package/dist/chat/ui/composer/use-prompt-history.js +117 -45
- package/dist/chat/ui/composer/use-prompt-hold.js +119 -35
- package/dist/chat/ui/composer/use-take-back.js +94 -72
- package/dist/chat/ui/diff/ApprovalReview.js +101 -23
- package/dist/chat/ui/diff/DiffFallbackBoundary.js +21 -13
- package/dist/chat/ui/diff/DiffOmitted.js +56 -6
- package/dist/chat/ui/diff/DiffStack.js +92 -8
- package/dist/chat/ui/diff/DiffUnavailable.js +56 -6
- package/dist/chat/ui/diff/EditorEditDiff.js +263 -51
- package/dist/chat/ui/diff/EditorPatchDiff.js +39 -14
- package/dist/chat/ui/diff/LegacyDiffPool.js +27 -10
- package/dist/chat/ui/diff/LegacyEditDiff.js +97 -20
- package/dist/chat/ui/diff/LegacyUnifiedDiff.js +172 -42
- package/dist/chat/ui/diff/RawDiff.js +65 -5
- package/dist/chat/ui/diff/ReviewDiff.js +77 -5
- package/dist/chat/ui/diff/diff-props.js +1 -1
- package/dist/chat/ui/diff/diff-source-budget.js +46 -35
- package/dist/chat/ui/diff/editor-edit-model.js +18 -14
- package/dist/chat/ui/diff/review-plan.js +63 -40
- package/dist/chat/ui/diff/review-settle.js +24 -9
- package/dist/chat/ui/diff/syntax-runtime.js +236 -201
- package/dist/chat/ui/diff/use-review-stack.js +146 -25
- package/dist/chat/ui/diff-syntax.js +70 -58
- package/dist/chat/ui/diff-theme.js +31 -12
- package/dist/chat/ui/file-links.js +39 -10
- package/dist/chat/ui/find-reveal.js +29 -8
- package/dist/chat/ui/full-diff.js +17 -12
- package/dist/chat/ui/highlighter.js +143 -113
- package/dist/chat/ui/icons.js +16 -7
- package/dist/chat/ui/index.js +1 -1
- package/dist/chat/ui/intelligent-ui/UiBlockFrame.js +556 -82
- package/dist/chat/ui/intelligent-ui/UiFallbackPart.js +73 -5
- package/dist/chat/ui/intelligent-ui/UiReply.js +666 -262
- package/dist/chat/ui/intelligent-ui/block-local.js +59 -31
- package/dist/chat/ui/intelligent-ui/chart-data.js +77 -67
- package/dist/chat/ui/intelligent-ui/node-text.js +77 -91
- package/dist/chat/ui/intelligent-ui/registry.js +46 -46
- package/dist/chat/ui/intelligent-ui/render-context.js +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/base-land.js +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/binding.js +3 -3
- package/dist/chat/ui/intelligent-ui/renderers/chart.js +1223 -123
- package/dist/chat/ui/intelligent-ui/renderers/choices.js +312 -34
- package/dist/chat/ui/intelligent-ui/renderers/content.js +1241 -86
- package/dist/chat/ui/intelligent-ui/renderers/data.js +619 -54
- package/dist/chat/ui/intelligent-ui/renderers/inputs.js +868 -67
- package/dist/chat/ui/intelligent-ui/renderers/links.js +366 -62
- package/dist/chat/ui/intelligent-ui/renderers/map-slots.js +118 -60
- package/dist/chat/ui/intelligent-ui/renderers/map-style.js +85 -78
- package/dist/chat/ui/intelligent-ui/renderers/map-view.js +282 -217
- package/dist/chat/ui/intelligent-ui/renderers/map.js +621 -69
- package/dist/chat/ui/intelligent-ui/renderers/place-point.js +15 -8
- package/dist/chat/ui/intelligent-ui/renderers/structure.js +262 -20
- package/dist/chat/ui/intelligent-ui/renderers/text.js +674 -49
- package/dist/chat/ui/intelligent-ui/reply-parts.js +24 -15
- package/dist/chat/ui/intelligent-ui/table-data.js +97 -57
- package/dist/chat/ui/intelligent-ui/tones.js +31 -31
- package/dist/chat/ui/intelligent-ui/use-in-view.js +30 -12
- package/dist/chat/ui/intelligent-ui/use-later.js +28 -13
- package/dist/chat/ui/intelligent-ui/use-truncated.js +45 -21
- package/dist/chat/ui/intelligent-ui/use-ui-links.js +296 -109
- package/dist/chat/ui/intelligent-ui/use-ui-queries.js +256 -246
- package/dist/chat/ui/markdown-blocks.js +296 -262
- package/dist/chat/ui/mermaid.js +60 -72
- package/dist/chat/ui/quote-selection.js +32 -29
- package/dist/chat/ui/rehype-chips.js +35 -23
- package/dist/chat/ui/rehype-fade.js +28 -17
- package/dist/chat/ui/remark-html-as-text.js +22 -15
- package/dist/chat/ui/reply-context.js +1 -1
- package/dist/chat/ui/reveal.js +161 -72
- package/dist/chat/ui/rows/ForksRow.js +226 -24
- package/dist/chat/ui/rows/GeneratedImageRow.js +541 -87
- package/dist/chat/ui/rows/MessageRows.js +1706 -159
- package/dist/chat/ui/rows/RowContainer.js +57 -7
- package/dist/chat/ui/rows/Rows.js +463 -54
- package/dist/chat/ui/rows/SubagentRow.js +577 -60
- package/dist/chat/ui/rows/TaskRow.js +359 -40
- package/dist/chat/ui/rows/VisualRow.js +233 -11
- package/dist/chat/ui/rows/WorkRows.js +1946 -163
- package/dist/chat/ui/rows/WorkflowRow.js +293 -34
- package/dist/chat/ui/rows/row-rhythm.js +27 -17
- package/dist/chat/ui/theme-watch.js +26 -23
- package/dist/chat/ui/timestamp-format.js +4 -1
- package/dist/chat/ui/use-diff-source-tokens.js +70 -34
- package/dist/chat/ui/useToggleSet.js +51 -19
- package/dist/chat/ui/visual-theme.js +153 -128
- package/dist/chat/visual-bridge.js +123 -123
- package/dist/chat/visual-viewport.js +94 -83
- package/dist/chat/visuals.js +13 -5
- package/dist/host-hooks.d.ts +29 -0
- package/dist/host-hooks.js +78 -0
- package/dist/host.js +120 -48
- package/dist/index.js +1 -1
- package/dist/lazy.js +38 -32
- package/dist/locales/en/agent-chat.d.ts +35 -0
- package/dist/locales/en/agent-chat.js +747 -712
- package/dist/locales/en/agent-prompts.js +42 -42
- package/dist/locales/en/agent-providers.d.ts +1 -0
- package/dist/locales/en/agent-providers.js +166 -165
- package/dist/locales/en/agent-usage.d.ts +6 -0
- package/dist/locales/en/agent-usage.js +129 -123
- package/dist/locales/nl/agent-chat.d.ts +35 -0
- package/dist/locales/nl/agent-chat.js +747 -712
- package/dist/locales/nl/agent-prompts.js +42 -42
- package/dist/locales/nl/agent-providers.d.ts +1 -0
- package/dist/locales/nl/agent-providers.js +166 -165
- package/dist/locales/nl/agent-usage.d.ts +6 -0
- package/dist/locales/nl/agent-usage.js +129 -123
- package/dist/locales.js +14 -14
- package/dist/mounted-registry.js +31 -30
- package/dist/port-transport.js +122 -111
- package/dist/prompts/index.js +1 -1
- package/dist/prompts/logic/focus.js +15 -14
- package/dist/prompts/logic/keys.js +93 -59
- package/dist/prompts/logic/prompts.js +27 -14
- package/dist/prompts/logic/subjects.js +60 -46
- package/dist/prompts/logic/useFocusAfterAnswer.js +60 -20
- package/dist/prompts/logic/usePromptSession.js +88 -77
- package/dist/prompts/ui/ApprovalBody.js +246 -25
- package/dist/prompts/ui/PromptActions.js +215 -9
- package/dist/prompts/ui/PromptCard.js +215 -36
- package/dist/prompts/ui/PromptView.js +372 -34
- package/dist/prompts/ui/QuestionBody.js +269 -73
- package/dist/providers/AccountColors.js +36 -5
- package/dist/providers/AccountDetail.js +683 -50
- package/dist/providers/AccountVariables.js +139 -32
- package/dist/providers/AddAccountForm.js +125 -38
- package/dist/providers/CliDetail.js +343 -36
- package/dist/providers/InstallPage.js +644 -59
- package/dist/providers/ProviderList.d.ts +2 -1
- package/dist/providers/ProviderList.js +215 -23
- package/dist/providers/ProvidersPane.d.ts +4 -2
- package/dist/providers/ProvidersPane.js +244 -64
- package/dist/providers/account-actions.js +54 -30
- package/dist/providers/index.js +1 -1
- package/dist/providers/install-steps.js +12 -9
- package/dist/providers/pane-target.d.ts +3 -0
- package/dist/providers/pane-target.js +34 -13
- package/dist/providers/parts.js +62 -12
- package/dist/providers/provider-abilities.js +5 -5
- package/dist/providers/provider-groups.js +75 -40
- package/dist/providers/variables.js +73 -39
- package/dist/scope.js +6 -6
- package/dist/settings/sections.js +18 -18
- package/dist/state/chats.d.ts +1 -0
- package/dist/state/chats.js +408 -192
- package/dist/state/index.js +1 -1
- package/dist/state/provider-accounts.js +70 -47
- package/dist/state/providers.js +45 -16
- package/dist/state/usage.js +154 -77
- package/dist/storage.js +69 -68
- package/dist/testing/index.js +1 -1
- package/dist/testing/prompts.js +105 -67
- package/dist/transport.js +10 -10
- package/dist/ui/PlainTextarea.js +27 -3
- package/dist/usage/LimitsList.js +646 -40
- package/dist/usage/UsageBreakdown.js +879 -38
- package/dist/usage/UsageChart.js +311 -32
- package/dist/usage/UsageDialog.js +46 -4
- package/dist/usage/UsageLimits.js +467 -34
- package/dist/usage/UsageLimitsCard.js +95 -11
- package/dist/usage/UsagePage.js +817 -96
- package/dist/usage/UsagePane.js +164 -10
- package/dist/usage/UsageSummary.js +151 -6
- package/dist/usage/UsageTiles.js +164 -14
- package/dist/usage/format.js +32 -32
- package/dist/usage/index.d.ts +1 -1
- package/dist/usage/index.js +2 -1
- package/dist/usage/limit-groups.d.ts +2 -0
- package/dist/usage/limit-groups.js +77 -59
- package/dist/usage/limits.js +78 -43
- package/dist/usage/money.js +20 -4
- package/dist/usage/summary.js +85 -64
- package/package.json +8 -8
- package/src/agents/ModelOptionControl.tsx +3 -1
- package/src/agents/option-words.ts +27 -0
- package/src/chat/account-choice.ts +41 -1
- package/src/chat/composer-effort.ts +32 -0
- package/src/chat/forks.ts +4 -5
- package/src/chat/index.ts +3 -1
- package/src/chat/logic/effort.ts +32 -0
- package/src/chat/logic/picker-entries.ts +45 -10
- package/src/chat/logic/resume-compaction.ts +95 -17
- package/src/chat/logic/timeline.ts +11 -3
- package/src/chat/preferences.ts +35 -0
- package/src/chat/subagent-view.ts +2 -3
- package/src/chat/ui/AnsiOutput.tsx +1 -2
- package/src/chat/ui/BookmarkSubmenu.tsx +3 -3
- package/src/chat/ui/ChatActivity.tsx +14 -22
- package/src/chat/ui/ChatReferenceChip.tsx +2 -3
- package/src/chat/ui/Composer.tsx +15 -7
- package/src/chat/ui/EditDiff.tsx +2 -3
- package/src/chat/ui/LimitState.tsx +2 -2
- package/src/chat/ui/Markdown.tsx +10 -8
- package/src/chat/ui/MermaidBlock.tsx +2 -3
- package/src/chat/ui/Pickers.tsx +49 -29
- package/src/chat/ui/PromptComposer.tsx +7 -9
- package/src/chat/ui/ResumeCompactionDock.tsx +16 -4
- package/src/chat/ui/RunSettings.tsx +67 -28
- package/src/chat/ui/Scrubber.tsx +3 -3
- package/src/chat/ui/ShellCommand.tsx +2 -0
- package/src/chat/ui/SubagentInfo.tsx +2 -3
- package/src/chat/ui/SubagentTimeline.tsx +12 -16
- package/src/chat/ui/Timeline.tsx +6 -6
- package/src/chat/ui/UnifiedDiff.tsx +3 -4
- package/src/chat/ui/VisualFrame.tsx +5 -8
- package/src/chat/ui/code-theme.ts +4 -4
- package/src/chat/ui/composer/placeholder.ts +2 -2
- package/src/chat/ui/composer/use-compaction-offer.ts +36 -16
- package/src/chat/ui/composer/use-composer-menus.ts +4 -9
- package/src/chat/ui/composer/use-composer-submit.ts +2 -1
- package/src/chat/ui/composer/use-effort-stepper.ts +56 -0
- package/src/chat/ui/composer/use-notice.ts +2 -2
- package/src/chat/ui/diff/EditorEditDiff.tsx +9 -13
- package/src/chat/ui/diff/LegacyEditDiff.tsx +12 -17
- package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +13 -21
- package/src/chat/ui/diff/use-review-stack.ts +4 -4
- package/src/chat/ui/diff-theme.ts +3 -3
- package/src/chat/ui/file-links.ts +2 -2
- package/src/chat/ui/intelligent-ui/UiReply.tsx +2 -0
- package/src/chat/ui/intelligent-ui/renderers/chart.tsx +3 -3
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +5 -6
- package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +2 -1
- package/src/chat/ui/intelligent-ui/renderers/map.tsx +2 -1
- package/src/chat/ui/intelligent-ui/use-truncated.ts +16 -19
- package/src/chat/ui/intelligent-ui/use-ui-links.ts +3 -3
- package/src/chat/ui/rows/ForksRow.tsx +3 -5
- package/src/chat/ui/rows/GeneratedImageRow.tsx +2 -1
- package/src/chat/ui/rows/MessageRows.tsx +12 -21
- package/src/chat/ui/rows/SubagentRow.tsx +3 -3
- package/src/chat/ui/rows/TaskRow.tsx +1 -1
- package/src/chat/ui/rows/WorkRows.tsx +20 -7
- package/src/chat/ui/useToggleSet.ts +15 -18
- package/src/chat/ui/visual-theme.ts +2 -3
- package/src/host-hooks.ts +113 -0
- package/src/lazy.tsx +2 -0
- package/src/locales/en/agent-chat.ts +135 -108
- package/src/locales/en/agent-prompts.ts +7 -7
- package/src/locales/en/agent-providers.ts +35 -34
- package/src/locales/en/agent-usage.ts +26 -20
- package/src/locales/nl/agent-chat.ts +127 -100
- package/src/locales/nl/agent-prompts.ts +5 -5
- package/src/locales/nl/agent-providers.ts +33 -32
- package/src/locales/nl/agent-usage.ts +25 -20
- package/src/prompts/ui/ApprovalBody.tsx +3 -1
- package/src/providers/CliDetail.tsx +2 -1
- package/src/providers/InstallPage.tsx +2 -4
- package/src/providers/ProviderList.tsx +12 -2
- package/src/providers/ProvidersPane.tsx +45 -15
- package/src/providers/pane-target.ts +20 -4
- package/src/state/chats.ts +7 -2
- package/src/usage/LimitsList.tsx +12 -13
- package/src/usage/UsageBreakdown.tsx +17 -6
- package/src/usage/UsageLimits.tsx +2 -1
- package/src/usage/UsagePage.tsx +3 -3
- package/src/usage/index.ts +1 -1
- package/src/usage/limit-groups.ts +12 -0
- package/src/usage/limits.ts +2 -2
- package/src/usage/money.ts +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useEffect,
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { ArrowDown, Hand, MessageCircleQuestionMark } from 'lucide-react';
|
|
5
5
|
import { focusPromptHeading, focusPromptStart } from '../../prompts/logic/focus.js';
|
|
@@ -12,58 +12,288 @@ import { useChatHost } from '../../host.js';
|
|
|
12
12
|
import { useChatScope } from '../../scope.js';
|
|
13
13
|
import { useChatActions } from '../actions.js';
|
|
14
14
|
import { Button, Icon } from '@adecore/ui';
|
|
15
|
+
import { useHostExtraPrompts } from '../../host-hooks.js';
|
|
15
16
|
/* The one being read stays in front; otherwise blocking before optional, oldest first, as everywhere else. */
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
18
|
function pickSubject(waiting, activeId) {
|
|
17
|
-
|
|
19
|
+
return waiting.find(subject => promptIdOf(subject) === activeId) ?? orderPrompts(waiting, isBlockingSubject, promptCreatedAt)[0] ?? null;
|
|
18
20
|
}
|
|
19
|
-
export function PromptComposer(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
21
|
+
export function PromptComposer(t0) {
|
|
22
|
+
const $ = _c(65);
|
|
23
|
+
const {
|
|
24
|
+
chatId,
|
|
25
|
+
pending,
|
|
26
|
+
focused,
|
|
27
|
+
onShowElsewhere,
|
|
28
|
+
disabled,
|
|
29
|
+
hasDraft,
|
|
30
|
+
denyReason,
|
|
31
|
+
onAllAnswered,
|
|
32
|
+
hold,
|
|
33
|
+
children
|
|
34
|
+
} = t0;
|
|
35
|
+
const {
|
|
36
|
+
t
|
|
37
|
+
} = useTranslation("agent-chat");
|
|
38
|
+
const {
|
|
39
|
+
id
|
|
40
|
+
} = useChatScope();
|
|
41
|
+
const host = useChatHost();
|
|
42
|
+
const actions = useChatActions();
|
|
43
|
+
const elsewhere = onShowElsewhere !== undefined;
|
|
44
|
+
const extra = useHostExtraPrompts(id, chatId);
|
|
45
|
+
let t1;
|
|
46
|
+
if ($[0] !== chatId || $[1] !== extra || $[2] !== pending) {
|
|
47
|
+
let t2;
|
|
48
|
+
if ($[4] !== chatId) {
|
|
49
|
+
t2 = item => ({
|
|
50
|
+
kind: "chat",
|
|
51
|
+
nodeId: chatId,
|
|
52
|
+
item
|
|
53
|
+
});
|
|
54
|
+
$[4] = chatId;
|
|
55
|
+
$[5] = t2;
|
|
56
|
+
} else {
|
|
57
|
+
t2 = $[5];
|
|
58
|
+
}
|
|
59
|
+
let t3;
|
|
60
|
+
if ($[6] !== chatId) {
|
|
61
|
+
t3 = prompt => ({
|
|
62
|
+
kind: "host",
|
|
63
|
+
nodeId: chatId,
|
|
64
|
+
prompt
|
|
65
|
+
});
|
|
66
|
+
$[6] = chatId;
|
|
67
|
+
$[7] = t3;
|
|
68
|
+
} else {
|
|
69
|
+
t3 = $[7];
|
|
70
|
+
}
|
|
71
|
+
t1 = [...pending.map(t2), ...extra.map(t3)];
|
|
72
|
+
$[0] = chatId;
|
|
73
|
+
$[1] = extra;
|
|
74
|
+
$[2] = pending;
|
|
75
|
+
$[3] = t1;
|
|
76
|
+
} else {
|
|
77
|
+
t1 = $[3];
|
|
78
|
+
}
|
|
79
|
+
const subjects = t1;
|
|
80
|
+
let t2;
|
|
81
|
+
if ($[8] !== disabled || $[9] !== subjects) {
|
|
82
|
+
t2 = {
|
|
83
|
+
prompts: subjects,
|
|
84
|
+
idOf: promptIdOf,
|
|
85
|
+
pick: pickSubject,
|
|
86
|
+
disabled
|
|
87
|
+
};
|
|
88
|
+
$[8] = disabled;
|
|
89
|
+
$[9] = subjects;
|
|
90
|
+
$[10] = t2;
|
|
91
|
+
} else {
|
|
92
|
+
t2 = $[10];
|
|
93
|
+
}
|
|
94
|
+
const session = usePromptSession(t2);
|
|
95
|
+
const ref = useRef(null);
|
|
96
|
+
const {
|
|
97
|
+
active,
|
|
98
|
+
activeId: activeKey
|
|
99
|
+
} = session;
|
|
100
|
+
const asksApproval = active?.kind === "chat" ? active.item.kind === "approval" : active?.prompt.asks === "approval";
|
|
101
|
+
const held = !!active && (hold?.held ?? false);
|
|
102
|
+
const expanded = !!active && !held;
|
|
103
|
+
const heldKey = useRef(null);
|
|
104
|
+
let t3;
|
|
105
|
+
if ($[11] !== onAllAnswered) {
|
|
106
|
+
t3 = () => onAllAnswered?.();
|
|
107
|
+
$[11] = onAllAnswered;
|
|
108
|
+
$[12] = t3;
|
|
109
|
+
} else {
|
|
110
|
+
t3 = $[12];
|
|
111
|
+
}
|
|
112
|
+
const refocus = useFocusAfterAnswer(activeKey, ref, t3);
|
|
113
|
+
let t4;
|
|
114
|
+
let t5;
|
|
115
|
+
if ($[13] !== activeKey || $[14] !== held) {
|
|
116
|
+
t4 = () => {
|
|
117
|
+
if (held) {
|
|
118
|
+
heldKey.current = activeKey;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
t5 = [held, activeKey];
|
|
122
|
+
$[13] = activeKey;
|
|
123
|
+
$[14] = held;
|
|
124
|
+
$[15] = t4;
|
|
125
|
+
$[16] = t5;
|
|
126
|
+
} else {
|
|
127
|
+
t4 = $[15];
|
|
128
|
+
t5 = $[16];
|
|
129
|
+
}
|
|
130
|
+
useEffect(t4, t5);
|
|
131
|
+
let t6;
|
|
132
|
+
if ($[17] !== activeKey || $[18] !== elsewhere || $[19] !== expanded || $[20] !== focused || $[21] !== hasDraft || $[22] !== hold?.releasedBy) {
|
|
133
|
+
t6 = () => {
|
|
134
|
+
if (hold?.releasedBy === "blur" && heldKey.current === activeKey) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (focused && expanded && !elsewhere && !ref.current?.querySelector(".prompt-card")?.contains(document.activeElement)) {
|
|
138
|
+
if (hasDraft) {
|
|
139
|
+
focusPromptHeading(ref.current);
|
|
140
|
+
} else {
|
|
141
|
+
focusPromptStart(ref.current);
|
|
48
142
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
$[17] = activeKey;
|
|
146
|
+
$[18] = elsewhere;
|
|
147
|
+
$[19] = expanded;
|
|
148
|
+
$[20] = focused;
|
|
149
|
+
$[21] = hasDraft;
|
|
150
|
+
$[22] = hold?.releasedBy;
|
|
151
|
+
$[23] = t6;
|
|
152
|
+
} else {
|
|
153
|
+
t6 = $[23];
|
|
154
|
+
}
|
|
155
|
+
const t7 = hold?.releasedBy;
|
|
156
|
+
let t8;
|
|
157
|
+
if ($[24] !== activeKey || $[25] !== elsewhere || $[26] !== expanded || $[27] !== focused || $[28] !== hasDraft || $[29] !== t7) {
|
|
158
|
+
t8 = [activeKey, expanded, focused, elsewhere, hasDraft, t7];
|
|
159
|
+
$[24] = activeKey;
|
|
160
|
+
$[25] = elsewhere;
|
|
161
|
+
$[26] = expanded;
|
|
162
|
+
$[27] = focused;
|
|
163
|
+
$[28] = hasDraft;
|
|
164
|
+
$[29] = t7;
|
|
165
|
+
$[30] = t8;
|
|
166
|
+
} else {
|
|
167
|
+
t8 = $[30];
|
|
168
|
+
}
|
|
169
|
+
useEffect(t6, t8);
|
|
170
|
+
let t9;
|
|
171
|
+
if ($[31] !== active || $[32] !== asksApproval || $[33] !== elsewhere || $[34] !== onShowElsewhere || $[35] !== t) {
|
|
172
|
+
t9 = active && elsewhere && /*#__PURE__*/_jsxs("button", {
|
|
173
|
+
type: "button",
|
|
174
|
+
className: "flex w-full items-center gap-2 px-3.5 py-3 text-left text-sm text-text-muted hover:text-text",
|
|
175
|
+
onClick: onShowElsewhere,
|
|
176
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
177
|
+
icon: asksApproval ? Hand : MessageCircleQuestionMark,
|
|
178
|
+
size: 16,
|
|
179
|
+
className: "shrink-0 text-status-needs-you"
|
|
180
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
181
|
+
className: "grow",
|
|
182
|
+
children: t("composer.waitingBelow")
|
|
183
|
+
}), /*#__PURE__*/_jsx(Icon, {
|
|
184
|
+
icon: ArrowDown,
|
|
185
|
+
size: 16,
|
|
186
|
+
className: "shrink-0"
|
|
187
|
+
})]
|
|
188
|
+
});
|
|
189
|
+
$[31] = active;
|
|
190
|
+
$[32] = asksApproval;
|
|
191
|
+
$[33] = elsewhere;
|
|
192
|
+
$[34] = onShowElsewhere;
|
|
193
|
+
$[35] = t;
|
|
194
|
+
$[36] = t9;
|
|
195
|
+
} else {
|
|
196
|
+
t9 = $[36];
|
|
197
|
+
}
|
|
198
|
+
let t10;
|
|
199
|
+
if ($[37] !== actions || $[38] !== active || $[39] !== activeKey || $[40] !== denyReason || $[41] !== disabled || $[42] !== elsewhere || $[43] !== expanded || $[44] !== hasDraft || $[45] !== host || $[46] !== refocus || $[47] !== session) {
|
|
200
|
+
t10 = active && !elsewhere && /*#__PURE__*/_jsx("div", {
|
|
201
|
+
hidden: !expanded,
|
|
202
|
+
children: /*#__PURE__*/_jsx(PromptView, {
|
|
203
|
+
subject: active,
|
|
204
|
+
draft: session.draftOf(promptIdOf(active)),
|
|
205
|
+
onDraft: draft => session.setDraft(promptIdOf(active), draft),
|
|
206
|
+
onAction: action => {
|
|
207
|
+
refocus.hold();
|
|
208
|
+
session.act(active, () => answerPrompt(active, action, actions, host)).then(result => {
|
|
209
|
+
if (result === "failed") {
|
|
210
|
+
refocus.release();
|
|
53
211
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
212
|
+
});
|
|
213
|
+
},
|
|
214
|
+
more: session.waiting.length - 1,
|
|
215
|
+
hasDraft: hasDraft,
|
|
216
|
+
denyReason: denyReason,
|
|
217
|
+
disabled: disabled,
|
|
218
|
+
sending: session.sending,
|
|
219
|
+
error: session.errorOf(promptIdOf(active))
|
|
220
|
+
}, activeKey)
|
|
221
|
+
});
|
|
222
|
+
$[37] = actions;
|
|
223
|
+
$[38] = active;
|
|
224
|
+
$[39] = activeKey;
|
|
225
|
+
$[40] = denyReason;
|
|
226
|
+
$[41] = disabled;
|
|
227
|
+
$[42] = elsewhere;
|
|
228
|
+
$[43] = expanded;
|
|
229
|
+
$[44] = hasDraft;
|
|
230
|
+
$[45] = host;
|
|
231
|
+
$[46] = refocus;
|
|
232
|
+
$[47] = session;
|
|
233
|
+
$[48] = t10;
|
|
234
|
+
} else {
|
|
235
|
+
t10 = $[48];
|
|
236
|
+
}
|
|
237
|
+
let t11;
|
|
238
|
+
if ($[49] !== active || $[50] !== asksApproval || $[51] !== held || $[52] !== hold || $[53] !== t) {
|
|
239
|
+
t11 = held && active && /*#__PURE__*/_jsxs("div", {
|
|
240
|
+
role: "status",
|
|
241
|
+
className: "flex items-center gap-2 border-b border-border px-3.5 py-2.5",
|
|
242
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
243
|
+
icon: asksApproval ? Hand : MessageCircleQuestionMark,
|
|
244
|
+
size: 16,
|
|
245
|
+
className: "shrink-0 text-status-needs-you"
|
|
246
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
247
|
+
className: "grow text-sm text-text-muted",
|
|
248
|
+
children: t(asksApproval ? "composer.held.approval" : "composer.held.question")
|
|
249
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
250
|
+
size: "sm",
|
|
251
|
+
onMouseDown: _temp,
|
|
252
|
+
onClick: () => hold?.release("show"),
|
|
253
|
+
children: t("composer.held.show")
|
|
254
|
+
})]
|
|
255
|
+
});
|
|
256
|
+
$[49] = active;
|
|
257
|
+
$[50] = asksApproval;
|
|
258
|
+
$[51] = held;
|
|
259
|
+
$[52] = hold;
|
|
260
|
+
$[53] = t;
|
|
261
|
+
$[54] = t11;
|
|
262
|
+
} else {
|
|
263
|
+
t11 = $[54];
|
|
264
|
+
}
|
|
265
|
+
let t12;
|
|
266
|
+
if ($[55] !== children || $[56] !== expanded) {
|
|
267
|
+
t12 = /*#__PURE__*/_jsx("div", {
|
|
268
|
+
hidden: expanded,
|
|
269
|
+
children: children
|
|
270
|
+
});
|
|
271
|
+
$[55] = children;
|
|
272
|
+
$[56] = expanded;
|
|
273
|
+
$[57] = t12;
|
|
274
|
+
} else {
|
|
275
|
+
t12 = $[57];
|
|
276
|
+
}
|
|
277
|
+
let t13;
|
|
278
|
+
if ($[58] !== session.onClickCapture || $[59] !== session.onPointerDownCapture || $[60] !== t10 || $[61] !== t11 || $[62] !== t12 || $[63] !== t9) {
|
|
279
|
+
t13 = /*#__PURE__*/_jsxs("div", {
|
|
280
|
+
ref: ref,
|
|
281
|
+
onPointerDownCapture: session.onPointerDownCapture,
|
|
282
|
+
onClickCapture: session.onClickCapture,
|
|
283
|
+
children: [t9, t10, t11, t12]
|
|
284
|
+
});
|
|
285
|
+
$[58] = session.onClickCapture;
|
|
286
|
+
$[59] = session.onPointerDownCapture;
|
|
287
|
+
$[60] = t10;
|
|
288
|
+
$[61] = t11;
|
|
289
|
+
$[62] = t12;
|
|
290
|
+
$[63] = t9;
|
|
291
|
+
$[64] = t13;
|
|
292
|
+
} else {
|
|
293
|
+
t13 = $[64];
|
|
294
|
+
}
|
|
295
|
+
return t13;
|
|
69
296
|
}
|
|
297
|
+
function _temp(e) {
|
|
298
|
+
return e.preventDefault();
|
|
299
|
+
}
|
|
@@ -1,73 +1,167 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Quote } from 'lucide-react';
|
|
5
5
|
import { selectedAnswerQuote } from './quote-selection.js';
|
|
6
6
|
import { Button, Icon, Surface } from '@adecore/ui';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
const GAP_PX = 6;
|
|
8
9
|
// Keeps the button's middle far enough from the edges that it never sticks out of the thread.
|
|
9
10
|
const EDGE_PX = 40;
|
|
10
11
|
/* The last line the range covers. A triple-click ends on an empty rect at the start of the next row. */
|
|
11
12
|
function lastLineOf(range) {
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const rects = [...range.getClientRects()].filter(rect => rect.width > 0);
|
|
14
|
+
return rects.at(-1) ?? null;
|
|
14
15
|
}
|
|
15
16
|
/*
|
|
16
17
|
* A button under a selection in an answer that hands it to the composer. It shows once the pointer is
|
|
17
18
|
* up: quoting on the selection alone grew the composer mid-drag and moved the thread under the pointer.
|
|
18
19
|
*/
|
|
19
|
-
export function QuoteButton(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
20
|
+
export function QuoteButton(t0) {
|
|
21
|
+
const $ = _c(20);
|
|
22
|
+
const {
|
|
23
|
+
thread,
|
|
24
|
+
frame,
|
|
25
|
+
taker
|
|
26
|
+
} = t0;
|
|
27
|
+
const {
|
|
28
|
+
t
|
|
29
|
+
} = useTranslation("agent-chat");
|
|
30
|
+
const [offer, setOffer] = useState(null);
|
|
31
|
+
let t1;
|
|
32
|
+
let t2;
|
|
33
|
+
if ($[0] !== frame || $[1] !== taker || $[2] !== thread) {
|
|
34
|
+
t1 = () => {
|
|
35
|
+
let pressed = false;
|
|
36
|
+
const read = () => {
|
|
37
|
+
const selection = document.getSelection();
|
|
38
|
+
const quote = taker.current === null ? null : selectedAnswerQuote(selection, thread.current);
|
|
39
|
+
const box = frame.current;
|
|
40
|
+
const line = quote === null || selection === null ? null : lastLineOf(selection.getRangeAt(0));
|
|
41
|
+
if (quote === null || box === null || line === null) {
|
|
42
|
+
setOffer(null);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const bounds = box.getBoundingClientRect();
|
|
46
|
+
const zoom = box.offsetWidth > 0 ? bounds.width / box.offsetWidth : 1;
|
|
47
|
+
const x = Math.min(Math.max((line.right - bounds.left) / zoom, EDGE_PX), box.offsetWidth - EDGE_PX);
|
|
48
|
+
const y = (line.bottom - bounds.top) / zoom + GAP_PX;
|
|
49
|
+
setOffer({
|
|
50
|
+
quote: quote.text,
|
|
51
|
+
itemId: quote.itemId,
|
|
52
|
+
x: Math.round(x),
|
|
53
|
+
y: Math.round(y)
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const press = () => {
|
|
57
|
+
pressed = true;
|
|
58
|
+
};
|
|
59
|
+
const release = () => {
|
|
60
|
+
pressed = false;
|
|
61
|
+
read();
|
|
62
|
+
};
|
|
63
|
+
const change = () => {
|
|
64
|
+
if (pressed) {
|
|
65
|
+
setOffer(null);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
read();
|
|
69
|
+
};
|
|
70
|
+
document.addEventListener("pointerdown", press, true);
|
|
71
|
+
document.addEventListener("pointerup", release, true);
|
|
72
|
+
document.addEventListener("selectionchange", change);
|
|
73
|
+
return () => {
|
|
74
|
+
document.removeEventListener("pointerdown", press, true);
|
|
75
|
+
document.removeEventListener("pointerup", release, true);
|
|
76
|
+
document.removeEventListener("selectionchange", change);
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
t2 = [thread, frame, taker];
|
|
80
|
+
$[0] = frame;
|
|
81
|
+
$[1] = taker;
|
|
82
|
+
$[2] = thread;
|
|
83
|
+
$[3] = t1;
|
|
84
|
+
$[4] = t2;
|
|
85
|
+
} else {
|
|
86
|
+
t1 = $[3];
|
|
87
|
+
t2 = $[4];
|
|
88
|
+
}
|
|
89
|
+
useEffect(t1, t2);
|
|
90
|
+
if (offer === null) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
let t3;
|
|
94
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
95
|
+
t3 = /*#__PURE__*/_jsx(Button, {
|
|
96
|
+
size: "sm"
|
|
97
|
+
});
|
|
98
|
+
$[5] = t3;
|
|
99
|
+
} else {
|
|
100
|
+
t3 = $[5];
|
|
101
|
+
}
|
|
102
|
+
let t4;
|
|
103
|
+
if ($[6] !== offer.x || $[7] !== offer.y) {
|
|
104
|
+
t4 = {
|
|
105
|
+
left: offer.x,
|
|
106
|
+
top: offer.y
|
|
107
|
+
};
|
|
108
|
+
$[6] = offer.x;
|
|
109
|
+
$[7] = offer.y;
|
|
110
|
+
$[8] = t4;
|
|
111
|
+
} else {
|
|
112
|
+
t4 = $[8];
|
|
113
|
+
}
|
|
114
|
+
let t5;
|
|
115
|
+
if ($[9] !== offer.itemId || $[10] !== offer.quote || $[11] !== taker) {
|
|
116
|
+
t5 = () => {
|
|
117
|
+
document.getSelection()?.removeAllRanges();
|
|
118
|
+
taker.current?.(offer.quote, offer.itemId);
|
|
119
|
+
setOffer(null);
|
|
120
|
+
};
|
|
121
|
+
$[9] = offer.itemId;
|
|
122
|
+
$[10] = offer.quote;
|
|
123
|
+
$[11] = taker;
|
|
124
|
+
$[12] = t5;
|
|
125
|
+
} else {
|
|
126
|
+
t5 = $[12];
|
|
127
|
+
}
|
|
128
|
+
let t6;
|
|
129
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
130
|
+
t6 = /*#__PURE__*/_jsx(Icon, {
|
|
131
|
+
icon: Quote,
|
|
132
|
+
size: 12
|
|
133
|
+
});
|
|
134
|
+
$[13] = t6;
|
|
135
|
+
} else {
|
|
136
|
+
t6 = $[13];
|
|
137
|
+
}
|
|
138
|
+
let t7;
|
|
139
|
+
if ($[14] !== t) {
|
|
140
|
+
t7 = t("composer.quote.add");
|
|
141
|
+
$[14] = t;
|
|
142
|
+
$[15] = t7;
|
|
143
|
+
} else {
|
|
144
|
+
t7 = $[15];
|
|
145
|
+
}
|
|
146
|
+
let t8;
|
|
147
|
+
if ($[16] !== t4 || $[17] !== t5 || $[18] !== t7) {
|
|
148
|
+
t8 = /*#__PURE__*/_jsxs(Surface, {
|
|
149
|
+
render: t3,
|
|
150
|
+
className: "absolute z-10 -translate-x-1/2 select-none",
|
|
151
|
+
style: t4,
|
|
152
|
+
onMouseDown: _temp,
|
|
153
|
+
onClick: t5,
|
|
154
|
+
children: [t6, t7]
|
|
155
|
+
});
|
|
156
|
+
$[16] = t4;
|
|
157
|
+
$[17] = t5;
|
|
158
|
+
$[18] = t7;
|
|
159
|
+
$[19] = t8;
|
|
160
|
+
} else {
|
|
161
|
+
t8 = $[19];
|
|
162
|
+
}
|
|
163
|
+
return t8;
|
|
73
164
|
}
|
|
165
|
+
function _temp(e) {
|
|
166
|
+
return e.preventDefault();
|
|
167
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ResumeCompactionReason } from '../logic/resume-compaction.js';
|
|
2
|
+
interface ResumeCompactionDockProps {
|
|
2
3
|
tokens: number;
|
|
4
|
+
reason?: ResumeCompactionReason;
|
|
3
5
|
onCompact(): void;
|
|
4
6
|
onDismiss(): void;
|
|
5
|
-
}
|
|
7
|
+
}
|
|
8
|
+
export declare function ResumeCompactionDock({ tokens, reason, onCompact, onDismiss }: ResumeCompactionDockProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|