@adecore/agents-react 0.23.1 → 0.24.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/README.md +14 -11
- package/dist/agents/AccountDot.js +3 -1
- package/dist/agents/accounts.d.ts +3 -2
- package/dist/agents/accounts.js +5 -6
- package/dist/chat/actions.d.ts +2 -2
- package/dist/chat/actions.js +8 -5
- package/dist/chat/bookmarks.d.ts +5 -3
- package/dist/chat/bookmarks.js +13 -14
- package/dist/chat/chat-client.d.ts +1 -0
- package/dist/chat/chat-client.js +7 -0
- package/dist/chat/composer-send.d.ts +3 -0
- package/dist/chat/composer-send.js +22 -0
- package/dist/chat/forks.js +22 -5
- package/dist/chat/index.d.ts +31 -0
- package/dist/chat/index.js +28 -0
- package/dist/chat/logic/embedded-code.d.ts +8 -0
- package/dist/chat/logic/embedded-code.js +371 -0
- package/dist/chat/logic/fork.js +1 -0
- package/dist/chat/logic/goal.d.ts +6 -0
- package/dist/chat/logic/goal.js +26 -0
- package/dist/chat/logic/scrubber.d.ts +1 -1
- package/dist/chat/logic/scrubber.js +6 -5
- package/dist/chat/logic/thought.d.ts +3 -0
- package/dist/chat/logic/thought.js +35 -0
- package/dist/chat/logic/thread-cards.js +2 -0
- package/dist/chat/logic/timeline.d.ts +5 -0
- package/dist/chat/logic/timeline.js +22 -1
- package/dist/chat/logic/tool-catalog.d.ts +1 -0
- package/dist/chat/logic/tool-catalog.js +3 -1
- package/dist/chat/logic/tools.d.ts +14 -0
- package/dist/chat/logic/tools.js +57 -0
- package/dist/chat/preferences.d.ts +6 -0
- package/dist/chat/preferences.js +19 -3
- package/dist/chat/reading-width.d.ts +9 -0
- package/dist/chat/reading-width.js +27 -0
- package/dist/chat/send-key.d.ts +10 -0
- package/dist/chat/send-key.js +24 -0
- package/dist/chat/ui/BookmarkMarker.js +4 -2
- package/dist/chat/ui/BookmarkSubmenu.js +4 -3
- package/dist/chat/ui/ChatActivity.js +14 -10
- package/dist/chat/ui/ChatReferenceChip.js +3 -4
- package/dist/chat/ui/CodeBlock.d.ts +2 -1
- package/dist/chat/ui/CodeBlock.js +14 -96
- package/dist/chat/ui/Composer.d.ts +1 -1
- package/dist/chat/ui/Composer.js +117 -906
- package/dist/chat/ui/ComposerInput.js +5 -4
- package/dist/chat/ui/EditDiff.js +3 -2
- package/dist/chat/ui/GoalDock.d.ts +9 -0
- package/dist/chat/ui/GoalDock.js +63 -0
- package/dist/chat/ui/LimitState.js +5 -3
- package/dist/chat/ui/Markdown.d.ts +2 -1
- package/dist/chat/ui/Markdown.js +70 -31
- package/dist/chat/ui/MermaidBlock.d.ts +3 -0
- package/dist/chat/ui/MermaidBlock.js +73 -0
- package/dist/chat/ui/MessageActions.js +12 -7
- package/dist/chat/ui/Pickers.js +6 -5
- package/dist/chat/ui/PromptComposer.js +4 -3
- package/dist/chat/ui/RowTime.d.ts +3 -0
- package/dist/chat/ui/RowTime.js +12 -0
- package/dist/chat/ui/RunSettings.js +5 -4
- package/dist/chat/ui/ShellCommand.d.ts +3 -0
- package/dist/chat/ui/ShellCommand.js +110 -0
- package/dist/chat/ui/SubagentInfo.js +4 -3
- package/dist/chat/ui/SubagentStopButton.js +4 -3
- package/dist/chat/ui/SubagentTimeline.js +4 -1
- package/dist/chat/ui/Timeline.js +70 -40
- package/dist/chat/ui/TimelineMenu.d.ts +2 -1
- package/dist/chat/ui/TimelineMenu.js +18 -8
- package/dist/chat/ui/UnifiedDiff.js +3 -2
- package/dist/chat/ui/VisualFrame.js +6 -7
- package/dist/chat/ui/code-theme.d.ts +2 -1
- package/dist/chat/ui/code-theme.js +4 -4
- package/dist/chat/ui/composer/ComposerControls.d.ts +27 -0
- package/dist/chat/ui/composer/ComposerControls.js +34 -0
- package/dist/chat/ui/composer/ComposerMenu.d.ts +4 -0
- package/dist/chat/ui/composer/ComposerMenu.js +46 -0
- package/dist/chat/ui/composer/DraftParts.d.ts +18 -0
- package/dist/chat/ui/composer/DraftParts.js +25 -0
- package/dist/chat/ui/composer/QueuedMessages.d.ts +10 -0
- package/dist/chat/ui/composer/QueuedMessages.js +20 -0
- package/dist/chat/ui/composer/key-handler.d.ts +20 -0
- package/dist/chat/ui/composer/key-handler.js +150 -0
- package/dist/chat/ui/composer/keys.d.ts +7 -2
- package/dist/chat/ui/composer/keys.js +19 -9
- package/dist/chat/ui/composer/placeholder.d.ts +9 -0
- package/dist/chat/ui/composer/placeholder.js +38 -0
- package/dist/chat/ui/composer/use-chat-controls.d.ts +28 -0
- package/dist/chat/ui/composer/use-chat-controls.js +112 -0
- package/dist/chat/ui/composer/use-compaction-offer.d.ts +2 -0
- package/dist/chat/ui/composer/use-compaction-offer.js +23 -0
- package/dist/chat/ui/composer/use-composer-draft.d.ts +14 -0
- package/dist/chat/ui/composer/use-composer-draft.js +39 -0
- package/dist/chat/ui/composer/use-composer-menus.d.ts +52 -0
- package/dist/chat/ui/composer/use-composer-menus.js +232 -0
- package/dist/chat/ui/composer/use-composer-submit.d.ts +32 -0
- package/dist/chat/ui/composer/use-composer-submit.js +113 -0
- package/dist/chat/ui/composer/use-draft-files.d.ts +27 -0
- package/dist/chat/ui/composer/use-draft-files.js +111 -0
- package/dist/chat/ui/composer/use-notice.d.ts +6 -0
- package/dist/chat/ui/composer/use-notice.js +18 -0
- package/dist/chat/ui/composer/use-pending-requests.d.ts +2 -0
- package/dist/chat/ui/composer/use-pending-requests.js +22 -0
- package/dist/chat/ui/composer/use-prompt-history.d.ts +8 -0
- package/dist/chat/ui/composer/use-prompt-history.js +57 -0
- package/dist/chat/ui/composer/use-prompt-hold.d.ts +6 -0
- package/dist/chat/ui/composer/use-prompt-hold.js +48 -0
- package/dist/chat/ui/composer/use-take-back.d.ts +13 -0
- package/dist/chat/ui/composer/use-take-back.js +82 -0
- package/dist/chat/ui/diff/EditorEditDiff.js +4 -3
- package/dist/chat/ui/diff/LegacyDiffPool.js +3 -2
- package/dist/chat/ui/diff/LegacyEditDiff.js +3 -2
- package/dist/chat/ui/diff/LegacyUnifiedDiff.js +3 -2
- package/dist/chat/ui/diff/syntax-runtime.d.ts +2 -1
- package/dist/chat/ui/diff/syntax-runtime.js +9 -5
- package/dist/chat/ui/diff-syntax.d.ts +2 -2
- package/dist/chat/ui/diff-syntax.js +1 -2
- package/dist/chat/ui/diff-theme.js +10 -9
- package/dist/chat/ui/file-links.d.ts +1 -1
- package/dist/chat/ui/file-links.js +7 -5
- package/dist/chat/ui/highlighter.d.ts +27 -0
- package/dist/chat/ui/highlighter.js +151 -0
- package/dist/chat/ui/index.d.ts +67 -0
- package/dist/chat/ui/index.js +64 -0
- package/dist/chat/ui/intelligent-ui/UiReply.js +3 -2
- package/dist/chat/ui/intelligent-ui/renderers/content.js +3 -2
- package/dist/chat/ui/intelligent-ui/use-ui-links.js +2 -2
- package/dist/chat/ui/intelligent-ui/use-ui-queries.js +4 -3
- package/dist/chat/ui/markdown-blocks.d.ts +8 -0
- package/dist/chat/ui/markdown-blocks.js +260 -12
- package/dist/chat/ui/mermaid.d.ts +23 -0
- package/dist/chat/ui/mermaid.js +93 -0
- package/dist/chat/ui/rows/ForksRow.js +5 -3
- package/dist/chat/ui/rows/GeneratedImageRow.js +6 -4
- package/dist/chat/ui/rows/MessageRows.d.ts +4 -0
- package/dist/chat/ui/rows/MessageRows.js +36 -13
- package/dist/chat/ui/rows/Rows.js +3 -1
- package/dist/chat/ui/rows/SubagentRow.js +3 -2
- package/dist/chat/ui/rows/VisualRow.js +3 -2
- package/dist/chat/ui/rows/WorkRows.d.ts +6 -3
- package/dist/chat/ui/rows/WorkRows.js +57 -20
- package/dist/chat/ui/rows/WorkflowRow.js +3 -2
- package/dist/chat/ui/timestamp-format.d.ts +1 -0
- package/dist/chat/ui/timestamp-format.js +2 -0
- package/dist/chat/ui/use-diff-source-tokens.js +6 -3
- package/dist/chat/ui/visual-theme.js +3 -2
- package/dist/host.d.ts +9 -6
- package/dist/host.js +19 -8
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/locales/en/agent-chat.d.ts +658 -0
- package/dist/locales/en/agent-chat.js +657 -0
- package/dist/locales/en/agent-prompts.d.ts +44 -0
- package/dist/locales/en/agent-prompts.js +43 -0
- package/dist/locales/en/agent-providers.d.ts +132 -0
- package/dist/locales/en/agent-providers.js +131 -0
- package/dist/locales/en/agent-usage.d.ts +132 -0
- package/dist/locales/en/agent-usage.js +131 -0
- package/dist/locales/nl/agent-chat.d.ts +658 -0
- package/dist/locales/nl/agent-chat.js +657 -0
- package/dist/locales/nl/agent-prompts.d.ts +44 -0
- package/dist/locales/nl/agent-prompts.js +43 -0
- package/dist/locales/nl/agent-providers.d.ts +132 -0
- package/dist/locales/nl/agent-providers.js +131 -0
- package/dist/locales/nl/agent-usage.d.ts +132 -0
- package/dist/locales/nl/agent-usage.js +131 -0
- package/dist/locales.js +9 -8
- package/dist/prompts/index.d.ts +11 -0
- package/dist/prompts/index.js +12 -0
- package/dist/prompts/logic/subjects.d.ts +2 -1
- package/dist/prompts/logic/subjects.js +6 -4
- package/dist/prompts/ui/ApprovalBody.js +6 -4
- package/dist/prompts/ui/PromptCard.js +5 -4
- package/dist/prompts/ui/PromptView.js +3 -2
- package/dist/prompts/ui/QuestionBody.js +3 -2
- package/dist/providers/AccountColors.js +2 -2
- package/dist/providers/AccountDetail.js +7 -6
- package/dist/providers/AccountVariables.js +3 -1
- package/dist/providers/AddAccountForm.js +3 -2
- package/dist/providers/ProvidersPane.js +4 -3
- package/dist/providers/account-actions.d.ts +4 -3
- package/dist/providers/account-actions.js +6 -7
- package/dist/providers/index.d.ts +16 -0
- package/dist/providers/index.js +17 -0
- package/dist/providers/provider-abilities.d.ts +2 -1
- package/dist/providers/provider-abilities.js +4 -0
- package/dist/state/chats.js +4 -2
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.js +5 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +2 -0
- package/dist/{prompts/logic/prompts.fixtures.d.ts → testing/prompts.d.ts} +1 -1
- package/dist/theme.css +13 -3
- package/dist/usage/UsageBreakdown.js +3 -2
- package/dist/usage/UsageLimits.js +4 -3
- package/dist/usage/UsagePage.js +3 -2
- package/dist/usage/index.d.ts +15 -0
- package/dist/usage/index.js +15 -0
- package/package.json +53 -1031
- package/src/agents/AccountDot.tsx +3 -1
- package/src/agents/accounts.ts +6 -6
- package/src/chat/actions.ts +8 -5
- package/src/chat/bookmarks.ts +23 -14
- package/src/chat/chat-client.ts +8 -0
- package/src/chat/composer-send.ts +27 -0
- package/src/chat/forks.ts +27 -6
- package/src/chat/index.ts +98 -0
- package/src/chat/logic/embedded-code.ts +409 -0
- package/src/chat/logic/fork.ts +1 -0
- package/src/chat/logic/goal.ts +33 -0
- package/src/chat/logic/scrubber.ts +6 -5
- package/src/chat/logic/thought.ts +40 -0
- package/src/chat/logic/thread-cards.ts +2 -0
- package/src/chat/logic/timeline.ts +25 -1
- package/src/chat/logic/tool-catalog.ts +5 -1
- package/src/chat/logic/tools.ts +76 -0
- package/src/chat/preferences.ts +26 -3
- package/src/chat/reading-width.ts +39 -0
- package/src/chat/send-key.ts +38 -0
- package/src/chat/ui/BookmarkMarker.tsx +4 -2
- package/src/chat/ui/BookmarkSubmenu.tsx +4 -3
- package/src/chat/ui/ChatActivity.tsx +14 -10
- package/src/chat/ui/ChatReferenceChip.tsx +3 -4
- package/src/chat/ui/CodeBlock.tsx +33 -124
- package/src/chat/ui/Composer.tsx +162 -1324
- package/src/chat/ui/ComposerInput.tsx +5 -4
- package/src/chat/ui/EditDiff.tsx +3 -2
- package/src/chat/ui/GoalDock.tsx +104 -0
- package/src/chat/ui/LimitState.tsx +5 -3
- package/src/chat/ui/Markdown.tsx +113 -39
- package/src/chat/ui/MermaidBlock.tsx +119 -0
- package/src/chat/ui/MessageActions.tsx +13 -8
- package/src/chat/ui/Pickers.tsx +8 -7
- package/src/chat/ui/PromptComposer.tsx +4 -3
- package/src/chat/ui/RowTime.tsx +21 -0
- package/src/chat/ui/RunSettings.tsx +9 -4
- package/src/chat/ui/ShellCommand.tsx +134 -0
- package/src/chat/ui/SubagentInfo.tsx +4 -3
- package/src/chat/ui/SubagentStopButton.tsx +4 -3
- package/src/chat/ui/SubagentTimeline.tsx +5 -1
- package/src/chat/ui/Timeline.tsx +167 -105
- package/src/chat/ui/TimelineMenu.tsx +42 -7
- package/src/chat/ui/UnifiedDiff.tsx +3 -2
- package/src/chat/ui/VisualFrame.tsx +6 -7
- package/src/chat/ui/code-theme.ts +4 -4
- package/src/chat/ui/composer/ComposerControls.tsx +147 -0
- package/src/chat/ui/composer/ComposerMenu.tsx +138 -0
- package/src/chat/ui/composer/DraftParts.tsx +86 -0
- package/src/chat/ui/composer/QueuedMessages.tsx +64 -0
- package/src/chat/ui/composer/key-handler.ts +174 -0
- package/src/chat/ui/composer/keys.ts +32 -10
- package/src/chat/ui/composer/placeholder.ts +48 -0
- package/src/chat/ui/composer/use-chat-controls.ts +134 -0
- package/src/chat/ui/composer/use-compaction-offer.ts +25 -0
- package/src/chat/ui/composer/use-composer-draft.ts +71 -0
- package/src/chat/ui/composer/use-composer-menus.ts +289 -0
- package/src/chat/ui/composer/use-composer-submit.ts +163 -0
- package/src/chat/ui/composer/use-draft-files.ts +135 -0
- package/src/chat/ui/composer/use-notice.ts +28 -0
- package/src/chat/ui/composer/use-pending-requests.ts +23 -0
- package/src/chat/ui/composer/use-prompt-history.ts +76 -0
- package/src/chat/ui/composer/use-prompt-hold.ts +58 -0
- package/src/chat/ui/composer/use-take-back.ts +91 -0
- package/src/chat/ui/diff/DiffFallbackBoundary.tsx +2 -2
- package/src/chat/ui/diff/EditorEditDiff.tsx +4 -3
- package/src/chat/ui/diff/LegacyDiffPool.tsx +3 -2
- package/src/chat/ui/diff/LegacyEditDiff.tsx +3 -2
- package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +3 -2
- package/src/chat/ui/diff/syntax-runtime.ts +10 -5
- package/src/chat/ui/diff-syntax.ts +2 -2
- package/src/chat/ui/diff-theme.ts +10 -9
- package/src/chat/ui/file-links.ts +7 -5
- package/src/chat/ui/highlighter.ts +185 -0
- package/src/chat/ui/index.ts +109 -0
- package/src/chat/ui/intelligent-ui/UiReply.tsx +5 -4
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +3 -2
- package/src/chat/ui/intelligent-ui/use-ui-links.ts +2 -2
- package/src/chat/ui/intelligent-ui/use-ui-queries.ts +4 -3
- package/src/chat/ui/markdown-blocks.ts +300 -12
- package/src/chat/ui/mermaid.ts +118 -0
- package/src/chat/ui/rows/ForksRow.tsx +5 -3
- package/src/chat/ui/rows/GeneratedImageRow.tsx +6 -4
- package/src/chat/ui/rows/MessageRows.tsx +73 -18
- package/src/chat/ui/rows/Rows.tsx +14 -1
- package/src/chat/ui/rows/SubagentRow.tsx +3 -2
- package/src/chat/ui/rows/VisualRow.tsx +3 -2
- package/src/chat/ui/rows/WorkRows.tsx +148 -47
- package/src/chat/ui/rows/WorkflowRow.tsx +3 -2
- package/src/chat/ui/timestamp-format.ts +2 -0
- package/src/chat/ui/use-diff-source-tokens.ts +10 -4
- package/src/chat/ui/visual-theme.ts +3 -2
- package/src/host.ts +31 -15
- package/src/index.ts +49 -0
- package/src/locales/en/agent-chat.ts +657 -0
- package/src/locales/en/agent-prompts.ts +43 -0
- package/src/locales/en/agent-providers.ts +131 -0
- package/src/locales/en/agent-usage.ts +131 -0
- package/src/locales/nl/agent-chat.ts +657 -0
- package/src/locales/nl/agent-prompts.ts +43 -0
- package/src/locales/nl/agent-providers.ts +131 -0
- package/src/locales/nl/agent-usage.ts +132 -0
- package/src/locales.ts +9 -8
- package/src/prompts/index.ts +35 -0
- package/src/prompts/logic/subjects.ts +12 -4
- package/src/prompts/ui/ApprovalBody.tsx +6 -4
- package/src/prompts/ui/PromptCard.tsx +11 -4
- package/src/prompts/ui/PromptView.tsx +3 -2
- package/src/prompts/ui/QuestionBody.tsx +3 -2
- package/src/providers/AccountColors.tsx +2 -2
- package/src/providers/AccountDetail.tsx +13 -7
- package/src/providers/AccountVariables.tsx +3 -1
- package/src/providers/AddAccountForm.tsx +3 -2
- package/src/providers/ProvidersPane.tsx +4 -3
- package/src/providers/account-actions.ts +7 -7
- package/src/providers/index.ts +17 -0
- package/src/providers/provider-abilities.ts +6 -1
- package/src/state/chats.ts +4 -2
- package/src/state/index.ts +39 -0
- package/src/testing/index.ts +2 -0
- package/src/{prompts/logic/prompts.fixtures.ts → testing/prompts.ts} +1 -1
- package/src/theme.css +13 -3
- package/src/usage/UsageBreakdown.tsx +3 -2
- package/src/usage/UsageLimits.tsx +4 -3
- package/src/usage/UsagePage.tsx +3 -2
- package/src/usage/index.ts +16 -0
- package/dist/locales/en/agent-chat.json +0 -597
- package/dist/locales/en/agent-prompts.json +0 -43
- package/dist/locales/en/agent-providers.json +0 -131
- package/dist/locales/en/agent-usage.json +0 -131
- package/dist/locales/nl/agent-chat.json +0 -597
- package/dist/locales/nl/agent-prompts.json +0 -43
- package/dist/locales/nl/agent-providers.json +0 -131
- package/dist/locales/nl/agent-usage.json +0 -131
- package/src/locales/en/agent-chat.json +0 -597
- package/src/locales/en/agent-prompts.json +0 -43
- package/src/locales/en/agent-providers.json +0 -131
- package/src/locales/en/agent-usage.json +0 -131
- package/src/locales/nl/agent-chat.json +0 -597
- package/src/locales/nl/agent-prompts.json +0 -43
- package/src/locales/nl/agent-providers.json +0 -131
- package/src/locales/nl/agent-usage.json +0 -131
- /package/dist/{prompts/logic/prompts.fixtures.js → testing/prompts.js} +0 -0
package/README.md
CHANGED
|
@@ -27,35 +27,38 @@ Import the theme after the one of `@adecore/ui`, let Tailwind scan the package,
|
|
|
27
27
|
@source "../node_modules/@adecore/agents-react/dist";
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Add the words of `AGENTS_LOCALES` to your i18next,
|
|
30
|
+
Add the words of `AGENTS_LOCALES` to your i18next, and render the views in a `ChatHostProvider` and a `ChatScopeContext`:
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import {
|
|
34
|
-
import { Timeline } from '@adecore/agents-react/chat/ui
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<ChatScopeContext.Provider value={scope}>
|
|
38
|
-
|
|
39
|
-
</ChatScopeContext.Provider
|
|
33
|
+
import { ChatHostProvider, ChatScopeContext } from '@adecore/agents-react';
|
|
34
|
+
import { Composer, Timeline } from '@adecore/agents-react/chat/ui';
|
|
35
|
+
|
|
36
|
+
<ChatHostProvider host={CHAT_HOST}>
|
|
37
|
+
<ChatScopeContext.Provider value={scope}>
|
|
38
|
+
<Timeline chatId={chatId} composer={<Composer chatId={chatId} info={info} {...composerProps} />} />
|
|
39
|
+
</ChatScopeContext.Provider>
|
|
40
|
+
</ChatHostProvider>;
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
[Getting started](https://adecore.dev/agents-react/guide/getting-started) covers the words, the host, the scope and its transport.
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
The root holds the host, the scope and the transport; `/chat`, `/chat/ui`, `/prompts`, `/providers`, `/state`, `/usage`, `/locales` and `/testing` hold the rest. A module that no entry exports is internal.
|
|
45
46
|
|
|
46
47
|
## Documentation
|
|
47
48
|
|
|
48
49
|
| Page | What it covers |
|
|
49
50
|
|---|---|
|
|
50
51
|
| [Getting started](https://adecore.dev/agents-react/guide/getting-started) | Install, CSS, words, the host and a first chat |
|
|
51
|
-
| [Host adapters](https://adecore.dev/agents-react/guide/host) | Everything `
|
|
52
|
+
| [Host adapters](https://adecore.dev/agents-react/guide/host) | Everything a `ChatHostProvider` takes |
|
|
52
53
|
| [Chat client and state](https://adecore.dev/agents-react/guide/chat-client) | The transport, `ChatClient` and the stores |
|
|
53
54
|
| [Persistence](https://adecore.dev/agents-react/guide/persistence) | Drafts, preferences and their storage keys |
|
|
54
55
|
| [Chat](https://adecore.dev/agents-react/chat/timeline) | The timeline, the composer, prompts and their parts, each with a live demo |
|
|
55
56
|
| [Providers](https://adecore.dev/agents-react/providers/providers-pane) | The settings of the CLIs and their accounts |
|
|
56
57
|
| [Usage](https://adecore.dev/agents-react/usage/usage-page) | Cost, charts and plan limits |
|
|
57
|
-
| [
|
|
58
|
+
| [Exports](https://adecore.dev/agents-react/reference) | Every entry point and its exports |
|
|
58
59
|
|
|
59
60
|
## License
|
|
60
61
|
|
|
61
62
|
FSL-1.1-MIT. See [LICENSE](./LICENSE).
|
|
63
|
+
|
|
64
|
+
Diagrams in a reply are drawn by [Mermaid](https://github.com/mermaid-js/mermaid), a dependency under the MIT license, loaded only when a reply holds one.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { useChatHost } from '../host.js';
|
|
3
4
|
import { accountColor } from './accounts.js';
|
|
4
5
|
/* The color an account wears, or the app's accent while it wears none of the accents. */
|
|
5
6
|
export function AccountDot({ color, className }) {
|
|
6
|
-
const
|
|
7
|
+
const { accents } = useChatHost();
|
|
8
|
+
const paint = accountColor(color, accents.all);
|
|
7
9
|
return (_jsx("span", { "aria-hidden": true, className: clsx('shrink-0 rounded-full', paint === undefined && 'bg-accent', className ?? 'size-2'), style: paint === undefined ? undefined : { background: paint } }));
|
|
8
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentKind, ProviderAccount, ProviderAccounts, ProviderAccountStatus } from '@adecore/agent-contracts';
|
|
2
|
-
|
|
2
|
+
import type { AccentChoice, ChatHost } from '../host.js';
|
|
3
|
+
export declare function accountColor(color: string | undefined, accents: readonly AccentChoice[]): string | undefined;
|
|
3
4
|
export declare const FOLDER_VARIABLES: Partial<Record<AgentKind, string>>;
|
|
4
5
|
export interface AccountEntry {
|
|
5
6
|
id: string;
|
|
@@ -16,7 +17,7 @@ export declare function accountStatusLine(status: ProviderAccountStatus | null,
|
|
|
16
17
|
tone: AccountTone;
|
|
17
18
|
};
|
|
18
19
|
export declare function mintAccountId(kind: AgentKind, label: string, taken: ReadonlySet<string>): string;
|
|
19
|
-
export declare function freeAccountColor(entries: readonly AccountEntry[], fallback: string): string;
|
|
20
|
+
export declare function freeAccountColor(entries: readonly AccountEntry[], accents: ChatHost['accents'], fallback: string): string;
|
|
20
21
|
export declare function offeredAccounts(entries: readonly AccountEntry[], current: string | undefined): AccountEntry[];
|
|
21
22
|
export declare function hasAccountChoice(entries: readonly AccountEntry[]): boolean;
|
|
22
23
|
export declare function canContinueOn(accounts: ProviderAccounts | null, kind: AgentKind, from: string | undefined, to: string | undefined): boolean;
|
package/dist/agents/accounts.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
-
import { chatHost } from '../host.js';
|
|
3
2
|
/*
|
|
4
3
|
* An account wears one of the host's accents, so the app paints from one palette. A color that is none
|
|
5
4
|
* of them (an older name, or one written by hand) reads as undefined, and the dot takes the accent.
|
|
6
5
|
*/
|
|
7
|
-
export function accountColor(color) {
|
|
8
|
-
return
|
|
6
|
+
export function accountColor(color, accents) {
|
|
7
|
+
return accents.find((entry) => entry.id === color)?.color;
|
|
9
8
|
}
|
|
10
9
|
/*
|
|
11
10
|
* The variable each CLI reads its config folder from, as the host's providers name them. Only for
|
|
@@ -82,9 +81,9 @@ export function mintAccountId(kind, label, taken) {
|
|
|
82
81
|
* The first featured accent no account of the CLI wears yet, then any other, so a new one stands apart.
|
|
83
82
|
* An account without a color of its own wears `fallback`, the accent the app is painted in.
|
|
84
83
|
*/
|
|
85
|
-
export function freeAccountColor(entries, fallback) {
|
|
86
|
-
const { all, featured } =
|
|
87
|
-
const worn = new Set(entries.map((entry) => (accountColor(entry.account.color) === undefined ? fallback : entry.account.color)));
|
|
84
|
+
export function freeAccountColor(entries, accents, fallback) {
|
|
85
|
+
const { all, featured } = accents;
|
|
86
|
+
const worn = new Set(entries.map((entry) => (accountColor(entry.account.color, all) === undefined ? fallback : entry.account.color)));
|
|
88
87
|
const choices = [...featured, ...all.map((entry) => entry.id).filter((id) => !featured.includes(id))];
|
|
89
88
|
return choices.find((id) => !worn.has(id)) ?? featured[entries.length % featured.length] ?? fallback;
|
|
90
89
|
}
|
package/dist/chat/actions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ChatActions } from '../host.js';
|
|
1
|
+
import { type ChatActions, type ChatHost } from '../host.js';
|
|
2
2
|
import { type ChatScope } from '../scope.js';
|
|
3
3
|
import { type ChatTransport } from '../transport.js';
|
|
4
4
|
export declare function transportActions(transport: ChatTransport): ChatActions;
|
|
5
|
-
export declare function actionsOf(scope: ChatScope): ChatActions;
|
|
5
|
+
export declare function actionsOf(scope: ChatScope, host: Pick<ChatHost, 'actions'>): ChatActions;
|
|
6
6
|
export declare function useChatActions(): ChatActions;
|
package/dist/chat/actions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
-
import {
|
|
2
|
+
import { useChatHost } from '../host.js';
|
|
3
3
|
import { useChatScope } from '../scope.js';
|
|
4
4
|
import { ChatTransportError } from '../transport.js';
|
|
5
5
|
/* Every action as the request a chat host answers, for an app that runs them through nothing of its own. */
|
|
@@ -37,6 +37,9 @@ export function transportActions(transport) {
|
|
|
37
37
|
stopTask: async (chatId, taskId) => {
|
|
38
38
|
await transport.request('chat.stopTask', { chatId, taskId });
|
|
39
39
|
},
|
|
40
|
+
goal: async (chatId, action) => {
|
|
41
|
+
await transport.request('chat.goal', { chatId, action });
|
|
42
|
+
},
|
|
40
43
|
approve: async (chatId, requestId, decision, message) => {
|
|
41
44
|
await transport.request('chat.approve', { chatId, requestId, decision, ...(message === undefined ? {} : { message }) });
|
|
42
45
|
},
|
|
@@ -49,9 +52,9 @@ export function transportActions(transport) {
|
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
54
|
const byTransport = new WeakMap();
|
|
52
|
-
/* The app's own actions when
|
|
53
|
-
export function actionsOf(scope) {
|
|
54
|
-
const own =
|
|
55
|
+
/* The app's own actions when its host has them, and the requests of this scope's host of chats otherwise. */
|
|
56
|
+
export function actionsOf(scope, host) {
|
|
57
|
+
const own = host.actions;
|
|
55
58
|
if (own !== null) {
|
|
56
59
|
return own;
|
|
57
60
|
}
|
|
@@ -64,5 +67,5 @@ export function actionsOf(scope) {
|
|
|
64
67
|
return actions;
|
|
65
68
|
}
|
|
66
69
|
export function useChatActions() {
|
|
67
|
-
return actionsOf(useChatScope());
|
|
70
|
+
return actionsOf(useChatScope(), useChatHost());
|
|
68
71
|
}
|
package/dist/chat/bookmarks.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChatBookmark } from '@adecore/agent-contracts';
|
|
2
|
+
import type { ChatHost } from '../host.js';
|
|
2
3
|
import type { ChatScope } from '../scope.js';
|
|
3
4
|
interface BookmarkNaming {
|
|
4
5
|
chatKey: string | null;
|
|
@@ -7,8 +8,9 @@ interface BookmarkNaming {
|
|
|
7
8
|
close(): void;
|
|
8
9
|
}
|
|
9
10
|
export declare const useBookmarkNaming: import("zustand").UseBoundStore<import("zustand").StoreApi<BookmarkNaming>>;
|
|
10
|
-
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
11
|
+
type Notifier = Pick<ChatHost, 'notify'>;
|
|
12
|
+
export declare function placeBookmark(scope: ChatScope, host: Notifier, chatId: string, itemId: string): Promise<void>;
|
|
13
|
+
export declare function nameBookmark(scope: ChatScope, host: Notifier, chatId: string, itemId: string, name: string, previous: string | undefined): Promise<void>;
|
|
14
|
+
export declare function removeBookmark(scope: ChatScope, host: Notifier, chatId: string, bookmark: ChatBookmark): Promise<void>;
|
|
13
15
|
export declare function goToBookmark(scope: ChatScope, chatId: string, itemId: string, rename?: boolean): boolean;
|
|
14
16
|
export {};
|
package/dist/chat/bookmarks.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
2
|
import { create } from 'zustand';
|
|
3
|
-
import { chatHost } from '../host.js';
|
|
4
3
|
import { jumpToTimelineItem } from './timeline-scroll.js';
|
|
5
4
|
export const useBookmarkNaming = create((set) => ({
|
|
6
5
|
chatKey: null,
|
|
@@ -8,23 +7,23 @@ export const useBookmarkNaming = create((set) => ({
|
|
|
8
7
|
open: (chatKey, itemId) => set({ chatKey, itemId }),
|
|
9
8
|
close: () => set({ chatKey: null, itemId: null })
|
|
10
9
|
}));
|
|
11
|
-
function failed(title, e) {
|
|
12
|
-
|
|
10
|
+
function failed(host, title, e) {
|
|
11
|
+
host.notify({ title, description: e instanceof Error ? e.message : String(e), kind: 'error' });
|
|
13
12
|
}
|
|
14
|
-
async function add(scope, chatId, itemId, name) {
|
|
13
|
+
async function add(scope, host, chatId, itemId, name) {
|
|
15
14
|
try {
|
|
16
15
|
await scope.chats.addBookmark(chatId, itemId, name);
|
|
17
16
|
return true;
|
|
18
17
|
}
|
|
19
18
|
catch (e) {
|
|
20
|
-
failed(i18next.t('agent-chat:bookmarks.addFailed'), e);
|
|
19
|
+
failed(host, i18next.t('agent-chat:bookmarks.addFailed'), e);
|
|
21
20
|
return false;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
/* Marks a message and opens the field for its name at once, before the host answered. */
|
|
25
|
-
export async function placeBookmark(scope, chatId, itemId) {
|
|
24
|
+
export async function placeBookmark(scope, host, chatId, itemId) {
|
|
26
25
|
useBookmarkNaming.getState().open(scope.keyOf(chatId), itemId);
|
|
27
|
-
if (!(await add(scope, chatId, itemId))) {
|
|
26
|
+
if (!(await add(scope, host, chatId, itemId))) {
|
|
28
27
|
useBookmarkNaming.getState().close();
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -32,35 +31,35 @@ export async function placeBookmark(scope, chatId, itemId) {
|
|
|
32
31
|
* The name a field settles on. A name goes through `addBookmark`, which also names a bookmark that
|
|
33
32
|
* already stands, so a name typed before the mark itself landed is not refused.
|
|
34
33
|
*/
|
|
35
|
-
export async function nameBookmark(scope, chatId, itemId, name, previous) {
|
|
34
|
+
export async function nameBookmark(scope, host, chatId, itemId, name, previous) {
|
|
36
35
|
const next = name.trim();
|
|
37
36
|
if (next === (previous ?? '')) {
|
|
38
37
|
return;
|
|
39
38
|
}
|
|
40
39
|
if (next !== '') {
|
|
41
|
-
await add(scope, chatId, itemId, next);
|
|
40
|
+
await add(scope, host, chatId, itemId, next);
|
|
42
41
|
return;
|
|
43
42
|
}
|
|
44
43
|
try {
|
|
45
44
|
await scope.chats.renameBookmark(chatId, itemId, '');
|
|
46
45
|
}
|
|
47
46
|
catch (e) {
|
|
48
|
-
failed(i18next.t('agent-chat:bookmarks.renameFailed'), e);
|
|
47
|
+
failed(host, i18next.t('agent-chat:bookmarks.renameFailed'), e);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
/* Takes a bookmark away at once; the toast puts it back, name and all. */
|
|
52
|
-
export async function removeBookmark(scope, chatId, bookmark) {
|
|
51
|
+
export async function removeBookmark(scope, host, chatId, bookmark) {
|
|
53
52
|
try {
|
|
54
53
|
await scope.chats.removeBookmark(chatId, bookmark.itemId);
|
|
55
54
|
}
|
|
56
55
|
catch (e) {
|
|
57
|
-
failed(i18next.t('agent-chat:bookmarks.removeFailed'), e);
|
|
56
|
+
failed(host, i18next.t('agent-chat:bookmarks.removeFailed'), e);
|
|
58
57
|
return;
|
|
59
58
|
}
|
|
60
|
-
|
|
59
|
+
host.notify({
|
|
61
60
|
title: i18next.t('agent-chat:bookmarks.removed'),
|
|
62
61
|
kind: 'deleted',
|
|
63
|
-
action: { label: i18next.t('agent-chat:common.action.undo'), run: () => void add(scope, chatId, bookmark.itemId, bookmark.name) }
|
|
62
|
+
action: { label: i18next.t('agent-chat:common.action.undo'), run: () => void add(scope, host, chatId, bookmark.itemId, bookmark.name) }
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
/* Scrolls the chat's thread to the message, and opens its name field for a rename. False when no thread of it is on screen yet. */
|
|
@@ -45,6 +45,7 @@ export declare class ChatClient {
|
|
|
45
45
|
removeVisual(chatId: string, visualId: string): Promise<ChatVisual[]>;
|
|
46
46
|
listSkills(chatId: string): Promise<ChatSkill[]>;
|
|
47
47
|
clear(chatId: string, force?: boolean): Promise<void>;
|
|
48
|
+
restart(chatId: string): Promise<void>;
|
|
48
49
|
kill(chatId: string): Promise<void>;
|
|
49
50
|
loadStatuses(): Promise<void>;
|
|
50
51
|
loadProviders(): Promise<void>;
|
package/dist/chat/chat-client.js
CHANGED
|
@@ -149,6 +149,13 @@ export class ChatClient {
|
|
|
149
149
|
async clear(chatId, force = false) {
|
|
150
150
|
await this.transport.request('chat.clear', { chatId, ...(force ? { force: true } : {}) });
|
|
151
151
|
}
|
|
152
|
+
/*
|
|
153
|
+
* Ends the chat's CLI and keeps its conversation, which the next message resumes in a fresh process
|
|
154
|
+
* that reads its skills, plugins and servers again; refused with `chat-busy` while the chat works.
|
|
155
|
+
*/
|
|
156
|
+
async restart(chatId) {
|
|
157
|
+
await this.transport.request('chat.restart', { chatId });
|
|
158
|
+
}
|
|
152
159
|
async kill(chatId) {
|
|
153
160
|
this.mounted.delete(chatId);
|
|
154
161
|
this.sink.forget(chatId);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A command outside the composer, such as a menu row, sends what a composer on screen holds the way its
|
|
3
|
+
* keys do. Keyed with the scope's `keyOf`, the way the app's shortcuts name the chat that has the focus.
|
|
4
|
+
*/
|
|
5
|
+
const senders = new Map();
|
|
6
|
+
export function registerComposerSender(key, send) {
|
|
7
|
+
senders.set(key, send);
|
|
8
|
+
return () => {
|
|
9
|
+
if (senders.get(key) === send) {
|
|
10
|
+
senders.delete(key);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/* False when that chat has no composer on screen. An empty or unsendable draft sends nothing, as with the keys. */
|
|
15
|
+
export function sendFromComposer(key, how = 'default') {
|
|
16
|
+
const send = senders.get(key);
|
|
17
|
+
if (send === undefined) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
send(how);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
package/dist/chat/forks.js
CHANGED
|
@@ -3,26 +3,43 @@ import { forkIdsAfter, forkedTurnIds } from './logic/fork.js';
|
|
|
3
3
|
import { useChatScope } from '../scope.js';
|
|
4
4
|
import { useChats } from '../state/chats.js';
|
|
5
5
|
/* The chats this client holds of one host, which is where the forks it knows of are. */
|
|
6
|
-
function* forkInfosOn(
|
|
7
|
-
for (const [key, state] of Object.entries(
|
|
6
|
+
function* forkInfosOn(statuses, owns) {
|
|
7
|
+
for (const [key, state] of Object.entries(statuses)) {
|
|
8
8
|
if (state.info.forkOf !== undefined && owns(key)) {
|
|
9
9
|
yield state.info;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
/*
|
|
13
|
+
/*
|
|
14
|
+
* Selectors answer a joined string, never a new array or set, and split it again in a memo. One runs on
|
|
15
|
+
* every write to the store, a streamed word included, so it walks the chats again only once the
|
|
16
|
+
* statuses, which change with an info alone, are others.
|
|
17
|
+
*/
|
|
18
|
+
function joinedForks(owns, collect) {
|
|
19
|
+
let statuses = null;
|
|
20
|
+
let joined = '';
|
|
21
|
+
return (state) => {
|
|
22
|
+
if (state.statusByKey !== statuses) {
|
|
23
|
+
statuses = state.statusByKey;
|
|
24
|
+
joined = [...collect(forkInfosOn(statuses, owns))].join('\n');
|
|
25
|
+
}
|
|
26
|
+
return joined;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
14
29
|
function splitIds(joined) {
|
|
15
30
|
return joined === '' ? [] : joined.split('\n');
|
|
16
31
|
}
|
|
17
32
|
/* The turns of this chat a fork went on after, for the thread to put a line under. */
|
|
18
33
|
export function useForkedTurns(chatId) {
|
|
19
34
|
const { owns } = useChatScope();
|
|
20
|
-
const
|
|
35
|
+
const select = useMemo(() => joinedForks(owns, (infos) => forkedTurnIds(infos, chatId)), [owns, chatId]);
|
|
36
|
+
const joined = useChats(select);
|
|
21
37
|
return useMemo(() => new Set(splitIds(joined)), [joined]);
|
|
22
38
|
}
|
|
23
39
|
/* The forks that went on after this turn of this chat. */
|
|
24
40
|
export function useForkIdsAfter(chatId, turnId) {
|
|
25
41
|
const { owns } = useChatScope();
|
|
26
|
-
const
|
|
42
|
+
const select = useMemo(() => joinedForks(owns, (infos) => forkIdsAfter(infos, chatId, turnId)), [owns, chatId, turnId]);
|
|
43
|
+
const joined = useChats(select);
|
|
27
44
|
return useMemo(() => splitIds(joined), [joined]);
|
|
28
45
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { type AccountChoice, useAccountChoice } from './account-choice.js';
|
|
2
|
+
export { transportActions, actionsOf, useChatActions } from './actions.js';
|
|
3
|
+
export { backgroundCounts } from './activity.js';
|
|
4
|
+
export { isImageAttachment, fileBadge, formatBytes, checkAttachmentLimits, filesOf, readAttachments, readStoredAttachments, uploadPreviewUrl, uploadBytes } from './attachments.js';
|
|
5
|
+
export { type ChatSendExtras, ChatClient } from './chat-client.js';
|
|
6
|
+
export type { ProjectChat } from './chat-references.js';
|
|
7
|
+
export { sendFromComposer, type ComposerSend } from './composer-send.js';
|
|
8
|
+
export { EMPTY_DRAFT, useDrafts, readDraft, writeDraft, offerDraft, type ChatDraft } from './drafts.js';
|
|
9
|
+
export { stripAnsi } from './logic/ansi.js';
|
|
10
|
+
export { FORKABLE_PROVIDERS, forkRefusal, summaryRefusal, lastSettledTurn, forkPointOf, forkPointLabel, type ForkShape, forkShapes, type ForkCliChoice, forkPayload, branchRefusal, type ForkPoint, type ForkWorktreeChoice } from './logic/fork.js';
|
|
11
|
+
export { handbackReportOf } from './logic/handback.js';
|
|
12
|
+
export { limitView, type LimitView } from './logic/limit.js';
|
|
13
|
+
export type { TickKind, ScrubberTick } from './logic/scrubber.js';
|
|
14
|
+
export { type TimedRow, cardRows, visualRows, withTimedRows, timedRowsOf, withThreadCards } from './logic/thread-cards.js';
|
|
15
|
+
export { EMPTY_TARGET, readTimelineTarget, type TimelineTarget } from './logic/timeline-target.js';
|
|
16
|
+
export { type TimelineRow, summarizeGroup, deriveTimelineRows, type SubagentBranch, type BaseMoved } from './logic/timeline.js';
|
|
17
|
+
export { toolSummary, fileChanges, unifiedChanges, approvalChanges, hasFileChanges, type FileChange } from './logic/tools.js';
|
|
18
|
+
export { MENTION_DRAG_TYPE, LEGACY_MENTION_DRAG_TYPE, MENTION_DRAG_TYPES, carriesMentions, droppedMentions, writeMentionDrag, findMentionQuery, findSkillQuery, insertMention, insertSkill, presentMentions, chipText, tokenizeChips, type MentionQuery, type ChipSegment } from './mentions.js';
|
|
19
|
+
export { defaultProvider, selectionFor, startingSelection, accountFor, chatPreferencesPayload, useChatPreferences, readChatPreferences, CHAT_PREFERENCES_KEY, chatPreferencesKey, reloadChatPreferences, rememberChatPreferences, rememberReadingWidth, rememberSendKey, rememberChatSelection, type ChatPreferences } from './preferences.js';
|
|
20
|
+
export type { HoldRelease } from './prompt-hold.js';
|
|
21
|
+
export { CHAT_READING_WIDTHS, readingWidthLabel, readingWidthHint, type ChatReadingWidth } from './reading-width.js';
|
|
22
|
+
export { recentChatMessages, recentSubagentMessages, type RecentChatMessage, type RecentChatMessages } from './recent-messages.js';
|
|
23
|
+
export { RUNTIME_MODES, runtimeModeLabel, runtimeModeHint } from './runtime-modes.js';
|
|
24
|
+
export { CHAT_SEND_KEYS, SEND_AND_NEW_SHORTCUT, sendKeyLabel, sendKeyHint, type ChatSendKey } from './send-key.js';
|
|
25
|
+
export type { StashedAttachment, StashedPrompt, StashedQuote } from './stash.js';
|
|
26
|
+
export { subagentTitle, summaryWordOf, stopOf, type SubagentStop } from './subagent-list.js';
|
|
27
|
+
export { useSubagentSupport } from './subagent-support.js';
|
|
28
|
+
export { crumbOf, openFromMain, composerWrites, canOpenSubagent, useSubagentView, useSubagentTrail, useSubagentItem, type SubagentStep, type SubagentTrail } from './subagent-view.js';
|
|
29
|
+
export { THUMBNAIL_PX, useUploadThumbnail } from './thumbnails.js';
|
|
30
|
+
export { stepTimelineMessage, jumpToTimelineItem, type TurnTarget, registerTurnJumper, jumpToTimelineTurn, type ItemJumpOptions } from './timeline-scroll.js';
|
|
31
|
+
export { type StatusWord, statusLookOf, taskStatusWord, type StatusLook, type TaskState } from '../agents/status-look.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
|
|
2
|
+
export { useAccountChoice } from './account-choice.js';
|
|
3
|
+
export { transportActions, actionsOf, useChatActions } from './actions.js';
|
|
4
|
+
export { backgroundCounts } from './activity.js';
|
|
5
|
+
export { isImageAttachment, fileBadge, formatBytes, checkAttachmentLimits, filesOf, readAttachments, readStoredAttachments, uploadPreviewUrl, uploadBytes } from './attachments.js';
|
|
6
|
+
export { ChatClient } from './chat-client.js';
|
|
7
|
+
export { sendFromComposer } from './composer-send.js';
|
|
8
|
+
export { EMPTY_DRAFT, useDrafts, readDraft, writeDraft, offerDraft } from './drafts.js';
|
|
9
|
+
export { stripAnsi } from './logic/ansi.js';
|
|
10
|
+
export { FORKABLE_PROVIDERS, forkRefusal, summaryRefusal, lastSettledTurn, forkPointOf, forkPointLabel, forkShapes, forkPayload, branchRefusal } from './logic/fork.js';
|
|
11
|
+
export { handbackReportOf } from './logic/handback.js';
|
|
12
|
+
export { limitView } from './logic/limit.js';
|
|
13
|
+
export { cardRows, visualRows, withTimedRows, timedRowsOf, withThreadCards } from './logic/thread-cards.js';
|
|
14
|
+
export { EMPTY_TARGET, readTimelineTarget } from './logic/timeline-target.js';
|
|
15
|
+
export { summarizeGroup, deriveTimelineRows } from './logic/timeline.js';
|
|
16
|
+
export { toolSummary, fileChanges, unifiedChanges, approvalChanges, hasFileChanges } from './logic/tools.js';
|
|
17
|
+
export { MENTION_DRAG_TYPE, LEGACY_MENTION_DRAG_TYPE, MENTION_DRAG_TYPES, carriesMentions, droppedMentions, writeMentionDrag, findMentionQuery, findSkillQuery, insertMention, insertSkill, presentMentions, chipText, tokenizeChips } from './mentions.js';
|
|
18
|
+
export { defaultProvider, selectionFor, startingSelection, accountFor, chatPreferencesPayload, useChatPreferences, readChatPreferences, CHAT_PREFERENCES_KEY, chatPreferencesKey, reloadChatPreferences, rememberChatPreferences, rememberReadingWidth, rememberSendKey, rememberChatSelection } from './preferences.js';
|
|
19
|
+
export { CHAT_READING_WIDTHS, readingWidthLabel, readingWidthHint } from './reading-width.js';
|
|
20
|
+
export { recentChatMessages, recentSubagentMessages } from './recent-messages.js';
|
|
21
|
+
export { RUNTIME_MODES, runtimeModeLabel, runtimeModeHint } from './runtime-modes.js';
|
|
22
|
+
export { CHAT_SEND_KEYS, SEND_AND_NEW_SHORTCUT, sendKeyLabel, sendKeyHint } from './send-key.js';
|
|
23
|
+
export { subagentTitle, summaryWordOf, stopOf } from './subagent-list.js';
|
|
24
|
+
export { useSubagentSupport } from './subagent-support.js';
|
|
25
|
+
export { crumbOf, openFromMain, composerWrites, canOpenSubagent, useSubagentView, useSubagentTrail, useSubagentItem } from './subagent-view.js';
|
|
26
|
+
export { THUMBNAIL_PX, useUploadThumbnail } from './thumbnails.js';
|
|
27
|
+
export { stepTimelineMessage, jumpToTimelineItem, registerTurnJumper, jumpToTimelineTurn } from './timeline-scroll.js';
|
|
28
|
+
export { statusLookOf, taskStatusWord } from '../agents/status-look.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface EmbeddedCode {
|
|
2
|
+
readonly start: number;
|
|
3
|
+
readonly end: number;
|
|
4
|
+
readonly language: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const SHELL_LANGUAGE = "shellscript";
|
|
7
|
+
export declare const EMBEDDED_CODE_LIMIT = 20000;
|
|
8
|
+
export declare function embeddedCode(command: string): EmbeddedCode[];
|