@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/src/chat/ui/index.ts
CHANGED
|
@@ -6,12 +6,12 @@ export { ChatActivity, StatusIcon } from './ChatActivity';
|
|
|
6
6
|
export { DisplayImage } from './DisplayImage';
|
|
7
7
|
export { CodeBlock } from './CodeBlock';
|
|
8
8
|
export { Composer } from './Composer';
|
|
9
|
-
export { type ComposerInputHandle, ComposerInput
|
|
9
|
+
export { type ComposerInputHandle, ComposerInput } from './ComposerInput';
|
|
10
10
|
export { default as DiffPool } from './DiffPool';
|
|
11
11
|
export { default as EditDiff } from './EditDiff';
|
|
12
12
|
export { FadingWords } from './FadingWords';
|
|
13
|
-
export {
|
|
14
|
-
export { ImageThumb
|
|
13
|
+
export { GoalPill } from './GoalDock';
|
|
14
|
+
export { ImageThumb } from './ImageView';
|
|
15
15
|
export { LimitDock, LimitPill } from './LimitState';
|
|
16
16
|
export { ReplyMarkdown, MessageMarkdown, Markdown } from './Markdown';
|
|
17
17
|
export { ModelPicker } from './Pickers';
|
|
@@ -23,57 +23,27 @@ export { SubagentTitleCrumb, SubagentBreadcrumb } from './SubagentControls';
|
|
|
23
23
|
export { SubagentInfo } from './SubagentInfo';
|
|
24
24
|
export { SubagentTimeline } from './SubagentTimeline';
|
|
25
25
|
export { Timeline } from './Timeline';
|
|
26
|
-
export { TimelineMenuPopup } from './TimelineMenu';
|
|
27
26
|
export { default as UnifiedDiff } from './UnifiedDiff';
|
|
28
27
|
export { UploadThumb } from './UploadThumb';
|
|
29
|
-
export { VisualPageFrame
|
|
28
|
+
export { VisualPageFrame } from './VisualFrame';
|
|
30
29
|
export { WelcomeGreeting } from './Welcome';
|
|
31
30
|
export { externalChange, composerEditorExtensions } from './composer/editor';
|
|
32
31
|
|
|
33
|
-
export {
|
|
34
|
-
createDiffSyntaxRuntime,
|
|
35
|
-
diffSyntaxRuntime,
|
|
36
|
-
type DiffSyntaxRuntime,
|
|
37
|
-
type DiffSyntaxRuntimeOptions,
|
|
38
|
-
type DiffSyntaxSession,
|
|
39
|
-
type DiffSyntaxMapping,
|
|
40
|
-
type DiffSourceTokenSession,
|
|
41
|
-
diffSourceTokens
|
|
42
|
-
} from './diff-syntax';
|
|
43
|
-
|
|
44
|
-
export { useDiffTheme } from './diff-theme';
|
|
45
|
-
export type { UnifiedDiffProps } from './diff/diff-props';
|
|
46
32
|
export { FileLinkContext, useFileLinkCwd } from './file-links';
|
|
47
33
|
export { type ChatFindField, type FindReveal } from './find-reveal';
|
|
48
34
|
export type { DiffContents } from './full-diff';
|
|
49
|
-
export { type UiBlockFrameProps, UiBlockFrame, type UiBlockFix
|
|
50
|
-
export {
|
|
51
|
-
export { uiChartData, type UiChartSeries, type UiChartValues, type UiChartData } from './intelligent-ui/chart-data';
|
|
35
|
+
export { type UiBlockFrameProps, UiBlockFrame, type UiBlockFix } from './intelligent-ui/UiBlockFrame';
|
|
36
|
+
export { uiChartData, type UiChartValues, type UiChartData } from './intelligent-ui/chart-data';
|
|
52
37
|
export { uiNodeLabel } from './intelligent-ui/node-text';
|
|
53
38
|
export { UI_RENDERERS } from './intelligent-ui/registry';
|
|
54
39
|
|
|
55
|
-
export type {
|
|
56
|
-
UiRenderContext,
|
|
57
|
-
UiRendererProps,
|
|
58
|
-
UiLinkTarget,
|
|
59
|
-
UiLink,
|
|
60
|
-
UiPlacePoint,
|
|
61
|
-
UiAnswer,
|
|
62
|
-
UiLiveStatus,
|
|
63
|
-
UiLiveValue,
|
|
64
|
-
UiLiveNodeState,
|
|
65
|
-
UiRenderer,
|
|
66
|
-
UiRenderers
|
|
67
|
-
} from './intelligent-ui/render-context';
|
|
40
|
+
export type { UiRenderContext, UiRendererProps, UiLinkTarget, UiLiveStatus, UiLiveNodeState } from './intelligent-ui/render-context';
|
|
68
41
|
|
|
69
|
-
export { uiTableColumns, type
|
|
70
|
-
export type { QuoteTaker } from './quote-selection';
|
|
71
|
-
export { ReplyContext } from './reply-context';
|
|
42
|
+
export { uiTableColumns, type UiTableColumn } from './intelligent-ui/table-data';
|
|
72
43
|
export { ForksRow } from './rows/ForksRow';
|
|
73
44
|
export { GeneratedImageRow } from './rows/GeneratedImageRow';
|
|
74
|
-
export { ReportRow,
|
|
45
|
+
export { ReportRow, NoteRow, AgentTurnRow, CompactionRow } from './rows/MessageRows';
|
|
75
46
|
export { TaskRow } from './rows/TaskRow';
|
|
76
47
|
export { WorkRow, WorkGroupRow, WorkingRow } from './rows/WorkRows';
|
|
77
48
|
export { WorkflowRow } from './rows/WorkflowRow';
|
|
78
49
|
export { WorkflowAgentLine } from './WorkflowAgentLine';
|
|
79
|
-
export { useDiffSourceTokens } from './use-diff-source-tokens';
|
|
@@ -5,7 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { Info, Lock, Radio, TriangleAlert } from 'lucide-react';
|
|
6
6
|
import { useId, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode, type RefObject } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { useChatHost } from '../../../host';
|
|
8
|
+
import { useChatHost } from '../../../host/host';
|
|
9
9
|
import { uiBlockHead, uiReasonText } from './node-text';
|
|
10
10
|
import { UiHeadContext, type UiLiveStatus } from './render-context';
|
|
11
11
|
import { useLater } from './use-later';
|
|
@@ -16,7 +16,7 @@ export interface UiBlockFix {
|
|
|
16
16
|
message: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
interface UiBlockFooterProps {
|
|
20
20
|
live?: UiLiveStatus | null;
|
|
21
21
|
/* The label of the Choice that answered the block, and when, in milliseconds since the epoch. */
|
|
22
22
|
answered?: { label: string; at: number } | null;
|
|
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import { Markdown } from '../Markdown';
|
|
5
5
|
|
|
6
6
|
/* Why a part is drawn as its text: a component this version does not know, or one it could not draw. */
|
|
7
|
-
|
|
7
|
+
type UiFallbackProblem = { kind: 'unknown'; component: string } | { kind: 'failed' };
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
* One part of a block as the markdown it stands for, on a card in a quiet tile under a line that says why.
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from 'react';
|
|
27
27
|
import { useTranslation } from 'react-i18next';
|
|
28
28
|
import ReactMarkdown, { type Components } from 'react-markdown';
|
|
29
|
-
import { useChatHost } from '../../../host';
|
|
29
|
+
import { useChatHost } from '../../../host/host';
|
|
30
30
|
import { ReplyMarkdown } from '../Markdown';
|
|
31
31
|
import { rehypeFadeWords } from '../rehype-fade';
|
|
32
32
|
import { UiReplyNavigationContext } from '../reply-context';
|
|
@@ -8,7 +8,7 @@ export const UI_CHART_ROWS = 60;
|
|
|
8
8
|
type ChartRow = UiProps<'Chart'>['data'][number];
|
|
9
9
|
type ChartKind = UiProps<'Chart'>['kind'];
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
interface UiChartSeries {
|
|
12
12
|
key: string;
|
|
13
13
|
/* One per label, null where a row has no number for this series. */
|
|
14
14
|
values: (number | null)[];
|
|
@@ -24,7 +24,7 @@ export interface UiPlacePoint {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/* The Choice that answered a block. `sending` already reads as sent, so a second click does nothing. */
|
|
27
|
-
|
|
27
|
+
interface UiAnswer {
|
|
28
28
|
choiceId: string;
|
|
29
29
|
state: 'sending' | 'sent' | 'queued';
|
|
30
30
|
}
|
|
@@ -179,7 +179,6 @@ function ValuesTable({ values, unit, shown }: { values: UiChartValues; unit: str
|
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
/* The values of one category beside the pointer. */
|
|
183
182
|
function Readout({ chart, index, left, unit }: { chart: UiChartData; index: number; left: number; unit: string | undefined }) {
|
|
184
183
|
return (
|
|
185
184
|
<div
|
|
@@ -199,7 +198,6 @@ function Readout({ chart, index, left, unit }: { chart: UiChartData; index: numb
|
|
|
199
198
|
);
|
|
200
199
|
}
|
|
201
200
|
|
|
202
|
-
/* Bars and lines over a value axis, in SVG at the measured width. */
|
|
203
201
|
function VerticalChart({
|
|
204
202
|
chart,
|
|
205
203
|
kind,
|
|
@@ -412,7 +410,6 @@ function ChartNotes({
|
|
|
412
410
|
}: {
|
|
413
411
|
chart: UiChartData;
|
|
414
412
|
requested: ChartKind;
|
|
415
|
-
/* Whether a category label is cut short at this width. */
|
|
416
413
|
cut: boolean;
|
|
417
414
|
values: UiChartValues;
|
|
418
415
|
unit: string | undefined;
|
|
@@ -4,7 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { CircleCheck } from 'lucide-react';
|
|
5
5
|
import { useId, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useChatHost } from '../../../../host';
|
|
7
|
+
import { useChatHost } from '../../../../host/host';
|
|
8
8
|
import type { UiRendererProps } from '../render-context';
|
|
9
9
|
import { UiFallbackPart } from '../UiFallbackPart';
|
|
10
10
|
import { useLater } from '../use-later';
|
|
@@ -5,8 +5,8 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { Box } from 'lucide-react';
|
|
6
6
|
import { createContext, useContext, useId, useState, type ReactNode } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { useChatHost } from '../../../../host';
|
|
9
|
-
import { useHostAttachmentUrl } from '../../../../host-hooks';
|
|
8
|
+
import { useChatHost } from '../../../../host/host';
|
|
9
|
+
import { useHostAttachmentUrl } from '../../../../host/host-hooks';
|
|
10
10
|
import { CodeStreamingContext } from '../../code-streaming';
|
|
11
11
|
import { CodeBlock } from '../../CodeBlock';
|
|
12
12
|
import { DisplayImage } from '../../DisplayImage';
|
|
@@ -278,7 +278,7 @@ export function SourcesRenderer({ node, children }: UiRendererProps<UiProps<'Sou
|
|
|
278
278
|
);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
interface UiSourceCitationProps {
|
|
282
282
|
/* The number of the Source, as its row in the list counts it. */
|
|
283
283
|
number: number;
|
|
284
284
|
title: string;
|
|
@@ -19,7 +19,6 @@ interface ChecklistState {
|
|
|
19
19
|
|
|
20
20
|
const ChecklistContext = createContext<ChecklistState>({ values: [], enabled: false, toggle: () => undefined });
|
|
21
21
|
|
|
22
|
-
/* The rows of a checklist as one named group. */
|
|
23
22
|
function ChecklistGroup({ pending, children }: { pending: boolean; children: ReactNode }) {
|
|
24
23
|
const { t } = useTranslation('agent-chat');
|
|
25
24
|
|
|
@@ -83,7 +83,7 @@ function chipFace(target: UiLinkTarget, link: UiLink): { face: ReactNode; hint:
|
|
|
83
83
|
* can open the target; one it cannot, outside the project or gone, stays mono text with the reason
|
|
84
84
|
* in a tooltip. A chip fades in, since a link reads as text until the host checked it.
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
function UiLinkChip({ target, context }: { target: UiLinkTarget; context: UiRenderContext }) {
|
|
87
87
|
const { t } = useTranslation('agent-chat');
|
|
88
88
|
const link = context.link?.(target) ?? PLAIN;
|
|
89
89
|
|
|
@@ -7,7 +7,7 @@ import { useEffect, useSyncExternalStore } from 'react';
|
|
|
7
7
|
*/
|
|
8
8
|
export const MAX_LIVE_MAPS = 4;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type MapSlotState = 'idle' | 'granted' | 'queued';
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
* Who may draw a map right now. A map in view asks for a slot and gets one while there are fewer than
|
|
@@ -92,7 +92,7 @@ export class MapSlots {
|
|
|
92
92
|
let page: MapSlots | null = null;
|
|
93
93
|
|
|
94
94
|
/* The one budget of the page, made on first use. */
|
|
95
|
-
|
|
95
|
+
function pageMapSlots(): MapSlots {
|
|
96
96
|
page ??= new MapSlots(MAX_LIVE_MAPS);
|
|
97
97
|
|
|
98
98
|
return page;
|
|
@@ -2,7 +2,7 @@ import type { LngLatBoundsLike, MapOptions } from 'maplibre-gl';
|
|
|
2
2
|
import { BASE_LAND_JSON } from './base-land';
|
|
3
3
|
|
|
4
4
|
// The package does not export its style type, only the options that take one.
|
|
5
|
-
|
|
5
|
+
type MapStyle = Exclude<MapOptions['style'], string | undefined>;
|
|
6
6
|
|
|
7
7
|
type Expression = unknown[];
|
|
8
8
|
|
|
@@ -19,20 +19,18 @@ export interface MapPoint {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* How far a map zooms to fit its points: street level with tiles, and only a country or two on the outline, which has nothing finer. */
|
|
22
|
-
|
|
22
|
+
const MAP_MAX_ZOOM = { tiles: 16, outline: 6 } as const;
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
export const MAP_FIT_PADDING = 32;
|
|
24
|
+
const MAP_FIT_PADDING = 32;
|
|
26
25
|
|
|
27
26
|
/* What fits every place in view: the first view and the way back to it share it, so they cannot drift apart. */
|
|
28
27
|
export function mapFitOptions(outline: boolean): { padding: number; maxZoom: number } {
|
|
29
28
|
return { padding: MAP_FIT_PADDING, maxZoom: outline ? MAP_MAX_ZOOM.outline : MAP_MAX_ZOOM.tiles };
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
export const MAP_MARKER_SIZE = 20;
|
|
31
|
+
const MAP_MARKER_SIZE = 20;
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
interface ScreenPoint {
|
|
36
34
|
id: string;
|
|
37
35
|
x: number;
|
|
38
36
|
y: number;
|
|
@@ -4,8 +4,8 @@ import { Maximize, Minus, Plus } from 'lucide-react';
|
|
|
4
4
|
import { Map as MapLibreMap, Marker, setWorkerUrl } from 'maplibre-gl';
|
|
5
5
|
import { useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useChatHost, type UiMapSource } from '../../../../host';
|
|
8
|
-
import { useHostCodeMode } from '../../../../host-hooks';
|
|
7
|
+
import { useChatHost, type UiMapSource } from '../../../../host/host';
|
|
8
|
+
import { useHostCodeMode } from '../../../../host/host-hooks';
|
|
9
9
|
import { watchTheme } from '../../theme-watch';
|
|
10
10
|
import { baseMapStyle, boundsOf, localizedTextField, mapFitOptions, spreadOverlaps, type MapColors, type MapPoint } from './map-style';
|
|
11
11
|
|
|
@@ -22,7 +22,6 @@ export interface MapMarker extends MapPoint {
|
|
|
22
22
|
export interface MapViewProps {
|
|
23
23
|
markers: readonly MapMarker[];
|
|
24
24
|
source: UiMapSource;
|
|
25
|
-
/* The id of the marker drawn as picked. */
|
|
26
25
|
selected: string | null;
|
|
27
26
|
/* Called with a marker's id when it is clicked; null where the places cannot be picked. */
|
|
28
27
|
onPick: ((id: string) => void) | null;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { UiProps, UiViewNode } from '@adecore/intelligent-ui';
|
|
2
|
-
import { Button, LazyBoundary, Spinner } from '@adecore/ui';
|
|
2
|
+
import { Button, LazyBoundary, Spinner, lazyNamed } from '@adecore/ui';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import type { TFunction } from 'i18next';
|
|
5
5
|
import { useId, useState, type ReactNode } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useChatHost, type UiMapSource } from '../../../../host';
|
|
8
|
-
import { useHostMapSource } from '../../../../host-hooks';
|
|
9
|
-
import { lazyNamed } from '../../../../lazy';
|
|
7
|
+
import { useChatHost, type UiMapSource } from '../../../../host/host';
|
|
8
|
+
import { useHostMapSource } from '../../../../host/host-hooks';
|
|
10
9
|
import { DiffFallbackBoundary } from '../../diff/DiffFallbackBoundary';
|
|
11
10
|
import { uiChildrenOf, uiNodeLabel } from '../node-text';
|
|
12
11
|
import type { UiPlacePoint, UiRendererProps } from '../render-context';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UiBlock } from '@adecore/intelligent-ui';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type UiReplyPart = { kind: 'text'; text: string } | { kind: 'ui'; block: UiBlock };
|
|
4
4
|
|
|
5
5
|
export function uiReplyParts(text: string, blocks: readonly UiBlock[], streaming = false): UiReplyPart[] {
|
|
6
6
|
const parts: UiReplyPart[] = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UiProps, UiViewNode } from '@adecore/intelligent-ui';
|
|
2
2
|
import { uiChildrenOf } from './node-text';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type UiColumnKind = NonNullable<UiProps<'Column'>['as']>;
|
|
5
5
|
|
|
6
6
|
export interface UiTableColumn {
|
|
7
7
|
key: string;
|
|
@@ -2,7 +2,7 @@ import type { ChatUiLinkReading, ChatUiQueryState } from '@adecore/agent-contrac
|
|
|
2
2
|
import { uiInputValues, UI_HOST_LIMITS, type UiBlock, UiState } from '@adecore/intelligent-ui';
|
|
3
3
|
import { uiLinkTargets, type UiLinkTarget } from '@adecore/intelligent-ui/links';
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { useChatHost } from '../../../host';
|
|
5
|
+
import { useChatHost } from '../../../host/host';
|
|
6
6
|
import type { UiRenderContext } from './render-context';
|
|
7
7
|
|
|
8
8
|
interface LinkState {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChatUiQueryReading, ChatUiQueryState } from '@adecore/agent-contracts';
|
|
2
2
|
import { uiInputValues, uiNodeQueries, UI_CATALOG_VERSION, UI_HOST_LIMITS, UiState, type UiBlock, type UiViewNode } from '@adecore/intelligent-ui';
|
|
3
3
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { useChatHost } from '../../../host';
|
|
4
|
+
import { useChatHost } from '../../../host/host';
|
|
5
5
|
import { UiPageMemory } from './block-local';
|
|
6
6
|
import type { UiLiveNodeState, UiLiveValue, UiLiveStatus, UiRenderContext } from './render-context';
|
|
7
7
|
|
|
@@ -25,7 +25,6 @@ interface OpenFence {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface TopFence {
|
|
28
|
-
// Where the opening marker stands in the text.
|
|
29
28
|
from: number;
|
|
30
29
|
marker: string;
|
|
31
30
|
info: string;
|
|
@@ -446,7 +445,6 @@ function openingFence(content: string): Pick<TopFence, 'marker' | 'info' | 'inde
|
|
|
446
445
|
return { marker, info, indent: columns(content), direct: !/[\\&]/.test(info.split(/[ \t]/, 1)[0]!) };
|
|
447
446
|
}
|
|
448
447
|
|
|
449
|
-
/* A line without the carriage return of a CRLF line ending. */
|
|
450
448
|
function withoutReturn(line: string): string {
|
|
451
449
|
return line.endsWith('\r') ? line.slice(0, -1) : line;
|
|
452
450
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UsageProviderSchema, type AgentKind, type ProviderAccounts, type ProviderInfo } from '@adecore/agent-contracts';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import { accountColor, accountName, accountsOfKind, topAccountEntry } from '../../agents/accounts';
|
|
4
|
-
import { useChatHost, type AccentChoice } from '../../host';
|
|
4
|
+
import { useChatHost, type AccentChoice } from '../../host/host';
|
|
5
5
|
import { ChatScopeContext } from '../../scope';
|
|
6
6
|
import { useProviderAccountsStore } from '../../state/provider-accounts';
|
|
7
7
|
import { useProvidersStore } from '../../state/providers';
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
type LucideIcon
|
|
17
17
|
} from 'lucide-react';
|
|
18
18
|
import { createElement, type ComponentType, type ReactNode } from 'react';
|
|
19
|
-
import type { ReferenceIconProps } from '../../host';
|
|
20
|
-
import type { ReferableKind } from '
|
|
19
|
+
import type { ReferenceIconProps } from '../../host/host';
|
|
20
|
+
import type { ReferableKind } from '../../host/references';
|
|
21
21
|
|
|
22
22
|
/* The mark of what a `#` points at, in the picker and on its chip, when the host draws none of its own. */
|
|
23
23
|
export const REFERENCE_ICONS: Record<ReferableKind, LucideIcon> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
-
import type { OutsideReference } from '../../host';
|
|
3
|
-
import type { Referable } from '
|
|
2
|
+
import type { OutsideReference } from '../../host/host';
|
|
3
|
+
import type { Referable } from '../../host/references';
|
|
4
4
|
|
|
5
5
|
export interface ReferenceLookup {
|
|
6
6
|
items: readonly Referable[];
|
|
@@ -27,7 +27,6 @@ const SKIPPED = new Set(['code', 'pre']);
|
|
|
27
27
|
|
|
28
28
|
const WHITESPACE = /^\s+$/;
|
|
29
29
|
|
|
30
|
-
/* A text cut into its words and the whitespace between them, in order. */
|
|
31
30
|
export function wordSegments(text: string): string[] {
|
|
32
31
|
return text.split(/(\s+)/).filter((segment) => segment !== '');
|
|
33
32
|
}
|
package/src/chat/ui/reveal.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
/* How long a word takes to fade in. `.chat-fade` in styles.css carries the same number. */
|
|
4
|
-
|
|
4
|
+
const REVEAL_FADE_MS = 300;
|
|
5
5
|
|
|
6
6
|
/* The time constant of the catch-up: after this long about two thirds of what was behind is on screen. */
|
|
7
7
|
export const REVEAL_TAU_MS = 250;
|
|
@@ -10,7 +10,7 @@ export const REVEAL_TAU_MS = 250;
|
|
|
10
10
|
export const REVEAL_MIN_CPS = 40;
|
|
11
11
|
|
|
12
12
|
// Once the item is done nothing more arrives to wait for, so the tail is closed faster.
|
|
13
|
-
|
|
13
|
+
const REVEAL_FINISH_MIN_CPS = 120;
|
|
14
14
|
|
|
15
15
|
// A tab that comes back hands one frame the whole time it was away; it would show everything at once.
|
|
16
16
|
export const REVEAL_MAX_FRAME_MS = 100;
|
|
@@ -71,7 +71,7 @@ export function revealBoundary(text: string, position: number, complete: boolean
|
|
|
71
71
|
return last >= 0xd800 && last <= 0xdbff ? end - 1 : end;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
interface RevealedText {
|
|
75
75
|
text: string;
|
|
76
76
|
/* True until the reveal caught up with a finished text and its last fade is over; spans are needed until then. */
|
|
77
77
|
active: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon, Menu } from '@adecore/ui';
|
|
2
2
|
import { ChevronRight, GitFork } from 'lucide-react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useHostChatPlace } from '../../../host-hooks';
|
|
4
|
+
import { useHostChatPlace } from '../../../host/host-hooks';
|
|
5
5
|
import { useForkIdsAfter } from '../../forks';
|
|
6
6
|
import { ROW_GUTTER } from '../icons';
|
|
7
7
|
|
|
@@ -5,8 +5,8 @@ import type { TFunction } from 'i18next';
|
|
|
5
5
|
import { Check, Copy, Ellipsis, ExternalLink, FolderDown, ImageIcon, Maximize2 } from 'lucide-react';
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
7
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
8
|
-
import { useChatHost } from '../../../host';
|
|
9
|
-
import { useHostAttachmentUrl } from '../../../host-hooks';
|
|
8
|
+
import { useChatHost } from '../../../host/host';
|
|
9
|
+
import { useHostAttachmentUrl } from '../../../host/host-hooks';
|
|
10
10
|
import { useChatScope } from '../../../scope';
|
|
11
11
|
import { useCurrentItem } from '../../../state/chats';
|
|
12
12
|
import { formatBytes } from '../../attachments';
|
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
} from 'lucide-react';
|
|
32
32
|
import { useContext, useState, type ReactNode } from 'react';
|
|
33
33
|
import { useTranslation } from 'react-i18next';
|
|
34
|
-
import { useChatHost, type CommandLookSent, type ReplyAuthor } from '../../../host';
|
|
35
|
-
import { useHostAttachmentUrl, useHostChatPlace, useHostReplyAuthor, useHostStreaming } from '../../../host-hooks';
|
|
34
|
+
import { useChatHost, type CommandLookSent, type ReplyAuthor } from '../../../host/host';
|
|
35
|
+
import { useHostAttachmentUrl, useHostChatPlace, useHostReplyAuthor, useHostStreaming } from '../../../host/host-hooks';
|
|
36
36
|
import { useChatScope } from '../../../scope';
|
|
37
37
|
import { useChatRow, useCurrentItem } from '../../../state/chats';
|
|
38
38
|
import { useProviders } from '../../../state/providers';
|
|
@@ -105,7 +105,6 @@ function AttachmentLink({ chatId, attachment }: { chatId: string; attachment: Ch
|
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
/* A picture attached to a message, which opens large. */
|
|
109
108
|
function AttachmentThumb({ chatId, attachment }: { chatId: string; attachment: ChatAttachment }) {
|
|
110
109
|
const { id } = useChatScope();
|
|
111
110
|
const source = useHostAttachmentUrl(id, chatId, attachment.id);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import type { ReactNode, Ref } from 'react';
|
|
3
|
-
import { useChatHost } from '../../../host';
|
|
4
|
-
import type { TimelineRow } from '
|
|
3
|
+
import { useChatHost } from '../../../host/host';
|
|
4
|
+
import type { TimelineRow } from '../../../host/timeline-row';
|
|
5
5
|
import { rowPosition, rowRhythm, saidToChat } from './row-rhythm';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface RowContainerProps {
|
|
8
8
|
row: TimelineRow;
|
|
9
9
|
previous: TimelineRow | null;
|
|
10
10
|
index: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ErrorBoundary } from '@adecore/ui';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import type { ThreadCard } from '../../../host';
|
|
3
|
+
import type { ThreadCard } from '../../../host/host';
|
|
4
|
+
import type { TimelineRow } from '../../../host/timeline-row';
|
|
4
5
|
import { isImageGeneration } from '../../logic/generated-image';
|
|
5
|
-
import type { TimelineRow } from '../../logic/timeline';
|
|
6
6
|
import type { SubagentStep } from '../../subagent-view';
|
|
7
7
|
import { ForksRow } from './ForksRow';
|
|
8
8
|
import { GeneratedImageRow } from './GeneratedImageRow';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { HOST_TASK_ORIGIN, taskIdOfRow, type ChatAssistantItem, type ChatItem, type ChatSubagentItem } from '@adecore/agent-contracts';
|
|
2
2
|
import { Icon, ScrollArea, useNow } from '@adecore/ui';
|
|
3
3
|
import { formatElapsedShort } from '@adecore/ui/format';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Bot, ChevronDown } from 'lucide-react';
|
|
6
6
|
import { useLayoutEffect, useRef, useState } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { type SubagentTask } from '../../../host';
|
|
9
|
-
import { useHostHidesToolCalls, useHostTask } from '../../../host-hooks';
|
|
8
|
+
import { type SubagentTask } from '../../../host/host';
|
|
9
|
+
import { useHostHidesToolCalls, useHostTask } from '../../../host/host-hooks';
|
|
10
|
+
import type { SubagentBranch } from '../../../host/timeline-row';
|
|
10
11
|
import { useChatScope } from '../../../scope';
|
|
11
12
|
import { useCurrentItem } from '../../../state/chats';
|
|
12
13
|
import { isImageGeneration } from '../../logic/generated-image';
|
|
13
|
-
import
|
|
14
|
-
import { entryTimeOf, statusWordOf, taskIdOf } from '../../subagent-list';
|
|
14
|
+
import { entryTimeOf, statusWordOf } from '../../subagent-list';
|
|
15
15
|
import { useSubagentSupport } from '../../subagent-support';
|
|
16
16
|
import { canOpenSubagent, crumbOf, type SubagentStep } from '../../subagent-view';
|
|
17
17
|
import { useOpenForFind } from '../find-reveal';
|
|
@@ -78,7 +78,6 @@ function StatusPill({ item, task }: { item: ChatSubagentItem; task: SubagentTask
|
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/* What the sub-agent did, live: its own tool calls and the text it wrote, as ordinary rows. */
|
|
82
81
|
function SubagentWork({ chatId, item, work }: { chatId: string; item: ChatSubagentItem; work: ChatItem[] }) {
|
|
83
82
|
const { t } = useTranslation('agent-chat');
|
|
84
83
|
const { id } = useChatScope();
|
|
@@ -159,7 +158,7 @@ export function SubagentRow({
|
|
|
159
158
|
}) {
|
|
160
159
|
const { t } = useTranslation('agent-chat');
|
|
161
160
|
const { id } = useChatScope();
|
|
162
|
-
const taskId =
|
|
161
|
+
const taskId = taskIdOfRow(item);
|
|
163
162
|
const task = useHostTask(id, taskId);
|
|
164
163
|
// A task paused on its child's limit is still a running row on the wire, but nothing is at work.
|
|
165
164
|
const running = item.status === 'running' && statusWordOf(item, task) !== 'paused';
|
|
@@ -170,7 +169,7 @@ export function SubagentRow({
|
|
|
170
169
|
|
|
171
170
|
return (
|
|
172
171
|
<div data-find-item={item.id}>
|
|
173
|
-
{item.origin ===
|
|
172
|
+
{item.origin === HOST_TASK_ORIGIN ? (
|
|
174
173
|
<TaskRow item={item} task={task} open={expanded} onPress={press} />
|
|
175
174
|
) : (
|
|
176
175
|
<ToggleLine
|
|
@@ -6,7 +6,7 @@ import { Bot, ChevronRight } from 'lucide-react';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { AgentIcon } from '../../../agents/AgentIcon';
|
|
8
8
|
import { modelName, shortModelName } from '../../../agents/model-name';
|
|
9
|
-
import type { SubagentTask } from '../../../host';
|
|
9
|
+
import type { SubagentTask } from '../../../host/host';
|
|
10
10
|
import { useChatScope } from '../../../scope';
|
|
11
11
|
import { useChats } from '../../../state/chats';
|
|
12
12
|
import { useProviders } from '../../../state/providers';
|
|
@@ -2,7 +2,7 @@ import type { ChatVisual } from '@adecore/agent-contracts';
|
|
|
2
2
|
import { ButtonGroup, ErrorBoundary, Icon, IconButton, Menu, Surface } from '@adecore/ui';
|
|
3
3
|
import { Ellipsis, Maximize2, Trash2 } from 'lucide-react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { useChatHost } from '../../../host';
|
|
5
|
+
import { useChatHost } from '../../../host/host';
|
|
6
6
|
import { useChatScope } from '../../../scope';
|
|
7
7
|
import { useVisualDialog } from '../../visuals';
|
|
8
8
|
import { HostMenuItems } from '../HostMenuItems';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { ChatCheckpointDiff, ChatCheckpointFile, ChatFileChange, ChatToolItem, ChatTurnItem } from '@adecore/agent-contracts';
|
|
2
|
-
import { Button, Icon, LazyBoundary, MiddleTruncate, ScrollArea, Spinner, useTickingText } from '@adecore/ui';
|
|
2
|
+
import { Button, Icon, LazyBoundary, MiddleTruncate, ScrollArea, Spinner, lazyNamed, useTickingText } from '@adecore/ui';
|
|
3
3
|
import { formatClockDuration, formatElapsedShort } from '@adecore/ui/format';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import i18next from 'i18next';
|
|
6
6
|
import { ChevronRight, FileDiff, X } from 'lucide-react';
|
|
7
7
|
import { Fragment, useContext, useEffect, useState, type Dispatch, type ReactNode, type SetStateAction } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { useChatHost, type CommandLook, type ToolLook } from '../../../host';
|
|
10
|
-
import { useCommandNames } from '../../../host-hooks';
|
|
11
|
-
import {
|
|
9
|
+
import { useChatHost, type CommandLook, type ToolLook } from '../../../host/host';
|
|
10
|
+
import { useCommandNames } from '../../../host/host-hooks';
|
|
11
|
+
import { type Look } from '../../../host/timeline-row';
|
|
12
|
+
import type { BaseMoved } from '../../../host/timeline-row';
|
|
12
13
|
import { ChatScopeContext, useChatScope } from '../../../scope';
|
|
13
14
|
import { useAwaitsApproval, useCurrentItem } from '../../../state/chats';
|
|
14
15
|
import { useChatActions } from '../../actions';
|
|
15
16
|
import { formatBytes } from '../../attachments';
|
|
16
|
-
import { lookKey, lookRunOf, type
|
|
17
|
-
import type { BaseMoved } from '../../logic/timeline';
|
|
17
|
+
import { lookKey, lookRunOf, type LookRun } from '../../logic/command-looks';
|
|
18
18
|
import {
|
|
19
19
|
exitCodeOf,
|
|
20
20
|
fileChanges,
|
|
@@ -47,7 +47,6 @@ const UnifiedDiff = lazyNamed(() => import('../UnifiedDiff'), 'default');
|
|
|
47
47
|
|
|
48
48
|
const OUTPUT_LIMIT = 4000;
|
|
49
49
|
|
|
50
|
-
/* The line that says how much of a text past the limit is left out; empty for a text within it. */
|
|
51
50
|
function clipNotice(text: string): string {
|
|
52
51
|
return text.length > OUTPUT_LIMIT ? `\n${i18next.t('agent-chat:work.moreCharacters', { count: text.length - OUTPUT_LIMIT })}` : '';
|
|
53
52
|
}
|
|
@@ -58,7 +57,6 @@ function clip(text: string): string {
|
|
|
58
57
|
|
|
59
58
|
const BRAND = 'font-semibold';
|
|
60
59
|
|
|
61
|
-
/* `text` with `brand` in semibold where it names it, as a sentence about a look does. */
|
|
62
60
|
function withBrand(text: string, brands: readonly string[]): ReactNode {
|
|
63
61
|
for (const brand of brands) {
|
|
64
62
|
const at = brand === '' ? -1 : text.indexOf(brand);
|
|
@@ -234,7 +232,6 @@ function DiffSuspense({ children }: { children: ReactNode }) {
|
|
|
234
232
|
return <LazyBoundary fallback={<div className="px-3 py-2 text-xs text-text-faint">{t('work.loadingDiff')}</div>}>{children}</LazyBoundary>;
|
|
235
233
|
}
|
|
236
234
|
|
|
237
|
-
/* A file in a changed files card, which opens its diff under it. */
|
|
238
235
|
function ChangedFileLine({
|
|
239
236
|
path,
|
|
240
237
|
open,
|
|
@@ -510,7 +507,6 @@ export function RunningFor({ startedAt }: { startedAt: number }) {
|
|
|
510
507
|
return <span ref={ref} className="shrink-0 text-xs text-text-faint tabular-nums" />;
|
|
511
508
|
}
|
|
512
509
|
|
|
513
|
-
/* The mark of one call: the look it runs under, else what the tool is about. */
|
|
514
510
|
function callIcon(tool: ChatToolItem, commandLooks: readonly CommandLook[] | undefined, toolLooks: readonly ToolLook[] | undefined): ReactNode {
|
|
515
511
|
const run = lookRunOf(tool, commandLooks, toolLooks);
|
|
516
512
|
|