@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,20 +1,26 @@
|
|
|
1
|
-
import type { AgentKind, ChatAttachment, ChatCheckpointDiff, ChatConfigurePayload, ChatGoalAction, ChatItem, ChatSubagentItem, ChatUiChoicePayload, ChatUiQueryPayload, ChatUiQueryReading, ChatUiLinkPayload, ChatUiLinkReading, ChatVisual,
|
|
1
|
+
import type { AgentKind, ChatAttachment, ChatCheckpointDiff, ChatConfigurePayload, ChatGoalAction, ChatItem, ChatSubagentItem, ChatUiChoicePayload, ChatUiQueryPayload, ChatUiQueryReading, ChatUiLinkPayload, ChatUiLinkReading, ChatVisual, ProviderPlatform } from '@adecore/agent-contracts';
|
|
2
2
|
import type { EditorEngine } from '@adecore/editor';
|
|
3
3
|
import type { Extension } from '@codemirror/state';
|
|
4
4
|
import type { EditorView } from '@codemirror/view';
|
|
5
5
|
import type { LucideIcon } from 'lucide-react';
|
|
6
6
|
import { type ComponentProps, type ComponentType, type ReactNode, type RefObject } from 'react';
|
|
7
7
|
import type { Highlighter, ThemeRegistration } from 'shiki';
|
|
8
|
-
import type {
|
|
9
|
-
import type { ReferableKind, Referables } from './
|
|
10
|
-
import type { TimelineRow } from './
|
|
11
|
-
import type { FindReveal } from './chat/ui/find-reveal.js';
|
|
12
|
-
import type { PromptAction } from './prompts/logic/prompts.js';
|
|
13
|
-
import type { HostPrompt, PromptViewProps } from './prompts/logic/subjects.js';
|
|
8
|
+
import type { HostPrompt, PromptAction, PromptViewProps } from './prompts.js';
|
|
9
|
+
import type { ReferableKind, Referables } from './references.js';
|
|
10
|
+
import type { TimelineRow } from './timeline-row.js';
|
|
14
11
|
export interface AccentChoice {
|
|
15
12
|
id: string;
|
|
16
13
|
color: string;
|
|
17
14
|
}
|
|
15
|
+
export type AccountRule = Partial<Record<string, {
|
|
16
|
+
default?: string;
|
|
17
|
+
off?: readonly string[];
|
|
18
|
+
}>>;
|
|
19
|
+
export type ChatFindField = 'summary' | 'text' | 'output';
|
|
20
|
+
export interface FindReveal {
|
|
21
|
+
itemId: string;
|
|
22
|
+
field: ChatFindField;
|
|
23
|
+
}
|
|
18
24
|
export interface ChatToast {
|
|
19
25
|
id?: string;
|
|
20
26
|
title: string;
|
|
@@ -128,21 +134,6 @@ export interface ComposerHeaderSlotProps {
|
|
|
128
134
|
disabled: boolean;
|
|
129
135
|
focused: boolean;
|
|
130
136
|
}
|
|
131
|
-
export interface ComposerSendDraft {
|
|
132
|
-
scopeId: string;
|
|
133
|
-
chatId: string;
|
|
134
|
-
text: string;
|
|
135
|
-
provider: AgentKind;
|
|
136
|
-
selection: ModelSelection;
|
|
137
|
-
runtimeMode: RuntimeMode;
|
|
138
|
-
}
|
|
139
|
-
export interface ComposerSendAction {
|
|
140
|
-
id: string;
|
|
141
|
-
label: string;
|
|
142
|
-
icon?: LucideIcon;
|
|
143
|
-
disabled?: boolean;
|
|
144
|
-
run(draft: ComposerSendDraft): void;
|
|
145
|
-
}
|
|
146
137
|
export interface ComposerStatusDetail {
|
|
147
138
|
icon: LucideIcon;
|
|
148
139
|
label: string;
|
|
@@ -272,7 +263,14 @@ export interface UiModelViewProps {
|
|
|
272
263
|
alt?: string;
|
|
273
264
|
caption: string;
|
|
274
265
|
}
|
|
266
|
+
export interface AgentMark {
|
|
267
|
+
title: string;
|
|
268
|
+
path: string;
|
|
269
|
+
viewBox?: string;
|
|
270
|
+
fillRule?: 'nonzero' | 'evenodd';
|
|
271
|
+
}
|
|
275
272
|
export interface ChatHost {
|
|
273
|
+
agentMarks?: Readonly<Partial<Record<AgentKind, AgentMark>>>;
|
|
276
274
|
useExpandingCommands?(): readonly {
|
|
277
275
|
name: string;
|
|
278
276
|
hint: string;
|
|
@@ -396,7 +394,6 @@ export interface ChatHost {
|
|
|
396
394
|
useContextSources(chatId: string): ReadonlyArray<{
|
|
397
395
|
title: string;
|
|
398
396
|
}>;
|
|
399
|
-
useHidesFolder(chatId: string): boolean;
|
|
400
397
|
useWelcome(chatId: string): boolean;
|
|
401
398
|
tasks: {
|
|
402
399
|
useTasks(scopeId: string): Readonly<Record<string, SubagentTask>> | undefined;
|
|
@@ -413,7 +410,6 @@ export interface ChatHost {
|
|
|
413
410
|
useComposerPlaceholder(scopeId: string, chatId: string): string | null;
|
|
414
411
|
ComposerSlot: ComponentType<ComposerSlotProps> | null;
|
|
415
412
|
ComposerHeaderSlot?: ComponentType<ComposerHeaderSlotProps> | null;
|
|
416
|
-
useComposerSendActions?(scopeId: string, chatId: string): readonly ComposerSendAction[];
|
|
417
413
|
useComposerStatus?(scopeId: string, chatId: string): readonly ComposerStatusItem[];
|
|
418
414
|
SubagentSlot: ComponentType<SubagentSlotProps> | null;
|
|
419
415
|
useThreadCards(scopeId: string, chatId: string): readonly ThreadCard[];
|
|
@@ -423,8 +419,14 @@ export interface ChatHost {
|
|
|
423
419
|
commandLooks?: readonly CommandLook[];
|
|
424
420
|
toolLooks?: readonly ToolLook[];
|
|
425
421
|
}
|
|
422
|
+
type PartOf<Member> = Member extends (...args: never[]) => unknown ? never : Member extends object ? Partial<Member> : never;
|
|
423
|
+
export type ChatHostLayer = {
|
|
424
|
+
[Member in keyof ChatHost]?: ChatHost[Member] | PartOf<ChatHost[Member]>;
|
|
425
|
+
};
|
|
426
426
|
export declare function ChatHostProvider({ host, children }: {
|
|
427
|
-
host:
|
|
427
|
+
host: ChatHostLayer;
|
|
428
428
|
children?: ReactNode;
|
|
429
429
|
}): import("react").FunctionComponentElement<import("react").ProviderProps<ChatHost>>;
|
|
430
|
+
export declare function takeHostReplacement(on: boolean): void;
|
|
430
431
|
export declare function useChatHost(): ChatHost;
|
|
432
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { isApplePlatform, syncAnimations } from '@adecore/ui';
|
|
3
|
-
import { createContext, createElement, useContext, useLayoutEffect, useState } from 'react';
|
|
4
|
-
import { PlainTextarea } from './
|
|
3
|
+
import { createContext, createElement, useContext, useLayoutEffect, useMemo, useState } from 'react';
|
|
4
|
+
import { PlainTextarea } from './PlainTextarea.js';
|
|
5
5
|
const NO_PROMPTS = [];
|
|
6
6
|
const NO_CHATS = [];
|
|
7
7
|
const NO_ROWS = [];
|
|
@@ -30,6 +30,7 @@ const DEFAULT_HOST = {
|
|
|
30
30
|
current: () => ''
|
|
31
31
|
},
|
|
32
32
|
isApplePlatform,
|
|
33
|
+
agentMarks: {},
|
|
33
34
|
isAppShortcut: () => false,
|
|
34
35
|
notify: () => undefined,
|
|
35
36
|
actions: null,
|
|
@@ -68,7 +69,6 @@ const DEFAULT_HOST = {
|
|
|
68
69
|
useMachineLabel: () => null,
|
|
69
70
|
useChatPlace: () => NOWHERE,
|
|
70
71
|
useContextSources: () => NO_SOURCES,
|
|
71
|
-
useHidesFolder: () => false,
|
|
72
72
|
useWelcome: () => false,
|
|
73
73
|
tasks: {
|
|
74
74
|
useTasks: () => undefined,
|
|
@@ -90,64 +90,97 @@ const DEFAULT_HOST = {
|
|
|
90
90
|
visuals: null
|
|
91
91
|
};
|
|
92
92
|
const ChatHostContext = createContext(DEFAULT_HOST);
|
|
93
|
+
function isBundle(value) {
|
|
94
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
95
|
+
}
|
|
96
|
+
function layered(parent, layer) {
|
|
97
|
+
const merged = {
|
|
98
|
+
...parent
|
|
99
|
+
};
|
|
100
|
+
for (const [member, value] of Object.entries(layer)) {
|
|
101
|
+
const before = merged[member];
|
|
102
|
+
merged[member] = isBundle(before) && isBundle(value) ? {
|
|
103
|
+
...before,
|
|
104
|
+
...value
|
|
105
|
+
} : value;
|
|
106
|
+
}
|
|
107
|
+
return merged;
|
|
108
|
+
}
|
|
93
109
|
/*
|
|
94
110
|
* Hands the views under it a host: `host` over the one of a provider above it, member by member, and
|
|
95
|
-
* over the defaults at the top. A
|
|
111
|
+
* over the defaults at the top. A member that is a bundle on both sides, such as `attachments`, is merged one
|
|
112
|
+
* level down, so a layer overrides one of its members without copying the rest. A part of an app that loads later and adds hooks renders a provider of
|
|
96
113
|
* its own around what it draws, so every view under it calls the same hooks from its first render on.
|
|
97
114
|
* The host is read once, as the provider mounts, since a hook that changed under a mounted view would
|
|
98
115
|
* break the order of its hooks: a provider that gets another `host` throws, and a new `key` remounts it.
|
|
116
|
+
* Only a dev server that replaces modules in place takes another `host`: re-running the module that makes it is
|
|
117
|
+
* how a change reaches a mounted view, and React Fast Refresh remounts what the new hooks would break.
|
|
99
118
|
*/
|
|
100
119
|
export function ChatHostProvider(t0) {
|
|
101
|
-
const $ = _c(
|
|
120
|
+
const $ = _c(9);
|
|
102
121
|
const {
|
|
103
122
|
host,
|
|
104
123
|
children
|
|
105
124
|
} = t0;
|
|
106
125
|
const parent = useContext(ChatHostContext);
|
|
107
126
|
let t1;
|
|
108
|
-
if ($[0] !== host
|
|
109
|
-
t1 = () =>
|
|
110
|
-
host,
|
|
111
|
-
value: {
|
|
112
|
-
...parent,
|
|
113
|
-
...host
|
|
114
|
-
}
|
|
115
|
-
});
|
|
127
|
+
if ($[0] !== host) {
|
|
128
|
+
t1 = () => host;
|
|
116
129
|
$[0] = host;
|
|
117
|
-
$[1] =
|
|
118
|
-
$[2] = t1;
|
|
130
|
+
$[1] = t1;
|
|
119
131
|
} else {
|
|
120
|
-
t1 = $[
|
|
132
|
+
t1 = $[1];
|
|
121
133
|
}
|
|
122
|
-
const [
|
|
123
|
-
if (
|
|
134
|
+
const [mounted] = useState(t1);
|
|
135
|
+
if (mounted !== host && !replacementTaken.on) {
|
|
124
136
|
throw new Error("A ChatHostProvider reads its host once: hand it the same object on every render, or a new key to mount it with another");
|
|
125
137
|
}
|
|
126
138
|
let t2;
|
|
127
|
-
if ($[3]
|
|
128
|
-
t2 =
|
|
129
|
-
$[
|
|
139
|
+
if ($[2] !== host || $[3] !== parent) {
|
|
140
|
+
t2 = layered(parent, host);
|
|
141
|
+
$[2] = host;
|
|
142
|
+
$[3] = parent;
|
|
143
|
+
$[4] = t2;
|
|
130
144
|
} else {
|
|
131
|
-
t2 = $[
|
|
145
|
+
t2 = $[4];
|
|
132
146
|
}
|
|
133
|
-
|
|
147
|
+
const value = t2;
|
|
134
148
|
let t3;
|
|
135
|
-
if ($[
|
|
136
|
-
t3 =
|
|
137
|
-
|
|
149
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
150
|
+
t3 = [];
|
|
151
|
+
$[5] = t3;
|
|
152
|
+
} else {
|
|
153
|
+
t3 = $[5];
|
|
154
|
+
}
|
|
155
|
+
useLayoutEffect(_temp, t3);
|
|
156
|
+
let t4;
|
|
157
|
+
if ($[6] !== children || $[7] !== value) {
|
|
158
|
+
t4 = createElement(ChatHostContext.Provider, {
|
|
159
|
+
value
|
|
138
160
|
}, children);
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
161
|
+
$[6] = children;
|
|
162
|
+
$[7] = value;
|
|
163
|
+
$[8] = t4;
|
|
142
164
|
} else {
|
|
143
|
-
|
|
165
|
+
t4 = $[8];
|
|
144
166
|
}
|
|
145
|
-
return
|
|
167
|
+
return t4;
|
|
146
168
|
}
|
|
147
|
-
/*
|
|
169
|
+
/*
|
|
170
|
+
* Whether the module that makes a host may be replaced while the page runs, which only a dev server does. Vite
|
|
171
|
+
* leaves `import.meta.hot` in a dev page and drops it from a build, so a production page and a test still throw.
|
|
172
|
+
*/
|
|
148
173
|
function _temp() {
|
|
149
174
|
return syncAnimations(["chat-shine"]);
|
|
150
175
|
}
|
|
176
|
+
const replacementTaken = {
|
|
177
|
+
on: import.meta.hot !== undefined
|
|
178
|
+
};
|
|
179
|
+
/* For the tests of this package: stands in for a dev server that replaces modules, or for a build. */
|
|
180
|
+
export function takeHostReplacement(on) {
|
|
181
|
+
replacementTaken.on = on;
|
|
182
|
+
}
|
|
183
|
+
/* The host of the nearest `ChatHostProvider`, or the defaults outside one. */
|
|
151
184
|
export function useChatHost() {
|
|
152
185
|
return useContext(ChatHostContext);
|
|
153
186
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { AgentKind, ChatApprovalItem, ChatQuestionItem } from '@adecore/agent-contracts';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type PendingPrompt = ChatApprovalItem | ChatQuestionItem;
|
|
4
|
+
export type PromptAction = {
|
|
5
|
+
kind: 'approve';
|
|
6
|
+
decision: 'allow' | 'allow-always' | 'deny';
|
|
7
|
+
message?: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'answer';
|
|
10
|
+
answers: Record<string, string>;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'dismiss';
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'choose';
|
|
15
|
+
choiceId: string;
|
|
16
|
+
};
|
|
17
|
+
export interface PromptAnswer {
|
|
18
|
+
choices: string[];
|
|
19
|
+
text: string;
|
|
20
|
+
custom: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface PromptDraft {
|
|
23
|
+
index: number;
|
|
24
|
+
answers: Record<string, PromptAnswer>;
|
|
25
|
+
reason: string;
|
|
26
|
+
showReason: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface HostPrompt {
|
|
29
|
+
id: string;
|
|
30
|
+
createdAt: number;
|
|
31
|
+
blocking: boolean;
|
|
32
|
+
asks: 'approval' | 'question';
|
|
33
|
+
data: unknown;
|
|
34
|
+
}
|
|
35
|
+
export type PromptSubject = {
|
|
36
|
+
kind: 'chat';
|
|
37
|
+
nodeId: string;
|
|
38
|
+
item: PendingPrompt;
|
|
39
|
+
source?: {
|
|
40
|
+
label: string;
|
|
41
|
+
provider?: AgentKind;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'host';
|
|
45
|
+
nodeId: string;
|
|
46
|
+
prompt: HostPrompt;
|
|
47
|
+
};
|
|
48
|
+
export interface PromptViewProps {
|
|
49
|
+
subject: PromptSubject;
|
|
50
|
+
draft: PromptDraft;
|
|
51
|
+
onDraft(draft: PromptDraft): void;
|
|
52
|
+
onAction(action: PromptAction): void;
|
|
53
|
+
more: number;
|
|
54
|
+
hasDraft: boolean;
|
|
55
|
+
denyReason: boolean;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
sending: boolean;
|
|
58
|
+
error: string | null;
|
|
59
|
+
top?: ReactNode;
|
|
60
|
+
onReveal?: () => void;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ProjectChat {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
export type ReferableKind = 'project' | 'canvas' | 'design' | 'chat' | 'terminal' | 'note' | 'text' | 'drawing' | 'diagram' | 'browser' | 'device' | 'file' | 'database';
|
|
6
|
+
export interface ReferenceStep {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: ReferableKind;
|
|
10
|
+
}
|
|
11
|
+
interface ReferenceSection {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
current?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface Referable {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
kind: ReferableKind;
|
|
20
|
+
detail?: string;
|
|
21
|
+
group: 'canvas' | 'views';
|
|
22
|
+
trail?: readonly ReferenceStep[];
|
|
23
|
+
section?: ReferenceSection;
|
|
24
|
+
read?(): Promise<string>;
|
|
25
|
+
}
|
|
26
|
+
export interface Referables {
|
|
27
|
+
items: readonly Referable[];
|
|
28
|
+
chatsOnly: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function referablesOfChats(chats: readonly ProjectChat[]): Referables;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* What a host without views offers: its chats, which every machine takes. */
|
|
2
|
+
export function referablesOfChats(chats) {
|
|
3
|
+
return {
|
|
4
|
+
items: chats.map(chat => ({
|
|
5
|
+
id: chat.id,
|
|
6
|
+
name: chat.title,
|
|
7
|
+
kind: 'chat',
|
|
8
|
+
group: 'views'
|
|
9
|
+
})),
|
|
10
|
+
chatsOnly: true
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { ChatApprovalItem, ChatAssistantItem, ChatCheckpointDiff, ChatItem, ChatNoteMessage, ChatQuestionItem, ChatSubagentItem, ChatThinkingItem, ChatToolItem, ChatTurnItem, ChatUserItem, ChatVisual, ChatWorkflow, ModelSelection } from '@adecore/agent-contracts';
|
|
2
|
+
import type { CommandLook, CommandLookSent, ThreadCard, ToolLook } from './host.js';
|
|
3
|
+
export type Look = CommandLook | ToolLook;
|
|
4
|
+
export interface SubagentBranch {
|
|
5
|
+
id: string;
|
|
6
|
+
item: ChatSubagentItem;
|
|
7
|
+
children: ChatItem[];
|
|
8
|
+
nested: SubagentBranch[];
|
|
9
|
+
expanded: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface BaseMoved {
|
|
12
|
+
from: string;
|
|
13
|
+
to: string;
|
|
14
|
+
}
|
|
15
|
+
export type TimelineRow = {
|
|
16
|
+
kind: 'user';
|
|
17
|
+
id: string;
|
|
18
|
+
item: ChatUserItem;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'turn-start';
|
|
21
|
+
id: string;
|
|
22
|
+
turn: ChatTurnItem;
|
|
23
|
+
label: string;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'assistant';
|
|
26
|
+
id: string;
|
|
27
|
+
item: ChatAssistantItem;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'report';
|
|
30
|
+
id: string;
|
|
31
|
+
text: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'thinking';
|
|
34
|
+
id: string;
|
|
35
|
+
item: ChatThinkingItem;
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'work';
|
|
38
|
+
id: string;
|
|
39
|
+
tool: ChatToolItem;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'work-group';
|
|
42
|
+
id: string;
|
|
43
|
+
tools: ChatToolItem[];
|
|
44
|
+
summary: string;
|
|
45
|
+
expanded: boolean;
|
|
46
|
+
look?: Look;
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'work-live';
|
|
49
|
+
id: string;
|
|
50
|
+
tool: ChatToolItem;
|
|
51
|
+
} | {
|
|
52
|
+
kind: 'live-thought';
|
|
53
|
+
id: string;
|
|
54
|
+
item: ChatThinkingItem;
|
|
55
|
+
at: number;
|
|
56
|
+
} | {
|
|
57
|
+
kind: 'workflow';
|
|
58
|
+
id: string;
|
|
59
|
+
tool: ChatToolItem;
|
|
60
|
+
workflow: ChatWorkflow;
|
|
61
|
+
} | ({
|
|
62
|
+
kind: 'subagent';
|
|
63
|
+
} & SubagentBranch) | {
|
|
64
|
+
kind: 'approval';
|
|
65
|
+
id: string;
|
|
66
|
+
item: ChatApprovalItem;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'question';
|
|
69
|
+
id: string;
|
|
70
|
+
item: ChatQuestionItem;
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'note';
|
|
73
|
+
id: string;
|
|
74
|
+
level: 'info' | 'warning' | 'error';
|
|
75
|
+
text: string;
|
|
76
|
+
from?: string;
|
|
77
|
+
said?: true;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'message';
|
|
80
|
+
id: string;
|
|
81
|
+
message: ChatNoteMessage;
|
|
82
|
+
createdAt: number;
|
|
83
|
+
} | {
|
|
84
|
+
kind: 'sent';
|
|
85
|
+
id: string;
|
|
86
|
+
tool: ChatToolItem;
|
|
87
|
+
sent: CommandLookSent;
|
|
88
|
+
} | {
|
|
89
|
+
kind: 'compaction';
|
|
90
|
+
id: string;
|
|
91
|
+
preTokens: number | null;
|
|
92
|
+
postTokens?: number;
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'selection-switch';
|
|
95
|
+
id: string;
|
|
96
|
+
from: ModelSelection;
|
|
97
|
+
to: ModelSelection;
|
|
98
|
+
} | {
|
|
99
|
+
kind: 'changed-files';
|
|
100
|
+
id: string;
|
|
101
|
+
turnId: string;
|
|
102
|
+
tools: ChatToolItem[];
|
|
103
|
+
diff: ChatCheckpointDiff | null;
|
|
104
|
+
checkpoint: boolean;
|
|
105
|
+
baseMoved?: BaseMoved;
|
|
106
|
+
heldBack?: boolean;
|
|
107
|
+
} | {
|
|
108
|
+
kind: 'turn-fold';
|
|
109
|
+
id: string;
|
|
110
|
+
turn: ChatTurnItem;
|
|
111
|
+
label: string;
|
|
112
|
+
work: string[];
|
|
113
|
+
hiddenCount: number;
|
|
114
|
+
expanded: boolean;
|
|
115
|
+
expandable: boolean;
|
|
116
|
+
} | {
|
|
117
|
+
kind: 'forks';
|
|
118
|
+
id: string;
|
|
119
|
+
turnId: string;
|
|
120
|
+
} | {
|
|
121
|
+
kind: 'working';
|
|
122
|
+
id: string;
|
|
123
|
+
startedAt: number;
|
|
124
|
+
tool?: ChatToolItem;
|
|
125
|
+
} | {
|
|
126
|
+
kind: 'app-card';
|
|
127
|
+
id: string;
|
|
128
|
+
card: ThreadCard;
|
|
129
|
+
} | {
|
|
130
|
+
kind: 'visual';
|
|
131
|
+
id: string;
|
|
132
|
+
visual: ChatVisual;
|
|
133
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/images.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { imageForDisplay } from './chat/image-display.js';
|
|
2
2
|
export { DisplayImage } from './chat/ui/DisplayImage.js';
|
package/dist/images.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { imageForDisplay } from './chat/image-display.js';
|
|
2
2
|
export { DisplayImage } from './chat/ui/DisplayImage.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export { type ChatActions, type FileRef, type ShellCodeBlockContext, type ChatPlace, type SubagentTask, type TimelineFindOptions, type TimelineFind, type ComposerDictationProps, type ComposerHeaderSlotProps, type ComposerSlotProps, type ReferenceIconProps, type OutsideReference, type
|
|
1
|
+
export { type ChatActions, type FileRef, type ShellCodeBlockContext, type ChatPlace, type SubagentTask, type TimelineFindOptions, type TimelineFind, type ComposerDictationProps, type ComposerHeaderSlotProps, type ComposerSlotProps, type ReferenceIconProps, type OutsideReference, type ComposerStatusDetail, type ComposerStatusItem, type SubagentSlotProps, type ThreadCard, type VisualHost, type HostMenuAction, type ReplyAuthor, type ChatHost, type UiMapSource, type UiModelViewProps, type CommandLook, type CommandLookCall, type CommandLookSent, type CommandLookMatch, type CommandName, type ToolLook, type ToolLookCall, type ToolLookMatch, ChatHostProvider, type AgentMark, type ChatHostLayer, useChatHost } from './host/host.js';
|
|
2
2
|
export { type ChatScope, ChatScopeContext, useChatScope } from './scope.js';
|
|
3
3
|
export { type ChatRequestMap, type ChatEventMap, type ChatTransportStatus, type ChatTransport, ChatTransportError, errorCode, isConnectionError } from './transport.js';
|
|
4
4
|
export { portTransport, type PortTransport } from './port-transport.js';
|
|
5
|
-
export {
|
|
6
|
-
export { configureChatStorage, type ChatStorageRecord, type ChatStorageAdapter, type ChatStorageOptions } from './storage.js';
|
|
7
|
-
export { setLazyPrefetch, onLazyOpenError } from './lazy.js';
|
|
5
|
+
export { configureChatStorage } from './storage.js';
|
|
8
6
|
export { type MountedEntry, MountedRegistry } from './mounted-registry.js';
|
|
9
|
-
export {
|
|
7
|
+
export { PROVIDERS_SECTION, USAGE_SECTION, settingsSection } from './settings/sections.js';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
|
|
2
|
-
export { ChatHostProvider, useChatHost } from './host.js';
|
|
2
|
+
export { ChatHostProvider, useChatHost } from './host/host.js';
|
|
3
3
|
export { ChatScopeContext, useChatScope } from './scope.js';
|
|
4
4
|
export { ChatTransportError, errorCode, isConnectionError } from './transport.js';
|
|
5
5
|
export { portTransport } from './port-transport.js';
|
|
6
|
-
export { configureAgentMarks } from './agents/agent-marks.js';
|
|
7
6
|
export { configureChatStorage } from './storage.js';
|
|
8
|
-
export { setLazyPrefetch, onLazyOpenError } from './lazy.js';
|
|
9
7
|
export { MountedRegistry } from './mounted-registry.js';
|
|
10
8
|
export { PROVIDERS_SECTION, USAGE_SECTION, settingsSection } from './settings/sections.js';
|
|
@@ -24,6 +24,7 @@ declare const _default: {
|
|
|
24
24
|
refusal: {
|
|
25
25
|
notInConversation: string;
|
|
26
26
|
cliCannotFork: string;
|
|
27
|
+
agentsLoading: string;
|
|
27
28
|
noConversation: string;
|
|
28
29
|
turnRunning: string;
|
|
29
30
|
originalGone: string;
|
|
@@ -443,7 +444,6 @@ declare const _default: {
|
|
|
443
444
|
continue: string;
|
|
444
445
|
continueHint: string;
|
|
445
446
|
send: string;
|
|
446
|
-
sendActions: string;
|
|
447
447
|
clear: {
|
|
448
448
|
title: string;
|
|
449
449
|
description: string;
|
|
@@ -24,6 +24,7 @@ export default {
|
|
|
24
24
|
refusal: {
|
|
25
25
|
notInConversation: 'This turn is not in the conversation',
|
|
26
26
|
cliCannotFork: 'This agent cannot fork its conversation',
|
|
27
|
+
agentsLoading: 'Wait for the agents to load',
|
|
27
28
|
noConversation: 'Nothing to fork yet. Send a message first.',
|
|
28
29
|
turnRunning: 'Wait for the turn to end',
|
|
29
30
|
originalGone: 'Original no longer in this project'
|
|
@@ -443,7 +444,6 @@ export default {
|
|
|
443
444
|
continue: 'Continue',
|
|
444
445
|
continueHint: 'Continue the stopped turn',
|
|
445
446
|
send: 'Send',
|
|
446
|
-
sendActions: 'More send options',
|
|
447
447
|
clear: {
|
|
448
448
|
title: 'Clear thread?',
|
|
449
449
|
description: 'A turn is running.',
|
|
@@ -24,6 +24,7 @@ declare const _default: {
|
|
|
24
24
|
refusal: {
|
|
25
25
|
notInConversation: string;
|
|
26
26
|
cliCannotFork: string;
|
|
27
|
+
agentsLoading: string;
|
|
27
28
|
noConversation: string;
|
|
28
29
|
turnRunning: string;
|
|
29
30
|
originalGone: string;
|
|
@@ -443,7 +444,6 @@ declare const _default: {
|
|
|
443
444
|
continue: string;
|
|
444
445
|
continueHint: string;
|
|
445
446
|
send: string;
|
|
446
|
-
sendActions: string;
|
|
447
447
|
clear: {
|
|
448
448
|
title: string;
|
|
449
449
|
description: string;
|
|
@@ -24,6 +24,7 @@ export default {
|
|
|
24
24
|
refusal: {
|
|
25
25
|
notInConversation: 'Deze turn zit niet in het gesprek',
|
|
26
26
|
cliCannotFork: 'Deze agent kan zijn gesprek niet forken',
|
|
27
|
+
agentsLoading: 'Wacht tot de agents geladen zijn',
|
|
27
28
|
noConversation: 'Nog niets om te forken. Stuur eerst een bericht.',
|
|
28
29
|
turnRunning: 'Wacht tot de turn klaar is',
|
|
29
30
|
originalGone: 'Origineel niet meer in dit project'
|
|
@@ -443,7 +444,6 @@ export default {
|
|
|
443
444
|
continue: 'Doorgaan',
|
|
444
445
|
continueHint: 'Ga verder met de gestopte turn',
|
|
445
446
|
send: 'Versturen',
|
|
446
|
-
sendActions: 'Meer verzendopties',
|
|
447
447
|
clear: {
|
|
448
448
|
title: 'Thread wissen?',
|
|
449
449
|
description: 'Er loopt een turn.',
|
package/dist/locales.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Bundle = Record<string, unknown>;
|
|
2
2
|
export declare const AGENTS_NAMESPACES: readonly ['agent-chat', 'agent-prompts', 'agent-providers', 'agent-usage'];
|
|
3
|
-
|
|
3
|
+
type AgentsNamespace = (typeof AGENTS_NAMESPACES)[number];
|
|
4
4
|
export declare const AGENTS_LOCALES: Record<string, () => Promise<Record<AgentsNamespace, Bundle>>>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface PersistedJson<T> {
|
|
2
2
|
read(): T;
|
|
3
3
|
write(value: T): boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare function persistedJson<T>(key: string | (() => string), parse: (raw: string | null) => T, fallback: T, legacyKeys?: () => readonly string[]): PersistedJson<T>;
|
|
6
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chatStorageAdapter, hydrateChatStorage } from '
|
|
1
|
+
import { chatStorageAdapter, hydrateChatStorage } from './storage.js';
|
|
2
2
|
export function persistedJson(key, parse, fallback, legacyKeys = () => []) {
|
|
3
3
|
let memory = fallback;
|
|
4
4
|
let unwritten = false;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { AccentSwatches } from '@adecore/ui';
|
|
3
|
-
import { useChatHost } from '../host.js';
|
|
4
|
-
/* The colors an account may wear, the host's palette. */
|
|
3
|
+
import { useChatHost } from '../host/host.js';
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
export function AccountColors(t0) {
|
|
7
6
|
const $ = _c(7);
|
|
@@ -6,8 +6,8 @@ import { useState } from 'react';
|
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
7
|
import { AccountDot } from '../agents/AccountDot.js';
|
|
8
8
|
import { accountName, FOLDER_VARIABLES } from '../agents/accounts.js';
|
|
9
|
-
import { useChatHost } from '../host.js';
|
|
10
|
-
import { useHostCanShareAccountConfig } from '../host-hooks.js';
|
|
9
|
+
import { useChatHost } from '../host/host.js';
|
|
10
|
+
import { useHostCanShareAccountConfig } from '../host/host-hooks.js';
|
|
11
11
|
import { useChatScope } from '../scope.js';
|
|
12
12
|
import { useProviderAccounts } from '../state/provider-accounts.js';
|
|
13
13
|
import { removeAccount, saveAccount, shareAccountConfig } from './account-actions.js';
|
|
@@ -71,7 +71,6 @@ function NameField(t0) {
|
|
|
71
71
|
}
|
|
72
72
|
return t3;
|
|
73
73
|
}
|
|
74
|
-
/* One account: how it looks in a picker, who is signed in, where its folder is, its variables. */
|
|
75
74
|
function _temp(event_0) {
|
|
76
75
|
if (event_0.key === "Enter") {
|
|
77
76
|
event_0.currentTarget.blur();
|
|
@@ -3,7 +3,7 @@ import { SettingsRow, SettingsSection } from '@adecore/ui/settings';
|
|
|
3
3
|
import { Lock, LockOpen, Plus, X } from 'lucide-react';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { useChatHost } from '../host.js';
|
|
6
|
+
import { useChatHost } from '../host/host.js';
|
|
7
7
|
import { useChatScope } from '../scope.js';
|
|
8
8
|
import { saveAccount } from './account-actions.js';
|
|
9
9
|
import { draftsOf, emptyDraft, variablesChanged, variablesOf, variablesProblem } from './variables.js';
|