@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,7 +1,11 @@
|
|
|
1
|
-
import type { AgentKind, ChatForkPayload, ChatInfo, ChatItem, ModelSelection } from '@adecore/agent-contracts';
|
|
2
|
-
import type { TimelineRow } from '
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { AgentKind, ChatForkPayload, ChatInfo, ChatItem, ModelSelection, ProviderInfo } from '@adecore/agent-contracts';
|
|
2
|
+
import type { TimelineRow } from '../../host/timeline-row.js';
|
|
3
|
+
interface HostProviders {
|
|
4
|
+
readonly providers: readonly ProviderInfo[];
|
|
5
|
+
readonly loaded: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function canForkWith(provider: Pick<ProviderInfo, 'capabilities'>): boolean;
|
|
8
|
+
interface ForkPoint {
|
|
5
9
|
turnId: string;
|
|
6
10
|
number: number;
|
|
7
11
|
total: number;
|
|
@@ -9,7 +13,7 @@ export interface ForkPoint {
|
|
|
9
13
|
last: boolean;
|
|
10
14
|
prompt: string | null;
|
|
11
15
|
}
|
|
12
|
-
export declare function forkRefusal(info: ChatInfo | null, turn: ChatItem | undefined): string | null;
|
|
16
|
+
export declare function forkRefusal(info: ChatInfo | null, turn: ChatItem | undefined, host: HostProviders): string | null;
|
|
13
17
|
export declare function summaryRefusal(state: {
|
|
14
18
|
busy: boolean;
|
|
15
19
|
originalPresent: boolean;
|
|
@@ -22,7 +26,7 @@ export declare function forkPointLabel(point: ForkPoint, maxPrompt?: number): st
|
|
|
22
26
|
export declare function turnIdOfRow(row: TimelineRow): string | null;
|
|
23
27
|
export type ForkShape = 'node' | 'view';
|
|
24
28
|
export declare function forkShapes(origin: ForkShape): ForkShape[];
|
|
25
|
-
|
|
29
|
+
interface ForkWorktreeChoice {
|
|
26
30
|
branch: string;
|
|
27
31
|
filesAfterTurn: boolean;
|
|
28
32
|
}
|
|
@@ -43,3 +47,4 @@ export declare function forkPayload(input: {
|
|
|
43
47
|
};
|
|
44
48
|
}): ChatForkPayload;
|
|
45
49
|
export declare function branchRefusal(branch: string, taken: readonly string[]): string | null;
|
|
50
|
+
export {};
|
package/dist/chat/logic/fork.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
-
/*
|
|
3
|
-
export
|
|
2
|
+
/* Whether a CLI keeps a conversation the host can fork, and go on with in a fork: its `fork` capability. */
|
|
3
|
+
export function canForkWith(provider) {
|
|
4
|
+
return provider.capabilities.fork === true;
|
|
5
|
+
}
|
|
4
6
|
function turnsOf(items, order) {
|
|
5
7
|
return order.flatMap(id => {
|
|
6
8
|
const item = items[id];
|
|
@@ -9,13 +11,18 @@ function turnsOf(items, order) {
|
|
|
9
11
|
}
|
|
10
12
|
/*
|
|
11
13
|
* Why a chat cannot be forked after this turn right now, or null when it can. A turn still running,
|
|
12
|
-
* or any turn in the chat, is a transcript that grows while it would be copied.
|
|
14
|
+
* or any turn in the chat, is a transcript that grows while it would be copied. Until the host named its
|
|
15
|
+
* CLIs, no CLI is known to fork.
|
|
13
16
|
*/
|
|
14
|
-
export function forkRefusal(info, turn) {
|
|
17
|
+
export function forkRefusal(info, turn, host) {
|
|
15
18
|
if (info === null || turn?.kind !== 'turn') {
|
|
16
19
|
return i18next.t('agent-chat:fork.refusal.notInConversation');
|
|
17
20
|
}
|
|
18
|
-
if (!
|
|
21
|
+
if (!host.loaded) {
|
|
22
|
+
return i18next.t('agent-chat:fork.refusal.agentsLoading');
|
|
23
|
+
}
|
|
24
|
+
const provider = host.providers.find(entry => entry.kind === info.provider);
|
|
25
|
+
if (provider === undefined || !canForkWith(provider)) {
|
|
19
26
|
return i18next.t('agent-chat:fork.refusal.cliCannotFork');
|
|
20
27
|
}
|
|
21
28
|
if (info.agentSessionId === null) {
|
|
@@ -26,7 +33,6 @@ export function forkRefusal(info, turn) {
|
|
|
26
33
|
}
|
|
27
34
|
return null;
|
|
28
35
|
}
|
|
29
|
-
/* Why a fork cannot write a summary for its original right now, or null when it can. */
|
|
30
36
|
export function summaryRefusal(state) {
|
|
31
37
|
if (!state.originalPresent) {
|
|
32
38
|
return i18next.t('agent-chat:fork.refusal.originalGone');
|
|
@@ -36,7 +42,6 @@ export function summaryRefusal(state) {
|
|
|
36
42
|
}
|
|
37
43
|
return null;
|
|
38
44
|
}
|
|
39
|
-
/* The forks this client knows of that went on after this turn of this chat, in the order it holds them. */
|
|
40
45
|
export function forkIdsAfter(infos, chatId, turnId) {
|
|
41
46
|
const ids = [];
|
|
42
47
|
for (const info of infos) {
|
|
@@ -46,7 +51,6 @@ export function forkIdsAfter(infos, chatId, turnId) {
|
|
|
46
51
|
}
|
|
47
52
|
return ids;
|
|
48
53
|
}
|
|
49
|
-
/* The turns of this chat that at least one fork this client knows of went on after. */
|
|
50
54
|
export function forkedTurnIds(infos, chatId) {
|
|
51
55
|
const turns = new Set();
|
|
52
56
|
for (const info of infos) {
|
|
@@ -161,7 +165,6 @@ export function forkPayload(input) {
|
|
|
161
165
|
} : {})
|
|
162
166
|
};
|
|
163
167
|
}
|
|
164
|
-
/* Why a branch cannot be the fork's, or null when it can. */
|
|
165
168
|
export function branchRefusal(branch, taken) {
|
|
166
169
|
const name = branch.trim();
|
|
167
170
|
if (name === '') {
|
|
@@ -11,7 +11,7 @@ export type GeneratedImageFailure = {
|
|
|
11
11
|
kind: 'too-large';
|
|
12
12
|
limit: number;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type GeneratedImageView = {
|
|
15
15
|
state: 'generating';
|
|
16
16
|
} | {
|
|
17
17
|
state: 'failed';
|
|
@@ -25,3 +25,4 @@ export type GeneratedImageView = {
|
|
|
25
25
|
export declare function isImageGeneration(tool: ChatToolItem): boolean;
|
|
26
26
|
export declare function generatedImageView(tool: ChatToolItem): GeneratedImageView;
|
|
27
27
|
export declare function attachmentAspect(attachment: ChatAttachment): number | undefined;
|
|
28
|
+
export {};
|
|
@@ -3,7 +3,6 @@ export const IMAGE_GENERATION_TOOL = 'ImageGeneration';
|
|
|
3
3
|
export function isImageGeneration(tool) {
|
|
4
4
|
return tool.name === IMAGE_GENERATION_TOOL;
|
|
5
5
|
}
|
|
6
|
-
/* What the row of an image generation draws, from the tool call alone. */
|
|
7
6
|
export function generatedImageView(tool) {
|
|
8
7
|
if (tool.state === 'running') {
|
|
9
8
|
return {
|
|
@@ -57,7 +56,6 @@ export function generatedImageView(tool) {
|
|
|
57
56
|
transparent: input.transparentBackground === true
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
|
-
/* Width over height, when the attachment carries both. */
|
|
61
59
|
export function attachmentAspect(attachment) {
|
|
62
60
|
return attachment.width !== undefined && attachment.height !== undefined ? attachment.width / attachment.height : undefined;
|
|
63
61
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ChatGoal, ChatGoalAction, ChatInfo, ProviderCapabilities } from '@adecore/agent-contracts';
|
|
2
|
-
|
|
2
|
+
interface GoalView {
|
|
3
3
|
goal: ChatGoal;
|
|
4
4
|
actions: ChatGoalAction[];
|
|
5
5
|
}
|
|
6
6
|
export declare function goalView(info: Pick<ChatInfo, 'goal' | 'activeTurnId'>, goals: ProviderCapabilities['goals'], canAct: boolean): GoalView | null;
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ChatInfo } from '@adecore/agent-contracts';
|
|
2
|
-
|
|
2
|
+
interface LimitView {
|
|
3
3
|
pill: string;
|
|
4
4
|
title: string;
|
|
5
5
|
detail: string | null;
|
|
6
6
|
}
|
|
7
7
|
export declare function limitView(info: Pick<ChatInfo, 'limit' | 'resumeAt' | 'activeTurnId'>, now: number): LimitView | null;
|
|
8
|
+
export {};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function inPickerOrder<T extends {
|
|
3
|
-
kind: AgentKind;
|
|
4
|
-
name: string;
|
|
5
|
-
}>(providers: readonly T[]): T[];
|
|
6
|
-
export declare function separatesGroups(previous: AgentKind | undefined, kind: AgentKind): boolean;
|
|
7
|
-
export declare const COMPACT_MODEL_LIMIT = 8;
|
|
1
|
+
import type { AgentKind, ModelInfo, ProviderInfo } from '@adecore/agent-contracts';
|
|
8
2
|
export type PickerEntry = {
|
|
9
3
|
kind: 'model';
|
|
10
4
|
provider: ProviderInfo;
|
|
@@ -18,12 +12,11 @@ export type PickerEntry = {
|
|
|
18
12
|
count: number;
|
|
19
13
|
open: boolean;
|
|
20
14
|
};
|
|
21
|
-
|
|
15
|
+
interface PickerCurrent {
|
|
22
16
|
provider: AgentKind;
|
|
23
17
|
model: string;
|
|
24
18
|
}
|
|
25
|
-
|
|
26
|
-
export declare function modelsByVendor(models: ModelInfo[]): ModelInfo[];
|
|
19
|
+
type FavoritesOf = (kind: AgentKind) => ReadonlySet<string>;
|
|
27
20
|
export declare function favoritesFirst(models: ModelInfo[], favorites: ReadonlySet<string>): ModelInfo[];
|
|
28
21
|
export declare function shortlistOf(kind: AgentKind, models: ModelInfo[], current: PickerCurrent | null, favorites?: ReadonlySet<string>): ModelInfo[] | null;
|
|
29
22
|
export declare function wantsModelSearch(providers: readonly ProviderInfo[]): boolean;
|
|
@@ -32,3 +25,4 @@ export declare function searchModels(providers: readonly ProviderInfo[], query:
|
|
|
32
25
|
models: ModelInfo[];
|
|
33
26
|
}>;
|
|
34
27
|
export declare function pickerEntriesOf(providers: readonly ProviderInfo[], query: string, legacyOpen: boolean, expanded?: ReadonlySet<AgentKind>, current?: PickerCurrent | null, favoritesOf?: FavoritesOf): PickerEntry[];
|
|
28
|
+
export {};
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import { pickerGroupsOf, providerGroupOf } from '@adecore/agent-contracts';
|
|
2
1
|
import { nameCollator } from '@adecore/ui/format';
|
|
3
|
-
/* The providers in the order a picker lists them: the frontier labs, the rest, then the API providers, each by name. */
|
|
4
|
-
export function inPickerOrder(providers) {
|
|
5
|
-
const groups = pickerGroupsOf(providers);
|
|
6
|
-
return [...groups.frontier, ...groups.others, ...groups.api];
|
|
7
|
-
}
|
|
8
|
-
/* Whether a separator goes between two providers next to each other in that order: where one group ends. */
|
|
9
|
-
export function separatesGroups(previous, kind) {
|
|
10
|
-
return previous !== undefined && providerGroupOf(previous) !== providerGroupOf(kind);
|
|
11
|
-
}
|
|
12
2
|
/*
|
|
13
3
|
* A provider with more live models than this keeps the list short: the model that is picked and the default,
|
|
14
4
|
* with the rest behind one row that opens all of them. A list of three hundred models is not one to scroll.
|
|
15
5
|
*/
|
|
16
|
-
|
|
6
|
+
const COMPACT_MODEL_LIMIT = 8;
|
|
17
7
|
const NO_FAVORITES = () => new Set();
|
|
18
8
|
const VENDOR_ORDER = {
|
|
19
9
|
sensitivity: 'base'
|
|
@@ -29,7 +19,7 @@ function matches(model, query) {
|
|
|
29
19
|
* By maker, then by name, when the provider says who made its models; a list with no makers keeps the order
|
|
30
20
|
* it came in. A model with no maker goes last, so the ones that have one read as groups.
|
|
31
21
|
*/
|
|
32
|
-
|
|
22
|
+
function modelsByVendor(models) {
|
|
33
23
|
if (!models.some(model => model.vendor !== undefined)) {
|
|
34
24
|
return models;
|
|
35
25
|
}
|
|
@@ -42,7 +32,6 @@ export function modelsByVendor(models) {
|
|
|
42
32
|
return vendorOrder(a.vendor, b.vendor) || modelOrder(a.name, b.name);
|
|
43
33
|
});
|
|
44
34
|
}
|
|
45
|
-
/* The starred models first, in the order they came, then the rest by maker. */
|
|
46
35
|
export function favoritesFirst(models, favorites) {
|
|
47
36
|
if (favorites.size === 0) {
|
|
48
37
|
return modelsByVendor(models);
|
|
@@ -54,7 +54,6 @@ export function resumeCompactionDueAt(input) {
|
|
|
54
54
|
const endedAt = offerableTurn(input)?.endedAt ?? null;
|
|
55
55
|
return endedAt === null ? null : dueAtOf(input.info, endedAt);
|
|
56
56
|
}
|
|
57
|
-
/* Whether to offer compacting before the next message. */
|
|
58
57
|
export function resumeCompactionOffer(input) {
|
|
59
58
|
const turn = offerableTurn(input);
|
|
60
59
|
if (turn === null || turn.endedAt === null || input.now < dueAtOf(input.info, turn.endedAt)) {
|
|
@@ -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.js';
|
|
3
3
|
export type TickKind = 'person' | 'wake' | 'bookmark';
|
|
4
4
|
export interface ScrubberTick {
|
|
5
5
|
id: string;
|
|
@@ -17,7 +17,7 @@ export declare const STRIP_INSET_PX = 8;
|
|
|
17
17
|
export declare const STRIP_CLEARANCE_PX: number;
|
|
18
18
|
export declare const EARLIER_ROW = -1;
|
|
19
19
|
export declare function ticksOf(rows: readonly TimelineRow[], marks?: ReadonlyMap<string, ChatBookmark>, earlier?: readonly ChatItem[], bookmarks?: readonly ChatBookmark[]): ScrubberTick[];
|
|
20
|
-
|
|
20
|
+
interface TickSlot {
|
|
21
21
|
first: number;
|
|
22
22
|
last: number;
|
|
23
23
|
kind: TickKind;
|
|
@@ -25,7 +25,7 @@ export interface TickSlot {
|
|
|
25
25
|
found: boolean;
|
|
26
26
|
y: number;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
interface ScrubberLayout {
|
|
29
29
|
top: number;
|
|
30
30
|
pitch: number;
|
|
31
31
|
count: number;
|
|
@@ -38,12 +38,12 @@ export declare function messageAt(layout: ScrubberLayout, y: number): number | n
|
|
|
38
38
|
export declare function slotOf(layout: ScrubberLayout, message: number): number | null;
|
|
39
39
|
export declare function tickWidth(kind: TickKind, distanceFromPointer: number | null): number;
|
|
40
40
|
type MessageStarts = Pick<readonly number[], 'length' | 'at'>;
|
|
41
|
-
|
|
41
|
+
interface ReadingPosition {
|
|
42
42
|
starts: MessageStarts;
|
|
43
43
|
scrollTop: number;
|
|
44
44
|
visibleHeight: number;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
interface MessageRange {
|
|
47
47
|
first: number;
|
|
48
48
|
last: number;
|
|
49
49
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '../../host/timeline-row.js';
|
|
1
2
|
import { DEFAULT_READING_WIDTH, readingMeasure } from '../reading-width.js';
|
|
2
3
|
import { agentTurnLabel } from './timeline.js';
|
|
3
4
|
/* With fewer messages than this the thread is short enough to scroll through, and the strip is noise. */
|
|
@@ -181,7 +182,6 @@ export function tickOfRow(ticks, rowIndex) {
|
|
|
181
182
|
}
|
|
182
183
|
return Math.max(0, lastIndexAtOrBelow(ticks.length, index => ticks[index].rowIndex, rowIndex));
|
|
183
184
|
}
|
|
184
|
-
/* Per tick, whether any of the rows has a find hit in its stretch. */
|
|
185
185
|
export function ticksWithHits(ticks, hitRows) {
|
|
186
186
|
const found = ticks.map(() => false);
|
|
187
187
|
for (const row of hitRows) {
|
|
@@ -256,7 +256,6 @@ function lastIndexAtOrBelow(length, valueAt, limit) {
|
|
|
256
256
|
}
|
|
257
257
|
return found;
|
|
258
258
|
}
|
|
259
|
-
/* The last index whose start lies at or above a line, or -1. */
|
|
260
259
|
function lastAtOrAbove(starts, line) {
|
|
261
260
|
return lastIndexAtOrBelow(starts.length, index => starts.at(index), line);
|
|
262
261
|
}
|
|
@@ -284,7 +283,6 @@ export function messagesInView({
|
|
|
284
283
|
last: Math.max(first, last)
|
|
285
284
|
};
|
|
286
285
|
}
|
|
287
|
-
/* Whether a drawn tick covers any of the messages on screen. */
|
|
288
286
|
export function slotInView(slot, range) {
|
|
289
287
|
return range !== null && slot.last >= range.first && slot.first <= range.last;
|
|
290
288
|
}
|
|
@@ -4,7 +4,6 @@ const HEADING_LINE = /^[ \t]*\*\*([^*\n]+?)\*\*[ \t]*$/;
|
|
|
4
4
|
const LIST_MARKER = /^[ \t]*(?:[-*+]|\d+[.)])[ \t]+/gm;
|
|
5
5
|
// A sentence ends on a stop with white space after it, so `a.ts` and `1.5` stay whole.
|
|
6
6
|
const SENTENCE_END = /[.!?]["'”’)\]]*(?=\s)/;
|
|
7
|
-
/* The thought as one line of plain text: the marks gone and every run of white space one space. */
|
|
8
7
|
export function flattenThought(text) {
|
|
9
8
|
return stripMarkdown(text.replace(LIST_MARKER, '')).replace(/\s+/g, ' ').trim();
|
|
10
9
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ChatVisual } from '@adecore/agent-contracts';
|
|
2
|
-
import type { ThreadCard } from '../../host.js';
|
|
3
|
-
import type { TimelineRow } from '
|
|
4
|
-
|
|
2
|
+
import type { ThreadCard } from '../../host/host.js';
|
|
3
|
+
import type { TimelineRow } from '../../host/timeline-row.js';
|
|
4
|
+
interface TimedRow {
|
|
5
5
|
at: number;
|
|
6
6
|
row: TimelineRow;
|
|
7
7
|
}
|
|
8
8
|
export declare function cardRows(cards: readonly ThreadCard[]): TimedRow[];
|
|
9
|
-
export declare function visualRows(visuals: readonly ChatVisual[], heldFrom?: number | null): TimedRow[];
|
|
10
9
|
export declare function withTimedRows(rows: TimelineRow[], timed: readonly TimedRow[]): TimelineRow[];
|
|
11
10
|
export declare function timedRowsOf(cards: readonly ThreadCard[], visuals: readonly ChatVisual[] | null, heldFrom?: number | null): TimedRow[];
|
|
11
|
+
export {};
|
|
@@ -45,7 +45,7 @@ export function cardRows(cards) {
|
|
|
45
45
|
* client holds began, while there is a page before it: a visual from before then belongs to that
|
|
46
46
|
* page and waits for it, rather than stacking up at the top of the thread.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
function visualRows(visuals, heldFrom = null) {
|
|
49
49
|
return visuals.filter(visual => heldFrom === null || visual.at >= heldFrom).map(visual => ({
|
|
50
50
|
at: visual.at,
|
|
51
51
|
row: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TimelineRow } from '
|
|
1
|
+
import type { TimelineRow } from '../../host/timeline-row.js';
|
|
2
2
|
export declare function stripMarkdown(text: string): string;
|
|
3
3
|
export declare function messageTextOf(row: TimelineRow): string | null;
|
|
4
4
|
export declare function markdownOf(row: TimelineRow): string | null;
|
|
@@ -6,12 +6,10 @@ import { stripAnsi } from './ansi.js';
|
|
|
6
6
|
export function stripMarkdown(text) {
|
|
7
7
|
return text.replace(/^ *```[^\n]*\n?/gm, '').replace(/^ *(#{1,6}) +/gm, '').replace(/^ *> ?/gm, '').replace(/!\[([^\]]*)\]\([^)]*\)/g, '$1').replace(/\[([^\]]*)\]\([^)]*\)/g, '$1').replace(/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, '$2').replace(/\*(?=\S)([^*\n]*\S)\*/g, '$1').replace(/`+([^`]+)`+/g, '$1').trim();
|
|
8
8
|
}
|
|
9
|
-
/* What a tool call has to show for itself: what it answered, or what it has answered so far. */
|
|
10
9
|
function outputOf(tool) {
|
|
11
10
|
const output = tool.output ?? tool.progress?.output ?? null;
|
|
12
11
|
return output === null ? null : stripAnsi(output);
|
|
13
12
|
}
|
|
14
|
-
/* The whole item under the pointer as plain text, or null for a row that carries no message. */
|
|
15
13
|
export function messageTextOf(row) {
|
|
16
14
|
switch (row.kind) {
|
|
17
15
|
case 'user':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChatItem, ChatUiChoiceOrigin } from '@adecore/agent-contracts';
|
|
2
|
-
import type { FileRef } from '../../host.js';
|
|
3
|
-
import type { TimelineRow } from '
|
|
2
|
+
import type { FileRef } from '../../host/host.js';
|
|
3
|
+
import type { TimelineRow } from '../../host/timeline-row.js';
|
|
4
4
|
export interface TimelineTarget {
|
|
5
5
|
selection: string;
|
|
6
6
|
row: TimelineRow | null;
|
|
@@ -17,7 +17,7 @@ export declare const EMPTY_TARGET: TimelineTarget;
|
|
|
17
17
|
export declare function withCurrentText(rows: TimelineRow[], items: Record<string, ChatItem> | undefined): TimelineRow[];
|
|
18
18
|
export declare function readTimelineTarget(element: HTMLElement, scroller: HTMLElement | null, rows: TimelineRow[]): TimelineTarget;
|
|
19
19
|
export type UiReplyTarget = Pick<ChatUiChoiceOrigin, 'itemId' | 'blockId' | 'revision'>;
|
|
20
|
-
|
|
20
|
+
type UiReplyJump = {
|
|
21
21
|
kind: 'missing' | 'earlier';
|
|
22
22
|
} | {
|
|
23
23
|
kind: 'turn';
|
|
@@ -28,3 +28,4 @@ export type UiReplyJump = {
|
|
|
28
28
|
};
|
|
29
29
|
export declare function uiReplyJump(target: UiReplyTarget, rows: readonly TimelineRow[], items: Record<string, ChatItem> | undefined, expandedTurns: ReadonlySet<string>, hasEarlier: boolean): UiReplyJump;
|
|
30
30
|
export declare function revealUiReplyBlock(scroller: HTMLElement, target: UiReplyTarget): boolean;
|
|
31
|
+
export {};
|
|
@@ -31,7 +31,6 @@ export function withCurrentText(rows, items) {
|
|
|
31
31
|
return row;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
/* The row a click landed in is the one whose id it sits under; the rest comes from the same walk up. */
|
|
35
34
|
export function readTimelineTarget(element, scroller, rows) {
|
|
36
35
|
const id = element.closest('[data-item-id]')?.dataset.itemId;
|
|
37
36
|
const file = element.closest('[data-file-path]');
|
|
@@ -1,132 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CommandLook,
|
|
3
|
-
import {
|
|
4
|
-
export interface SubagentBranch {
|
|
5
|
-
id: string;
|
|
6
|
-
item: ChatSubagentItem;
|
|
7
|
-
children: ChatItem[];
|
|
8
|
-
nested: SubagentBranch[];
|
|
9
|
-
expanded: boolean;
|
|
10
|
-
}
|
|
11
|
-
export type TimelineRow = {
|
|
12
|
-
kind: 'user';
|
|
13
|
-
id: string;
|
|
14
|
-
item: ChatUserItem;
|
|
15
|
-
} | {
|
|
16
|
-
kind: 'turn-start';
|
|
17
|
-
id: string;
|
|
18
|
-
turn: ChatTurnItem;
|
|
19
|
-
label: string;
|
|
20
|
-
} | {
|
|
21
|
-
kind: 'assistant';
|
|
22
|
-
id: string;
|
|
23
|
-
item: ChatAssistantItem;
|
|
24
|
-
} | {
|
|
25
|
-
kind: 'report';
|
|
26
|
-
id: string;
|
|
27
|
-
text: string;
|
|
28
|
-
} | {
|
|
29
|
-
kind: 'thinking';
|
|
30
|
-
id: string;
|
|
31
|
-
item: ChatThinkingItem;
|
|
32
|
-
} | {
|
|
33
|
-
kind: 'work';
|
|
34
|
-
id: string;
|
|
35
|
-
tool: ChatToolItem;
|
|
36
|
-
} | {
|
|
37
|
-
kind: 'work-group';
|
|
38
|
-
id: string;
|
|
39
|
-
tools: ChatToolItem[];
|
|
40
|
-
summary: string;
|
|
41
|
-
expanded: boolean;
|
|
42
|
-
look?: Look;
|
|
43
|
-
} | {
|
|
44
|
-
kind: 'work-live';
|
|
45
|
-
id: string;
|
|
46
|
-
tool: ChatToolItem;
|
|
47
|
-
} | {
|
|
48
|
-
kind: 'live-thought';
|
|
49
|
-
id: string;
|
|
50
|
-
item: ChatThinkingItem;
|
|
51
|
-
at: number;
|
|
52
|
-
} | {
|
|
53
|
-
kind: 'workflow';
|
|
54
|
-
id: string;
|
|
55
|
-
tool: ChatToolItem;
|
|
56
|
-
workflow: ChatWorkflow;
|
|
57
|
-
} | ({
|
|
58
|
-
kind: 'subagent';
|
|
59
|
-
} & SubagentBranch) | {
|
|
60
|
-
kind: 'approval';
|
|
61
|
-
id: string;
|
|
62
|
-
item: ChatApprovalItem;
|
|
63
|
-
} | {
|
|
64
|
-
kind: 'question';
|
|
65
|
-
id: string;
|
|
66
|
-
item: ChatQuestionItem;
|
|
67
|
-
} | {
|
|
68
|
-
kind: 'note';
|
|
69
|
-
id: string;
|
|
70
|
-
level: 'info' | 'warning' | 'error';
|
|
71
|
-
text: string;
|
|
72
|
-
from?: string;
|
|
73
|
-
said?: true;
|
|
74
|
-
} | {
|
|
75
|
-
kind: 'message';
|
|
76
|
-
id: string;
|
|
77
|
-
message: ChatNoteMessage;
|
|
78
|
-
createdAt: number;
|
|
79
|
-
} | {
|
|
80
|
-
kind: 'sent';
|
|
81
|
-
id: string;
|
|
82
|
-
tool: ChatToolItem;
|
|
83
|
-
sent: CommandLookSent;
|
|
84
|
-
} | {
|
|
85
|
-
kind: 'compaction';
|
|
86
|
-
id: string;
|
|
87
|
-
preTokens: number | null;
|
|
88
|
-
postTokens?: number;
|
|
89
|
-
} | {
|
|
90
|
-
kind: 'selection-switch';
|
|
91
|
-
id: string;
|
|
92
|
-
from: ModelSelection;
|
|
93
|
-
to: ModelSelection;
|
|
94
|
-
} | {
|
|
95
|
-
kind: 'changed-files';
|
|
96
|
-
id: string;
|
|
97
|
-
turnId: string;
|
|
98
|
-
tools: ChatToolItem[];
|
|
99
|
-
diff: ChatCheckpointDiff | null;
|
|
100
|
-
checkpoint: boolean;
|
|
101
|
-
baseMoved?: BaseMoved;
|
|
102
|
-
heldBack?: boolean;
|
|
103
|
-
} | {
|
|
104
|
-
kind: 'turn-fold';
|
|
105
|
-
id: string;
|
|
106
|
-
turn: ChatTurnItem;
|
|
107
|
-
label: string;
|
|
108
|
-
work: string[];
|
|
109
|
-
hiddenCount: number;
|
|
110
|
-
expanded: boolean;
|
|
111
|
-
expandable: boolean;
|
|
112
|
-
} | {
|
|
113
|
-
kind: 'forks';
|
|
114
|
-
id: string;
|
|
115
|
-
turnId: string;
|
|
116
|
-
} | {
|
|
117
|
-
kind: 'working';
|
|
118
|
-
id: string;
|
|
119
|
-
startedAt: number;
|
|
120
|
-
tool?: ChatToolItem;
|
|
121
|
-
} | {
|
|
122
|
-
kind: 'app-card';
|
|
123
|
-
id: string;
|
|
124
|
-
card: ThreadCard;
|
|
125
|
-
} | {
|
|
126
|
-
kind: 'visual';
|
|
127
|
-
id: string;
|
|
128
|
-
visual: ChatVisual;
|
|
129
|
-
};
|
|
1
|
+
import type { ChatItem, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
|
|
2
|
+
import type { CommandLook, ToolLook } from '../../host/host.js';
|
|
3
|
+
import type { SubagentBranch, TimelineRow } from '../../host/timeline-row.js';
|
|
130
4
|
interface TimelineOptions {
|
|
131
5
|
expandedGroups: ReadonlySet<string>;
|
|
132
6
|
expandedTurns: ReadonlySet<string>;
|
|
@@ -146,9 +20,5 @@ export declare function findSubagentBranch(rows: readonly TimelineRow[], toolUse
|
|
|
146
20
|
index: number;
|
|
147
21
|
branch: SubagentBranch;
|
|
148
22
|
} | null;
|
|
149
|
-
export interface BaseMoved {
|
|
150
|
-
from: string;
|
|
151
|
-
to: string;
|
|
152
|
-
}
|
|
153
23
|
export declare function deriveTimelineRows(items: ChatItem[], options: TimelineOptions): TimelineRow[];
|
|
154
24
|
export {};
|
|
@@ -300,7 +300,6 @@ function flushTools(buffer, rows, options) {
|
|
|
300
300
|
function isImageRow(row) {
|
|
301
301
|
return (row.kind === 'work' || row.kind === 'work-live') && isImageGeneration(row.tool);
|
|
302
302
|
}
|
|
303
|
-
/* Rows for a run of items, in order, with tool runs folded and a subagent's work under its own row. */
|
|
304
303
|
function rowsForItems(items, options, children) {
|
|
305
304
|
const rows = [];
|
|
306
305
|
const tools = [];
|
|
@@ -551,7 +550,6 @@ function chunksByTurn(items) {
|
|
|
551
550
|
}
|
|
552
551
|
return chunks;
|
|
553
552
|
}
|
|
554
|
-
/* Whether every node whose message opened the turn has that message among the rows right above it. */
|
|
555
553
|
function opensUnderItsMessages(turn, rows) {
|
|
556
554
|
const from = turn.messageFrom ?? [];
|
|
557
555
|
if (from.length === 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LucideIcon } from 'lucide-react';
|
|
2
|
-
|
|
2
|
+
interface ToolEntry {
|
|
3
3
|
icon: LucideIcon;
|
|
4
4
|
summary: readonly string[];
|
|
5
5
|
grouped: boolean;
|
|
@@ -9,3 +9,4 @@ export interface ToolEntry {
|
|
|
9
9
|
}
|
|
10
10
|
export declare const TOOL_CATALOG: Record<string, ToolEntry>;
|
|
11
11
|
export declare function toolEntry(name: string): ToolEntry | undefined;
|
|
12
|
+
export {};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { ChatToolItem } from '@adecore/agent-contracts';
|
|
2
|
-
import type { ToolLook, ToolLookMatch } from '../../host.js';
|
|
2
|
+
import type { ToolLook, ToolLookMatch } from '../../host/host.js';
|
|
3
3
|
import type { LookRun } from './command-looks.js';
|
|
4
|
-
|
|
4
|
+
interface McpCall {
|
|
5
5
|
readonly server: string;
|
|
6
6
|
readonly tool: string;
|
|
7
7
|
readonly input: Readonly<Record<string, unknown>>;
|
|
8
8
|
readonly output: string | null;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
interface ToolLookRun extends LookRun {
|
|
11
11
|
readonly look: ToolLook;
|
|
12
12
|
readonly match: ToolLookMatch;
|
|
13
13
|
readonly call: McpCall;
|
|
14
14
|
}
|
|
15
15
|
export declare function mcpCallOf(item: Pick<ChatToolItem, 'name' | 'input' | 'output'>, servers: readonly string[]): McpCall | null;
|
|
16
16
|
export declare function matchToolLook(item: ChatToolItem, looks: readonly ToolLook[] | undefined): ToolLookRun | null;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isRecord } from '@adecore/utils/record';
|
|
2
|
-
// A value keeps this many characters of what it says.
|
|
3
2
|
const FOLD_LENGTH = 40;
|
|
4
3
|
// An ACP agent titles a call of an MCP tool with the server and the tool, each agent with a separator of its own.
|
|
5
4
|
const TITLE_SEPARATORS = ['__', '_', '-'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ChatFileChange, type ChatToolItem } from '@adecore/agent-contracts';
|
|
2
2
|
export interface FileChange {
|
|
3
3
|
path: string;
|
|
4
4
|
before: string;
|
|
@@ -12,7 +12,7 @@ export declare function diffTexts(change: FileChange): {
|
|
|
12
12
|
export declare function toolSummary(name: string, input: unknown): string;
|
|
13
13
|
export declare function toolSummaryIsPath(name: string, input: unknown): boolean;
|
|
14
14
|
export declare function shellCommand(name: string, input: unknown): string | null;
|
|
15
|
-
|
|
15
|
+
interface ToolCallLines {
|
|
16
16
|
readonly command: string | null;
|
|
17
17
|
readonly args: ReadonlyArray<readonly [key: string, value: string]>;
|
|
18
18
|
readonly text: string | null;
|
|
@@ -32,3 +32,4 @@ export declare function approvalChanges(input: unknown): ChatFileChange[];
|
|
|
32
32
|
export declare function hasFileChanges(tool: ChatToolItem): boolean;
|
|
33
33
|
export declare function toolStartedAt(tool: ChatToolItem): number;
|
|
34
34
|
export declare function liveOutput(tool: ChatToolItem): string | null;
|
|
35
|
+
export {};
|