@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
|
@@ -5,7 +5,7 @@ import { ChevronRight } from 'lucide-react';
|
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { freeAccountColor, mintAccountId } from '../agents/accounts.js';
|
|
8
|
-
import { useChatHost } from '../host.js';
|
|
8
|
+
import { useChatHost } from '../host/host.js';
|
|
9
9
|
import { useChatScope } from '../scope.js';
|
|
10
10
|
import { providerAccountsOf } from '../state/provider-accounts.js';
|
|
11
11
|
import { errorMessage } from '../transport.js';
|
|
@@ -9,8 +9,8 @@ import { carryOptions } from '../agents/model-options.js';
|
|
|
9
9
|
import { ModelOptionControl } from '../agents/ModelOptionControl.js';
|
|
10
10
|
import { optionWord } from '../agents/option-words.js';
|
|
11
11
|
import { accountFor, forgetChatSelection, rememberChatAccount, rememberChatSelection, selectionFor, useChatPreferences } from '../chat/preferences.js';
|
|
12
|
-
import { useChatHost } from '../host.js';
|
|
13
|
-
import { useHostCanReorderAccounts } from '../host-hooks.js';
|
|
12
|
+
import { useChatHost } from '../host/host.js';
|
|
13
|
+
import { useHostCanReorderAccounts } from '../host/host-hooks.js';
|
|
14
14
|
import { useChatScope } from '../scope.js';
|
|
15
15
|
import { knownAccounts, useProviderAccounts } from '../state/provider-accounts.js';
|
|
16
16
|
import { reorderAccounts } from './account-actions.js';
|
|
@@ -87,7 +87,6 @@ function ModelOptionRows(t0) {
|
|
|
87
87
|
}
|
|
88
88
|
return t3;
|
|
89
89
|
}
|
|
90
|
-
/* One CLI: what it is, what a new chat of it starts with unless `defaults` is off, and its accounts. */
|
|
91
90
|
export function CliDetail(t0) {
|
|
92
91
|
const $ = _c(53);
|
|
93
92
|
const {
|
|
@@ -4,8 +4,8 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { Check, Copy, ExternalLink, SquareTerminal } from 'lucide-react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
|
-
import { useChatHost } from '../host.js';
|
|
8
|
-
import { useHostMachinePlatform } from '../host-hooks.js';
|
|
7
|
+
import { useChatHost } from '../host/host.js';
|
|
8
|
+
import { useHostMachinePlatform } from '../host/host-hooks.js';
|
|
9
9
|
import { useChatScope } from '../scope.js';
|
|
10
10
|
import { installPlatforms, installStepStates, pagePlatform } from './install-steps.js';
|
|
11
11
|
import { CliMark } from './parts.js';
|
|
@@ -365,7 +365,6 @@ function SignInWay(t0) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
/* How to get a CLI that is not on the machine yet, step by step, until it is there and signed in. */
|
|
369
368
|
export function InstallPage(t0) {
|
|
370
369
|
const $ = _c(42);
|
|
371
370
|
const {
|
|
@@ -4,8 +4,8 @@ import { MasterDetail } from '@adecore/ui/settings';
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { accountLoginOf, accountsOfKind } from '../agents/accounts.js';
|
|
7
|
-
import { useChatHost } from '../host.js';
|
|
8
|
-
import { useHostLoginBlocked } from '../host-hooks.js';
|
|
7
|
+
import { useChatHost } from '../host/host.js';
|
|
8
|
+
import { useHostLoginBlocked } from '../host/host-hooks.js';
|
|
9
9
|
import { useChatScope } from '../scope.js';
|
|
10
10
|
import { useProviderAccounts } from '../state/provider-accounts.js';
|
|
11
11
|
import { useProviders } from '../state/providers.js';
|
|
@@ -16,7 +16,6 @@ import { InstallPage } from './InstallPage.js';
|
|
|
16
16
|
import { pickOfCli, pickOfTarget } from './pane-target.js';
|
|
17
17
|
import { groupProviders } from './provider-groups.js';
|
|
18
18
|
import { ProviderList } from './ProviderList.js';
|
|
19
|
-
/* The agent CLIs of the host in scope, each with its accounts, beside the detail of what is picked. */
|
|
20
19
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
20
|
export function ProvidersPane(t0) {
|
|
22
21
|
const $ = _c(13);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { AgentKind, ProviderAccount
|
|
2
|
-
import type { ChatHost } from '../host.js';
|
|
1
|
+
import type { AgentKind, ProviderAccount } from '@adecore/agent-contracts';
|
|
2
|
+
import type { ChatHost } from '../host/host.js';
|
|
3
3
|
import type { ChatScope } from '../scope.js';
|
|
4
|
-
export declare function saveAccounts(scope: ChatScope, host: Pick<ChatHost, 'notify'>, accounts: ProviderAccountMap): Promise<boolean>;
|
|
5
4
|
export declare function saveAccount(scope: ChatScope, host: Pick<ChatHost, 'notify'>, id: string, account: ProviderAccount): Promise<boolean>;
|
|
6
5
|
export declare function removeAccount(scope: ChatScope, host: Pick<ChatHost, 'notify'>, id: string, kind: AgentKind): Promise<void>;
|
|
7
6
|
export declare function reorderAccounts(scope: ChatScope, host: Pick<ChatHost, 'notify'>, kind: AgentKind, ids: readonly string[]): Promise<void>;
|
|
@@ -12,7 +12,7 @@ function linkTo(scope) {
|
|
|
12
12
|
return scope.transport;
|
|
13
13
|
}
|
|
14
14
|
/* The whole map, as `accounts.save` takes it. Answers false when the host refused, which a toast then says. */
|
|
15
|
-
|
|
15
|
+
async function saveAccounts(scope, host, accounts) {
|
|
16
16
|
try {
|
|
17
17
|
useProviderAccountsStore.getState().set(scope.id, await linkTo(scope).request('accounts.save', {
|
|
18
18
|
accounts
|
|
@@ -3,11 +3,9 @@ export { AgentIcon } from '../agents/AgentIcon.js';
|
|
|
3
3
|
export { AgentModelLabel } from '../agents/AgentModelLabel.js';
|
|
4
4
|
export { ModelOptionControl } from '../agents/ModelOptionControl.js';
|
|
5
5
|
export { ProviderLogo } from '../agents/ProviderLogo.js';
|
|
6
|
-
export {
|
|
6
|
+
export { hasProviderLogo } from '../agents/provider-paths.js';
|
|
7
|
+
export { type AccountEntry, accountsOfKind, ACCOUNT_TONE_CLASSES, accountStatusLine, canContinueOn, projectDefault, topAccountEntry } from '../agents/accounts.js';
|
|
7
8
|
export { modelName, useModelName, shortModelName } from '../agents/model-name.js';
|
|
8
9
|
export { carryOptions } from '../agents/model-options.js';
|
|
9
|
-
export { type ModelRequirement } from '../agents/model-requirement.js';
|
|
10
10
|
export { ProvidersPane } from './ProvidersPane.js';
|
|
11
|
-
export type { ProviderInstallStep } from './install-steps.js';
|
|
12
|
-
export type { ProviderSetupStatus } from './provider-groups.js';
|
|
13
11
|
export { CliMark, CliTile } from './parts.js';
|
package/dist/providers/index.js
CHANGED
|
@@ -4,9 +4,9 @@ export { AgentIcon } from '../agents/AgentIcon.js';
|
|
|
4
4
|
export { AgentModelLabel } from '../agents/AgentModelLabel.js';
|
|
5
5
|
export { ModelOptionControl } from '../agents/ModelOptionControl.js';
|
|
6
6
|
export { ProviderLogo } from '../agents/ProviderLogo.js';
|
|
7
|
+
export { hasProviderLogo } from '../agents/provider-paths.js';
|
|
7
8
|
export { accountsOfKind, ACCOUNT_TONE_CLASSES, accountStatusLine, canContinueOn, projectDefault, topAccountEntry } from '../agents/accounts.js';
|
|
8
9
|
export { modelName, useModelName, shortModelName } from '../agents/model-name.js';
|
|
9
10
|
export { carryOptions } from '../agents/model-options.js';
|
|
10
|
-
export {} from '../agents/model-requirement.js';
|
|
11
11
|
export { ProvidersPane } from './ProvidersPane.js';
|
|
12
12
|
export { CliMark, CliTile } from './parts.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isApplePlatform } from '@adecore/ui';
|
|
2
2
|
const PLATFORMS = ['darwin', 'linux', 'win32'];
|
|
3
|
-
/* The first step not done is the current one. */
|
|
4
3
|
export function installStepStates(done) {
|
|
5
4
|
const first = done.indexOf(false);
|
|
6
5
|
return done.map((value, index) => value ? 'done' : index === first ? 'current' : 'later');
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ProviderInfo } from '@adecore/agent-contracts';
|
|
2
2
|
export declare function providerAbilities(provider: ProviderInfo): string;
|
|
3
|
-
export declare function canSteer(capabilities: ProviderCapabilities | undefined): boolean;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
-
/* What a provider offers, in one sentence, where it can be opened and whether its hooks report status. */
|
|
3
2
|
export function providerAbilities(provider) {
|
|
4
3
|
const where = provider.capabilities.chat ? i18next.t('agent-providers:abilities.chatAndTerminal') : i18next.t('agent-providers:abilities.terminalOnly');
|
|
5
4
|
const status = provider.capabilities.hooks ? i18next.t('agent-providers:abilities.reportsStatus') : i18next.t('agent-providers:abilities.noStatus');
|
|
6
5
|
return `${where} ${status}`;
|
|
7
|
-
}
|
|
8
|
-
/* Whether a message sent while a turn runs may join it. Undefined while the host has not answered `provider.list`, which steers nothing. */
|
|
9
|
-
export function canSteer(capabilities) {
|
|
10
|
-
return capabilities?.steer === true;
|
|
11
6
|
}
|
|
@@ -79,7 +79,6 @@ export function variablesOf(drafts) {
|
|
|
79
79
|
};
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
/* Whether the drafts say something other than what the machine holds. */
|
|
83
82
|
export function variablesChanged(drafts, env) {
|
|
84
83
|
return JSON.stringify(variablesOf(drafts)) !== JSON.stringify((env ?? []).map(({
|
|
85
84
|
name,
|
package/dist/scope.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SettingsSectionEntry } from '@adecore/ui/settings';
|
|
2
2
|
import { type LucideIcon } from 'lucide-react';
|
|
3
3
|
import type { ComponentType } from 'react';
|
|
4
|
-
|
|
4
|
+
interface AgentsSettingsSection {
|
|
5
5
|
id: string;
|
|
6
6
|
icon: LucideIcon;
|
|
7
7
|
split?: boolean;
|
|
@@ -11,3 +11,4 @@ export interface AgentsSettingsSection {
|
|
|
11
11
|
export declare const PROVIDERS_SECTION: AgentsSettingsSection;
|
|
12
12
|
export declare const USAGE_SECTION: AgentsSettingsSection;
|
|
13
13
|
export declare function settingsSection(section: AgentsSettingsSection, pane: ComponentType): SettingsSectionEntry;
|
|
14
|
+
export {};
|
package/dist/state/chats.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AgentKind, ChatApprovalItem, ChatBookmark, ChatEvent, ChatHistoryResult, ChatInfo, ChatItem, ChatQuestionItem,
|
|
1
|
+
import type { AgentKind, ChatApprovalItem, ChatBookmark, ChatEvent, ChatHistoryResult, ChatInfo, ChatItem, ChatQuestionItem, ChatVisual } from '@adecore/agent-contracts';
|
|
2
|
+
import type { ChatHistoryPage, ChatPage, ChatSink } from '../chat-sink.js';
|
|
2
3
|
export interface ChatState {
|
|
3
4
|
info: ChatInfo;
|
|
4
5
|
historyPending?: boolean;
|
|
@@ -13,27 +14,8 @@ export interface ChatState {
|
|
|
13
14
|
bookmarks?: ChatBookmark[];
|
|
14
15
|
visuals?: ChatVisual[];
|
|
15
16
|
}
|
|
16
|
-
export type ChatHistoryPage = ChatHistoryResult['history'];
|
|
17
|
-
export interface ChatPage {
|
|
18
|
-
history: ChatHistoryPage;
|
|
19
|
-
pending: ChatItem[];
|
|
20
|
-
subagents?: ChatSubagentItem[];
|
|
21
|
-
workflows?: ChatToolItem[];
|
|
22
|
-
outline?: ChatItem[];
|
|
23
|
-
}
|
|
24
17
|
export type ChatsById = Record<string, ChatState>;
|
|
25
18
|
export type ChatStatuses = Record<string, Pick<ChatState, 'info'>>;
|
|
26
|
-
export interface ChatSink {
|
|
27
|
-
historyIdentity?(chatId: string): object | undefined;
|
|
28
|
-
reset(chatId: string, info: ChatInfo, items: ChatItem[], page?: ChatPage): void;
|
|
29
|
-
prepend(chatId: string, cursor: string, page: ChatHistoryResult): void;
|
|
30
|
-
apply(chatId: string, event: ChatEvent): void;
|
|
31
|
-
replay?(chatId: string, events: readonly ChatEvent[]): void;
|
|
32
|
-
status(chatId: string, info: ChatInfo): void;
|
|
33
|
-
bookmarks(chatId: string, bookmarks: ChatBookmark[]): void;
|
|
34
|
-
visuals(chatId: string, visuals: ChatVisual[]): void;
|
|
35
|
-
forget(chatId: string): void;
|
|
36
|
-
}
|
|
37
19
|
interface ChatsStore {
|
|
38
20
|
byKey: ChatsById;
|
|
39
21
|
statusByKey: ChatStatuses;
|
package/dist/state/chats.js
CHANGED
|
@@ -142,7 +142,6 @@ function withItem(state, item, structural = true) {
|
|
|
142
142
|
function sameInfo(left, right) {
|
|
143
143
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
144
144
|
}
|
|
145
|
-
/* The statuses with this chat's info in them, the same object when that info is already there. */
|
|
146
145
|
function withStatus(statuses, key, info) {
|
|
147
146
|
return statuses[key]?.info === info ? statuses : {
|
|
148
147
|
...statuses,
|
|
@@ -484,7 +483,6 @@ export function useReportedModels(provider) {
|
|
|
484
483
|
}
|
|
485
484
|
return t1;
|
|
486
485
|
}
|
|
487
|
-
/* `useReportedModels` for every provider at once, as a lookup by provider. */
|
|
488
486
|
export function useReportedModelsByProvider() {
|
|
489
487
|
const $ = _c(6);
|
|
490
488
|
const scope = useContext(ChatScopeContext);
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { type ChatState, type ChatsById, type ChatStatuses,
|
|
2
|
-
export {
|
|
1
|
+
export { type ChatState, type ChatsById, type ChatStatuses, waitingRequestsOf, applyEvent, useChats, chatSink, useChatRow } from './chats.js';
|
|
2
|
+
export type { ChatHistoryPage, ChatSink } from '../chat-sink.js';
|
|
3
|
+
export { useProviderAccountsStore, useProviderAccounts, providerAccountsOf, knownAccounts, watchProviderAccounts } from './provider-accounts.js';
|
|
3
4
|
export { useProvidersStore, useProviders, providersOf, providerSinkFor, type ProvidersRow } from './providers.js';
|
|
4
|
-
export { type UsageMetric, USAGE_PREFERENCES_KEY, dayOf, windowFor, reloadUsagePreferences, useUsageStore, type UsagePeriod
|
|
5
|
+
export { type UsageMetric, USAGE_PREFERENCES_KEY, dayOf, windowFor, reloadUsagePreferences, useUsageStore, type UsagePeriod } from './usage.js';
|
package/dist/state/usage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type UsageLimitsSnapshot, type UsageRate, type UsageSummaryPayload, type UsageSummaryResult } from '@adecore/agent-contracts';
|
|
2
|
-
|
|
2
|
+
export type UsageCurrency = 'USD' | 'EUR';
|
|
3
3
|
export type UsagePeriod = 'today' | '7d' | '30d' | '90d';
|
|
4
4
|
export type UsageMetric = 'cost' | 'tokens';
|
|
5
5
|
export declare const USAGE_PERIODS: readonly {
|
|
@@ -39,6 +39,6 @@ interface UsageStore extends Preferences {
|
|
|
39
39
|
}
|
|
40
40
|
export declare function reloadUsagePreferences(): void;
|
|
41
41
|
export declare const useUsageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<UsageStore>>;
|
|
42
|
-
|
|
42
|
+
type UsageView = Preferences & UsageRow;
|
|
43
43
|
export declare function useUsage<T>(select: (view: UsageView) => T): T;
|
|
44
44
|
export {};
|
package/dist/state/usage.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { UsageRateSchema } from '@adecore/agent-contracts';
|
|
3
3
|
import { localTimeZone } from '@adecore/ui/format';
|
|
4
|
-
import { persistedJson } from '../
|
|
4
|
+
import { persistedJson } from '../persisted-json.js';
|
|
5
5
|
import { useChatScope } from '../scope.js';
|
|
6
6
|
import { chatStorageKey, chatStorageLegacyKeys, createChatStore, onChatStorageConfiguration } from '../storage.js';
|
|
7
7
|
/* Only the id and the length. A store has no words, so the page names a period in its own language. */
|
package/dist/storage.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type StateCreator, type StoreApi, type UseBoundStore } from 'zustand';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type ChatStorageRecord = 'drafts' | 'preferences' | 'stash' | 'usage';
|
|
3
|
+
interface ChatStorageAdapter {
|
|
4
4
|
getItem(key: string): string | null;
|
|
5
5
|
setItem(key: string, value: string): void;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
interface ChatStorageOptions {
|
|
8
8
|
namespace?: string;
|
|
9
9
|
keys?: Partial<Record<ChatStorageRecord, string>>;
|
|
10
10
|
legacyNamespaces?: readonly string[];
|
|
@@ -18,3 +18,4 @@ export declare function chatStorageLegacyKeys(record: ChatStorageRecord): readon
|
|
|
18
18
|
export declare function chatStorageAdapter(): ChatStorageAdapter | null;
|
|
19
19
|
export declare function hydrateChatStorage(): void;
|
|
20
20
|
export declare function createChatStore<T>(initial: StateCreator<T>, hydrate: (store: StoreApi<T>) => void): UseBoundStore<StoreApi<T>>;
|
|
21
|
+
export {};
|
package/dist/usage/ChartLogo.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { ProviderLogo } from '../agents/ProviderLogo.js';
|
|
3
3
|
import { PROVIDER_COLORS } from './format.js';
|
|
4
|
-
/* A provider's logo in its color of the chart, so it reads as the series it names. */
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
export function ChartLogo(t0) {
|
|
7
6
|
const $ = _c(8);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type UsageLimitsSnapshot, type UsageWindow } from '@adecore/agent-contracts';
|
|
2
2
|
import { type LimitGroup } from './limit-groups.js';
|
|
3
3
|
export declare function WindowBar({ window, now, compact }: {
|
|
4
4
|
window: UsageWindow;
|
package/dist/usage/LimitsList.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { evenPace } from '@adecore/agent-contracts';
|
|
2
3
|
import { Icon, Tooltip } from '@adecore/ui';
|
|
3
4
|
import { formatClock, formatWeekdayClock, isSameDay, formatCountdown, formatPercent } from '@adecore/ui/format';
|
|
4
5
|
import clsx from 'clsx';
|
|
@@ -8,21 +9,19 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
9
|
import { limitsAccountId } from '../agents/account-limits.js';
|
|
9
10
|
import { accountColor } from '../agents/accounts.js';
|
|
10
11
|
import { ProviderLogo } from '../agents/ProviderLogo.js';
|
|
11
|
-
import { useChatHost } from '../host.js';
|
|
12
|
+
import { useChatHost } from '../host/host.js';
|
|
12
13
|
import { ChartLogo } from './ChartLogo.js';
|
|
13
14
|
import { PROVIDER_COLORS, PROVIDER_LABELS } from './format.js';
|
|
14
|
-
import { accountNote, emptyWindows,
|
|
15
|
+
import { accountNote, emptyWindows, explain, isSignedOut, limitAccountKey, noteIsWarning, paceText, ringWindows, showsWindows } from './limit-groups.js';
|
|
15
16
|
import { LimitProvenance } from './LimitProvenance.js';
|
|
16
17
|
/* Red where a window is nearly spent, amber where it is worth knowing; room to spare is not news and takes the text color. */
|
|
17
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
function toneOf(used) {
|
|
19
20
|
return used >= 0.9 ? 'bg-status-error' : used >= 0.7 ? 'bg-status-needs-you' : 'bg-text';
|
|
20
21
|
}
|
|
21
|
-
/* A time of day when the reset is today, a weekday and a time when it is not. */
|
|
22
22
|
function resetAtLabel(resetsAt, now) {
|
|
23
23
|
return isSameDay(resetsAt, now) ? formatClock(resetsAt) : formatWeekdayClock(resetsAt);
|
|
24
24
|
}
|
|
25
|
-
/* How long the window still has, or nothing once it has run out. */
|
|
26
25
|
function resetInLabel(resetsAt, now) {
|
|
27
26
|
return resetsAt <= now ? null : formatCountdown(resetsAt - now);
|
|
28
27
|
}
|
|
@@ -319,7 +318,6 @@ export function LimitsList(t0) {
|
|
|
319
318
|
}
|
|
320
319
|
return t5;
|
|
321
320
|
}
|
|
322
|
-
/* Red where a window is nearly spent, amber where it is worth knowing, in the color of a word. */
|
|
323
321
|
function textToneOf(used) {
|
|
324
322
|
return used >= 0.9 ? 'text-status-error' : used >= 0.7 ? 'text-status-needs-you' : 'text-text';
|
|
325
323
|
}
|
|
@@ -536,7 +534,6 @@ function WindowLine(t0) {
|
|
|
536
534
|
}
|
|
537
535
|
return t17;
|
|
538
536
|
}
|
|
539
|
-
/* A window this account has not reported on: no number to draw, so an empty bar and a dash. */
|
|
540
537
|
function EmptyWindowLine(t0) {
|
|
541
538
|
const $ = _c(7);
|
|
542
539
|
const {
|
|
@@ -776,7 +773,6 @@ function AccountLogo(t0) {
|
|
|
776
773
|
}
|
|
777
774
|
return t4;
|
|
778
775
|
}
|
|
779
|
-
/* One account: a row that folds its windows away, or only a row with the words for why it has none. */
|
|
780
776
|
function AccountRow(t0) {
|
|
781
777
|
const $ = _c(61);
|
|
782
778
|
const {
|
|
@@ -6,7 +6,7 @@ import { CircleHelp, Folder, Info } from 'lucide-react';
|
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { useModelName } from '../agents/model-name.js';
|
|
9
|
-
import { useHostProjectLook } from '../host-hooks.js';
|
|
9
|
+
import { useHostProjectLook } from '../host/host-hooks.js';
|
|
10
10
|
import { useChatScope } from '../scope.js';
|
|
11
11
|
import { ChartLogo } from './ChartLogo.js';
|
|
12
12
|
import { formatCount, formatTokens, PROVIDER_COLORS, PROVIDER_LABELS, shortPath, slotLabel } from './format.js';
|
|
@@ -52,7 +52,6 @@ function ProviderMark(t0) {
|
|
|
52
52
|
}
|
|
53
53
|
return t3;
|
|
54
54
|
}
|
|
55
|
-
/* The name the machine's catalog gives the model, where it has the model; the slug made readable where it does not. */
|
|
56
55
|
function ModelName(t0) {
|
|
57
56
|
const {
|
|
58
57
|
provider,
|
|
@@ -330,7 +329,6 @@ function ModelRows(t0) {
|
|
|
330
329
|
}
|
|
331
330
|
return t1;
|
|
332
331
|
}
|
|
333
|
-
/* One project's row, under the name and the mark its host gives it, or its folder's own under a folder. */
|
|
334
332
|
function ProjectRow(t0) {
|
|
335
333
|
const $ = _c(33);
|
|
336
334
|
const {
|
|
@@ -550,7 +548,6 @@ function ProjectRows(t0) {
|
|
|
550
548
|
}
|
|
551
549
|
return t4;
|
|
552
550
|
}
|
|
553
|
-
/* The chart written out per calendar day, a column per provider that did anything in the period. */
|
|
554
551
|
function _temp(project) {
|
|
555
552
|
return project.costUsd;
|
|
556
553
|
}
|
|
@@ -715,7 +712,6 @@ function DayRows(t0) {
|
|
|
715
712
|
}
|
|
716
713
|
return t1;
|
|
717
714
|
}
|
|
718
|
-
/* The same period cut three ways: which model, which checkout, and which day it went on. */
|
|
719
715
|
function _temp2(provider) {
|
|
720
716
|
return /*#__PURE__*/_jsx("span", {
|
|
721
717
|
className: "w-20 text-right",
|
|
@@ -4,8 +4,8 @@ import { ListRestart, LogIn } from 'lucide-react';
|
|
|
4
4
|
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { AccountDot } from '../agents/AccountDot.js';
|
|
7
|
-
import { useChatHost } from '../host.js';
|
|
8
|
-
import { useHostLoginBlocked } from '../host-hooks.js';
|
|
7
|
+
import { useChatHost } from '../host/host.js';
|
|
8
|
+
import { useHostLoginBlocked } from '../host/host-hooks.js';
|
|
9
9
|
import { useChatScope } from '../scope.js';
|
|
10
10
|
import { useProviderAccounts } from '../state/provider-accounts.js';
|
|
11
11
|
import { useUsageStore } from '../state/usage.js';
|
|
@@ -91,7 +91,6 @@ function LoginButton(t0) {
|
|
|
91
91
|
}
|
|
92
92
|
return t7;
|
|
93
93
|
}
|
|
94
|
-
/* One account: where its numbers come from, then a bar per window, or why there are none. */
|
|
95
94
|
function LimitCard(t0) {
|
|
96
95
|
const $ = _c(35);
|
|
97
96
|
const {
|
package/dist/usage/UsagePage.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { USAGE_PROVIDERS } from '@adecore/agent-contracts';
|
|
3
3
|
import { Button, CloseButton, Dialog, EmptyState, FormError, IconButton, ScrollArea, Segmented, Select, Skeleton } from '@adecore/ui';
|
|
4
|
+
import { formatClock } from '@adecore/ui/format';
|
|
4
5
|
import { ChartNoAxesColumn, RefreshCw } from 'lucide-react';
|
|
5
6
|
import { useCallback, useEffect, useState, useSyncExternalStore } from 'react';
|
|
6
7
|
import { useTranslation } from 'react-i18next';
|
|
7
8
|
import { AccountDot } from '../agents/AccountDot.js';
|
|
8
|
-
import { useChatHost } from '../host.js';
|
|
9
|
+
import { useChatHost } from '../host/host.js';
|
|
9
10
|
import { useChatScope } from '../scope.js';
|
|
10
11
|
import { useProvidersStore } from '../state/providers.js';
|
|
11
12
|
import { askedKey, summaryPayload, USAGE_PERIODS, useUsage, useUsageStore } from '../state/usage.js';
|
|
12
13
|
import { whenOpen } from '../transport.js';
|
|
13
|
-
import {
|
|
14
|
+
import { formatCount, formatDate, formatRateDate, formatTokens, PROVIDER_LABELS } from './format.js';
|
|
14
15
|
import { useMoney } from './money.js';
|
|
15
16
|
import { deriveUsage, labelEveryFor } from './summary.js';
|
|
16
17
|
import { UsageBreakdown } from './UsageBreakdown.js';
|
|
@@ -24,7 +25,6 @@ const METRICS = ['cost', 'tokens'];
|
|
|
24
25
|
const ALL_ACCOUNTS = '*';
|
|
25
26
|
/* Over the whole popup rather than the body under the header, so an empty state stands in the middle of the dialog. */
|
|
26
27
|
const DIALOG_CENTER = 'pointer-events-none absolute inset-0';
|
|
27
|
-
/* Whether the scope's host answers right now, redrawn as its link comes and goes. */
|
|
28
28
|
function useAnswering(transport) {
|
|
29
29
|
const $ = _c(4);
|
|
30
30
|
let t0;
|
package/dist/usage/UsageTiles.js
CHANGED
|
@@ -3,7 +3,6 @@ import { totalTokensOf } from '@adecore/agent-contracts';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { formatTokens } from './format.js';
|
|
5
5
|
import { useMoney } from './money.js';
|
|
6
|
-
/* What the period moved, split by the kinds of token that are priced differently. */
|
|
7
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
7
|
export function UsageTiles(t0) {
|
|
9
8
|
const $ = _c(35);
|
package/dist/usage/format.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { UsageProvider, UsageRate } from '@adecore/agent-contracts';
|
|
2
2
|
import { formatTokens } from '@adecore/ui/format';
|
|
3
|
-
|
|
4
|
-
export type UsageCurrency = 'USD' | 'EUR';
|
|
3
|
+
import type { UsageCurrency } from '../state/usage.js';
|
|
5
4
|
export declare function formatCount(value: number): string;
|
|
6
5
|
export { formatTokens };
|
|
7
6
|
export declare function moneyFormat(currency: UsageCurrency, rate: UsageRate | null): (usd: number) => string;
|
package/dist/usage/format.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { formatDay, formatHour, formatWeekdayDay, formatMoney, formatNumber, formatTokens } from '@adecore/ui/format';
|
|
2
|
-
export { formatClock } from '@adecore/ui/format';
|
|
3
|
-
/* Read in the region of the machine looking at it: `$5,480.96` in the US, `$ 5.480,96` in the Netherlands. */
|
|
4
2
|
export function formatCount(value) {
|
|
5
3
|
return formatNumber(value);
|
|
6
4
|
}
|
package/dist/usage/index.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ export { UsagePage } from './UsagePage.js';
|
|
|
8
8
|
export { UsagePane } from './UsagePane.js';
|
|
9
9
|
export { UsageSummary } from './UsageSummary.js';
|
|
10
10
|
export { UsageTiles } from './UsageTiles.js';
|
|
11
|
-
export {
|
|
12
|
-
export { evenPace, type EvenPace, type LimitAccount, type LimitGroup, type PaceStanding } from './limit-groups.js';
|
|
11
|
+
export { type LimitAccount } from './limit-groups.js';
|
|
13
12
|
export { useLimitGroups } from './limits.js';
|
|
14
13
|
export { useMoney } from './money.js';
|
|
15
|
-
export { niceScale, labelEveryFor, deriveUsage, type
|
|
14
|
+
export { niceScale, labelEveryFor, deriveUsage, type ProviderTotal } from './summary.js';
|
package/dist/usage/index.js
CHANGED
|
@@ -9,8 +9,7 @@ export { UsagePage } from './UsagePage.js';
|
|
|
9
9
|
export { UsagePane } from './UsagePane.js';
|
|
10
10
|
export { UsageSummary } from './UsageSummary.js';
|
|
11
11
|
export { UsageTiles } from './UsageTiles.js';
|
|
12
|
-
export {
|
|
13
|
-
export { evenPace } from './limit-groups.js';
|
|
12
|
+
export {} from './limit-groups.js';
|
|
14
13
|
export { useLimitGroups } from './limits.js';
|
|
15
14
|
export { useMoney } from './money.js';
|
|
16
15
|
export { niceScale, labelEveryFor, deriveUsage } from './summary.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ProviderAccounts, type ProviderAccountStatus, type UsageLimitsProvider, type UsageLimitsSnapshot, type UsageProvider, type UsageWindow } from '@adecore/agent-contracts';
|
|
2
|
-
export { evenPace, type EvenPace, type PaceStanding } from '@adecore/agent-contracts';
|
|
3
2
|
export interface LimitAccount {
|
|
4
3
|
id: string;
|
|
5
4
|
kind: UsageProvider;
|
|
@@ -4,7 +4,6 @@ import i18next from 'i18next';
|
|
|
4
4
|
import { limitsAccountId } from '../agents/account-limits.js';
|
|
5
5
|
import { accountName, accountsOfKind, accountStatusLine } from '../agents/accounts.js';
|
|
6
6
|
import { PROVIDER_LABELS } from './format.js';
|
|
7
|
-
export { evenPace } from '@adecore/agent-contracts';
|
|
8
7
|
const MINUTE = 60_000;
|
|
9
8
|
/*
|
|
10
9
|
* The plan numbers per CLI, one row per account. The machine only reads an account that is signed in,
|
|
@@ -117,7 +116,6 @@ export function checkedLabel(entry, now) {
|
|
|
117
116
|
when
|
|
118
117
|
}) : when;
|
|
119
118
|
}
|
|
120
|
-
/* Why a read account has no bars, or null when it has them. */
|
|
121
119
|
export function explain(provider) {
|
|
122
120
|
if (provider.unavailable === null) {
|
|
123
121
|
return provider.windows.length === 0 ? i18next.t('agent-usage:limits.none') : null;
|
package/dist/usage/limits.js
CHANGED
package/dist/usage/summary.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare function niceScale(max: number, ticks?: number): {
|
|
|
14
14
|
max: number;
|
|
15
15
|
step: number;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
interface DerivedUsage {
|
|
18
18
|
slots: ChartSlot[];
|
|
19
19
|
providers: ProviderTotal[];
|
|
20
20
|
active: UsageProvider[];
|
|
@@ -25,10 +25,11 @@ export interface DerivedUsage {
|
|
|
25
25
|
export declare function enumerateSlots(summary: Pick<UsageSummaryResult, 'from' | 'to' | 'resolution'>): string[];
|
|
26
26
|
export declare function labelEveryFor(slots: number): number;
|
|
27
27
|
export declare function deriveUsage(summary: UsageSummaryResult, metric: UsageMetric): DerivedUsage;
|
|
28
|
-
|
|
28
|
+
interface UsageDay {
|
|
29
29
|
slot: string;
|
|
30
30
|
costByProvider: Partial<Record<UsageProvider, number>>;
|
|
31
31
|
costUsd: number;
|
|
32
32
|
tokens: number;
|
|
33
33
|
}
|
|
34
34
|
export declare function deriveDays(summary: UsageSummaryResult): UsageDay[];
|
|
35
|
+
export {};
|
package/dist/usage/summary.js
CHANGED
|
@@ -37,7 +37,6 @@ export function enumerateSlots(summary) {
|
|
|
37
37
|
}
|
|
38
38
|
return slots;
|
|
39
39
|
}
|
|
40
|
-
/* How often an x label fits: every third hour, every day, every week, every fortnight. */
|
|
41
40
|
export function labelEveryFor(slots) {
|
|
42
41
|
return slots <= 10 ? 1 : slots <= 24 ? 3 : slots <= 31 ? 7 : 15;
|
|
43
42
|
}
|