@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,5 +1,5 @@
|
|
|
1
1
|
import { type AgentKind, type ProviderAccounts, type ProviderInfo } from '@adecore/agent-contracts';
|
|
2
|
-
import { type AccentChoice } from '../../host.js';
|
|
2
|
+
import { type AccentChoice } from '../../host/host.js';
|
|
3
3
|
import type { NamedChipKind } from '../mentions.js';
|
|
4
4
|
export interface NamedChipLook {
|
|
5
5
|
label: string;
|
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { UsageProviderSchema } from '@adecore/agent-contracts';
|
|
3
3
|
import { useContext } from 'react';
|
|
4
4
|
import { accountColor, accountName, accountsOfKind, topAccountEntry } from '../../agents/accounts.js';
|
|
5
|
-
import { useChatHost } from '../../host.js';
|
|
5
|
+
import { useChatHost } from '../../host/host.js';
|
|
6
6
|
import { ChatScopeContext } from '../../scope.js';
|
|
7
7
|
import { useProviderAccountsStore } from '../../state/provider-accounts.js';
|
|
8
8
|
import { useProvidersStore } from '../../state/providers.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type LucideIcon } from 'lucide-react';
|
|
2
2
|
import { type ComponentType, type ReactNode } from 'react';
|
|
3
|
-
import type { ReferenceIconProps } from '../../host.js';
|
|
4
|
-
import type { ReferableKind } from '
|
|
3
|
+
import type { ReferenceIconProps } from '../../host/host.js';
|
|
4
|
+
import type { ReferableKind } from '../../host/references.js';
|
|
5
5
|
export declare const REFERENCE_ICONS: Record<ReferableKind, LucideIcon>;
|
|
6
6
|
export declare function referenceGlyph(HostIcon: ComponentType<ReferenceIconProps> | null | undefined, props: ReferenceIconProps): ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OutsideReference } from '../../host.js';
|
|
2
|
-
import type { Referable } from '
|
|
1
|
+
import type { OutsideReference } from '../../host/host.js';
|
|
2
|
+
import type { Referable } from '../../host/references.js';
|
|
3
3
|
export interface ReferenceLookup {
|
|
4
4
|
items: readonly Referable[];
|
|
5
5
|
open: ((id: string) => void) | null;
|
|
@@ -4,7 +4,6 @@ export const WHOLE_FADE_CLASS = 'chat-fade-whole';
|
|
|
4
4
|
// Code is read as one string by the renderer, so a span inside it would come out as "[object Object]".
|
|
5
5
|
const SKIPPED = new Set(['code', 'pre']);
|
|
6
6
|
const WHITESPACE = /^\s+$/;
|
|
7
|
-
/* A text cut into its words and the whitespace between them, in order. */
|
|
8
7
|
export function wordSegments(text) {
|
|
9
8
|
return text.split(/(\s+)/).filter(segment => segment !== '');
|
|
10
9
|
}
|
package/dist/chat/ui/reveal.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export declare const REVEAL_FADE_MS = 300;
|
|
2
1
|
export declare const REVEAL_TAU_MS = 250;
|
|
3
2
|
export declare const REVEAL_MIN_CPS = 40;
|
|
4
|
-
export declare const REVEAL_FINISH_MIN_CPS = 120;
|
|
5
3
|
export declare const REVEAL_MAX_FRAME_MS = 100;
|
|
6
4
|
export declare const REVEAL_MAX_HELD_WORD = 32;
|
|
7
5
|
export declare function advanceReveal(position: number, target: number, elapsedMs: number, finished: boolean): number;
|
|
8
6
|
export declare function revealBoundary(text: string, position: number, complete: boolean): number;
|
|
9
|
-
|
|
7
|
+
interface RevealedText {
|
|
10
8
|
text: string;
|
|
11
9
|
active: boolean;
|
|
12
10
|
}
|
|
13
11
|
export declare function useRevealedText(text: string, streaming: boolean): RevealedText;
|
|
12
|
+
export {};
|
package/dist/chat/ui/reveal.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
/* How long a word takes to fade in. `.chat-fade` in styles.css carries the same number. */
|
|
4
|
-
|
|
4
|
+
const REVEAL_FADE_MS = 300;
|
|
5
5
|
/* The time constant of the catch-up: after this long about two thirds of what was behind is on screen. */
|
|
6
6
|
export const REVEAL_TAU_MS = 250;
|
|
7
7
|
// Without a floor the last few characters of a gap crawl, since the exponential step shrinks with the gap.
|
|
8
8
|
export const REVEAL_MIN_CPS = 40;
|
|
9
9
|
// Once the item is done nothing more arrives to wait for, so the tail is closed faster.
|
|
10
|
-
|
|
10
|
+
const REVEAL_FINISH_MIN_CPS = 120;
|
|
11
11
|
// A tab that comes back hands one frame the whole time it was away; it would show everything at once.
|
|
12
12
|
export const REVEAL_MAX_FRAME_MS = 100;
|
|
13
13
|
// A word this long (a URL, a line of CJK) would otherwise hold everything behind it until it ends.
|
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { Icon, Menu } from '@adecore/ui';
|
|
3
3
|
import { ChevronRight, GitFork } from 'lucide-react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { useHostChatPlace } from '../../../host-hooks.js';
|
|
5
|
+
import { useHostChatPlace } from '../../../host/host-hooks.js';
|
|
6
6
|
import { useForkIdsAfter } from '../../forks.js';
|
|
7
7
|
import { ROW_GUTTER } from '../icons.js';
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -4,8 +4,8 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { Check, Copy, Ellipsis, ExternalLink, FolderDown, ImageIcon, Maximize2 } from 'lucide-react';
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
|
-
import { useChatHost } from '../../../host.js';
|
|
8
|
-
import { useHostAttachmentUrl } from '../../../host-hooks.js';
|
|
7
|
+
import { useChatHost } from '../../../host/host.js';
|
|
8
|
+
import { useHostAttachmentUrl } from '../../../host/host-hooks.js';
|
|
9
9
|
import { useChatScope } from '../../../scope.js';
|
|
10
10
|
import { useCurrentItem } from '../../../state/chats.js';
|
|
11
11
|
import { formatBytes } from '../../attachments.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatApprovalItem, ChatAssistantItem, ChatNoteMessage, ChatQuestionItem, ChatThinkingItem, ChatToolItem, ChatUserItem, ModelSelection } from '@adecore/agent-contracts';
|
|
2
|
-
import { type CommandLookSent } from '../../../host.js';
|
|
2
|
+
import { type CommandLookSent } from '../../../host/host.js';
|
|
3
3
|
export declare function UserRow({ chatId, item }: {
|
|
4
4
|
chatId: string;
|
|
5
5
|
item: ChatUserItem;
|
|
@@ -6,8 +6,8 @@ import clsx from 'clsx';
|
|
|
6
6
|
import { Bot, Brain, ChevronDown, CircleAlert, CircleCheck, CircleX, File, Info, MessageCircleQuestionMark, Reply, Send, SquareTerminal, TriangleAlert } from 'lucide-react';
|
|
7
7
|
import { useContext, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { useChatHost } from '../../../host.js';
|
|
10
|
-
import { useHostAttachmentUrl, useHostChatPlace, useHostReplyAuthor, useHostStreaming } from '../../../host-hooks.js';
|
|
9
|
+
import { useChatHost } from '../../../host/host.js';
|
|
10
|
+
import { useHostAttachmentUrl, useHostChatPlace, useHostReplyAuthor, useHostStreaming } from '../../../host/host-hooks.js';
|
|
11
11
|
import { useChatScope } from '../../../scope.js';
|
|
12
12
|
import { useChatRow, useCurrentItem } from '../../../state/chats.js';
|
|
13
13
|
import { useProviders } from '../../../state/providers.js';
|
|
@@ -165,7 +165,6 @@ function AttachmentLink(t0) {
|
|
|
165
165
|
}
|
|
166
166
|
return t12;
|
|
167
167
|
}
|
|
168
|
-
/* A picture attached to a message, which opens large. */
|
|
169
168
|
function AttachmentThumb(t0) {
|
|
170
169
|
const $ = _c(3);
|
|
171
170
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from 'react';
|
|
2
|
-
import type { TimelineRow } from '
|
|
3
|
-
|
|
2
|
+
import type { TimelineRow } from '../../../host/timeline-row.js';
|
|
3
|
+
interface RowContainerProps {
|
|
4
4
|
row: TimelineRow;
|
|
5
5
|
previous: TimelineRow | null;
|
|
6
6
|
index: number;
|
|
@@ -9,3 +9,4 @@ export interface RowContainerProps {
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
export declare function RowContainer({ row, previous, index, top, ref, children }: RowContainerProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { useChatHost } from '../../../host.js';
|
|
3
|
+
import { useChatHost } from '../../../host/host.js';
|
|
4
4
|
import { rowPosition, rowRhythm, saidToChat } from './row-rhythm.js';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export function RowContainer(t0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { SubagentBranch } from '
|
|
1
|
+
import { type ChatItem, type ChatSubagentItem } from '@adecore/agent-contracts';
|
|
2
|
+
import type { SubagentBranch } from '../../../host/timeline-row.js';
|
|
3
3
|
import { type SubagentStep } from '../../subagent-view.js';
|
|
4
4
|
export declare function SubagentRow({ chatId, item, work, expanded, onToggle, onOpenConversation }: {
|
|
5
5
|
chatId: string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { HOST_TASK_ORIGIN, taskIdOfRow } from '@adecore/agent-contracts';
|
|
2
3
|
import { Icon, ScrollArea, useNow } from '@adecore/ui';
|
|
3
4
|
import { formatElapsedShort } from '@adecore/ui/format';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import { Bot, ChevronDown } from 'lucide-react';
|
|
6
7
|
import { useLayoutEffect, useRef, useState } from 'react';
|
|
7
8
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import '../../../host.js';
|
|
9
|
-
import { useHostHidesToolCalls, useHostTask } from '../../../host-hooks.js';
|
|
9
|
+
import '../../../host/host.js';
|
|
10
|
+
import { useHostHidesToolCalls, useHostTask } from '../../../host/host-hooks.js';
|
|
10
11
|
import { useChatScope } from '../../../scope.js';
|
|
11
12
|
import { useCurrentItem } from '../../../state/chats.js';
|
|
12
13
|
import { isImageGeneration } from '../../logic/generated-image.js';
|
|
13
|
-
import { entryTimeOf, statusWordOf
|
|
14
|
+
import { entryTimeOf, statusWordOf } from '../../subagent-list.js';
|
|
14
15
|
import { useSubagentSupport } from '../../subagent-support.js';
|
|
15
16
|
import { canOpenSubagent, crumbOf } from '../../subagent-view.js';
|
|
16
17
|
import { useOpenForFind } from '../find-reveal.js';
|
|
@@ -202,7 +203,6 @@ function StatusPill(t0) {
|
|
|
202
203
|
}
|
|
203
204
|
return t4;
|
|
204
205
|
}
|
|
205
|
-
/* What the sub-agent did, live: its own tool calls and the text it wrote, as ordinary rows. */
|
|
206
206
|
function SubagentWork(t0) {
|
|
207
207
|
const $ = _c(24);
|
|
208
208
|
const {
|
|
@@ -453,7 +453,7 @@ export function SubagentRow(t0) {
|
|
|
453
453
|
} = useChatScope();
|
|
454
454
|
let t1;
|
|
455
455
|
if ($[0] !== item) {
|
|
456
|
-
t1 =
|
|
456
|
+
t1 = taskIdOfRow(item);
|
|
457
457
|
$[0] = item;
|
|
458
458
|
$[1] = t1;
|
|
459
459
|
} else {
|
|
@@ -484,7 +484,7 @@ export function SubagentRow(t0) {
|
|
|
484
484
|
const press = onOpenConversation !== undefined && canOpenSubagent(item, refused) ? onOpenConversation : onToggle;
|
|
485
485
|
let t4;
|
|
486
486
|
if ($[7] !== detail || $[8] !== expanded || $[9] !== item || $[10] !== press || $[11] !== running || $[12] !== t || $[13] !== task) {
|
|
487
|
-
t4 = item.origin ===
|
|
487
|
+
t4 = item.origin === HOST_TASK_ORIGIN ? /*#__PURE__*/_jsx(TaskRow, {
|
|
488
488
|
item: item,
|
|
489
489
|
task: task,
|
|
490
490
|
open: expanded,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatSubagentItem } from '@adecore/agent-contracts';
|
|
2
|
-
import type { SubagentTask } from '../../../host.js';
|
|
2
|
+
import type { SubagentTask } from '../../../host/host.js';
|
|
3
3
|
export declare function TaskRow({ item, task, open, onPress }: {
|
|
4
4
|
item: ChatSubagentItem;
|
|
5
5
|
task: SubagentTask | null;
|
|
@@ -2,7 +2,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { ButtonGroup, ErrorBoundary, Icon, IconButton, Menu, Surface } from '@adecore/ui';
|
|
3
3
|
import { Ellipsis, Maximize2, Trash2 } from 'lucide-react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { useChatHost } from '../../../host.js';
|
|
5
|
+
import { useChatHost } from '../../../host/host.js';
|
|
6
6
|
import { useChatScope } from '../../../scope.js';
|
|
7
7
|
import { useVisualDialog } from '../../visuals.js';
|
|
8
8
|
import { HostMenuItems } from '../HostMenuItems.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ChatCheckpointDiff, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
-
import { type Look
|
|
4
|
-
import type { BaseMoved } from '
|
|
3
|
+
import { type Look } from '../../../host/timeline-row.js';
|
|
4
|
+
import type { BaseMoved } from '../../../host/timeline-row.js';
|
|
5
|
+
import { type LookRun } from '../../logic/command-looks.js';
|
|
5
6
|
export declare function ToggleLine({ icon, label, brand, detail, command, look, path, open, onToggle, failed, live, trailing, time, className }: {
|
|
6
7
|
icon: ReactNode;
|
|
7
8
|
label: ReactNode;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { Button, Icon, LazyBoundary, MiddleTruncate, ScrollArea, Spinner, useTickingText } from '@adecore/ui';
|
|
2
|
+
import { Button, Icon, LazyBoundary, MiddleTruncate, ScrollArea, Spinner, lazyNamed, useTickingText } from '@adecore/ui';
|
|
3
3
|
import { formatClockDuration, formatElapsedShort } from '@adecore/ui/format';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import i18next from 'i18next';
|
|
6
6
|
import { ChevronRight, FileDiff, X } from 'lucide-react';
|
|
7
7
|
import { Fragment, useContext, useEffect, useState } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { useChatHost } from '../../../host.js';
|
|
10
|
-
import { useCommandNames } from '../../../host-hooks.js';
|
|
11
|
-
import
|
|
9
|
+
import { useChatHost } from '../../../host/host.js';
|
|
10
|
+
import { useCommandNames } from '../../../host/host-hooks.js';
|
|
11
|
+
import '../../../host/timeline-row.js';
|
|
12
12
|
import { ChatScopeContext, useChatScope } from '../../../scope.js';
|
|
13
13
|
import { useAwaitsApproval, useCurrentItem } from '../../../state/chats.js';
|
|
14
14
|
import { useChatActions } from '../../actions.js';
|
|
@@ -30,7 +30,6 @@ import { useReferenceLookupIn } from '../thread-references.js';
|
|
|
30
30
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
31
|
const UnifiedDiff = lazyNamed(() => import('../UnifiedDiff.js'), 'default');
|
|
32
32
|
const OUTPUT_LIMIT = 4000;
|
|
33
|
-
/* The line that says how much of a text past the limit is left out; empty for a text within it. */
|
|
34
33
|
function clipNotice(text) {
|
|
35
34
|
return text.length > OUTPUT_LIMIT ? `\n${i18next.t('agent-chat:work.moreCharacters', {
|
|
36
35
|
count: text.length - OUTPUT_LIMIT
|
|
@@ -40,7 +39,6 @@ function clip(text) {
|
|
|
40
39
|
return text.slice(0, OUTPUT_LIMIT) + clipNotice(text);
|
|
41
40
|
}
|
|
42
41
|
const BRAND = 'font-semibold';
|
|
43
|
-
/* `text` with `brand` in semibold where it names it, as a sentence about a look does. */
|
|
44
42
|
function withBrand(text, brands) {
|
|
45
43
|
for (const brand of brands) {
|
|
46
44
|
const at = brand === '' ? -1 : text.indexOf(brand);
|
|
@@ -507,7 +505,6 @@ function DiffSuspense(t0) {
|
|
|
507
505
|
}
|
|
508
506
|
return t3;
|
|
509
507
|
}
|
|
510
|
-
/* A file in a changed files card, which opens its diff under it. */
|
|
511
508
|
function ChangedFileLine(t0) {
|
|
512
509
|
const $ = _c(19);
|
|
513
510
|
const {
|
|
@@ -1409,7 +1406,6 @@ export function RunningFor(t0) {
|
|
|
1409
1406
|
}
|
|
1410
1407
|
return t2;
|
|
1411
1408
|
}
|
|
1412
|
-
/* The mark of one call: the look it runs under, else what the tool is about. */
|
|
1413
1409
|
function callIcon(tool, commandLooks, toolLooks) {
|
|
1414
1410
|
const run = lookRunOf(tool, commandLooks, toolLooks);
|
|
1415
1411
|
return run === null ? toolIcon(tool.name) : /*#__PURE__*/_jsx(run.look.Mark, {
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { ChevronRight, Square, TriangleAlert, Workflow } from 'lucide-react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useChatHost } from '../../../host.js';
|
|
7
|
+
import { useChatHost } from '../../../host/host.js';
|
|
8
8
|
import { useChatScope } from '../../../scope.js';
|
|
9
9
|
import { useChats } from '../../../state/chats.js';
|
|
10
10
|
import { useChatActions } from '../../actions.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import { type TimelineRow } from '
|
|
2
|
+
import { type TimelineRow } from '../../../host/timeline-row.js';
|
|
3
3
|
export declare const FOLLOW_THRESHOLD_PX = 40;
|
|
4
4
|
export declare function saidToChat(row: TimelineRow, hostSpeaks?: boolean): boolean;
|
|
5
5
|
export declare function rowRhythm(row: TimelineRow, previous: TimelineRow | null, hostSpeaks?: boolean): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
+
import '../../../host/timeline-row.js';
|
|
2
3
|
import { isBlock } from '../../logic/timeline.js';
|
|
3
4
|
/* Below this distance from the bottom a thread follows what the agent writes; above it the reader scrolled back on purpose. */
|
|
4
5
|
export const FOLLOW_THRESHOLD_PX = 40;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ChatItem } from '@adecore/agent-contracts';
|
|
2
1
|
import type { ReferenceLookup } from './reference-lookup.js';
|
|
3
|
-
export declare function threadReferencedKey(structure: Record<string, ChatItem> | undefined): string;
|
|
4
2
|
export declare function useReferenceLookup(chatId: string): ReferenceLookup;
|
|
5
3
|
export declare function useReferenceLookupIn(scopeId: string, chatId: string): ReferenceLookup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useChatHost } from '../../host.js';
|
|
3
|
-
import { useHostReferables } from '../../host-hooks.js';
|
|
2
|
+
import { useChatHost } from '../../host/host.js';
|
|
3
|
+
import { useHostReferables } from '../../host/host-hooks.js';
|
|
4
4
|
import { useChatScope } from '../../scope.js';
|
|
5
5
|
import { useChatRow } from '../../state/chats.js';
|
|
6
6
|
const referencedOf = new WeakMap();
|
|
@@ -9,7 +9,7 @@ const referencedOf = new WeakMap();
|
|
|
9
9
|
* it answers the same value until a message with another one comes; the structure a streamed word
|
|
10
10
|
* leaves alone is what it is cached on.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
function threadReferencedKey(structure) {
|
|
13
13
|
if (structure === undefined) {
|
|
14
14
|
return '';
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { diffSyntaxDocument } from '@adecore/editor-react';
|
|
3
3
|
import { useLayoutEffect, useMemo } from 'react';
|
|
4
|
-
import { useChatHost } from '../../host.js';
|
|
4
|
+
import { useChatHost } from '../../host/host.js';
|
|
5
5
|
import { diffSourceTokens, diffSyntaxRuntime } from './diff-syntax.js';
|
|
6
6
|
function createSourceBinding(document, language, theme, runtime) {
|
|
7
7
|
const mapping = diffSyntaxDocument(document, language, theme);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cleanVisualVariables } from '@adecore/agent-contracts/visual';
|
|
3
3
|
import { useLayoutEffect, useState } from 'react';
|
|
4
|
-
import { useHostCodeMode } from '../../host-hooks.js';
|
|
4
|
+
import { useHostCodeMode } from '../../host/host-hooks.js';
|
|
5
5
|
import { watchTheme } from './theme-watch.js';
|
|
6
6
|
/*
|
|
7
7
|
* A page's theme from the app's tokens. The names follow common component themes, where `--accent`
|
package/dist/chat/waiting-on.js
CHANGED
|
@@ -60,7 +60,7 @@ export function waitingOnLabel(waiting, now) {
|
|
|
60
60
|
});
|
|
61
61
|
case 'command':
|
|
62
62
|
return t('waitingOn.command', {
|
|
63
|
-
command: waiting.task.
|
|
63
|
+
command: waiting.task.description || waiting.task.command || t(`activity.${waiting.task.kind}`),
|
|
64
64
|
age: formatElapsedShort(Math.max(0, now - waiting.task.startedAt))
|
|
65
65
|
});
|
|
66
66
|
case 'background':
|
|
@@ -3,10 +3,11 @@ export type WorkflowCall = ChatToolItem & {
|
|
|
3
3
|
workflow: ChatWorkflow;
|
|
4
4
|
};
|
|
5
5
|
export type WorkflowWord = 'running' | 'stalled' | 'done' | 'failed';
|
|
6
|
-
|
|
6
|
+
interface WorkflowPill {
|
|
7
7
|
word: WorkflowWord;
|
|
8
8
|
label: string;
|
|
9
9
|
}
|
|
10
10
|
export declare function flyoutWorkflows(order: readonly string[], structure: Readonly<Record<string, ChatItem>>): WorkflowCall[];
|
|
11
11
|
export declare function workflowWordOf(tool: WorkflowCall): WorkflowWord;
|
|
12
12
|
export declare function workflowPillOf(calls: readonly WorkflowCall[]): WorkflowPill;
|
|
13
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentKind, ChatAttachmentUpload, ChatAttachResult, ChatBookmark, ChatPreferencesPayload, ChatQuoteSource, ChatSkill, ChatVisual, ModelSelection, ProviderInfo, RuntimeMode } from '@adecore/agent-contracts';
|
|
2
|
-
import type { ChatSink } from '
|
|
3
|
-
import { type ChatTransport } from '
|
|
2
|
+
import type { ChatSink } from './chat-sink.js';
|
|
3
|
+
import { type ChatTransport } from './transport.js';
|
|
4
4
|
interface ChatOpenOptions {
|
|
5
5
|
provider?: AgentKind;
|
|
6
6
|
account?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MountedRegistry } from '
|
|
2
|
-
import { errorCode, isConnectionError } from '
|
|
1
|
+
import { MountedRegistry } from './mounted-registry.js';
|
|
2
|
+
import { errorCode, isConnectionError } from './transport.js';
|
|
3
3
|
/* How many items a chat reads at once, on attach and for every page before it. */
|
|
4
4
|
const HISTORY_PAGE = 90;
|
|
5
5
|
/*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ChatBookmark, ChatEvent, ChatHistoryResult, ChatInfo, ChatItem, ChatSubagentItem, ChatToolItem, ChatVisual } from '@adecore/agent-contracts';
|
|
2
|
+
export type ChatHistoryPage = ChatHistoryResult['history'];
|
|
3
|
+
export interface ChatPage {
|
|
4
|
+
history: ChatHistoryPage;
|
|
5
|
+
pending: ChatItem[];
|
|
6
|
+
subagents?: ChatSubagentItem[];
|
|
7
|
+
workflows?: ChatToolItem[];
|
|
8
|
+
outline?: ChatItem[];
|
|
9
|
+
}
|
|
10
|
+
export interface ChatSink {
|
|
11
|
+
historyIdentity?(chatId: string): object | undefined;
|
|
12
|
+
reset(chatId: string, info: ChatInfo, items: ChatItem[], page?: ChatPage): void;
|
|
13
|
+
prepend(chatId: string, cursor: string, page: ChatHistoryResult): void;
|
|
14
|
+
apply(chatId: string, event: ChatEvent): void;
|
|
15
|
+
replay?(chatId: string, events: readonly ChatEvent[]): void;
|
|
16
|
+
status(chatId: string, info: ChatInfo): void;
|
|
17
|
+
bookmarks(chatId: string, bookmarks: ChatBookmark[]): void;
|
|
18
|
+
visuals(chatId: string, visuals: ChatVisual[]): void;
|
|
19
|
+
forget(chatId: string): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { TextareaProps } from '
|
|
1
|
+
import type { TextareaProps } from './host.js';
|
|
2
2
|
export declare function PlainTextarea({ buttonClassName: _buttonClassName, ...props }: TextareaProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ProviderPlatform } from '@adecore/agent-contracts';
|
|
2
|
-
import type { AccountRule } from './
|
|
3
|
-
import { type
|
|
4
|
-
import { type
|
|
2
|
+
import type { AccountRule } from './host.js';
|
|
3
|
+
import { type ChatHost, type CommandLook, type ComposerStatusItem } from './host.js';
|
|
4
|
+
import { type Referables } from './references.js';
|
|
5
5
|
export declare function useHostCodeMode(): 'light' | 'dark';
|
|
6
6
|
export declare function useHostCodeThemes(): {
|
|
7
7
|
light: string;
|
|
@@ -15,7 +15,6 @@ export declare function useHostStreaming(): ReturnType<ChatHost['useStreaming']>
|
|
|
15
15
|
export declare function useHostSendDelivery(): ReturnType<ChatHost['useSendDelivery']>;
|
|
16
16
|
export declare function useHostHidesToolCalls(...args: Parameters<ChatHost['useHidesToolCalls']>): ReturnType<ChatHost['useHidesToolCalls']>;
|
|
17
17
|
export declare function useHostTimelineFind(...args: Parameters<ChatHost['useTimelineFind']>): ReturnType<ChatHost['useTimelineFind']>;
|
|
18
|
-
export declare function useHostReferableChats(): ReturnType<ChatHost['useReferableChats']>;
|
|
19
18
|
export declare function useHostReferables(scopeId: string, chatId: string): Referables;
|
|
20
19
|
export declare function useHostLoginBlocked(...args: Parameters<ChatHost['useLoginBlocked']>): ReturnType<ChatHost['useLoginBlocked']>;
|
|
21
20
|
export declare function useHostExpandingCommands(): ReturnType<NonNullable<ChatHost['useExpandingCommands']>>;
|
|
@@ -24,11 +23,9 @@ export declare function useHostProjectLook(...args: Parameters<ChatHost['useProj
|
|
|
24
23
|
export declare function useHostMachineLabel(...args: Parameters<ChatHost['useMachineLabel']>): ReturnType<ChatHost['useMachineLabel']>;
|
|
25
24
|
export declare function useHostChatPlace(...args: Parameters<ChatHost['useChatPlace']>): ReturnType<ChatHost['useChatPlace']>;
|
|
26
25
|
export declare function useHostContextSources(...args: Parameters<ChatHost['useContextSources']>): ReturnType<ChatHost['useContextSources']>;
|
|
27
|
-
export declare function useHostHidesFolder(...args: Parameters<ChatHost['useHidesFolder']>): ReturnType<ChatHost['useHidesFolder']>;
|
|
28
26
|
export declare function useHostWelcome(...args: Parameters<ChatHost['useWelcome']>): ReturnType<ChatHost['useWelcome']>;
|
|
29
27
|
export declare function useHostResumeAtReset(...args: Parameters<ChatHost['useResumeAtReset']>): ReturnType<ChatHost['useResumeAtReset']>;
|
|
30
28
|
export declare function useHostComposerPlaceholder(...args: Parameters<ChatHost['useComposerPlaceholder']>): ReturnType<ChatHost['useComposerPlaceholder']>;
|
|
31
|
-
export declare function useHostComposerSendActions(scopeId: string, chatId: string): readonly ComposerSendAction[];
|
|
32
29
|
export declare function useHostComposerStatus(scopeId: string, chatId: string): readonly ComposerStatusItem[];
|
|
33
30
|
export declare function useHostThreadCards(...args: Parameters<ChatHost['useThreadCards']>): ReturnType<ChatHost['useThreadCards']>;
|
|
34
31
|
export declare function useHostReplyAuthor(...args: Parameters<ChatHost['useReplyAuthor']>): ReturnType<ChatHost['useReplyAuthor']>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use no memo';
|
|
2
2
|
|
|
3
|
-
import { referablesOfChats } from './chat/chat-references.js';
|
|
4
3
|
import { useChatHost } from './host.js';
|
|
4
|
+
import { referablesOfChats } from './references.js';
|
|
5
5
|
export function useHostCodeMode() {
|
|
6
6
|
return useChatHost().code.useMode();
|
|
7
7
|
}
|
|
@@ -32,7 +32,7 @@ export function useHostHidesToolCalls(...args) {
|
|
|
32
32
|
export function useHostTimelineFind(...args) {
|
|
33
33
|
return useChatHost().useTimelineFind(...args);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
function useHostReferableChats() {
|
|
36
36
|
return useChatHost().useReferableChats();
|
|
37
37
|
}
|
|
38
38
|
const useReferablesFromChats = (_scopeId, _chatId) => referablesOfChats(useHostReferableChats());
|
|
@@ -46,13 +46,11 @@ export function useHostLoginBlocked(...args) {
|
|
|
46
46
|
}
|
|
47
47
|
const NO_EXPANDING = [];
|
|
48
48
|
const noExpanding = () => NO_EXPANDING;
|
|
49
|
-
/* None where the host has no commands of its own. */
|
|
50
49
|
export function useHostExpandingCommands() {
|
|
51
50
|
const useExpanding = useChatHost().useExpandingCommands ?? noExpanding;
|
|
52
51
|
return useExpanding();
|
|
53
52
|
}
|
|
54
53
|
const noPlatform = () => null;
|
|
55
|
-
/* Null where the host does not say, as it need not. */
|
|
56
54
|
export function useHostMachinePlatform(scopeId) {
|
|
57
55
|
const useMachinePlatform = useChatHost().useMachinePlatform ?? noPlatform;
|
|
58
56
|
return useMachinePlatform(scopeId);
|
|
@@ -69,9 +67,6 @@ export function useHostChatPlace(...args) {
|
|
|
69
67
|
export function useHostContextSources(...args) {
|
|
70
68
|
return useChatHost().useContextSources(...args);
|
|
71
69
|
}
|
|
72
|
-
export function useHostHidesFolder(...args) {
|
|
73
|
-
return useChatHost().useHidesFolder(...args);
|
|
74
|
-
}
|
|
75
70
|
export function useHostWelcome(...args) {
|
|
76
71
|
return useChatHost().useWelcome(...args);
|
|
77
72
|
}
|
|
@@ -81,12 +76,6 @@ export function useHostResumeAtReset(...args) {
|
|
|
81
76
|
export function useHostComposerPlaceholder(...args) {
|
|
82
77
|
return useChatHost().useComposerPlaceholder(...args);
|
|
83
78
|
}
|
|
84
|
-
const NO_SEND_ACTIONS = [];
|
|
85
|
-
const noSendActions = () => NO_SEND_ACTIONS;
|
|
86
|
-
export function useHostComposerSendActions(scopeId, chatId) {
|
|
87
|
-
const useSendActions = useChatHost().useComposerSendActions ?? noSendActions;
|
|
88
|
-
return useSendActions(scopeId, chatId);
|
|
89
|
-
}
|
|
90
79
|
const NO_STATUS = [];
|
|
91
80
|
const noStatus = () => NO_STATUS;
|
|
92
81
|
export function useHostComposerStatus(scopeId, chatId) {
|