@adecore/agents-react 0.0.1 → 0.17.0-beta.1
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/LICENSE +110 -0
- package/README.md +53 -0
- package/dist/agents/AccountDot.d.ts +4 -0
- package/dist/agents/AccountDot.js +8 -0
- package/dist/agents/AgentIcon.d.ts +6 -0
- package/dist/agents/AgentIcon.js +20 -0
- package/dist/agents/ModelOptionControl.d.ts +15 -0
- package/dist/agents/ModelOptionControl.js +33 -0
- package/dist/agents/ProviderLogo.d.ts +8 -0
- package/dist/agents/ProviderLogo.js +8 -0
- package/dist/agents/account-limits.d.ts +7 -0
- package/dist/agents/account-limits.js +40 -0
- package/dist/agents/accounts.d.ts +22 -0
- package/dist/agents/accounts.js +113 -0
- package/dist/agents/model-name.d.ts +12 -0
- package/dist/agents/model-name.js +56 -0
- package/dist/agents/model-options.d.ts +5 -0
- package/dist/agents/model-options.js +15 -0
- package/dist/agents/provider-paths.d.ts +2 -0
- package/dist/agents/provider-paths.js +8 -0
- package/dist/agents/status-look.d.ts +13 -0
- package/dist/agents/status-look.js +24 -0
- package/dist/chat/account-choice.d.ts +11 -0
- package/dist/chat/account-choice.js +30 -0
- package/dist/chat/actions.d.ts +6 -0
- package/dist/chat/actions.js +68 -0
- package/dist/chat/activity.d.ts +5 -0
- package/dist/chat/activity.js +6 -0
- package/dist/chat/attachments.d.ts +23 -0
- package/dist/chat/attachments.js +86 -0
- package/dist/chat/bookmarks.d.ts +14 -0
- package/dist/chat/bookmarks.js +73 -0
- package/dist/chat/chat-client.d.ts +55 -0
- package/dist/chat/chat-client.js +279 -0
- package/dist/chat/chat-references.d.ts +5 -0
- package/dist/chat/chat-references.js +5 -0
- package/dist/chat/drafts.d.ts +29 -0
- package/dist/chat/drafts.js +116 -0
- package/dist/chat/forks.d.ts +2 -0
- package/dist/chat/forks.js +28 -0
- package/dist/chat/guards.d.ts +12 -0
- package/dist/chat/guards.js +69 -0
- package/dist/chat/logic/ansi.d.ts +13 -0
- package/dist/chat/logic/ansi.js +185 -0
- package/dist/chat/logic/answers.d.ts +1 -0
- package/dist/chat/logic/answers.js +8 -0
- package/dist/chat/logic/bookmarks.d.ts +5 -0
- package/dist/chat/logic/bookmarks.js +33 -0
- package/dist/chat/logic/context-usage.d.ts +12 -0
- package/dist/chat/logic/context-usage.js +21 -0
- package/dist/chat/logic/fork.d.ts +45 -0
- package/dist/chat/logic/fork.js +148 -0
- package/dist/chat/logic/handback.d.ts +2 -0
- package/dist/chat/logic/handback.js +8 -0
- package/dist/chat/logic/json.d.ts +1 -0
- package/dist/chat/logic/json.js +4 -0
- package/dist/chat/logic/limit.d.ts +7 -0
- package/dist/chat/logic/limit.js +34 -0
- package/dist/chat/logic/resume-compaction.d.ts +14 -0
- package/dist/chat/logic/resume-compaction.js +47 -0
- package/dist/chat/logic/scrubber.d.ts +50 -0
- package/dist/chat/logic/scrubber.js +220 -0
- package/dist/chat/logic/thread-cards.d.ts +3 -0
- package/dist/chat/logic/thread-cards.js +59 -0
- package/dist/chat/logic/timeline-copy.d.ts +4 -0
- package/dist/chat/logic/timeline-copy.js +59 -0
- package/dist/chat/logic/timeline-target.d.ts +12 -0
- package/dist/chat/logic/timeline-target.js +34 -0
- package/dist/chat/logic/timeline.d.ts +115 -0
- package/dist/chat/logic/timeline.js +343 -0
- package/dist/chat/logic/tool-catalog.d.ts +10 -0
- package/dist/chat/logic/tool-catalog.js +44 -0
- package/dist/chat/logic/tools.d.ts +15 -0
- package/dist/chat/logic/tools.js +82 -0
- package/dist/chat/logic/welcome.d.ts +2 -0
- package/dist/chat/logic/welcome.js +10 -0
- package/dist/chat/logic/workflow.d.ts +14 -0
- package/dist/chat/logic/workflow.js +47 -0
- package/dist/chat/mentions.d.ts +65 -0
- package/dist/chat/mentions.js +184 -0
- package/dist/chat/persisted-json.d.ts +5 -0
- package/dist/chat/persisted-json.js +58 -0
- package/dist/chat/preferences.d.ts +27 -0
- package/dist/chat/preferences.js +139 -0
- package/dist/chat/quote.d.ts +2 -0
- package/dist/chat/quote.js +25 -0
- package/dist/chat/recent-messages.d.ts +17 -0
- package/dist/chat/recent-messages.js +36 -0
- package/dist/chat/resume-compaction-dismissals.d.ts +3 -0
- package/dist/chat/resume-compaction-dismissals.js +14 -0
- package/dist/chat/runtime-modes.d.ts +4 -0
- package/dist/chat/runtime-modes.js +15 -0
- package/dist/chat/stash.d.ts +24 -0
- package/dist/chat/stash.js +91 -0
- package/dist/chat/subagent-conversation.d.ts +41 -0
- package/dist/chat/subagent-conversation.js +167 -0
- package/dist/chat/subagent-list.d.ts +19 -0
- package/dist/chat/subagent-list.js +106 -0
- package/dist/chat/subagent-support.d.ts +6 -0
- package/dist/chat/subagent-support.js +14 -0
- package/dist/chat/subagent-view.d.ts +35 -0
- package/dist/chat/subagent-view.js +96 -0
- package/dist/chat/thumbnails.d.ts +10 -0
- package/dist/chat/thumbnails.js +89 -0
- package/dist/chat/timeline-flash.d.ts +12 -0
- package/dist/chat/timeline-flash.js +16 -0
- package/dist/chat/timeline-scroll.d.ts +27 -0
- package/dist/chat/timeline-scroll.js +152 -0
- package/dist/chat/ui/AccountPill.d.ts +3 -0
- package/dist/chat/ui/AccountPill.js +23 -0
- package/dist/chat/ui/AnsiOutput.d.ts +5 -0
- package/dist/chat/ui/AnsiOutput.js +9 -0
- package/dist/chat/ui/BookmarkMarker.d.ts +8 -0
- package/dist/chat/ui/BookmarkMarker.js +57 -0
- package/dist/chat/ui/BookmarkSubmenu.d.ts +3 -0
- package/dist/chat/ui/BookmarkSubmenu.js +33 -0
- package/dist/chat/ui/ChatActivity.d.ts +7 -0
- package/dist/chat/ui/ChatActivity.js +84 -0
- package/dist/chat/ui/ChatReferenceChip.d.ts +4 -0
- package/dist/chat/ui/ChatReferenceChip.js +16 -0
- package/dist/chat/ui/CodeBlock.d.ts +4 -0
- package/dist/chat/ui/CodeBlock.js +132 -0
- package/dist/chat/ui/Composer.d.ts +15 -0
- package/dist/chat/ui/Composer.js +856 -0
- package/dist/chat/ui/ComposerInput.d.ts +29 -0
- package/dist/chat/ui/ComposerInput.js +127 -0
- package/dist/chat/ui/DiffPool.d.ts +5 -0
- package/dist/chat/ui/DiffPool.js +26 -0
- package/dist/chat/ui/EditDiff.d.ts +4 -0
- package/dist/chat/ui/EditDiff.js +21 -0
- package/dist/chat/ui/FadingWords.d.ts +3 -0
- package/dist/chat/ui/FadingWords.js +5 -0
- package/dist/chat/ui/ImageView.d.ts +6 -0
- package/dist/chat/ui/ImageView.js +81 -0
- package/dist/chat/ui/LimitState.d.ts +8 -0
- package/dist/chat/ui/LimitState.js +112 -0
- package/dist/chat/ui/Markdown.d.ts +18 -0
- package/dist/chat/ui/Markdown.js +159 -0
- package/dist/chat/ui/MessageActions.d.ts +9 -0
- package/dist/chat/ui/MessageActions.js +53 -0
- package/dist/chat/ui/Pickers.d.ts +21 -0
- package/dist/chat/ui/Pickers.js +111 -0
- package/dist/chat/ui/PromptComposer.d.ts +13 -0
- package/dist/chat/ui/PromptComposer.js +56 -0
- package/dist/chat/ui/QuoteButton.d.ts +7 -0
- package/dist/chat/ui/QuoteButton.js +74 -0
- package/dist/chat/ui/ResumeCompactionDock.d.ts +5 -0
- package/dist/chat/ui/ResumeCompactionDock.js +14 -0
- package/dist/chat/ui/RunSettings.d.ts +28 -0
- package/dist/chat/ui/RunSettings.js +153 -0
- package/dist/chat/ui/Scrubber.d.ts +17 -0
- package/dist/chat/ui/Scrubber.js +118 -0
- package/dist/chat/ui/SubagentControls.d.ts +11 -0
- package/dist/chat/ui/SubagentControls.js +36 -0
- package/dist/chat/ui/SubagentInfo.d.ts +4 -0
- package/dist/chat/ui/SubagentInfo.js +34 -0
- package/dist/chat/ui/SubagentStopButton.d.ts +7 -0
- package/dist/chat/ui/SubagentStopButton.js +34 -0
- package/dist/chat/ui/SubagentTimeline.d.ts +4 -0
- package/dist/chat/ui/SubagentTimeline.js +107 -0
- package/dist/chat/ui/Timeline.d.ts +6 -0
- package/dist/chat/ui/Timeline.js +424 -0
- package/dist/chat/ui/TimelineMenu.d.ts +12 -0
- package/dist/chat/ui/TimelineMenu.js +54 -0
- package/dist/chat/ui/UnifiedDiff.d.ts +11 -0
- package/dist/chat/ui/UnifiedDiff.js +66 -0
- package/dist/chat/ui/UploadThumb.d.ts +4 -0
- package/dist/chat/ui/UploadThumb.js +11 -0
- package/dist/chat/ui/Welcome.d.ts +4 -0
- package/dist/chat/ui/Welcome.js +16 -0
- package/dist/chat/ui/chips.d.ts +4 -0
- package/dist/chat/ui/chips.js +11 -0
- package/dist/chat/ui/code-lines.d.ts +18 -0
- package/dist/chat/ui/code-lines.js +46 -0
- package/dist/chat/ui/code-streaming.d.ts +1 -0
- package/dist/chat/ui/code-streaming.js +3 -0
- package/dist/chat/ui/code-theme.d.ts +3 -0
- package/dist/chat/ui/code-theme.js +12 -0
- package/dist/chat/ui/composer/chips.d.ts +6 -0
- package/dist/chat/ui/composer/chips.js +31 -0
- package/dist/chat/ui/composer/editor.d.ts +11 -0
- package/dist/chat/ui/composer/editor.js +98 -0
- package/dist/chat/ui/composer/insert.d.ts +2 -0
- package/dist/chat/ui/composer/insert.js +19 -0
- package/dist/chat/ui/composer/keys.d.ts +30 -0
- package/dist/chat/ui/composer/keys.js +100 -0
- package/dist/chat/ui/diff-theme.d.ts +2 -0
- package/dist/chat/ui/diff-theme.js +20 -0
- package/dist/chat/ui/file-links.d.ts +5 -0
- package/dist/chat/ui/file-links.js +20 -0
- package/dist/chat/ui/find-reveal.d.ts +7 -0
- package/dist/chat/ui/find-reveal.js +13 -0
- package/dist/chat/ui/full-diff.d.ts +6 -0
- package/dist/chat/ui/full-diff.js +19 -0
- package/dist/chat/ui/icons.d.ts +4 -0
- package/dist/chat/ui/icons.js +20 -0
- package/dist/chat/ui/markdown-blocks.d.ts +6 -0
- package/dist/chat/ui/markdown-blocks.js +103 -0
- package/dist/chat/ui/quote-selection.d.ts +3 -0
- package/dist/chat/ui/quote-selection.js +46 -0
- package/dist/chat/ui/rehype-chips.d.ts +23 -0
- package/dist/chat/ui/rehype-chips.js +32 -0
- package/dist/chat/ui/rehype-fade.d.ts +23 -0
- package/dist/chat/ui/rehype-fade.js +36 -0
- package/dist/chat/ui/remark-html-as-text.d.ts +8 -0
- package/dist/chat/ui/remark-html-as-text.js +26 -0
- package/dist/chat/ui/reply-context.d.ts +5 -0
- package/dist/chat/ui/reply-context.js +2 -0
- package/dist/chat/ui/reveal.d.ts +13 -0
- package/dist/chat/ui/reveal.js +114 -0
- package/dist/chat/ui/rows/ForksRow.d.ts +4 -0
- package/dist/chat/ui/rows/ForksRow.js +38 -0
- package/dist/chat/ui/rows/MessageRows.d.ts +40 -0
- package/dist/chat/ui/rows/MessageRows.js +204 -0
- package/dist/chat/ui/rows/Rows.d.ts +12 -0
- package/dist/chat/ui/rows/Rows.js +61 -0
- package/dist/chat/ui/rows/SubagentRow.d.ts +17 -0
- package/dist/chat/ui/rows/SubagentRow.js +101 -0
- package/dist/chat/ui/rows/TaskRow.d.ts +8 -0
- package/dist/chat/ui/rows/TaskRow.js +63 -0
- package/dist/chat/ui/rows/WorkRows.d.ts +47 -0
- package/dist/chat/ui/rows/WorkRows.js +168 -0
- package/dist/chat/ui/rows/WorkflowRow.d.ts +8 -0
- package/dist/chat/ui/rows/WorkflowRow.js +48 -0
- package/dist/chat/ui/rows/row-rhythm.d.ts +6 -0
- package/dist/chat/ui/rows/row-rhythm.js +34 -0
- package/dist/chat/ui/useToggleSet.d.ts +6 -0
- package/dist/chat/ui/useToggleSet.js +25 -0
- package/dist/host.d.ts +195 -0
- package/dist/host.js +55 -0
- package/dist/lazy.d.ts +6 -0
- package/dist/lazy.js +57 -0
- package/dist/locales/en/agent-chat.json +446 -0
- package/dist/locales/en/agent-prompts.json +42 -0
- package/dist/locales/en/agent-providers.json +131 -0
- package/dist/locales/en/agent-usage.json +131 -0
- package/dist/locales/nl/agent-chat.json +446 -0
- package/dist/locales/nl/agent-prompts.json +42 -0
- package/dist/locales/nl/agent-providers.json +131 -0
- package/dist/locales/nl/agent-usage.json +131 -0
- package/dist/locales.d.ts +5 -0
- package/dist/locales.js +20 -0
- package/dist/mounted-registry.d.ts +7 -0
- package/dist/mounted-registry.js +39 -0
- package/dist/port-transport.d.ts +6 -0
- package/dist/port-transport.js +129 -0
- package/dist/prompts/logic/focus.d.ts +2 -0
- package/dist/prompts/logic/focus.js +23 -0
- package/dist/prompts/logic/keys.d.ts +42 -0
- package/dist/prompts/logic/keys.js +94 -0
- package/dist/prompts/logic/prompts.d.ts +34 -0
- package/dist/prompts/logic/prompts.fixtures.d.ts +5 -0
- package/dist/prompts/logic/prompts.fixtures.js +79 -0
- package/dist/prompts/logic/prompts.js +32 -0
- package/dist/prompts/logic/subjects.d.ts +50 -0
- package/dist/prompts/logic/subjects.js +63 -0
- package/dist/prompts/logic/useFocusAfterAnswer.d.ts +6 -0
- package/dist/prompts/logic/useFocusAfterAnswer.js +28 -0
- package/dist/prompts/logic/usePromptSession.d.ts +24 -0
- package/dist/prompts/logic/usePromptSession.js +87 -0
- package/dist/prompts/ui/ApprovalBody.d.ts +13 -0
- package/dist/prompts/ui/ApprovalBody.js +34 -0
- package/dist/prompts/ui/PromptActions.d.ts +27 -0
- package/dist/prompts/ui/PromptActions.js +18 -0
- package/dist/prompts/ui/PromptCard.d.ts +16 -0
- package/dist/prompts/ui/PromptCard.js +50 -0
- package/dist/prompts/ui/PromptView.d.ts +2 -0
- package/dist/prompts/ui/PromptView.js +47 -0
- package/dist/prompts/ui/QuestionBody.d.ts +9 -0
- package/dist/prompts/ui/QuestionBody.js +87 -0
- package/dist/providers/AccountColors.d.ts +5 -0
- package/dist/providers/AccountColors.js +8 -0
- package/dist/providers/AccountDetail.d.ts +12 -0
- package/dist/providers/AccountDetail.js +69 -0
- package/dist/providers/AccountVariables.d.ts +8 -0
- package/dist/providers/AccountVariables.js +43 -0
- package/dist/providers/AddAccountForm.d.ts +10 -0
- package/dist/providers/AddAccountForm.js +54 -0
- package/dist/providers/CliDetail.d.ts +12 -0
- package/dist/providers/CliDetail.js +54 -0
- package/dist/providers/ProvidersPane.d.ts +9 -0
- package/dist/providers/ProvidersPane.js +86 -0
- package/dist/providers/account-actions.d.ts +7 -0
- package/dist/providers/account-actions.js +57 -0
- package/dist/providers/parts.d.ts +9 -0
- package/dist/providers/parts.js +18 -0
- package/dist/providers/provider-abilities.d.ts +2 -0
- package/dist/providers/provider-abilities.js +7 -0
- package/dist/providers/variables.d.ts +13 -0
- package/dist/providers/variables.js +63 -0
- package/dist/scope.d.ts +11 -0
- package/dist/scope.js +10 -0
- package/dist/settings/sections.d.ts +13 -0
- package/dist/settings/sections.js +32 -0
- package/dist/state/chats.d.ts +44 -0
- package/dist/state/chats.js +199 -0
- package/dist/state/provider-accounts.d.ts +17 -0
- package/dist/state/provider-accounts.js +67 -0
- package/dist/state/providers.d.ts +17 -0
- package/dist/state/providers.js +33 -0
- package/dist/state/usage.d.ts +44 -0
- package/dist/state/usage.js +121 -0
- package/dist/storage.d.ts +20 -0
- package/dist/storage.js +89 -0
- package/dist/theme.css +196 -0
- package/dist/transport.d.ts +24 -0
- package/dist/transport.js +18 -0
- package/dist/ui/PlainTextarea.d.ts +2 -0
- package/dist/ui/PlainTextarea.js +5 -0
- package/dist/usage/LimitsList.d.ts +18 -0
- package/dist/usage/LimitsList.js +73 -0
- package/dist/usage/UsageBreakdown.d.ts +9 -0
- package/dist/usage/UsageBreakdown.js +67 -0
- package/dist/usage/UsageChart.d.ts +10 -0
- package/dist/usage/UsageChart.js +47 -0
- package/dist/usage/UsageDialog.d.ts +6 -0
- package/dist/usage/UsageDialog.js +12 -0
- package/dist/usage/UsageLimits.d.ts +1 -0
- package/dist/usage/UsageLimits.js +57 -0
- package/dist/usage/UsageLimitsCard.d.ts +4 -0
- package/dist/usage/UsageLimitsCard.js +26 -0
- package/dist/usage/UsagePage.d.ts +7 -0
- package/dist/usage/UsagePage.js +154 -0
- package/dist/usage/UsagePane.d.ts +3 -0
- package/dist/usage/UsagePane.js +21 -0
- package/dist/usage/UsageSummary.d.ts +12 -0
- package/dist/usage/UsageSummary.js +15 -0
- package/dist/usage/UsageTiles.d.ts +7 -0
- package/dist/usage/UsageTiles.js +19 -0
- package/dist/usage/format.d.ts +13 -0
- package/dist/usage/format.js +55 -0
- package/dist/usage/limit-groups.d.ts +22 -0
- package/dist/usage/limit-groups.js +86 -0
- package/dist/usage/limits.d.ts +4 -0
- package/dist/usage/limits.js +58 -0
- package/dist/usage/money.d.ts +1 -0
- package/dist/usage/money.js +13 -0
- package/dist/usage/summary.d.ts +34 -0
- package/dist/usage/summary.js +94 -0
- package/package.json +895 -3
- package/src/agents/AccountDot.tsx +14 -0
- package/src/agents/AgentIcon.tsx +26 -0
- package/src/agents/ModelOptionControl.tsx +68 -0
- package/src/agents/ProviderLogo.tsx +20 -0
- package/src/agents/account-limits.ts +61 -0
- package/src/agents/accounts.ts +137 -0
- package/src/agents/model-name.ts +70 -0
- package/src/agents/model-options.ts +21 -0
- package/src/agents/provider-paths.ts +10 -0
- package/src/agents/status-look.ts +43 -0
- package/src/chat/account-choice.ts +44 -0
- package/src/chat/actions.ts +72 -0
- package/src/chat/activity.ts +8 -0
- package/src/chat/attachments.ts +118 -0
- package/src/chat/bookmarks.ts +87 -0
- package/src/chat/chat-client.ts +345 -0
- package/src/chat/chat-references.ts +11 -0
- package/src/chat/drafts.ts +165 -0
- package/src/chat/forks.ts +33 -0
- package/src/chat/guards.ts +84 -0
- package/src/chat/logic/ansi.ts +206 -0
- package/src/chat/logic/answers.ts +8 -0
- package/src/chat/logic/bookmarks.ts +42 -0
- package/src/chat/logic/context-usage.ts +36 -0
- package/src/chat/logic/fork.ts +200 -0
- package/src/chat/logic/handback.ts +10 -0
- package/src/chat/logic/json.ts +4 -0
- package/src/chat/logic/limit.ts +46 -0
- package/src/chat/logic/resume-compaction.ts +71 -0
- package/src/chat/logic/scrubber.ts +289 -0
- package/src/chat/logic/thread-cards.ts +64 -0
- package/src/chat/logic/timeline-copy.ts +65 -0
- package/src/chat/logic/timeline-target.ts +52 -0
- package/src/chat/logic/timeline.ts +419 -0
- package/src/chat/logic/tool-catalog.ts +62 -0
- package/src/chat/logic/tools.ts +102 -0
- package/src/chat/logic/welcome.ts +13 -0
- package/src/chat/logic/workflow.ts +66 -0
- package/src/chat/mentions.ts +232 -0
- package/src/chat/persisted-json.ts +67 -0
- package/src/chat/preferences.ts +179 -0
- package/src/chat/quote.ts +26 -0
- package/src/chat/recent-messages.ts +59 -0
- package/src/chat/resume-compaction-dismissals.ts +17 -0
- package/src/chat/runtime-modes.ts +18 -0
- package/src/chat/stash.ts +122 -0
- package/src/chat/subagent-conversation.ts +203 -0
- package/src/chat/subagent-list.ts +141 -0
- package/src/chat/subagent-support.ts +21 -0
- package/src/chat/subagent-view.ts +137 -0
- package/src/chat/thumbnails.ts +108 -0
- package/src/chat/timeline-flash.ts +33 -0
- package/src/chat/timeline-scroll.ts +199 -0
- package/src/chat/ui/AccountPill.tsx +31 -0
- package/src/chat/ui/AnsiOutput.tsx +18 -0
- package/src/chat/ui/BookmarkMarker.tsx +108 -0
- package/src/chat/ui/BookmarkSubmenu.tsx +53 -0
- package/src/chat/ui/ChatActivity.tsx +198 -0
- package/src/chat/ui/ChatReferenceChip.tsx +28 -0
- package/src/chat/ui/CodeBlock.tsx +175 -0
- package/src/chat/ui/Composer.tsx +1326 -0
- package/src/chat/ui/ComposerInput.tsx +187 -0
- package/src/chat/ui/DiffPool.tsx +36 -0
- package/src/chat/ui/EditDiff.tsx +30 -0
- package/src/chat/ui/FadingWords.tsx +18 -0
- package/src/chat/ui/ImageView.tsx +159 -0
- package/src/chat/ui/LimitState.tsx +165 -0
- package/src/chat/ui/Markdown.tsx +258 -0
- package/src/chat/ui/MessageActions.tsx +88 -0
- package/src/chat/ui/Pickers.tsx +272 -0
- package/src/chat/ui/PromptComposer.tsx +119 -0
- package/src/chat/ui/QuoteButton.tsx +103 -0
- package/src/chat/ui/ResumeCompactionDock.tsx +28 -0
- package/src/chat/ui/RunSettings.tsx +546 -0
- package/src/chat/ui/Scrubber.tsx +265 -0
- package/src/chat/ui/SubagentControls.tsx +66 -0
- package/src/chat/ui/SubagentInfo.tsx +67 -0
- package/src/chat/ui/SubagentStopButton.tsx +45 -0
- package/src/chat/ui/SubagentTimeline.tsx +170 -0
- package/src/chat/ui/Timeline.tsx +628 -0
- package/src/chat/ui/TimelineMenu.tsx +124 -0
- package/src/chat/ui/UnifiedDiff.tsx +99 -0
- package/src/chat/ui/UploadThumb.tsx +13 -0
- package/src/chat/ui/Welcome.tsx +22 -0
- package/src/chat/ui/chips.ts +15 -0
- package/src/chat/ui/code-lines.ts +60 -0
- package/src/chat/ui/code-streaming.ts +4 -0
- package/src/chat/ui/code-theme.ts +15 -0
- package/src/chat/ui/composer/chips.ts +43 -0
- package/src/chat/ui/composer/editor.ts +118 -0
- package/src/chat/ui/composer/insert.ts +22 -0
- package/src/chat/ui/composer/keys.ts +144 -0
- package/src/chat/ui/diff-theme.ts +23 -0
- package/src/chat/ui/file-links.ts +24 -0
- package/src/chat/ui/find-reveal.ts +23 -0
- package/src/chat/ui/full-diff.ts +25 -0
- package/src/chat/ui/icons.tsx +24 -0
- package/src/chat/ui/markdown-blocks.ts +123 -0
- package/src/chat/ui/quote-selection.ts +53 -0
- package/src/chat/ui/rehype-chips.ts +62 -0
- package/src/chat/ui/rehype-fade.ts +64 -0
- package/src/chat/ui/remark-html-as-text.ts +36 -0
- package/src/chat/ui/reply-context.ts +4 -0
- package/src/chat/ui/reveal.ts +135 -0
- package/src/chat/ui/rows/ForksRow.tsx +79 -0
- package/src/chat/ui/rows/MessageRows.tsx +415 -0
- package/src/chat/ui/rows/Rows.tsx +81 -0
- package/src/chat/ui/rows/SubagentRow.tsx +209 -0
- package/src/chat/ui/rows/TaskRow.tsx +91 -0
- package/src/chat/ui/rows/WorkRows.tsx +445 -0
- package/src/chat/ui/rows/WorkflowRow.tsx +120 -0
- package/src/chat/ui/rows/row-rhythm.ts +37 -0
- package/src/chat/ui/useToggleSet.ts +39 -0
- package/src/host.ts +324 -0
- package/src/lazy.tsx +64 -0
- package/src/locales/en/agent-chat.json +446 -0
- package/src/locales/en/agent-prompts.json +42 -0
- package/src/locales/en/agent-providers.json +131 -0
- package/src/locales/en/agent-usage.json +131 -0
- package/src/locales/nl/agent-chat.json +446 -0
- package/src/locales/nl/agent-prompts.json +42 -0
- package/src/locales/nl/agent-providers.json +131 -0
- package/src/locales/nl/agent-usage.json +131 -0
- package/src/locales.ts +33 -0
- package/src/mounted-registry.ts +45 -0
- package/src/port-transport.ts +146 -0
- package/src/prompts/logic/focus.ts +25 -0
- package/src/prompts/logic/keys.ts +116 -0
- package/src/prompts/logic/prompts.fixtures.ts +84 -0
- package/src/prompts/logic/prompts.ts +58 -0
- package/src/prompts/logic/subjects.ts +122 -0
- package/src/prompts/logic/useFocusAfterAnswer.ts +38 -0
- package/src/prompts/logic/usePromptSession.ts +114 -0
- package/src/prompts/ui/ApprovalBody.tsx +109 -0
- package/src/prompts/ui/PromptActions.tsx +109 -0
- package/src/prompts/ui/PromptCard.tsx +101 -0
- package/src/prompts/ui/PromptView.tsx +111 -0
- package/src/prompts/ui/QuestionBody.tsx +174 -0
- package/src/providers/AccountColors.tsx +8 -0
- package/src/providers/AccountDetail.tsx +209 -0
- package/src/providers/AccountVariables.tsx +126 -0
- package/src/providers/AddAccountForm.tsx +121 -0
- package/src/providers/CliDetail.tsx +157 -0
- package/src/providers/ProvidersPane.tsx +236 -0
- package/src/providers/account-actions.ts +67 -0
- package/src/providers/parts.tsx +25 -0
- package/src/providers/provider-abilities.ts +9 -0
- package/src/providers/variables.ts +87 -0
- package/src/scope.ts +30 -0
- package/src/settings/sections.ts +47 -0
- package/src/state/chats.ts +279 -0
- package/src/state/provider-accounts.ts +87 -0
- package/src/state/providers.ts +50 -0
- package/src/state/usage.ts +196 -0
- package/src/storage.ts +113 -0
- package/src/theme.css +196 -0
- package/src/transport.ts +50 -0
- package/src/ui/PlainTextarea.tsx +6 -0
- package/src/usage/LimitsList.tsx +232 -0
- package/src/usage/UsageBreakdown.tsx +210 -0
- package/src/usage/UsageChart.tsx +113 -0
- package/src/usage/UsageDialog.tsx +20 -0
- package/src/usage/UsageLimits.tsx +145 -0
- package/src/usage/UsageLimitsCard.tsx +36 -0
- package/src/usage/UsagePage.tsx +276 -0
- package/src/usage/UsagePane.tsx +52 -0
- package/src/usage/UsageSummary.tsx +50 -0
- package/src/usage/UsageTiles.tsx +34 -0
- package/src/usage/format.ts +71 -0
- package/src/usage/limit-groups.ts +119 -0
- package/src/usage/limits.ts +71 -0
- package/src/usage/money.ts +14 -0
- package/src/usage/summary.ts +137 -0
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { ComponentProps, ComponentType, ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { Extension } from '@codemirror/state';
|
|
3
|
+
import type { EditorView } from '@codemirror/view';
|
|
4
|
+
import type { ThemeRegistration } from 'shiki';
|
|
5
|
+
import type { AgentKind, ChatCheckpointDiff, ChatConfigurePayload, ChatItem, ChatSubagentItem } from '@adecore/agent-contracts';
|
|
6
|
+
import type { TimelineRow } from './chat/logic/timeline.js';
|
|
7
|
+
import type { FindReveal } from './chat/ui/find-reveal.js';
|
|
8
|
+
import type { PromptAction } from './prompts/logic/prompts.js';
|
|
9
|
+
import type { HostPrompt, PromptViewProps } from './prompts/logic/subjects.js';
|
|
10
|
+
import { type ChatStorageOptions } from './storage.js';
|
|
11
|
+
export interface AccentChoice {
|
|
12
|
+
id: string;
|
|
13
|
+
color: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ChatToast {
|
|
16
|
+
id?: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
kind: 'success' | 'error' | 'deleted';
|
|
20
|
+
action?: {
|
|
21
|
+
label: string;
|
|
22
|
+
run(): void;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface ChatActions {
|
|
26
|
+
clear(chatId: string, force: boolean): Promise<void>;
|
|
27
|
+
stopTurn(chatId: string, subagents: boolean): Promise<void>;
|
|
28
|
+
unqueue(chatId: string, messageId: string): Promise<void>;
|
|
29
|
+
sendNow(chatId: string, messageId: string): Promise<void>;
|
|
30
|
+
compact(chatId: string): Promise<void>;
|
|
31
|
+
configure(chatId: string, patch: Omit<ChatConfigurePayload, 'chatId'>): Promise<void>;
|
|
32
|
+
continueOn(chatId: string, account: string): Promise<void>;
|
|
33
|
+
turnDiff(chatId: string, turnId: string): Promise<ChatCheckpointDiff | null>;
|
|
34
|
+
stopSubagent(chatId: string, toolUseId: string): Promise<void>;
|
|
35
|
+
stopTask(chatId: string, taskId: string): Promise<void>;
|
|
36
|
+
approve(chatId: string, requestId: string, decision: 'allow' | 'allow-always' | 'deny', message?: string): Promise<void>;
|
|
37
|
+
answer(chatId: string, requestId: string, answers: Record<string, string>): Promise<void>;
|
|
38
|
+
dismiss(chatId: string, itemId: string): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export interface FileRef {
|
|
41
|
+
path: string;
|
|
42
|
+
line?: number;
|
|
43
|
+
directory: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface ChatPlace {
|
|
46
|
+
title: string | null;
|
|
47
|
+
go(): void;
|
|
48
|
+
}
|
|
49
|
+
export interface SubagentTask {
|
|
50
|
+
status: 'open' | 'done' | 'failed' | 'cancelled';
|
|
51
|
+
createdAt: number;
|
|
52
|
+
settledAt: number | null;
|
|
53
|
+
paused?: {
|
|
54
|
+
until?: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface TimelineFindOptions {
|
|
58
|
+
chatId: string;
|
|
59
|
+
frame: RefObject<HTMLDivElement | null>;
|
|
60
|
+
thread: RefObject<HTMLDivElement | null>;
|
|
61
|
+
scroller: RefObject<HTMLDivElement | null>;
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
rows: readonly TimelineRow[];
|
|
64
|
+
structure: Readonly<Record<string, ChatItem>> | undefined;
|
|
65
|
+
order: readonly string[] | undefined;
|
|
66
|
+
firstRowInView(): number;
|
|
67
|
+
openTurn(turnId: string): void;
|
|
68
|
+
openGroup(id: string): void;
|
|
69
|
+
openSubagent(id: string): void;
|
|
70
|
+
scrollToRow(index: number): void;
|
|
71
|
+
coveredHeight(): number;
|
|
72
|
+
stopFollowing(): void;
|
|
73
|
+
}
|
|
74
|
+
export interface TimelineFind {
|
|
75
|
+
open: boolean;
|
|
76
|
+
bar: ReactNode;
|
|
77
|
+
reveal: FindReveal | null;
|
|
78
|
+
hitRows: readonly number[];
|
|
79
|
+
currentRow: number | null;
|
|
80
|
+
}
|
|
81
|
+
export interface ComposerDictationProps {
|
|
82
|
+
targetRef: RefObject<HTMLElement | null>;
|
|
83
|
+
buttonContainer: HTMLElement | null | undefined;
|
|
84
|
+
disabled: boolean;
|
|
85
|
+
editor(): EditorView | null;
|
|
86
|
+
}
|
|
87
|
+
export type TextareaProps = ComponentProps<'textarea'> & {
|
|
88
|
+
buttonClassName?: string;
|
|
89
|
+
};
|
|
90
|
+
export interface ResourceUrl {
|
|
91
|
+
url: string | null;
|
|
92
|
+
failure: string | null;
|
|
93
|
+
}
|
|
94
|
+
export interface ComposerSlotProps {
|
|
95
|
+
scopeId: string;
|
|
96
|
+
chatId: string;
|
|
97
|
+
disabled: boolean;
|
|
98
|
+
insert(text: string): void;
|
|
99
|
+
}
|
|
100
|
+
export interface SubagentSlotProps {
|
|
101
|
+
chatId: string;
|
|
102
|
+
items: readonly ChatSubagentItem[];
|
|
103
|
+
}
|
|
104
|
+
export interface ThreadCard {
|
|
105
|
+
id: string;
|
|
106
|
+
at: number;
|
|
107
|
+
render(): ReactNode;
|
|
108
|
+
}
|
|
109
|
+
export interface ReplyAuthor {
|
|
110
|
+
name: string;
|
|
111
|
+
mark?: ReactNode;
|
|
112
|
+
}
|
|
113
|
+
export interface ChatHost {
|
|
114
|
+
storage?: ChatStorageOptions;
|
|
115
|
+
accents: {
|
|
116
|
+
all: readonly AccentChoice[];
|
|
117
|
+
featured: readonly string[];
|
|
118
|
+
label(id: string): string;
|
|
119
|
+
current(): string;
|
|
120
|
+
};
|
|
121
|
+
isApplePlatform(): boolean;
|
|
122
|
+
isAppShortcut(event: KeyboardEvent): boolean;
|
|
123
|
+
notify(toast: ChatToast): void;
|
|
124
|
+
actions: ChatActions | null;
|
|
125
|
+
searchFiles: ((scopeId: string, cwd: string, query: string, limit: number) => Promise<string[]>) | null;
|
|
126
|
+
attachments: {
|
|
127
|
+
useUrl(scopeId: string, chatId: string, attachmentId: string): ResourceUrl;
|
|
128
|
+
read(scopeId: string, chatId: string, attachmentId: string): Promise<Blob>;
|
|
129
|
+
};
|
|
130
|
+
ReadImage: ComponentType<{
|
|
131
|
+
path: string;
|
|
132
|
+
}> | null;
|
|
133
|
+
code: {
|
|
134
|
+
useMode(): 'light' | 'dark';
|
|
135
|
+
useThemes(): {
|
|
136
|
+
light: string;
|
|
137
|
+
dark: string;
|
|
138
|
+
};
|
|
139
|
+
custom: ReadonlyArray<ThemeRegistration & {
|
|
140
|
+
name: string;
|
|
141
|
+
}>;
|
|
142
|
+
};
|
|
143
|
+
useStreaming(): 'words' | 'blocks' | 'whole';
|
|
144
|
+
fileLinks: {
|
|
145
|
+
target(text: string, cwd: string | null): FileRef | null;
|
|
146
|
+
open(cwd: string | null, ref: FileRef): void;
|
|
147
|
+
} | null;
|
|
148
|
+
useTimelineFind(options: TimelineFindOptions): TimelineFind;
|
|
149
|
+
dictation: {
|
|
150
|
+
Textarea: ComponentType<TextareaProps>;
|
|
151
|
+
composer: {
|
|
152
|
+
extensions: Extension;
|
|
153
|
+
Control: ComponentType<ComposerDictationProps>;
|
|
154
|
+
} | null;
|
|
155
|
+
};
|
|
156
|
+
prompts: {
|
|
157
|
+
useExtra(scopeId: string, chatId: string): readonly HostPrompt[];
|
|
158
|
+
render(prompt: HostPrompt, props: PromptViewProps): ReactNode;
|
|
159
|
+
answer(prompt: HostPrompt, action: PromptAction): Promise<void>;
|
|
160
|
+
};
|
|
161
|
+
useReferableChats(): ReadonlyArray<{
|
|
162
|
+
id: string;
|
|
163
|
+
title: string;
|
|
164
|
+
}>;
|
|
165
|
+
openLogin: ((scopeId: string, kind: AgentKind, accountId: string, name: string) => Promise<void>) | null;
|
|
166
|
+
useLoginBlocked(scopeId: string): string | null;
|
|
167
|
+
useProjectLook(scopeId: string, projectId: string | null): {
|
|
168
|
+
name: string;
|
|
169
|
+
mark: ReactNode;
|
|
170
|
+
} | null;
|
|
171
|
+
useChatPlace(chatId: string): ChatPlace;
|
|
172
|
+
useContextSources(chatId: string): ReadonlyArray<{
|
|
173
|
+
title: string;
|
|
174
|
+
}>;
|
|
175
|
+
useHidesFolder(chatId: string): boolean;
|
|
176
|
+
useWelcome(chatId: string): boolean;
|
|
177
|
+
tasks: {
|
|
178
|
+
useTasks(scopeId: string): Readonly<Record<string, SubagentTask>> | undefined;
|
|
179
|
+
useTask(scopeId: string, taskId: string | null): SubagentTask | null;
|
|
180
|
+
};
|
|
181
|
+
confirm: {
|
|
182
|
+
stopSubagents(scopeId: string, chatId: string, run: () => void): void;
|
|
183
|
+
stopTask(scopeId: string, childId: string, title: string, run: () => void): void;
|
|
184
|
+
};
|
|
185
|
+
fork: ((chatId: string, turnId: string) => void) | null;
|
|
186
|
+
openSettings(section: 'providers' | 'agents'): void;
|
|
187
|
+
useResumeAtReset(scopeId: string): boolean;
|
|
188
|
+
useComposerPlaceholder(scopeId: string, chatId: string): string | null;
|
|
189
|
+
ComposerSlot: ComponentType<ComposerSlotProps> | null;
|
|
190
|
+
SubagentSlot: ComponentType<SubagentSlotProps> | null;
|
|
191
|
+
useThreadCards(scopeId: string, chatId: string): readonly ThreadCard[];
|
|
192
|
+
useReplyAuthor(scopeId: string, chatId: string): ReplyAuthor | null;
|
|
193
|
+
}
|
|
194
|
+
export declare function setChatHost(patch: Partial<ChatHost>): void;
|
|
195
|
+
export declare function chatHost(): ChatHost;
|
package/dist/host.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { isApplePlatform } from '@adecore/ui';
|
|
2
|
+
import { PlainTextarea } from './ui/PlainTextarea.js';
|
|
3
|
+
import { configureChatStorage } from './storage.js';
|
|
4
|
+
const NO_PROMPTS = [];
|
|
5
|
+
const NO_CHATS = [];
|
|
6
|
+
const NO_ROWS = [];
|
|
7
|
+
const NO_FIND = { open: false, bar: null, reveal: null, hitRows: NO_ROWS, currentRow: null };
|
|
8
|
+
const NO_SOURCES = [];
|
|
9
|
+
const NO_URL = { url: null, failure: null };
|
|
10
|
+
const NOWHERE = { title: null, go: () => undefined };
|
|
11
|
+
const NO_CARDS = [];
|
|
12
|
+
const DEFAULT_HOST = {
|
|
13
|
+
accents: { all: [], featured: [], label: (id) => id, current: () => '' },
|
|
14
|
+
isApplePlatform,
|
|
15
|
+
isAppShortcut: () => false,
|
|
16
|
+
notify: () => undefined,
|
|
17
|
+
actions: null,
|
|
18
|
+
searchFiles: null,
|
|
19
|
+
attachments: { useUrl: () => NO_URL, read: () => Promise.reject(new Error('This app keeps no attached files')) },
|
|
20
|
+
ReadImage: null,
|
|
21
|
+
code: { useMode: () => 'light', useThemes: () => ({ light: 'github-light', dark: 'github-dark' }), custom: [] },
|
|
22
|
+
useStreaming: () => 'words',
|
|
23
|
+
fileLinks: null,
|
|
24
|
+
useTimelineFind: () => NO_FIND,
|
|
25
|
+
dictation: { Textarea: PlainTextarea, composer: null },
|
|
26
|
+
prompts: { useExtra: () => NO_PROMPTS, render: () => null, answer: () => Promise.reject(new Error('This app raises no prompts of its own')) },
|
|
27
|
+
useReferableChats: () => NO_CHATS,
|
|
28
|
+
openLogin: null,
|
|
29
|
+
useLoginBlocked: () => null,
|
|
30
|
+
useProjectLook: () => null,
|
|
31
|
+
useChatPlace: () => NOWHERE,
|
|
32
|
+
useContextSources: () => NO_SOURCES,
|
|
33
|
+
useHidesFolder: () => false,
|
|
34
|
+
useWelcome: () => false,
|
|
35
|
+
tasks: { useTasks: () => undefined, useTask: () => null },
|
|
36
|
+
confirm: { stopSubagents: (_scopeId, _chatId, run) => run(), stopTask: (_scopeId, _childId, _title, run) => run() },
|
|
37
|
+
fork: null,
|
|
38
|
+
openSettings: () => undefined,
|
|
39
|
+
useResumeAtReset: () => true,
|
|
40
|
+
useComposerPlaceholder: () => null,
|
|
41
|
+
ComposerSlot: null,
|
|
42
|
+
SubagentSlot: null,
|
|
43
|
+
useThreadCards: () => NO_CARDS,
|
|
44
|
+
useReplyAuthor: () => null
|
|
45
|
+
};
|
|
46
|
+
let host = DEFAULT_HOST;
|
|
47
|
+
export function setChatHost(patch) {
|
|
48
|
+
if (patch.storage !== undefined) {
|
|
49
|
+
configureChatStorage(patch.storage);
|
|
50
|
+
}
|
|
51
|
+
host = { ...host, ...patch };
|
|
52
|
+
}
|
|
53
|
+
export function chatHost() {
|
|
54
|
+
return host;
|
|
55
|
+
}
|
package/dist/lazy.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentProps, type ComponentType } from 'react';
|
|
2
|
+
type Loader = () => Promise<unknown>;
|
|
3
|
+
export declare function setLazyPrefetch(next: (load: Loader) => void): void;
|
|
4
|
+
export declare function onLazyOpenError(listener: (error: unknown) => void): () => void;
|
|
5
|
+
export declare function lazyNamed<Module extends Record<Name, ComponentType<any>>, Name extends keyof Module>(load: () => Promise<Module>, name: Name): ComponentType<ComponentProps<Module[Name]>>;
|
|
6
|
+
export {};
|
package/dist/lazy.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { lazy } from 'react';
|
|
3
|
+
const loaders = [];
|
|
4
|
+
let register = null;
|
|
5
|
+
const openErrorListeners = new Set();
|
|
6
|
+
/*
|
|
7
|
+
* Hands every module the chat loads lazily to the app's prefetcher: the ones made so far, and each
|
|
8
|
+
* one made from now on. Without it they load on their first render, as `React.lazy` does.
|
|
9
|
+
*/
|
|
10
|
+
export function setLazyPrefetch(next) {
|
|
11
|
+
register = next;
|
|
12
|
+
for (const load of loaders) {
|
|
13
|
+
next(load);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/*
|
|
17
|
+
* Tells `listener` when a module the chat loads for a render fails to load, the way `onLazyOpenError`
|
|
18
|
+
* of `@adecore/ui` does for the app's own. A failed prefetch never reaches it.
|
|
19
|
+
*/
|
|
20
|
+
export function onLazyOpenError(listener) {
|
|
21
|
+
openErrorListeners.add(listener);
|
|
22
|
+
return () => {
|
|
23
|
+
openErrorListeners.delete(listener);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/*
|
|
27
|
+
* `React.lazy` for a module that exports its component by name, `default` included. Once the module
|
|
28
|
+
* is here the component is drawn straight away, since `React.lazy` suspends for a tick even on a
|
|
29
|
+
* module the prefetcher already fetched.
|
|
30
|
+
*/
|
|
31
|
+
export function lazyNamed(load, name) {
|
|
32
|
+
let loaded = null;
|
|
33
|
+
const open = async () => {
|
|
34
|
+
const component = (await load())[name];
|
|
35
|
+
loaded ??= component;
|
|
36
|
+
return component;
|
|
37
|
+
};
|
|
38
|
+
loaders.push(open);
|
|
39
|
+
register?.(open);
|
|
40
|
+
// Only a render loads through here; a prefetch calls `open` itself, so its failures report nothing.
|
|
41
|
+
const Lazy = lazy(async () => {
|
|
42
|
+
try {
|
|
43
|
+
return { default: await open() };
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
for (const listener of openErrorListeners) {
|
|
47
|
+
listener(error);
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const LazyNamed = (props) => {
|
|
53
|
+
const Component = loaded ?? Lazy;
|
|
54
|
+
return _jsx(Component, { ...props });
|
|
55
|
+
};
|
|
56
|
+
return LazyNamed;
|
|
57
|
+
}
|