@adecore/agents-react 0.62.1 → 0.63.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 +1 -1
- package/dist/agents/AgentIcon.js +43 -51
- package/dist/agents/accounts.d.ts +3 -6
- package/dist/agents/model-name.d.ts +2 -1
- package/dist/agents/model-requirement.d.ts +2 -1
- package/dist/agents/provider-paths.d.ts +1 -1
- package/dist/agents/status-look.d.ts +3 -2
- package/dist/chat/account-choice.d.ts +2 -1
- package/dist/chat/account-choice.js +2 -1
- package/dist/chat/actions.d.ts +1 -3
- package/dist/chat/actions.js +2 -2
- package/dist/chat/attachments.js +0 -2
- package/dist/chat/bookmarks.d.ts +1 -1
- package/dist/chat/chat-references.d.ts +1 -30
- package/dist/chat/chat-references.js +0 -12
- package/dist/chat/drafts.js +1 -1
- package/dist/chat/forks.js +0 -2
- package/dist/chat/guards.js +0 -1
- package/dist/chat/index.d.ts +20 -24
- package/dist/chat/index.js +6 -6
- package/dist/chat/logic/ansi.d.ts +2 -1
- package/dist/chat/logic/bookmarks.d.ts +1 -1
- package/dist/chat/logic/command-looks.d.ts +4 -3
- package/dist/chat/logic/command-looks.js +0 -2
- package/dist/chat/logic/context-usage.d.ts +2 -2
- package/dist/chat/logic/context-usage.js +1 -1
- package/dist/chat/logic/effort.d.ts +2 -1
- package/dist/chat/logic/embedded-code.d.ts +4 -3
- package/dist/chat/logic/embedded-code.js +0 -1
- package/dist/chat/logic/fork.d.ts +11 -6
- package/dist/chat/logic/fork.js +12 -9
- package/dist/chat/logic/generated-image.d.ts +2 -1
- package/dist/chat/logic/generated-image.js +0 -2
- package/dist/chat/logic/goal.d.ts +2 -1
- package/dist/chat/logic/limit.d.ts +2 -1
- package/dist/chat/logic/picker-entries.d.ts +4 -10
- package/dist/chat/logic/picker-entries.js +2 -13
- package/dist/chat/logic/resume-compaction.js +0 -1
- package/dist/chat/logic/scrubber.d.ts +5 -5
- package/dist/chat/logic/scrubber.js +1 -3
- package/dist/chat/logic/steer.d.ts +2 -0
- package/dist/chat/logic/steer.js +4 -0
- package/dist/chat/logic/thought.js +0 -1
- package/dist/chat/logic/thread-cards.d.ts +4 -4
- package/dist/chat/logic/thread-cards.js +1 -1
- package/dist/chat/logic/timeline-copy.d.ts +1 -1
- package/dist/chat/logic/timeline-copy.js +0 -2
- package/dist/chat/logic/timeline-target.d.ts +4 -3
- package/dist/chat/logic/timeline-target.js +0 -1
- package/dist/chat/logic/timeline.d.ts +3 -133
- package/dist/chat/logic/timeline.js +0 -2
- package/dist/chat/logic/tool-catalog.d.ts +2 -1
- package/dist/chat/logic/tool-looks.d.ts +4 -3
- package/dist/chat/logic/tool-looks.js +0 -1
- package/dist/chat/logic/tools.d.ts +3 -2
- package/dist/chat/logic/tools.js +11 -32
- package/dist/chat/logic/visual-height.js +0 -1
- package/dist/chat/logic/welcome.d.ts +2 -1
- package/dist/chat/logic/workflow.d.ts +3 -2
- package/dist/chat/logic/workflow.js +0 -1
- package/dist/chat/mentions.d.ts +3 -3
- package/dist/chat/mentions.js +1 -2
- package/dist/chat/pending-prompts.d.ts +1 -1
- package/dist/chat/preferences.js +1 -2
- package/dist/chat/prompt-hold.js +0 -1
- package/dist/chat/prompts/index.d.ts +11 -0
- package/dist/{prompts → chat/prompts}/index.js +2 -0
- package/dist/{prompts → chat/prompts}/logic/keys.d.ts +4 -3
- package/dist/{prompts → chat/prompts}/logic/prompts.d.ts +2 -26
- package/dist/{prompts → chat/prompts}/logic/prompts.js +1 -1
- package/dist/{prompts → chat/prompts}/logic/subjects.d.ts +2 -38
- package/dist/{prompts → chat/prompts}/logic/useFocusAfterAnswer.d.ts +2 -1
- package/dist/{prompts → chat/prompts}/logic/usePromptSession.d.ts +2 -2
- package/dist/{prompts → chat/prompts}/logic/usePromptSession.js +2 -1
- package/dist/{prompts → chat/prompts}/ui/ApprovalBody.d.ts +1 -5
- package/dist/{prompts → chat/prompts}/ui/ApprovalBody.js +5 -6
- package/dist/{prompts → chat/prompts}/ui/PromptActions.d.ts +2 -1
- package/dist/{prompts → chat/prompts}/ui/PromptActions.js +0 -1
- package/dist/{prompts → chat/prompts}/ui/PromptCard.d.ts +1 -1
- package/dist/{prompts → chat/prompts}/ui/PromptCard.js +1 -1
- package/dist/{prompts → chat/prompts}/ui/PromptView.d.ts +1 -1
- package/dist/{prompts → chat/prompts}/ui/PromptView.js +4 -2
- package/dist/{prompts → chat/prompts}/ui/QuestionBody.d.ts +1 -1
- package/dist/{prompts → chat/prompts}/ui/QuestionBody.js +2 -2
- package/dist/chat/reading-width.js +2 -1
- package/dist/chat/recent-messages.d.ts +2 -6
- package/dist/chat/recent-messages.js +1 -1
- package/dist/chat/send-key.js +0 -1
- package/dist/chat/stash.d.ts +3 -2
- package/dist/chat/stash.js +1 -1
- package/dist/chat/subagent-conversation.d.ts +0 -1
- package/dist/chat/subagent-conversation.js +1 -1
- package/dist/chat/subagent-list.d.ts +3 -3
- package/dist/chat/subagent-list.js +2 -6
- package/dist/chat/subagent-view.d.ts +1 -1
- package/dist/chat/subagent-view.js +0 -1
- package/dist/chat/tag-suggestions.d.ts +3 -4
- package/dist/chat/tag-suggestions.js +3 -3
- package/dist/chat/thumbnails.d.ts +2 -1
- package/dist/chat/thumbnails.js +0 -1
- package/dist/chat/timeline-flash.d.ts +1 -1
- package/dist/chat/ui/BookmarkMarker.js +1 -1
- package/dist/chat/ui/BookmarkSubmenu.js +2 -2
- package/dist/chat/ui/ChatActivity.js +8 -48
- package/dist/chat/ui/CodeBlock.js +1 -1
- package/dist/chat/ui/Composer.d.ts +1 -1
- package/dist/chat/ui/Composer.js +174 -209
- package/dist/chat/ui/ComposerInput.d.ts +1 -1
- package/dist/chat/ui/ComposerInput.js +1 -1
- package/dist/chat/ui/EditDiff.js +2 -3
- package/dist/chat/ui/GoalDock.js +1 -1
- package/dist/chat/ui/HostMenuItems.d.ts +1 -1
- package/dist/chat/ui/HostMenuItems.js +0 -1
- package/dist/chat/ui/ImageView.d.ts +3 -2
- package/dist/chat/ui/LimitState.js +2 -2
- package/dist/chat/ui/Markdown.d.ts +1 -1
- package/dist/chat/ui/Markdown.js +1 -2
- package/dist/chat/ui/MermaidBlock.js +1 -1
- package/dist/chat/ui/MessageActions.d.ts +1 -1
- package/dist/chat/ui/MessageActions.js +94 -88
- package/dist/chat/ui/Pickers.d.ts +1 -1
- package/dist/chat/ui/Pickers.js +4 -3
- package/dist/chat/ui/PromptComposer.d.ts +1 -1
- package/dist/chat/ui/PromptComposer.js +9 -8
- package/dist/chat/ui/PromptEditor.d.ts +1 -1
- package/dist/chat/ui/PromptEditor.js +1 -1
- package/dist/chat/ui/ReferenceChip.js +1 -1
- package/dist/chat/ui/ReferenceTrail.d.ts +2 -2
- package/dist/chat/ui/RunSettings.js +3 -3
- package/dist/chat/ui/SessionLine.d.ts +1 -1
- package/dist/chat/ui/SessionLine.js +2 -1
- package/dist/chat/ui/ShellCommand.d.ts +1 -1
- package/dist/chat/ui/ShellCommand.js +1 -3
- package/dist/chat/ui/SubagentInfo.js +4 -3
- package/dist/chat/ui/SubagentStopButton.js +1 -1
- package/dist/chat/ui/SubagentTimeline.js +2 -2
- package/dist/chat/ui/Timeline.js +6 -4
- package/dist/chat/ui/TimelineMenu.js +125 -119
- package/dist/chat/ui/UnifiedDiff.js +2 -3
- package/dist/chat/ui/VisualFrame.d.ts +3 -2
- package/dist/chat/ui/VisualFrame.js +1 -1
- package/dist/chat/ui/chip-clipboard.d.ts +1 -2
- package/dist/chat/ui/chip-clipboard.js +1 -1
- package/dist/chat/ui/code-theme.d.ts +1 -1
- package/dist/chat/ui/code-theme.js +2 -2
- package/dist/chat/ui/composer/ComposerControls.d.ts +0 -3
- package/dist/chat/ui/composer/ComposerControls.js +60 -215
- package/dist/chat/ui/composer/ComposerMenu.js +1 -1
- package/dist/chat/ui/composer/ComposerStatusLine.d.ts +1 -1
- package/dist/chat/ui/composer/DraftParts.js +0 -1
- package/dist/chat/ui/composer/chip-paste.d.ts +1 -1
- package/dist/chat/ui/composer/chip-paste.js +0 -1
- package/dist/chat/ui/composer/chips.d.ts +4 -3
- package/dist/chat/ui/composer/chips.js +0 -1
- package/dist/chat/ui/composer/editor.d.ts +2 -1
- package/dist/chat/ui/composer/key-handler.d.ts +1 -1
- package/dist/chat/ui/composer/key-handler.js +0 -1
- package/dist/chat/ui/composer/keys.d.ts +4 -3
- package/dist/chat/ui/composer/keys.js +0 -4
- package/dist/chat/ui/composer/placeholder.js +1 -1
- package/dist/chat/ui/composer/prompt-picks.d.ts +2 -2
- package/dist/chat/ui/composer/prompt-picks.js +1 -0
- package/dist/chat/ui/composer/use-chat-controls.js +2 -2
- package/dist/chat/ui/composer/use-composer-menus.d.ts +0 -1
- package/dist/chat/ui/composer/use-composer-menus.js +2 -2
- package/dist/chat/ui/composer/use-composer-submit.d.ts +1 -1
- package/dist/chat/ui/composer/use-composer-submit.js +1 -1
- package/dist/chat/ui/composer/use-continuable-turn.js +0 -1
- package/dist/chat/ui/composer/use-draft-files.d.ts +1 -1
- package/dist/chat/ui/composer/use-draft-files.js +1 -1
- package/dist/chat/ui/composer/use-pending-requests.d.ts +1 -1
- package/dist/chat/ui/composer/use-prompt-menus.d.ts +6 -5
- package/dist/chat/ui/composer/use-prompt-menus.js +3 -2
- package/dist/chat/ui/composer/use-take-back.js +1 -2
- package/dist/chat/ui/diff/EditorEditDiff.js +1 -1
- package/dist/chat/ui/diff/LegacyDiffPool.js +1 -1
- package/dist/chat/ui/diff/LegacyEditDiff.js +1 -1
- package/dist/chat/ui/diff/LegacyUnifiedDiff.js +1 -1
- package/dist/chat/ui/diff/ReviewDiff.js +1 -2
- package/dist/chat/ui/diff/diff-source-budget.d.ts +0 -7
- package/dist/chat/ui/diff/diff-source-budget.js +1 -1
- package/dist/chat/ui/diff/review-plan.d.ts +2 -2
- package/dist/chat/ui/diff/review-plan.js +1 -1
- package/dist/chat/ui/diff/syntax-runtime.d.ts +1 -1
- package/dist/chat/ui/diff-theme.js +2 -2
- package/dist/chat/ui/file-links.d.ts +1 -1
- package/dist/chat/ui/file-links.js +1 -2
- package/dist/chat/ui/highlighter.d.ts +1 -1
- package/dist/chat/ui/highlighter.js +1 -2
- package/dist/chat/ui/index.d.ts +9 -17
- package/dist/chat/ui/index.js +3 -9
- package/dist/chat/ui/intelligent-ui/UiBlockFrame.d.ts +2 -1
- package/dist/chat/ui/intelligent-ui/UiBlockFrame.js +1 -1
- package/dist/chat/ui/intelligent-ui/UiFallbackPart.d.ts +2 -1
- package/dist/chat/ui/intelligent-ui/UiReply.js +1 -1
- package/dist/chat/ui/intelligent-ui/chart-data.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/render-context.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/chart.js +0 -2
- package/dist/chat/ui/intelligent-ui/renderers/choices.js +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/content.d.ts +2 -1
- package/dist/chat/ui/intelligent-ui/renderers/content.js +2 -2
- package/dist/chat/ui/intelligent-ui/renderers/inputs.js +0 -1
- package/dist/chat/ui/intelligent-ui/renderers/links.d.ts +1 -5
- package/dist/chat/ui/intelligent-ui/renderers/links.js +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/map-slots.d.ts +2 -2
- package/dist/chat/ui/intelligent-ui/renderers/map-slots.js +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/map-style.d.ts +3 -8
- package/dist/chat/ui/intelligent-ui/renderers/map-style.js +3 -5
- package/dist/chat/ui/intelligent-ui/renderers/map-view.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/map-view.js +2 -2
- package/dist/chat/ui/intelligent-ui/renderers/map.js +3 -4
- package/dist/chat/ui/intelligent-ui/reply-parts.d.ts +2 -1
- package/dist/chat/ui/intelligent-ui/table-data.d.ts +2 -1
- package/dist/chat/ui/intelligent-ui/use-ui-links.js +1 -1
- package/dist/chat/ui/intelligent-ui/use-ui-queries.js +1 -1
- package/dist/chat/ui/markdown-blocks.js +0 -1
- package/dist/chat/ui/named-chip-look.d.ts +1 -1
- package/dist/chat/ui/named-chip-look.js +1 -1
- package/dist/chat/ui/reference-icons.d.ts +2 -2
- package/dist/chat/ui/reference-lookup.d.ts +2 -2
- package/dist/chat/ui/rehype-fade.js +0 -1
- package/dist/chat/ui/reveal.d.ts +2 -3
- package/dist/chat/ui/reveal.js +2 -2
- package/dist/chat/ui/rows/ForksRow.js +1 -1
- package/dist/chat/ui/rows/GeneratedImageRow.js +2 -2
- package/dist/chat/ui/rows/MessageRows.d.ts +1 -1
- package/dist/chat/ui/rows/MessageRows.js +2 -3
- package/dist/chat/ui/rows/RowContainer.d.ts +3 -2
- package/dist/chat/ui/rows/RowContainer.js +1 -1
- package/dist/chat/ui/rows/Rows.d.ts +1 -1
- package/dist/chat/ui/rows/SubagentRow.d.ts +2 -2
- package/dist/chat/ui/rows/SubagentRow.js +6 -6
- package/dist/chat/ui/rows/TaskRow.d.ts +1 -1
- package/dist/chat/ui/rows/VisualRow.js +1 -1
- package/dist/chat/ui/rows/WorkRows.d.ts +3 -2
- package/dist/chat/ui/rows/WorkRows.js +4 -8
- package/dist/chat/ui/rows/WorkflowRow.js +1 -1
- package/dist/chat/ui/rows/row-rhythm.d.ts +1 -1
- package/dist/chat/ui/rows/row-rhythm.js +1 -0
- package/dist/chat/ui/thread-references.d.ts +0 -2
- package/dist/chat/ui/thread-references.js +3 -3
- package/dist/chat/ui/use-diff-source-tokens.js +1 -1
- package/dist/chat/ui/useToggleSet.d.ts +2 -1
- package/dist/chat/ui/visual-theme.js +1 -1
- package/dist/chat/visual-bridge.js +0 -1
- package/dist/chat/waiting-on.js +1 -1
- package/dist/chat/workflow-list.d.ts +2 -1
- package/dist/{chat/chat-client.d.ts → chat-client.d.ts} +2 -2
- package/dist/{chat/chat-client.js → chat-client.js} +2 -2
- package/dist/chat-sink.d.ts +20 -0
- package/dist/chat-sink.js +1 -0
- package/dist/{ui → host}/PlainTextarea.d.ts +1 -1
- package/dist/{host-hooks.d.ts → host/host-hooks.d.ts} +3 -6
- package/dist/{host-hooks.js → host/host-hooks.js} +2 -13
- package/dist/{host.d.ts → host/host.d.ts} +27 -25
- package/dist/{host.js → host/host.js} +65 -32
- package/dist/host/prompts.d.ts +61 -0
- package/dist/host/prompts.js +1 -0
- package/dist/host/references.d.ts +31 -0
- package/dist/host/references.js +12 -0
- package/dist/host/timeline-row.d.ts +133 -0
- package/dist/host/timeline-row.js +1 -0
- package/dist/images.d.ts +1 -1
- package/dist/images.js +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.js +1 -3
- package/dist/locales/en/agent-chat.d.ts +1 -1
- package/dist/locales/en/agent-chat.js +1 -1
- package/dist/locales/nl/agent-chat.d.ts +1 -1
- package/dist/locales/nl/agent-chat.js +1 -1
- package/dist/locales.d.ts +1 -1
- package/dist/{chat/persisted-json.d.ts → persisted-json.d.ts} +2 -1
- package/dist/{chat/persisted-json.js → persisted-json.js} +1 -1
- package/dist/providers/AccountColors.js +1 -2
- package/dist/providers/AccountDetail.js +2 -3
- package/dist/providers/AccountVariables.js +1 -1
- package/dist/providers/AddAccountForm.js +1 -1
- package/dist/providers/CliDetail.js +2 -3
- package/dist/providers/InstallPage.js +2 -3
- package/dist/providers/ProviderList.js +0 -1
- package/dist/providers/ProvidersPane.js +2 -3
- package/dist/providers/account-actions.d.ts +2 -3
- package/dist/providers/account-actions.js +1 -1
- package/dist/providers/index.d.ts +2 -4
- package/dist/providers/index.js +1 -1
- package/dist/providers/install-steps.js +0 -1
- package/dist/providers/provider-abilities.d.ts +1 -2
- package/dist/providers/provider-abilities.js +0 -5
- package/dist/providers/variables.js +0 -1
- package/dist/scope.d.ts +1 -1
- package/dist/settings/sections.d.ts +2 -1
- package/dist/state/chats.d.ts +2 -20
- package/dist/state/chats.js +0 -2
- package/dist/state/index.d.ts +4 -3
- package/dist/state/provider-accounts.js +0 -1
- package/dist/state/usage.d.ts +2 -2
- package/dist/state/usage.js +1 -1
- package/dist/storage.d.ts +4 -3
- package/dist/testing/prompts.d.ts +1 -1
- package/dist/usage/ChartLogo.js +0 -1
- package/dist/usage/LimitsList.d.ts +1 -1
- package/dist/usage/LimitsList.js +3 -7
- package/dist/usage/UsageBreakdown.js +1 -5
- package/dist/usage/UsageLimits.js +2 -3
- package/dist/usage/UsagePage.js +3 -3
- package/dist/usage/UsageTiles.js +0 -1
- package/dist/usage/format.d.ts +1 -2
- package/dist/usage/format.js +0 -2
- package/dist/usage/index.d.ts +2 -3
- package/dist/usage/index.js +1 -2
- package/dist/usage/limit-groups.d.ts +0 -1
- package/dist/usage/limit-groups.js +0 -2
- package/dist/usage/limits.js +0 -1
- package/dist/usage/summary.d.ts +3 -2
- package/dist/usage/summary.js +0 -1
- package/package.json +19 -12
- package/src/agents/AccountDot.tsx +1 -1
- package/src/agents/AgentIcon.tsx +2 -2
- package/src/agents/accounts.ts +2 -5
- package/src/agents/model-name.ts +1 -1
- package/src/agents/model-requirement.ts +1 -1
- package/src/agents/provider-paths.ts +1 -1
- package/src/agents/status-look.ts +2 -2
- package/src/chat/account-choice.ts +3 -11
- package/src/chat/actions.ts +2 -2
- package/src/chat/attachments.ts +0 -2
- package/src/chat/bookmarks.ts +1 -1
- package/src/chat/chat-references.ts +1 -64
- package/src/chat/drafts.ts +1 -1
- package/src/chat/forks.ts +0 -2
- package/src/chat/guards.ts +0 -2
- package/src/chat/index.ts +21 -38
- package/src/chat/logic/ansi.ts +1 -1
- package/src/chat/logic/bookmarks.ts +1 -1
- package/src/chat/logic/command-looks.ts +3 -7
- package/src/chat/logic/context-usage.ts +2 -2
- package/src/chat/logic/effort.ts +1 -1
- package/src/chat/logic/embedded-code.ts +3 -7
- package/src/chat/logic/fork.ts +23 -13
- package/src/chat/logic/generated-image.ts +1 -3
- package/src/chat/logic/goal.ts +1 -1
- package/src/chat/logic/limit.ts +1 -1
- package/src/chat/logic/picker-entries.ts +5 -19
- package/src/chat/logic/resume-compaction.ts +0 -1
- package/src/chat/logic/scrubber.ts +6 -9
- package/src/chat/logic/steer.ts +6 -0
- package/src/chat/logic/thought.ts +0 -1
- package/src/chat/logic/thread-cards.ts +4 -4
- package/src/chat/logic/timeline-copy.ts +1 -3
- package/src/chat/logic/timeline-target.ts +3 -6
- package/src/chat/logic/timeline.ts +4 -85
- package/src/chat/logic/tool-catalog.ts +1 -2
- package/src/chat/logic/tool-looks.ts +3 -6
- package/src/chat/logic/tools.ts +6 -25
- package/src/chat/logic/visual-height.ts +0 -1
- package/src/chat/logic/welcome.ts +1 -1
- package/src/chat/logic/workflow.ts +2 -3
- package/src/chat/mentions.ts +3 -5
- package/src/chat/pending-prompts.ts +2 -2
- package/src/chat/preferences.ts +1 -2
- package/src/chat/prompt-hold.ts +0 -1
- package/src/chat/prompts/index.ts +14 -0
- package/src/{prompts → chat/prompts}/logic/keys.ts +3 -3
- package/src/{prompts → chat/prompts}/logic/prompts.ts +3 -24
- package/src/{prompts → chat/prompts}/logic/subjects.ts +3 -42
- package/src/{prompts → chat/prompts}/logic/useFocusAfterAnswer.ts +1 -1
- package/src/{prompts → chat/prompts}/logic/usePromptSession.ts +4 -4
- package/src/{prompts → chat/prompts}/ui/ApprovalBody.tsx +6 -7
- package/src/{prompts → chat/prompts}/ui/PromptActions.tsx +1 -2
- package/src/{prompts → chat/prompts}/ui/PromptCard.tsx +2 -2
- package/src/{prompts → chat/prompts}/ui/PromptView.tsx +6 -4
- package/src/{prompts → chat/prompts}/ui/QuestionBody.tsx +3 -3
- package/src/chat/reading-width.ts +2 -1
- package/src/chat/recent-messages.ts +3 -3
- package/src/chat/send-key.ts +0 -1
- package/src/chat/stash.ts +3 -3
- package/src/chat/subagent-conversation.ts +1 -1
- package/src/chat/subagent-list.ts +4 -9
- package/src/chat/subagent-view.ts +1 -2
- package/src/chat/tag-suggestions.ts +5 -5
- package/src/chat/thumbnails.ts +1 -3
- package/src/chat/timeline-flash.ts +1 -1
- package/src/chat/timeline-scroll.ts +0 -2
- package/src/chat/ui/BookmarkMarker.tsx +1 -1
- package/src/chat/ui/BookmarkSubmenu.tsx +2 -2
- package/src/chat/ui/ChatActivity.tsx +8 -18
- package/src/chat/ui/CodeBlock.tsx +1 -1
- package/src/chat/ui/Composer.tsx +5 -15
- package/src/chat/ui/ComposerInput.tsx +2 -2
- package/src/chat/ui/EditDiff.tsx +2 -3
- package/src/chat/ui/GoalDock.tsx +1 -1
- package/src/chat/ui/HostMenuItems.tsx +1 -2
- package/src/chat/ui/ImageView.tsx +2 -2
- package/src/chat/ui/LimitState.tsx +2 -2
- package/src/chat/ui/Markdown.tsx +1 -2
- package/src/chat/ui/MermaidBlock.tsx +1 -2
- package/src/chat/ui/MessageActions.tsx +5 -3
- package/src/chat/ui/Pickers.tsx +4 -4
- package/src/chat/ui/PromptComposer.tsx +9 -8
- package/src/chat/ui/PromptEditor.tsx +2 -2
- package/src/chat/ui/ReferenceChip.tsx +1 -1
- package/src/chat/ui/ReferenceTrail.tsx +2 -2
- package/src/chat/ui/RunSettings.tsx +4 -2
- package/src/chat/ui/SessionLine.tsx +2 -2
- package/src/chat/ui/ShellCommand.tsx +1 -4
- package/src/chat/ui/SubagentInfo.tsx +4 -3
- package/src/chat/ui/SubagentStopButton.tsx +1 -1
- package/src/chat/ui/SubagentTimeline.tsx +2 -2
- package/src/chat/ui/Timeline.tsx +7 -6
- package/src/chat/ui/TimelineMenu.tsx +4 -2
- package/src/chat/ui/UnifiedDiff.tsx +2 -3
- package/src/chat/ui/VisualFrame.tsx +3 -3
- package/src/chat/ui/chip-clipboard.ts +2 -2
- package/src/chat/ui/code-theme.ts +2 -2
- package/src/chat/ui/composer/ComposerControls.tsx +8 -59
- package/src/chat/ui/composer/ComposerMenu.tsx +2 -2
- package/src/chat/ui/composer/ComposerStatusLine.tsx +1 -1
- package/src/chat/ui/composer/DraftParts.tsx +0 -1
- package/src/chat/ui/composer/chip-paste.ts +1 -2
- package/src/chat/ui/composer/chips.ts +3 -4
- package/src/chat/ui/composer/editor.ts +1 -1
- package/src/chat/ui/composer/key-handler.ts +1 -2
- package/src/chat/ui/composer/keys.ts +3 -8
- package/src/chat/ui/composer/placeholder.ts +1 -1
- package/src/chat/ui/composer/prompt-picks.ts +3 -2
- package/src/chat/ui/composer/use-chat-controls.ts +2 -2
- package/src/chat/ui/composer/use-composer-menus.ts +2 -2
- package/src/chat/ui/composer/use-composer-submit.ts +2 -2
- package/src/chat/ui/composer/use-continuable-turn.ts +0 -1
- package/src/chat/ui/composer/use-draft-files.ts +2 -2
- package/src/chat/ui/composer/use-pending-requests.ts +1 -1
- package/src/chat/ui/composer/use-prompt-menus.ts +6 -9
- package/src/chat/ui/composer/use-take-back.ts +1 -3
- package/src/chat/ui/diff/EditorEditDiff.tsx +1 -1
- package/src/chat/ui/diff/LegacyDiffPool.tsx +1 -1
- package/src/chat/ui/diff/LegacyEditDiff.tsx +1 -1
- package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +1 -1
- package/src/chat/ui/diff/ReviewDiff.tsx +1 -2
- package/src/chat/ui/diff/diff-source-budget.ts +1 -1
- package/src/chat/ui/diff/review-plan.ts +2 -2
- package/src/chat/ui/diff/syntax-runtime.ts +1 -1
- package/src/chat/ui/diff-theme.ts +2 -2
- package/src/chat/ui/file-links.ts +1 -2
- package/src/chat/ui/highlighter.ts +1 -2
- package/src/chat/ui/index.ts +9 -39
- package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +2 -2
- package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +1 -1
- package/src/chat/ui/intelligent-ui/UiReply.tsx +1 -1
- package/src/chat/ui/intelligent-ui/chart-data.ts +1 -1
- package/src/chat/ui/intelligent-ui/render-context.ts +1 -1
- package/src/chat/ui/intelligent-ui/renderers/chart.tsx +0 -3
- package/src/chat/ui/intelligent-ui/renderers/choices.tsx +1 -1
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +3 -3
- package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +0 -1
- package/src/chat/ui/intelligent-ui/renderers/links.tsx +1 -1
- package/src/chat/ui/intelligent-ui/renderers/map-slots.ts +2 -2
- package/src/chat/ui/intelligent-ui/renderers/map-style.ts +5 -7
- package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +2 -3
- package/src/chat/ui/intelligent-ui/renderers/map.tsx +3 -4
- package/src/chat/ui/intelligent-ui/reply-parts.ts +1 -1
- package/src/chat/ui/intelligent-ui/table-data.ts +1 -1
- package/src/chat/ui/intelligent-ui/use-ui-links.ts +1 -1
- package/src/chat/ui/intelligent-ui/use-ui-queries.ts +1 -1
- package/src/chat/ui/markdown-blocks.ts +0 -2
- package/src/chat/ui/named-chip-look.ts +1 -1
- package/src/chat/ui/reference-icons.ts +2 -2
- package/src/chat/ui/reference-lookup.ts +2 -2
- package/src/chat/ui/rehype-fade.ts +0 -1
- package/src/chat/ui/reveal.ts +3 -3
- package/src/chat/ui/rows/ForksRow.tsx +1 -1
- package/src/chat/ui/rows/GeneratedImageRow.tsx +2 -2
- package/src/chat/ui/rows/MessageRows.tsx +2 -3
- package/src/chat/ui/rows/RowContainer.tsx +3 -3
- package/src/chat/ui/rows/Rows.tsx +2 -2
- package/src/chat/ui/rows/SubagentRow.tsx +7 -8
- package/src/chat/ui/rows/TaskRow.tsx +1 -1
- package/src/chat/ui/rows/VisualRow.tsx +1 -1
- package/src/chat/ui/rows/WorkRows.tsx +6 -10
- package/src/chat/ui/rows/WorkflowRow.tsx +1 -1
- package/src/chat/ui/rows/row-rhythm.ts +2 -1
- package/src/chat/ui/thread-references.ts +3 -3
- package/src/chat/ui/use-diff-source-tokens.ts +1 -1
- package/src/chat/ui/useToggleSet.ts +1 -1
- package/src/chat/ui/visual-theme.ts +1 -1
- package/src/chat/visual-bridge.ts +0 -2
- package/src/chat/waiting-on.ts +1 -1
- package/src/chat/workflow-list.ts +1 -1
- package/src/{chat/chat-client.ts → chat-client.ts} +3 -3
- package/src/chat-sink.ts +37 -0
- package/src/{ui → host}/PlainTextarea.tsx +1 -1
- package/src/{host-hooks.ts → host/host-hooks.ts} +4 -20
- package/src/{host.ts → host/host.ts} +78 -42
- package/src/host/prompts.ts +62 -0
- package/src/host/references.ts +63 -0
- package/src/host/timeline-row.ts +85 -0
- package/src/images.ts +1 -1
- package/src/index.ts +6 -12
- package/src/locales/en/agent-chat.ts +1 -1
- package/src/locales/nl/agent-chat.ts +1 -1
- package/src/locales.ts +1 -1
- package/src/{chat/persisted-json.ts → persisted-json.ts} +2 -2
- package/src/providers/AccountColors.tsx +1 -2
- package/src/providers/AccountDetail.tsx +2 -4
- package/src/providers/AccountVariables.tsx +1 -1
- package/src/providers/AddAccountForm.tsx +1 -1
- package/src/providers/CliDetail.tsx +2 -3
- package/src/providers/InstallPage.tsx +2 -3
- package/src/providers/ProviderList.tsx +0 -1
- package/src/providers/ProvidersPane.tsx +2 -3
- package/src/providers/account-actions.ts +2 -2
- package/src/providers/index.ts +2 -14
- package/src/providers/install-steps.ts +0 -1
- package/src/providers/provider-abilities.ts +1 -7
- package/src/providers/variables.ts +0 -2
- package/src/scope.ts +1 -1
- package/src/settings/sections.ts +1 -1
- package/src/state/chats.ts +1 -40
- package/src/state/index.ts +4 -22
- package/src/state/provider-accounts.ts +0 -1
- package/src/state/usage.ts +5 -5
- package/src/storage.ts +3 -3
- package/src/testing/prompts.ts +1 -1
- package/src/usage/ChartLogo.tsx +0 -1
- package/src/usage/LimitsList.tsx +3 -11
- package/src/usage/UsageBreakdown.tsx +1 -5
- package/src/usage/UsageLimits.tsx +2 -3
- package/src/usage/UsagePage.tsx +3 -3
- package/src/usage/UsagePane.tsx +2 -2
- package/src/usage/UsageTiles.tsx +0 -1
- package/src/usage/format.ts +1 -6
- package/src/usage/index.ts +2 -3
- package/src/usage/limit-groups.ts +0 -4
- package/src/usage/limits.ts +0 -1
- package/src/usage/summary.ts +2 -5
- package/dist/agents/agent-marks.d.ts +0 -9
- package/dist/agents/agent-marks.js +0 -14
- package/dist/lazy.d.ts +0 -8
- package/dist/lazy.js +0 -63
- package/dist/prompts/index.d.ts +0 -9
- package/src/agents/agent-marks.ts +0 -28
- package/src/lazy.tsx +0 -76
- package/src/prompts/index.ts +0 -22
- /package/dist/{prompts → chat/prompts}/logic/focus.d.ts +0 -0
- /package/dist/{prompts → chat/prompts}/logic/focus.js +0 -0
- /package/dist/{prompts → chat/prompts}/logic/keys.js +0 -0
- /package/dist/{prompts → chat/prompts}/logic/subjects.js +0 -0
- /package/dist/{prompts → chat/prompts}/logic/useFocusAfterAnswer.js +0 -0
- /package/dist/{ui → host}/PlainTextarea.js +0 -0
- /package/src/{prompts → chat/prompts}/logic/focus.ts +0 -0
|
@@ -1,226 +1,73 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { holdsConversation } from '@adecore/agent-contracts';
|
|
3
|
-
import { Button, ErrorBoundary, Icon,
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { useRef, useState } from 'react';
|
|
3
|
+
import { Button, ErrorBoundary, Icon, Tooltip } from '@adecore/ui';
|
|
4
|
+
import { ArrowUp, Play, Square } from 'lucide-react';
|
|
5
|
+
import { useRef } from 'react';
|
|
7
6
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { useChatHost } from '../../../host.js';
|
|
7
|
+
import { useChatHost } from '../../../host/host.js';
|
|
9
8
|
import { useChatScope } from '../../../scope.js';
|
|
10
9
|
import { useProviders } from '../../../state/providers.js';
|
|
11
10
|
import { useAccountChoice, useAccountColorId } from '../../account-choice.js';
|
|
12
11
|
import { composerStopLabel } from '../../subagent-list.js';
|
|
13
|
-
import { HostMenuItems } from '../HostMenuItems.js';
|
|
14
12
|
import { RunSettings } from '../RunSettings.js';
|
|
15
13
|
import { ComposerPlusMenu } from './ComposerPlusMenu.js';
|
|
16
|
-
/* The send button, split with a chevron that opens the host's send actions when it has any. */
|
|
17
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
15
|
function SendButton(t0) {
|
|
19
|
-
const $ = _c(
|
|
16
|
+
const $ = _c(10);
|
|
20
17
|
const {
|
|
21
|
-
send
|
|
22
|
-
writable
|
|
18
|
+
send
|
|
23
19
|
} = t0;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const t1 = send.label;
|
|
30
|
-
const t2 = send.kbd;
|
|
31
|
-
const t3 = split ? "focus-visible:-outline-offset-2" : "rounded-full";
|
|
32
|
-
let t4;
|
|
33
|
-
if ($[0] !== t3) {
|
|
34
|
-
t4 = clsx("flex h-9 w-9 shrink-0 items-center justify-center bg-accent text-accent-text hover:brightness-90 disabled:opacity-50 disabled:hover:brightness-100", t3);
|
|
35
|
-
$[0] = t3;
|
|
36
|
-
$[1] = t4;
|
|
37
|
-
} else {
|
|
38
|
-
t4 = $[1];
|
|
39
|
-
}
|
|
40
|
-
let t5;
|
|
41
|
-
if ($[2] !== send) {
|
|
42
|
-
t5 = event => send.onSend(event.altKey);
|
|
43
|
-
$[2] = send;
|
|
44
|
-
$[3] = t5;
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[0] !== send) {
|
|
22
|
+
t1 = event => send.onSend(event.altKey);
|
|
23
|
+
$[0] = send;
|
|
24
|
+
$[1] = t1;
|
|
45
25
|
} else {
|
|
46
|
-
|
|
26
|
+
t1 = $[1];
|
|
47
27
|
}
|
|
48
|
-
let
|
|
49
|
-
if ($[
|
|
50
|
-
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
|
+
t2 = /*#__PURE__*/_jsx(Icon, {
|
|
51
31
|
icon: ArrowUp,
|
|
52
32
|
size: 16
|
|
53
33
|
});
|
|
54
|
-
$[
|
|
34
|
+
$[2] = t2;
|
|
55
35
|
} else {
|
|
56
|
-
|
|
36
|
+
t2 = $[2];
|
|
57
37
|
}
|
|
58
|
-
let
|
|
59
|
-
if ($[
|
|
60
|
-
|
|
61
|
-
className:
|
|
38
|
+
let t3;
|
|
39
|
+
if ($[3] !== send.disabled || $[4] !== t1) {
|
|
40
|
+
t3 = /*#__PURE__*/_jsx("button", {
|
|
41
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent text-accent-text hover:brightness-90 disabled:opacity-50 disabled:hover:brightness-100",
|
|
62
42
|
disabled: send.disabled,
|
|
63
|
-
onClick:
|
|
64
|
-
children:
|
|
65
|
-
});
|
|
66
|
-
$[5] = send.disabled;
|
|
67
|
-
$[6] = t4;
|
|
68
|
-
$[7] = t5;
|
|
69
|
-
$[8] = t7;
|
|
70
|
-
} else {
|
|
71
|
-
t7 = $[8];
|
|
72
|
-
}
|
|
73
|
-
let t8;
|
|
74
|
-
if ($[9] !== send.kbd || $[10] !== send.label || $[11] !== t7) {
|
|
75
|
-
t8 = /*#__PURE__*/_jsx(Tooltip, {
|
|
76
|
-
label: t1,
|
|
77
|
-
kbd: t2,
|
|
78
|
-
name: true,
|
|
79
|
-
children: t7
|
|
80
|
-
});
|
|
81
|
-
$[9] = send.kbd;
|
|
82
|
-
$[10] = send.label;
|
|
83
|
-
$[11] = t7;
|
|
84
|
-
$[12] = t8;
|
|
85
|
-
} else {
|
|
86
|
-
t8 = $[12];
|
|
87
|
-
}
|
|
88
|
-
const button = t8;
|
|
89
|
-
if (!split) {
|
|
90
|
-
return button;
|
|
91
|
-
}
|
|
92
|
-
const {
|
|
93
|
-
draft
|
|
94
|
-
} = send;
|
|
95
|
-
let t9;
|
|
96
|
-
if ($[13] !== t) {
|
|
97
|
-
t9 = t("composer.sendActions");
|
|
98
|
-
$[13] = t;
|
|
99
|
-
$[14] = t9;
|
|
100
|
-
} else {
|
|
101
|
-
t9 = $[14];
|
|
102
|
-
}
|
|
103
|
-
let t10;
|
|
104
|
-
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
-
t10 = /*#__PURE__*/_jsx("button", {
|
|
106
|
-
type: "button",
|
|
107
|
-
className: "relative flex h-9 w-6 shrink-0 items-center justify-center bg-accent text-accent-text before:absolute before:inset-y-0 before:left-0 before:my-auto before:h-4 before:w-px before:bg-current/30 before:content-[\"\"] hover:brightness-90 focus-visible:-outline-offset-2 disabled:opacity-50 disabled:hover:brightness-100"
|
|
43
|
+
onClick: t1,
|
|
44
|
+
children: t2
|
|
108
45
|
});
|
|
109
|
-
$[
|
|
46
|
+
$[3] = send.disabled;
|
|
47
|
+
$[4] = t1;
|
|
48
|
+
$[5] = t3;
|
|
110
49
|
} else {
|
|
111
|
-
|
|
50
|
+
t3 = $[5];
|
|
112
51
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
size: 14
|
|
119
|
-
});
|
|
120
|
-
$[16] = t12;
|
|
121
|
-
} else {
|
|
122
|
-
t12 = $[16];
|
|
123
|
-
}
|
|
124
|
-
let t13;
|
|
125
|
-
if ($[17] !== t11) {
|
|
126
|
-
t13 = /*#__PURE__*/_jsx(Menu.Trigger, {
|
|
127
|
-
render: t10,
|
|
128
|
-
disabled: t11,
|
|
129
|
-
children: t12
|
|
130
|
-
});
|
|
131
|
-
$[17] = t11;
|
|
132
|
-
$[18] = t13;
|
|
133
|
-
} else {
|
|
134
|
-
t13 = $[18];
|
|
135
|
-
}
|
|
136
|
-
let t14;
|
|
137
|
-
if ($[19] !== t13 || $[20] !== t9) {
|
|
138
|
-
t14 = /*#__PURE__*/_jsx(Tooltip, {
|
|
139
|
-
label: t9,
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[6] !== send.kbd || $[7] !== send.label || $[8] !== t3) {
|
|
54
|
+
t4 = /*#__PURE__*/_jsx(Tooltip, {
|
|
55
|
+
label: send.label,
|
|
56
|
+
kbd: send.kbd,
|
|
140
57
|
name: true,
|
|
141
|
-
children:
|
|
142
|
-
});
|
|
143
|
-
$[19] = t13;
|
|
144
|
-
$[20] = t9;
|
|
145
|
-
$[21] = t14;
|
|
146
|
-
} else {
|
|
147
|
-
t14 = $[21];
|
|
148
|
-
}
|
|
149
|
-
let t15;
|
|
150
|
-
if ($[22] !== draft || $[23] !== send.actions) {
|
|
151
|
-
let t16;
|
|
152
|
-
if ($[25] !== draft) {
|
|
153
|
-
t16 = action => ({
|
|
154
|
-
...action,
|
|
155
|
-
run: () => action.run(draft)
|
|
156
|
-
});
|
|
157
|
-
$[25] = draft;
|
|
158
|
-
$[26] = t16;
|
|
159
|
-
} else {
|
|
160
|
-
t16 = $[26];
|
|
161
|
-
}
|
|
162
|
-
t15 = send.actions.map(t16);
|
|
163
|
-
$[22] = draft;
|
|
164
|
-
$[23] = send.actions;
|
|
165
|
-
$[24] = t15;
|
|
166
|
-
} else {
|
|
167
|
-
t15 = $[24];
|
|
168
|
-
}
|
|
169
|
-
let t16;
|
|
170
|
-
if ($[27] !== t15) {
|
|
171
|
-
t16 = /*#__PURE__*/_jsx(HostMenuItems, {
|
|
172
|
-
actions: t15
|
|
58
|
+
children: t3
|
|
173
59
|
});
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
60
|
+
$[6] = send.kbd;
|
|
61
|
+
$[7] = send.label;
|
|
62
|
+
$[8] = t3;
|
|
63
|
+
$[9] = t4;
|
|
176
64
|
} else {
|
|
177
|
-
|
|
65
|
+
t4 = $[9];
|
|
178
66
|
}
|
|
179
|
-
|
|
180
|
-
if ($[29] !== box || $[30] !== t16) {
|
|
181
|
-
t17 = /*#__PURE__*/_jsx(Menu.Popup, {
|
|
182
|
-
anchor: box,
|
|
183
|
-
side: "top",
|
|
184
|
-
sideOffset: 8,
|
|
185
|
-
align: "end",
|
|
186
|
-
className: "min-w-48",
|
|
187
|
-
children: t16
|
|
188
|
-
});
|
|
189
|
-
$[29] = box;
|
|
190
|
-
$[30] = t16;
|
|
191
|
-
$[31] = t17;
|
|
192
|
-
} else {
|
|
193
|
-
t17 = $[31];
|
|
194
|
-
}
|
|
195
|
-
let t18;
|
|
196
|
-
if ($[32] !== t14 || $[33] !== t17) {
|
|
197
|
-
t18 = /*#__PURE__*/_jsxs(Menu.Root, {
|
|
198
|
-
children: [t14, t17]
|
|
199
|
-
});
|
|
200
|
-
$[32] = t14;
|
|
201
|
-
$[33] = t17;
|
|
202
|
-
$[34] = t18;
|
|
203
|
-
} else {
|
|
204
|
-
t18 = $[34];
|
|
205
|
-
}
|
|
206
|
-
let t19;
|
|
207
|
-
if ($[35] !== button || $[36] !== t18) {
|
|
208
|
-
t19 = /*#__PURE__*/_jsxs("div", {
|
|
209
|
-
ref: setBox,
|
|
210
|
-
className: "flex h-9 shrink-0 overflow-clip rounded-full",
|
|
211
|
-
children: [button, t18]
|
|
212
|
-
});
|
|
213
|
-
$[35] = button;
|
|
214
|
-
$[36] = t18;
|
|
215
|
-
$[37] = t19;
|
|
216
|
-
} else {
|
|
217
|
-
t19 = $[37];
|
|
218
|
-
}
|
|
219
|
-
return t19;
|
|
67
|
+
return t4;
|
|
220
68
|
}
|
|
221
|
-
/* The row under the box: the + with attach, the stash and the sigils, the chat's settings, the app's own control, and stop and send. */
|
|
222
69
|
export function ComposerControls(t0) {
|
|
223
|
-
const $ = _c(
|
|
70
|
+
const $ = _c(82);
|
|
224
71
|
const {
|
|
225
72
|
chatId,
|
|
226
73
|
info,
|
|
@@ -511,45 +358,43 @@ export function ComposerControls(t0) {
|
|
|
511
358
|
t18 = $[68];
|
|
512
359
|
}
|
|
513
360
|
let t19;
|
|
514
|
-
if ($[69] !== send
|
|
361
|
+
if ($[69] !== send) {
|
|
515
362
|
t19 = send.onContinue === null && send.visible && /*#__PURE__*/_jsx(SendButton, {
|
|
516
|
-
send: send
|
|
517
|
-
writable: writable
|
|
363
|
+
send: send
|
|
518
364
|
});
|
|
519
365
|
$[69] = send;
|
|
520
|
-
$[70] =
|
|
521
|
-
$[71] = t19;
|
|
366
|
+
$[70] = t19;
|
|
522
367
|
} else {
|
|
523
|
-
t19 = $[
|
|
368
|
+
t19 = $[70];
|
|
524
369
|
}
|
|
525
370
|
let t20;
|
|
526
|
-
if ($[
|
|
371
|
+
if ($[71] !== t16 || $[72] !== t17 || $[73] !== t18 || $[74] !== t19) {
|
|
527
372
|
t20 = /*#__PURE__*/_jsxs("div", {
|
|
528
373
|
className: "flex h-9 shrink-0 items-center gap-0.5 rounded-full bg-surface-hover",
|
|
529
374
|
children: [t16, t17, t18, t19]
|
|
530
375
|
});
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
376
|
+
$[71] = t16;
|
|
377
|
+
$[72] = t17;
|
|
378
|
+
$[73] = t18;
|
|
379
|
+
$[74] = t19;
|
|
380
|
+
$[75] = t20;
|
|
536
381
|
} else {
|
|
537
|
-
t20 = $[
|
|
382
|
+
t20 = $[75];
|
|
538
383
|
}
|
|
539
384
|
let t21;
|
|
540
|
-
if ($[
|
|
385
|
+
if ($[76] !== t13 || $[77] !== t14 || $[78] !== t20 || $[79] !== t5 || $[80] !== t6) {
|
|
541
386
|
t21 = /*#__PURE__*/_jsxs("div", {
|
|
542
387
|
className: "flex items-center gap-2 pt-3 pr-3.5 pb-3.5 pl-5 @max-md/composer:gap-1.5 @max-md/composer:p-3 @max-md/composer:pt-2.5",
|
|
543
388
|
children: [t5, t6, t13, t14, t15, t20]
|
|
544
389
|
});
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
} else {
|
|
552
|
-
t21 = $[
|
|
390
|
+
$[76] = t13;
|
|
391
|
+
$[77] = t14;
|
|
392
|
+
$[78] = t20;
|
|
393
|
+
$[79] = t5;
|
|
394
|
+
$[80] = t6;
|
|
395
|
+
$[81] = t21;
|
|
396
|
+
} else {
|
|
397
|
+
t21 = $[81];
|
|
553
398
|
}
|
|
554
399
|
return t21;
|
|
555
400
|
}
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { SquareSlash, Zap } from 'lucide-react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { CliMark } from '../../../agents/AgentModelLabel.js';
|
|
7
|
-
import { useChatHost } from '../../../host.js';
|
|
7
|
+
import { useChatHost } from '../../../host/host.js';
|
|
8
8
|
import { ModelMarks } from '../ModelMarks.js';
|
|
9
9
|
import { referenceGlyph } from '../reference-icons.js';
|
|
10
10
|
import { optionIdOf } from './menu-aria.js';
|
|
@@ -8,7 +8,6 @@ import { jumpToTimelineItem } from '../../timeline-scroll.js';
|
|
|
8
8
|
import { UploadThumb } from '../UploadThumb.js';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const ROW = 'px-5 pt-4 @max-md/composer:px-3.5 @max-md/composer:pt-3';
|
|
11
|
-
/* The quote that goes above the message, as a blockquote. */
|
|
12
11
|
export function DraftQuote(t0) {
|
|
13
12
|
const $ = _c(15);
|
|
14
13
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorView } from '@codemirror/view';
|
|
2
|
-
import type { Referable } from '
|
|
2
|
+
import type { Referable } from '../../../host/references.js';
|
|
3
3
|
import type { ChatDraft } from '../../drafts.js';
|
|
4
4
|
import { type ClipboardChips, type ReferenceToken, type TextRange } from '../../mentions.js';
|
|
5
5
|
export interface PasteChoices {
|
|
@@ -23,7 +23,6 @@ export function pastedChipsIn(text, from, to, code, choices) {
|
|
|
23
23
|
name: text.slice(range.from + 1, range.to)
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
26
|
-
/* Whether a plain paste could make a chip at all, before it goes in as text. */
|
|
27
26
|
export function mayHoldChips(text) {
|
|
28
27
|
return /(^|[\s([{"'“‘])[$#]\p{L}/u.test(text);
|
|
29
28
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
2
|
import { type ComponentType } from 'react';
|
|
3
|
-
import type { ReferenceIconProps } from '../../../host.js';
|
|
4
|
-
import type { ReferableKind, ReferenceStep } from '
|
|
3
|
+
import type { ReferenceIconProps } from '../../../host/host.js';
|
|
4
|
+
import type { ReferableKind, ReferenceStep } from '../../../host/references.js';
|
|
5
5
|
import { type ReferenceToken } from '../../mentions.js';
|
|
6
6
|
import type { NamedChipLookup } from '../named-chip-look.js';
|
|
7
|
-
|
|
7
|
+
interface ChipChoices {
|
|
8
8
|
mentions: string[];
|
|
9
9
|
skills: string[];
|
|
10
10
|
references?: ReadonlyArray<ReferenceToken & {
|
|
@@ -15,3 +15,4 @@ export interface ChipChoices {
|
|
|
15
15
|
named?: NamedChipLookup | null;
|
|
16
16
|
}
|
|
17
17
|
export declare function chipDecorations(value: ChipChoices): Extension;
|
|
18
|
+
export {};
|
|
@@ -2,10 +2,11 @@ import { Language } from '@codemirror/language';
|
|
|
2
2
|
import { type EditorState, type Extension } from '@codemirror/state';
|
|
3
3
|
export declare const externalChange: import("@codemirror/state").AnnotationType<boolean>;
|
|
4
4
|
export declare const markdownLanguage: Language;
|
|
5
|
-
|
|
5
|
+
interface CodeRange {
|
|
6
6
|
from: number;
|
|
7
7
|
to: number;
|
|
8
8
|
kind: 'inline' | 'fence';
|
|
9
9
|
}
|
|
10
10
|
export declare function codeRanges(state: EditorState, from?: number, to?: number): CodeRange[];
|
|
11
11
|
export declare function composerEditorExtensions(): Extension;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorView } from '@codemirror/view';
|
|
2
|
-
import type { ChatHost } from '../../../host.js';
|
|
2
|
+
import type { ChatHost } from '../../../host/host.js';
|
|
3
3
|
import type { ComposerSend } from '../../composer-send.js';
|
|
4
4
|
import type { ChatSendKey } from '../../send-key.js';
|
|
5
5
|
import type { ComposerMenus } from './use-composer-menus.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Tree } from '@lezer/common';
|
|
2
2
|
import { type ChatSendKey } from '../../send-key.js';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type EnterAction = 'send' | 'send-alternate' | 'send-and-new' | 'newline' | 'continue-list' | 'leave-list';
|
|
4
|
+
interface EnterKeys {
|
|
5
5
|
shift: boolean;
|
|
6
6
|
mod: boolean;
|
|
7
7
|
alt?: boolean;
|
|
@@ -25,7 +25,7 @@ export declare function inOpenFence(tree: Tree, pos: number): boolean;
|
|
|
25
25
|
export declare function inFenceBody(tree: Tree, text: string, pos: number): boolean;
|
|
26
26
|
export declare function tabSpaces(column: number): string;
|
|
27
27
|
export declare function inCode(tree: Tree, text: string, pos: number): boolean;
|
|
28
|
-
|
|
28
|
+
interface RecallContext {
|
|
29
29
|
key: string;
|
|
30
30
|
text: string;
|
|
31
31
|
from: number;
|
|
@@ -33,3 +33,4 @@ export interface RecallContext {
|
|
|
33
33
|
recalled: boolean;
|
|
34
34
|
}
|
|
35
35
|
export declare function recallDirection({ key, text, from, to, recalled }: RecallContext): -1 | 1 | null;
|
|
36
|
+
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { modSends } from '../../send-key.js';
|
|
2
2
|
const LIST_ITEM = /^([ \t]*)(?:([-*+])|(\d{1,9})([.)]))([ \t]+)(\[[ xX]\](?:[ \t]+|$))?/;
|
|
3
|
-
/* The list item a line starts, if it starts one. */
|
|
4
3
|
export function listItemAt(line) {
|
|
5
4
|
const match = LIST_ITEM.exec(line);
|
|
6
5
|
if (match === null) {
|
|
@@ -51,7 +50,6 @@ export function enterAction(keys, {
|
|
|
51
50
|
}
|
|
52
51
|
return modOnly ? 'newline' : 'send';
|
|
53
52
|
}
|
|
54
|
-
/* The innermost fenced code block around `pos`, if any. */
|
|
55
53
|
function enclosingFence(tree, pos) {
|
|
56
54
|
for (let node = tree.resolveInner(pos, -1); node !== null; node = node.parent) {
|
|
57
55
|
if (node.name === 'FencedCode') {
|
|
@@ -64,7 +62,6 @@ function enclosingFence(tree, pos) {
|
|
|
64
62
|
function isOpenFence(fence) {
|
|
65
63
|
return fence.getChildren('CodeMark').length < 2;
|
|
66
64
|
}
|
|
67
|
-
/* Whether `pos` sits inside a fenced code block that has an opening fence and no closing one yet. */
|
|
68
65
|
export function inOpenFence(tree, pos) {
|
|
69
66
|
const fence = enclosingFence(tree, pos);
|
|
70
67
|
return fence !== null && pos > fence.from && isOpenFence(fence);
|
|
@@ -78,7 +75,6 @@ export function inFenceBody(tree, text, pos) {
|
|
|
78
75
|
const openingEnd = text.indexOf('\n', fence.from);
|
|
79
76
|
return openingEnd !== -1 && pos > openingEnd && (pos < fence.to || isOpenFence(fence));
|
|
80
77
|
}
|
|
81
|
-
/* The spaces Tab inserts at `column`, up to the next stop of four, the way a code editor lines up. */
|
|
82
78
|
export function tabSpaces(column) {
|
|
83
79
|
return ' '.repeat(4 - column % 4);
|
|
84
80
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useHostComposerPlaceholder } from '../../../host-hooks.js';
|
|
4
|
+
import { useHostComposerPlaceholder } from '../../../host/host-hooks.js';
|
|
5
5
|
import { useChatScope } from '../../../scope.js';
|
|
6
6
|
/* The keys that open a picker in this chat, in the order a person reads them. */
|
|
7
7
|
export function placeholderHints(t, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatSendExtras } from '
|
|
2
|
-
import { type Referables } from '
|
|
1
|
+
import type { ChatSendExtras } from '../../../chat-client.js';
|
|
2
|
+
import { type Referables } from '../../../host/references.js';
|
|
3
3
|
import type { PromptDraft } from './use-prompt-menus.js';
|
|
4
4
|
export declare function promptPicks(value: PromptDraft, referables: Referables): Pick<ChatSendExtras, 'mentions' | 'skills' | 'chats' | 'references'>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '../../../host/references.js';
|
|
1
2
|
import { referenceTokens } from '../../chat-references.js';
|
|
2
3
|
import { presentMentions, presentReferences, presentSkills } from '../../mentions.js';
|
|
3
4
|
/* What a prompt still holds of what was picked in it, as a send of the composer carries it. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useChatHost } from '../../../host.js';
|
|
5
|
-
import { useHostCanReorderAccounts } from '../../../host-hooks.js';
|
|
4
|
+
import { useChatHost } from '../../../host/host.js';
|
|
5
|
+
import { useHostCanReorderAccounts } from '../../../host/host-hooks.js';
|
|
6
6
|
import { useChatScope } from '../../../scope.js';
|
|
7
7
|
import { errorCode } from '../../../transport.js';
|
|
8
8
|
import { useChatActions } from '../../actions.js';
|
|
@@ -4,7 +4,6 @@ import type { ComposerInputHandle } from '../ComposerInput.js';
|
|
|
4
4
|
import type { ComposerDraft } from './use-composer-draft.js';
|
|
5
5
|
import { type PromptMenus } from './use-prompt-menus.js';
|
|
6
6
|
export type { ComposerCommand } from './use-prompt-menus.js';
|
|
7
|
-
export declare const LOCAL_COMMANDS: string[];
|
|
8
7
|
interface MenusInput {
|
|
9
8
|
chatId: string;
|
|
10
9
|
info: ChatInfo;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useHostAccountRule, useHostReferables } from '../../../host-hooks.js';
|
|
4
|
+
import { useHostAccountRule, useHostReferables } from '../../../host/host-hooks.js';
|
|
5
5
|
import { useChatScope } from '../../../scope.js';
|
|
6
6
|
import { usePromptMenus } from './use-prompt-menus.js';
|
|
7
7
|
// Commands the composer handles itself; the CLI's own ones are sent through as text.
|
|
8
|
-
|
|
8
|
+
const LOCAL_COMMANDS = ['model', 'compact', 'clear'];
|
|
9
9
|
/* The pickers over a chat's composer, fed by what the chat's CLI has: its skills, its commands and its folder. */
|
|
10
10
|
export function useComposerMenus(t0) {
|
|
11
11
|
const $ = _c(27);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
|
-
import type { ChatSendExtras } from '
|
|
2
|
+
import type { ChatSendExtras } from '../../../chat-client.js';
|
|
3
3
|
import { type ComposerSend } from '../../composer-send.js';
|
|
4
4
|
import type { PromptGuard } from '../../guards.js';
|
|
5
5
|
import { type StashedPrompt } from '../../stash.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useChatHost } from '../../../host.js';
|
|
4
|
+
import { useChatHost } from '../../../host/host.js';
|
|
5
5
|
import { useChatScope } from '../../../scope.js';
|
|
6
6
|
import { checkAttachmentLimits, uploadBytes } from '../../attachments.js';
|
|
7
7
|
import { registerComposerSender } from '../../composer-send.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useChatRow } from '../../../state/chats.js';
|
|
3
3
|
import { continuableTurn } from '../../logic/continue-after-stop.js';
|
|
4
|
-
/* The turn a person stopped that Continue would pick up, or null when there is none. */
|
|
5
4
|
export function useContinuableTurn(chatId, info) {
|
|
6
5
|
const $ = _c(6);
|
|
7
6
|
const order = useChatRow(chatId, _temp);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ProviderCapabilities } from '@adecore/agent-contracts';
|
|
2
2
|
import { EditorView } from '@codemirror/view';
|
|
3
3
|
import { type DragEvent, type RefObject } from 'react';
|
|
4
|
-
import type { Referable } from '
|
|
4
|
+
import type { Referable } from '../../../host/references.js';
|
|
5
5
|
import { type ReferenceToken } from '../../mentions.js';
|
|
6
6
|
import type { ComposerInputHandle } from '../ComposerInput.js';
|
|
7
7
|
import type { ComposerDraft } from './use-composer-draft.js';
|
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { EditorView } from '@codemirror/view';
|
|
3
3
|
import { useRef, useState } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { useChatHost } from '../../../host.js';
|
|
5
|
+
import { useChatHost } from '../../../host/host.js';
|
|
6
6
|
import { checkAttachmentLimits, filesOf, readAttachments, uploadBytes } from '../../attachments.js';
|
|
7
7
|
import { pasteBecomesAttachment, pastedTextName } from '../../guards.js';
|
|
8
8
|
import { carriesMentions, droppedMentions, pastedMentions, readClipboardChips } from '../../mentions.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PromptSubject } from '../../../prompts
|
|
1
|
+
import type { PromptSubject } from '../../../host/prompts.js';
|
|
2
2
|
export declare function usePendingRequests(chatId: string): PromptSubject[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ChatSkill } from '@adecore/agent-contracts';
|
|
2
2
|
import type { EditorState } from '@codemirror/state';
|
|
3
3
|
import { type Dispatch, type RefObject, type SetStateAction } from 'react';
|
|
4
|
-
import type
|
|
5
|
-
import { type Referable, type Referables } from '
|
|
4
|
+
import { type AccountRule } from '../../../host/host.js';
|
|
5
|
+
import { type Referable, type Referables } from '../../../host/references.js';
|
|
6
6
|
import type { ChatDraft } from '../../drafts.js';
|
|
7
7
|
import { type MentionQuery, type NamedPick, type TextRange } from '../../mentions.js';
|
|
8
8
|
import type { ComposerInputHandle } from '../ComposerInput.js';
|
|
9
9
|
import { type NamedChipHome } from '../named-chip-look.js';
|
|
10
10
|
export type PromptDraft = Pick<ChatDraft, 'text' | 'mentions' | 'skills' | 'chats' | 'references' | 'referenceNames'>;
|
|
11
|
-
|
|
11
|
+
interface PromptDraftBox<D extends PromptDraft> {
|
|
12
12
|
draft: D;
|
|
13
13
|
setDraft: Dispatch<SetStateAction<D>>;
|
|
14
14
|
setText(next: string, mentions?: string[], skills?: string[]): void;
|
|
@@ -20,7 +20,7 @@ export interface ComposerCommand {
|
|
|
20
20
|
expand?(args: string): Promise<string>;
|
|
21
21
|
skill: boolean;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
interface PromptMenusInput<D extends PromptDraft> {
|
|
24
24
|
draft: PromptDraftBox<D>;
|
|
25
25
|
inputRef: RefObject<ComposerInputHandle | null>;
|
|
26
26
|
cwd: string | null;
|
|
@@ -66,7 +66,7 @@ export declare function usePromptMenus<D extends PromptDraft>({ draft: { draft,
|
|
|
66
66
|
id: string;
|
|
67
67
|
name: string;
|
|
68
68
|
kind: import("../../index.js").ReferableKind | null;
|
|
69
|
-
trail: readonly import("
|
|
69
|
+
trail: readonly import("../../../host/references.js").ReferenceStep[] | undefined;
|
|
70
70
|
}[];
|
|
71
71
|
setMenuIndex: Dispatch<SetStateAction<number>>;
|
|
72
72
|
trackTriggers: (value: string, selection: TextRange, state: EditorState) => void;
|
|
@@ -82,3 +82,4 @@ export declare function usePromptMenus<D extends PromptDraft>({ draft: { draft,
|
|
|
82
82
|
moveInMenu: (key: string, count: number) => boolean;
|
|
83
83
|
};
|
|
84
84
|
export type PromptMenus = ReturnType<typeof usePromptMenus>;
|
|
85
|
+
export {};
|