@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.0",
|
|
4
4
|
"description": "React agent chat threads, composers, approvals, provider accounts and usage views.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"default": "./dist/chat/ui/index.js"
|
|
21
21
|
},
|
|
22
22
|
"./prompts": {
|
|
23
|
-
"source": "./src/prompts/index.ts",
|
|
24
|
-
"types": "./dist/prompts/index.d.ts",
|
|
25
|
-
"default": "./dist/prompts/index.js"
|
|
23
|
+
"source": "./src/chat/prompts/index.ts",
|
|
24
|
+
"types": "./dist/chat/prompts/index.d.ts",
|
|
25
|
+
"default": "./dist/chat/prompts/index.js"
|
|
26
26
|
},
|
|
27
27
|
"./providers": {
|
|
28
28
|
"source": "./src/providers/index.ts",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"test:visuals": "bun --config=integration.bunfig.toml --conditions=source test ./src/chat/visual-viewport.integration.test.ts"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@adecore/agent-contracts": "0.
|
|
76
|
-
"@adecore/editor": "0.
|
|
77
|
-
"@adecore/editor-react": "0.
|
|
78
|
-
"@adecore/intelligent-ui": "0.
|
|
79
|
-
"@adecore/merge": "0.
|
|
80
|
-
"@adecore/utils": "0.
|
|
75
|
+
"@adecore/agent-contracts": "0.63.0",
|
|
76
|
+
"@adecore/editor": "0.63.0",
|
|
77
|
+
"@adecore/editor-react": "0.63.0",
|
|
78
|
+
"@adecore/intelligent-ui": "0.63.0",
|
|
79
|
+
"@adecore/merge": "0.63.0",
|
|
80
|
+
"@adecore/utils": "0.63.0",
|
|
81
81
|
"@codemirror/commands": "^6.11.1",
|
|
82
82
|
"@codemirror/language": "^6.13.1",
|
|
83
83
|
"@codemirror/state": "^6.7.6",
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"zustand": "^5.0.16"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@adecore/ui": "^0.
|
|
104
|
+
"@adecore/ui": "^0.63.0",
|
|
105
105
|
"i18next": "^26.4.2",
|
|
106
106
|
"react": "^19.3.0",
|
|
107
107
|
"react-dom": "^19.3.0",
|
|
108
108
|
"react-i18next": "^17.0.15"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@adecore/ui": "0.
|
|
111
|
+
"@adecore/ui": "0.63.0",
|
|
112
112
|
"@types/bun": "^1.4.4",
|
|
113
113
|
"@types/react": "^19.3.0",
|
|
114
114
|
"@types/react-dom": "^19.3.0",
|
|
@@ -130,6 +130,13 @@
|
|
|
130
130
|
"url": "https://github.com/basmilius/adecore/issues"
|
|
131
131
|
},
|
|
132
132
|
"homepage": "https://adecore.dev/agents-react/",
|
|
133
|
+
"adecore": {
|
|
134
|
+
"dedupe": [
|
|
135
|
+
"@codemirror/*",
|
|
136
|
+
"@lezer/*",
|
|
137
|
+
"shiki"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
133
140
|
"files": [
|
|
134
141
|
"dist",
|
|
135
142
|
"src",
|
package/src/agents/AgentIcon.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { Icon } from '@adecore/ui';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { Bot } from 'lucide-react';
|
|
5
5
|
import { siClaude, siGithubcopilot, siGooglegemini } from 'simple-icons';
|
|
6
|
-
import { type AgentMark,
|
|
6
|
+
import { type AgentMark, useChatHost } from '../host/host';
|
|
7
7
|
import { PROVIDER_PATHS } from './provider-paths';
|
|
8
8
|
|
|
9
9
|
// simple-icons removed OpenAI's mark at its request, so Codex reuses the usage page's path.
|
|
@@ -17,7 +17,7 @@ const BUILT_IN_MARKS: Partial<Record<AgentKind, AgentMark>> = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export function AgentIcon({ kind, size = 14, className }: { kind: AgentKind; size?: number; className?: string }) {
|
|
20
|
-
const mark =
|
|
20
|
+
const mark = useChatHost().agentMarks?.[kind] ?? BUILT_IN_MARKS[kind];
|
|
21
21
|
|
|
22
22
|
if (!mark) {
|
|
23
23
|
return <Icon icon={Bot} size={size} className={className} />;
|
package/src/agents/accounts.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { orderedAccountIds, type AgentKind, type ProviderAccount, type ProviderAccounts, type ProviderAccountStatus } from '@adecore/agent-contracts';
|
|
2
2
|
import i18next from 'i18next';
|
|
3
|
-
import type { AccentChoice, ChatHost } from '../host';
|
|
3
|
+
import type { AccentChoice, AccountRule, ChatHost } from '../host/host';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* An account wears one of the host's accents, so the app paints from one palette. A color that is none
|
|
@@ -52,9 +52,6 @@ export function movedIds(ids: readonly string[], id: string, to: number): string
|
|
|
52
52
|
return [...rest.slice(0, place), id, ...rest.slice(place)];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/* What a project says about the accounts of each CLI: the one its new chats start on, and those it never offers. */
|
|
56
|
-
export type AccountRule = Partial<Record<string, { default?: string; off?: readonly string[] }>>;
|
|
57
|
-
|
|
58
55
|
/* The accounts a project offers, as `offeredAccounts` gives them; the one in use stays even when the project turned it off. */
|
|
59
56
|
export function projectOffered(
|
|
60
57
|
entries: readonly AccountEntry[],
|
|
@@ -93,7 +90,7 @@ export function accountLoginOf(accounts: ProviderAccounts | null | undefined, ki
|
|
|
93
90
|
return accounts?.chatLogins?.includes(kind) === true ? 'chat' : null;
|
|
94
91
|
}
|
|
95
92
|
|
|
96
|
-
|
|
93
|
+
type AccountTone = 'muted' | 'needs-you' | 'error';
|
|
97
94
|
|
|
98
95
|
export const ACCOUNT_TONE_CLASSES: Record<AccountTone, string> = {
|
|
99
96
|
muted: 'text-text-muted',
|
package/src/agents/model-name.ts
CHANGED
|
@@ -32,7 +32,7 @@ export function modelName(slug: string, models: readonly ModelInfo[] | undefined
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/* What an agent picker's chip says: the provider's name beside the model, and whether its mark is the logo of the usage page or the generic icon. */
|
|
35
|
-
|
|
35
|
+
interface AgentChip {
|
|
36
36
|
readonly mark: 'logo' | 'icon';
|
|
37
37
|
readonly name: string;
|
|
38
38
|
readonly model: string;
|
|
@@ -25,7 +25,7 @@ export const PROVIDER_PATHS: Record<UsageProvider, string> = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/* The CLIs drawn with the logo of the usage page rather than their agent mark. */
|
|
28
|
-
export function hasProviderLogo(kind: AgentKind): kind is 'claude' | 'codex' | 'anthropic-claude-api' {
|
|
28
|
+
export function hasProviderLogo(kind: AgentKind | null | undefined): kind is 'claude' | 'codex' | 'anthropic-claude-api' {
|
|
29
29
|
return kind === 'claude' || kind === 'codex' || kind === 'anthropic-claude-api';
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -3,7 +3,7 @@ import { CircleCheck, CircleSlash, CircleX, Hourglass, LoaderCircle, type Lucide
|
|
|
3
3
|
/* The states a piece of work settles into, wherever it is drawn. */
|
|
4
4
|
export type StatusWord = 'running' | 'paused' | 'done' | 'failed' | 'cancelled';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface StatusLook {
|
|
7
7
|
icon: LucideIcon;
|
|
8
8
|
tone: string;
|
|
9
9
|
spins: boolean;
|
|
@@ -27,7 +27,7 @@ export function statusLookOf(word: StatusWord): StatusLook {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* A task as far as its look goes, for an app that hands work to agents as tasks. */
|
|
30
|
-
|
|
30
|
+
interface TaskState {
|
|
31
31
|
status: 'open' | 'done' | 'failed' | 'cancelled';
|
|
32
32
|
/* Set while the child waits out a limit. */
|
|
33
33
|
paused?: object;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import type { AgentKind, ProviderAccounts } from '@adecore/agent-contracts';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
hasAccountChoice,
|
|
6
|
-
offeredAccounts,
|
|
7
|
-
projectDefault,
|
|
8
|
-
projectOffered,
|
|
9
|
-
type AccountEntry,
|
|
10
|
-
type AccountRule
|
|
11
|
-
} from '../agents/accounts';
|
|
12
|
-
import { useHostAccountRule } from '../host-hooks';
|
|
2
|
+
import { accountName, accountsOfKind, hasAccountChoice, offeredAccounts, projectDefault, projectOffered, type AccountEntry } from '../agents/accounts';
|
|
3
|
+
import { type AccountRule } from '../host/host';
|
|
4
|
+
import { useHostAccountRule } from '../host/host-hooks';
|
|
13
5
|
import { useChatScope } from '../scope';
|
|
14
6
|
import { useProviderAccounts, type ProviderAccountsRow } from '../state/provider-accounts';
|
|
15
7
|
import { useProviders } from '../state/providers';
|
package/src/chat/actions.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
-
import { useChatHost, type ChatActions, type ChatHost } from '../host';
|
|
2
|
+
import { useChatHost, type ChatActions, type ChatHost } from '../host/host';
|
|
3
3
|
import { useChatScope, type ChatScope } from '../scope';
|
|
4
4
|
import { ChatTransportError, type ChatTransport } from '../transport';
|
|
5
5
|
|
|
6
6
|
/* Every action as the request a chat host answers, for an app that runs them through nothing of its own. */
|
|
7
|
-
|
|
7
|
+
function transportActions(transport: ChatTransport): ChatActions {
|
|
8
8
|
return {
|
|
9
9
|
clear: async (chatId, force) => {
|
|
10
10
|
await transport.request('chat.clear', { chatId, ...(force ? { force: true } : {}) });
|
package/src/chat/attachments.ts
CHANGED
|
@@ -44,7 +44,6 @@ export function formatBytes(bytes: number): string {
|
|
|
44
44
|
return bytesOf(bytes, bytes < 1024 * 1024);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/* Which of the incoming files fit next to what the composer already holds, and why the rest do not. */
|
|
48
47
|
export function checkAttachmentLimits<T extends IncomingFile>(current: number, incoming: T[], currentBytes = 0): AttachmentCheck<T> {
|
|
49
48
|
const accepted: T[] = [];
|
|
50
49
|
const rejected: Array<{ name: string; reason: string }> = [];
|
|
@@ -123,7 +122,6 @@ export async function readAttachments(files: File[]): Promise<ChatAttachmentUplo
|
|
|
123
122
|
);
|
|
124
123
|
}
|
|
125
124
|
|
|
126
|
-
/* Files the host already stored for a chat, back as uploads the composer can hold again. */
|
|
127
125
|
export async function readStoredAttachments(
|
|
128
126
|
read: (attachment: ChatAttachment) => Promise<Blob>,
|
|
129
127
|
stored: readonly ChatAttachment[]
|
package/src/chat/bookmarks.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChatBookmark } from '@adecore/agent-contracts';
|
|
2
2
|
import i18next from 'i18next';
|
|
3
3
|
import { create } from 'zustand';
|
|
4
|
-
import type { ChatHost } from '../host';
|
|
4
|
+
import type { ChatHost } from '../host/host';
|
|
5
5
|
import type { ChatScope } from '../scope';
|
|
6
6
|
import { errorMessage } from '../transport';
|
|
7
7
|
import { jumpToTimelineItem } from './timeline-scroll';
|
|
@@ -1,69 +1,6 @@
|
|
|
1
|
+
import type { Referable, Referables } from '../host/references';
|
|
1
2
|
import type { ReferenceToken } from './mentions';
|
|
2
3
|
|
|
3
|
-
/* Another chat a message may point at, under the name it has right now. */
|
|
4
|
-
export interface ProjectChat {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type ReferableKind =
|
|
10
|
-
| 'project'
|
|
11
|
-
| 'canvas'
|
|
12
|
-
| 'design'
|
|
13
|
-
| 'chat'
|
|
14
|
-
| 'terminal'
|
|
15
|
-
| 'note'
|
|
16
|
-
| 'text'
|
|
17
|
-
| 'drawing'
|
|
18
|
-
| 'diagram'
|
|
19
|
-
| 'browser'
|
|
20
|
-
| 'device'
|
|
21
|
-
| 'file'
|
|
22
|
-
| 'database';
|
|
23
|
-
|
|
24
|
-
/* One place on the way to a reference, such as the project or the canvas it stands in. */
|
|
25
|
-
export interface ReferenceStep {
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
kind: ReferableKind;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* The heading a reference is offered under when a host offers more than one project. */
|
|
32
|
-
export interface ReferenceSection {
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
/* The project of the chat that asks, which comes first and says so. */
|
|
36
|
-
current?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* What a message may point at with `#`, under the name it has right now. */
|
|
40
|
-
export interface Referable {
|
|
41
|
-
id: string;
|
|
42
|
-
name: string;
|
|
43
|
-
kind: ReferableKind;
|
|
44
|
-
/* What tells it apart from another of the same name, such as the canvas it stands on; absent when its kind does. */
|
|
45
|
-
detail?: string;
|
|
46
|
-
/* `canvas` for what stands on the canvas the chat is a node of, `views` for a view of the project. */
|
|
47
|
-
group: 'canvas' | 'views';
|
|
48
|
-
/* Where it stands, outermost first; its chip draws these in front of its name. */
|
|
49
|
-
trail?: readonly ReferenceStep[];
|
|
50
|
-
section?: ReferenceSection;
|
|
51
|
-
/* What it comes down to in the prompt, for a thing from outside the project that nothing else can read. */
|
|
52
|
-
read?(): Promise<string>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface Referables {
|
|
56
|
-
/* The canvas group first, then the views; never the chat that asks. */
|
|
57
|
-
items: readonly Referable[];
|
|
58
|
-
/* The machine only resolves chats, so nothing else is offered. */
|
|
59
|
-
chatsOnly: boolean;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* What a host without views offers: its chats, which every machine takes. */
|
|
63
|
-
export function referablesOfChats(chats: readonly ProjectChat[]): Referables {
|
|
64
|
-
return { items: chats.map((chat) => ({ id: chat.id, name: chat.title, kind: 'chat', group: 'views' })), chatsOnly: true };
|
|
65
|
-
}
|
|
66
|
-
|
|
67
4
|
/*
|
|
68
5
|
* How each id is spelled in a text: under the name it was picked with where `spelled` knows it, else
|
|
69
6
|
* under the name it has now. An id with neither has no token.
|
package/src/chat/drafts.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChatAttachmentUpload } from '@adecore/agent-contracts';
|
|
2
|
+
import { persistedJson } from '../persisted-json';
|
|
2
3
|
import { chatStorageKey, chatStorageLegacyKeys, createChatStore } from '../storage';
|
|
3
4
|
import { checkAttachmentLimits, uploadBytes } from './attachments';
|
|
4
|
-
import { persistedJson } from './persisted-json';
|
|
5
5
|
|
|
6
6
|
const storageKey = (): string => chatStorageKey('drafts');
|
|
7
7
|
|
package/src/chat/forks.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { useChatScope } from '../scope';
|
|
|
3
3
|
import { useChats, type ChatStatuses } from '../state/chats';
|
|
4
4
|
import { forkIdsAfter, forkedTurnIds } from './logic/fork';
|
|
5
5
|
|
|
6
|
-
/* The chats this client holds of one host, which is where the forks it knows of are. */
|
|
7
6
|
function* forkInfosOn(statuses: ChatStatuses, owns: (key: string) => boolean): Generator<ChatInfo> {
|
|
8
7
|
for (const [key, state] of Object.entries(statuses)) {
|
|
9
8
|
if (state.info.forkOf !== undefined && owns(key)) {
|
|
@@ -47,7 +46,6 @@ export function useForkedTurns(chatId: string): ReadonlySet<string> {
|
|
|
47
46
|
return new Set(splitIds(joined));
|
|
48
47
|
}
|
|
49
48
|
|
|
50
|
-
/* The forks that went on after this turn of this chat. */
|
|
51
49
|
export function useForkIdsAfter(chatId: string, turnId: string): string[] {
|
|
52
50
|
const { owns } = useChatScope();
|
|
53
51
|
const select = joinedForks(owns, (infos) => forkIdsAfter(infos, chatId, turnId));
|
package/src/chat/guards.ts
CHANGED
|
@@ -33,7 +33,6 @@ export function pastedTextName(taken: string[]): string {
|
|
|
33
33
|
|
|
34
34
|
export interface PromptGuard {
|
|
35
35
|
count: number;
|
|
36
|
-
// Whether the counter is worth drawing at all.
|
|
37
36
|
visible: boolean;
|
|
38
37
|
tooLong: boolean;
|
|
39
38
|
}
|
|
@@ -80,7 +79,6 @@ const TUI_ONLY = new Set([
|
|
|
80
79
|
'vim'
|
|
81
80
|
]);
|
|
82
81
|
|
|
83
|
-
/* The commands of the CLI's list that mean something in a chat node. */
|
|
84
82
|
export function usableSlashCommands(names: string[]): string[] {
|
|
85
83
|
return names.filter((name) => !TUI_ONLY.has(name));
|
|
86
84
|
}
|
package/src/chat/index.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
// Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
|
|
2
|
-
export { type AccountChoice, useAccountChoice,
|
|
3
|
-
export {
|
|
4
|
-
export { type ChatSendExtras, ChatClient } from '
|
|
5
|
-
export type { ProjectChat, Referable, ReferableKind, Referables } from '
|
|
2
|
+
export { type AccountChoice, useAccountChoice, useNewAccountChoice } from './account-choice';
|
|
3
|
+
export { actionsOf, useChatActions } from './actions';
|
|
4
|
+
export { type ChatSendExtras, ChatClient } from '../chat-client';
|
|
5
|
+
export type { ProjectChat, Referable, ReferableKind, Referables } from '../host/references';
|
|
6
6
|
export { REFERENCE_ICONS } from './ui/reference-icons';
|
|
7
|
-
export { sendFromComposer
|
|
7
|
+
export { sendFromComposer } from './composer-send';
|
|
8
8
|
export { stepEffortFromComposer } from './composer-effort';
|
|
9
|
-
export
|
|
10
|
-
export { EMPTY_DRAFT, useDrafts, readDraft, writeDraft, offerDraft, type ChatDraft } from './drafts';
|
|
9
|
+
export { EMPTY_DRAFT, useDrafts, readDraft, writeDraft, offerDraft } from './drafts';
|
|
11
10
|
export { stripAnsi } from './logic/ansi';
|
|
12
11
|
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
canForkWith,
|
|
15
14
|
forkRefusal,
|
|
16
15
|
summaryRefusal,
|
|
17
16
|
lastSettledTurn,
|
|
@@ -21,19 +20,16 @@ export {
|
|
|
21
20
|
forkShapes,
|
|
22
21
|
type ForkCliChoice,
|
|
23
22
|
forkPayload,
|
|
24
|
-
branchRefusal
|
|
25
|
-
type ForkPoint,
|
|
26
|
-
type ForkWorktreeChoice
|
|
23
|
+
branchRefusal
|
|
27
24
|
} from './logic/fork';
|
|
28
25
|
|
|
29
|
-
export { matchCommandLook, lookRunOf, sentMessageOf
|
|
30
|
-
export {
|
|
26
|
+
export { matchCommandLook, lookRunOf, sentMessageOf } from './logic/command-looks';
|
|
27
|
+
export { type Look } from '../host/timeline-row';
|
|
28
|
+
export { mcpCallOf } from './logic/tool-looks';
|
|
31
29
|
export { handbackReportOf } from './logic/handback';
|
|
32
|
-
export { limitView
|
|
33
|
-
export
|
|
34
|
-
export { type
|
|
35
|
-
export { EMPTY_TARGET, readTimelineTarget, type TimelineTarget } from './logic/timeline-target';
|
|
36
|
-
export { type TimelineRow, summarizeGroup, deriveTimelineRows, type SubagentBranch, type BaseMoved } from './logic/timeline';
|
|
30
|
+
export { limitView } from './logic/limit';
|
|
31
|
+
export { summarizeGroup, deriveTimelineRows } from './logic/timeline';
|
|
32
|
+
export { type TimelineRow, type SubagentBranch } from '../host/timeline-row';
|
|
37
33
|
export { toolSummary, type FileChange } from './logic/tools';
|
|
38
34
|
|
|
39
35
|
export {
|
|
@@ -51,21 +47,10 @@ export {
|
|
|
51
47
|
type WorkflowAgentState,
|
|
52
48
|
type WorkflowAgentPreview,
|
|
53
49
|
type WorkflowCounts,
|
|
54
|
-
type
|
|
55
|
-
type WorkflowPhaseStateKind,
|
|
56
|
-
type WorkflowPhaseTime
|
|
50
|
+
type WorkflowPhaseStateKind
|
|
57
51
|
} from './logic/workflow';
|
|
58
52
|
|
|
59
|
-
export {
|
|
60
|
-
MENTION_DRAG_TYPE,
|
|
61
|
-
LEGACY_MENTION_DRAG_TYPE,
|
|
62
|
-
carriesMentions,
|
|
63
|
-
droppedMentions,
|
|
64
|
-
writeMentionDrag,
|
|
65
|
-
chipText,
|
|
66
|
-
type MentionQuery,
|
|
67
|
-
type ChipSegment
|
|
68
|
-
} from './mentions';
|
|
53
|
+
export { MENTION_DRAG_TYPE, LEGACY_MENTION_DRAG_TYPE, carriesMentions, droppedMentions, writeMentionDrag, chipText } from './mentions';
|
|
69
54
|
|
|
70
55
|
export {
|
|
71
56
|
defaultProvider,
|
|
@@ -84,12 +69,10 @@ export {
|
|
|
84
69
|
type ChatPreferences
|
|
85
70
|
} from './preferences';
|
|
86
71
|
|
|
87
|
-
export
|
|
88
|
-
export {
|
|
89
|
-
export { recentChatMessages, recentSubagentMessages, type RecentChatMessage, type RecentChatMessages } from './recent-messages';
|
|
72
|
+
export { CHAT_READING_WIDTHS, readingWidthLabel, readingWidthHint } from './reading-width';
|
|
73
|
+
export { recentChatMessages, recentSubagentMessages } from './recent-messages';
|
|
90
74
|
export { RUNTIME_MODES, runtimeModeLabel, runtimeModeHint } from './runtime-modes';
|
|
91
|
-
export { CHAT_SEND_KEYS, SEND_AND_NEW_SHORTCUT, sendKeyLabel, sendKeyHint
|
|
92
|
-
export type { StashedAttachment, StashedPrompt, StashedQuote } from './stash';
|
|
75
|
+
export { CHAT_SEND_KEYS, SEND_AND_NEW_SHORTCUT, sendKeyLabel, sendKeyHint } from './send-key';
|
|
93
76
|
export { subagentTitle, summaryWordOf, stopOf, type SubagentStop } from './subagent-list';
|
|
94
77
|
export { waitingOnOf, waitingOnLabel, type WaitingChild, type WaitingOn, type WaitingOnInput } from './waiting-on';
|
|
95
78
|
export { useSubagentSupport } from './subagent-support';
|
|
@@ -106,7 +89,7 @@ export {
|
|
|
106
89
|
type SubagentTrail
|
|
107
90
|
} from './subagent-view';
|
|
108
91
|
|
|
109
|
-
export { stepTimelineMessage, jumpToTimelineItem, type TurnTarget, registerTurnJumper, jumpToTimelineTurn
|
|
110
|
-
export { type StatusWord, statusLookOf, taskStatusWord
|
|
92
|
+
export { stepTimelineMessage, jumpToTimelineItem, type TurnTarget, registerTurnJumper, jumpToTimelineTurn } from './timeline-scroll';
|
|
93
|
+
export { type StatusWord, statusLookOf, taskStatusWord } from '../agents/status-look';
|
|
111
94
|
|
|
112
95
|
export { ChatPromptFeed } from './pending-prompts';
|
package/src/chat/logic/ansi.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatBookmark, ChatItem } from '@adecore/agent-contracts';
|
|
2
|
-
import type { TimelineRow } from '
|
|
2
|
+
import type { TimelineRow } from '../../host/timeline-row';
|
|
3
3
|
|
|
4
4
|
/* What a list calls a bookmark: its name, else the start of the message. */
|
|
5
5
|
export function bookmarkLabel(bookmark: ChatBookmark): string {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChatToolItem } from '@adecore/agent-contracts';
|
|
2
|
-
import type { CommandLook, CommandLookMatch, CommandLookSent, ToolLook } from '../../host';
|
|
2
|
+
import type { CommandLook, CommandLookMatch, CommandLookSent, ToolLook } from '../../host/host';
|
|
3
|
+
import type { Look } from '../../host/timeline-row';
|
|
3
4
|
import { EMBEDDED_CODE_LIMIT, shellCommands, type EmbeddedCode, type ShellSimpleCommand, type ShellWord } from './embedded-code';
|
|
4
5
|
import { matchToolLook } from './tool-looks';
|
|
5
6
|
import { shellCommand } from './tools';
|
|
@@ -19,9 +20,6 @@ export interface CommandLookWord {
|
|
|
19
20
|
readonly option: string | null;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
/* A look of the host's own: a program in a shell call, or an MCP server. */
|
|
23
|
-
export type Look = CommandLook | ToolLook;
|
|
24
|
-
|
|
25
23
|
/* A call read as a look's tool, as its row draws it, whether a shell line or an MCP call. */
|
|
26
24
|
export interface LookRun {
|
|
27
25
|
readonly look: Look;
|
|
@@ -44,7 +42,7 @@ export interface LookRun {
|
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
/* A shell call read as a tool of its own: the first command of the line a look knows. */
|
|
47
|
-
|
|
45
|
+
interface CommandLookRun extends LookRun {
|
|
48
46
|
readonly look: CommandLook;
|
|
49
47
|
readonly match: CommandLookMatch;
|
|
50
48
|
/* The words after the program, quotes taken out. */
|
|
@@ -57,7 +55,6 @@ export interface CommandLookRun extends LookRun {
|
|
|
57
55
|
|
|
58
56
|
const caches = new WeakMap<readonly CommandLook[], Map<string, CommandLookRun | null>>();
|
|
59
57
|
|
|
60
|
-
/* The look of a simple command and what it says about it, or null when no look knows it. */
|
|
61
58
|
function lookOf(command: ShellSimpleCommand, looks: readonly CommandLook[]): { look: CommandLook; match: CommandLookMatch } | null {
|
|
62
59
|
const program = command.program;
|
|
63
60
|
|
|
@@ -142,7 +139,6 @@ function detailOf(source: string, command: ShellSimpleCommand, match: CommandLoo
|
|
|
142
139
|
return { detail, code, words };
|
|
143
140
|
}
|
|
144
141
|
|
|
145
|
-
/* Whether the shell would fill in a part of this source: a `$` or backtick outside single quotes and not escaped. */
|
|
146
142
|
function expandsInShell(source: string): boolean {
|
|
147
143
|
let quote: "'" | '"' | null = null;
|
|
148
144
|
|
|
@@ -4,9 +4,9 @@ export const CONTEXT_OPTION = 'contextWindow';
|
|
|
4
4
|
|
|
5
5
|
export type ContextPart = keyof ChatContextBreakdown;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const CONTEXT_PARTS: readonly ContextPart[] = ['toolOutput', 'filesRead', 'conversation', 'system'];
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
interface ContextSegment {
|
|
10
10
|
part: ContextPart;
|
|
11
11
|
tokens: number;
|
|
12
12
|
/* Of the window, so the segments together fill the bar as far as the context is full. */
|
package/src/chat/logic/effort.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const EFFORT_OPTION = 'effort';
|
|
|
6
6
|
/* `up` is one choice more effort, `down` one less. */
|
|
7
7
|
export type EffortStep = 'up' | 'down';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
type EffortStepResult =
|
|
10
10
|
| { kind: 'stepped'; selection: ModelSelection; choice: ModelOptionChoice }
|
|
11
11
|
/* Already at the end of the model's choices that way, which `choice` names. */
|
|
12
12
|
| { kind: 'edge'; choice: ModelOptionChoice }
|
|
@@ -13,8 +13,7 @@ export const EMBEDDED_CODE_LIMIT = 20_000;
|
|
|
13
13
|
|
|
14
14
|
const MAX_DEPTH = 3;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
export interface ShellSpan {
|
|
16
|
+
interface ShellSpan {
|
|
18
17
|
readonly start: number;
|
|
19
18
|
readonly end: number;
|
|
20
19
|
}
|
|
@@ -27,13 +26,13 @@ export interface ShellWord extends ShellSpan {
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
/* A redirect such as `2>&1` or `> out.txt`, its descriptor included. */
|
|
30
|
-
|
|
29
|
+
interface ShellRedirect extends ShellSpan {
|
|
31
30
|
readonly op: string;
|
|
32
31
|
readonly target: ShellWord;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
/* The `<<'EOF'` of a heredoc, and the lines it feeds the command. */
|
|
36
|
-
|
|
35
|
+
interface ShellHeredoc extends ShellSpan {
|
|
37
36
|
readonly body: ShellSpan;
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -57,9 +56,7 @@ interface SimpleCommand {
|
|
|
57
56
|
|
|
58
57
|
interface Interpreter {
|
|
59
58
|
readonly language: string;
|
|
60
|
-
/* Whether a flag says the next argument is the script. */
|
|
61
59
|
script(flag: string): boolean;
|
|
62
|
-
/* Options that take the next argument as their value. */
|
|
63
60
|
readonly takesValue?: ReadonlySet<string>;
|
|
64
61
|
/* A database client: its arguments name a database, and it reads statements from stdin whatever they are. */
|
|
65
62
|
readonly client?: boolean;
|
|
@@ -149,7 +146,6 @@ function programOf(word: string): string {
|
|
|
149
146
|
return /^python\d*(\.\d+)?$/.test(name) ? 'python' : name;
|
|
150
147
|
}
|
|
151
148
|
|
|
152
|
-
/* Splits `source[from, to)` into simple commands the way a shell would, enough to find the code in them. */
|
|
153
149
|
function parseCommands(source: string, from: number, to: number): SimpleCommand[] {
|
|
154
150
|
const commands: SimpleCommand[] = [];
|
|
155
151
|
let current: SimpleCommand = { words: [], redirects: [], heredocs: [] };
|