@adecore/agents-react 0.39.0 → 0.40.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/AgentModelLabel.js +2 -1
- package/dist/agents/model-name.js +2 -1
- package/dist/agents/provider-paths.d.ts +2 -1
- package/dist/agents/provider-paths.js +7 -3
- package/dist/chat/account-choice.js +57 -28
- package/dist/chat/bookmarks.js +2 -1
- package/dist/chat/drafts.d.ts +0 -1
- package/dist/chat/drafts.js +9 -28
- package/dist/chat/logic/picker-entries.js +2 -8
- package/dist/chat/logic/resume-compaction.js +2 -5
- package/dist/chat/logic/timeline-copy.js +2 -8
- package/dist/chat/logic/timeline.js +9 -10
- package/dist/chat/logic/workflow.js +2 -4
- package/dist/chat/subagent-conversation.js +2 -1
- package/dist/chat/ui/GoalDock.js +2 -1
- package/dist/chat/ui/LimitState.js +4 -6
- package/dist/chat/ui/composer/use-continuable-turn.js +0 -1
- package/dist/chat/ui/composer/use-notice.js +2 -1
- package/dist/chat/ui/composer/use-prompt-history.js +1 -1
- package/dist/chat/ui/composer/use-prompt-menus.js +216 -253
- package/dist/chat/ui/composer/use-take-back.js +2 -2
- package/dist/chat/ui/diff/ApprovalReview.js +1 -1
- package/dist/chat/ui/highlighter.d.ts +0 -6
- package/dist/chat/ui/highlighter.js +0 -12
- package/dist/chat/ui/icons.d.ts +0 -1
- package/dist/chat/ui/icons.js +0 -3
- package/dist/chat/ui/rows/MessageRows.js +2 -5
- package/dist/chat/ui/rows/row-rhythm.js +2 -5
- package/dist/chat/ui/theme-watch.js +3 -7
- package/dist/prompts/logic/usePromptSession.js +2 -1
- package/dist/providers/AddAccountForm.js +2 -1
- package/dist/providers/CliDetail.js +104 -130
- package/dist/providers/account-actions.js +6 -9
- package/dist/state/chats.d.ts +1 -0
- package/dist/state/chats.js +6 -11
- package/dist/state/provider-accounts.d.ts +1 -1
- package/dist/state/provider-accounts.js +2 -8
- package/dist/transport.d.ts +2 -0
- package/dist/transport.js +14 -0
- package/dist/usage/ChartLogo.d.ts +5 -0
- package/dist/usage/ChartLogo.js +48 -0
- package/dist/usage/LimitsList.js +6 -16
- package/dist/usage/UsageBreakdown.js +17 -40
- package/dist/usage/UsageLimits.js +183 -211
- package/dist/usage/UsagePage.js +3 -17
- package/dist/usage/UsageSummary.js +4 -9
- package/dist/usage/limits.js +16 -31
- package/dist/usage/summary.d.ts +1 -1
- package/dist/usage/summary.js +3 -5
- package/package.json +26 -26
- package/src/agents/AccountDot.tsx +1 -0
- package/src/agents/AgentIcon.tsx +2 -0
- package/src/agents/AgentModelLabel.tsx +4 -6
- package/src/agents/ModelOptionControl.tsx +8 -0
- package/src/agents/account-limits.ts +3 -0
- package/src/agents/accounts.ts +12 -0
- package/src/agents/model-name.ts +13 -1
- package/src/agents/model-options.ts +2 -0
- package/src/agents/model-requirement.ts +4 -0
- package/src/agents/option-words.ts +2 -0
- package/src/agents/provider-paths.ts +8 -3
- package/src/agents/status-look.ts +1 -0
- package/src/chat/account-choice.ts +25 -19
- package/src/chat/actions.ts +5 -0
- package/src/chat/attachments.ts +8 -0
- package/src/chat/bookmarks.ts +13 -1
- package/src/chat/chat-client.ts +63 -0
- package/src/chat/chat-references.ts +3 -0
- package/src/chat/composer-effort.ts +5 -0
- package/src/chat/composer-send.ts +4 -0
- package/src/chat/drafts.ts +21 -17
- package/src/chat/forks.ts +4 -0
- package/src/chat/guards.ts +2 -0
- package/src/chat/index.ts +7 -0
- package/src/chat/logic/ansi.ts +47 -0
- package/src/chat/logic/bookmarks.ts +7 -0
- package/src/chat/logic/command-looks.ts +29 -0
- package/src/chat/logic/context-usage.ts +3 -0
- package/src/chat/logic/continue-after-stop.ts +5 -0
- package/src/chat/logic/effort.ts +4 -0
- package/src/chat/logic/embedded-code.ts +63 -0
- package/src/chat/logic/fork.ts +22 -0
- package/src/chat/logic/generated-image.ts +7 -0
- package/src/chat/logic/goal.ts +7 -0
- package/src/chat/logic/handback.ts +2 -0
- package/src/chat/logic/limit.ts +8 -0
- package/src/chat/logic/picker-entries.ts +16 -4
- package/src/chat/logic/resume-compaction.ts +22 -5
- package/src/chat/logic/scrubber.ts +38 -5
- package/src/chat/logic/thought.ts +5 -0
- package/src/chat/logic/thread-cards.ts +6 -0
- package/src/chat/logic/timeline-copy.ts +4 -9
- package/src/chat/logic/timeline-target.ts +15 -0
- package/src/chat/logic/timeline.ts +113 -10
- package/src/chat/logic/tools.ts +30 -0
- package/src/chat/logic/visual-height.ts +5 -0
- package/src/chat/logic/visual-viewport.ts +1 -0
- package/src/chat/logic/welcome.ts +3 -0
- package/src/chat/logic/workflow.ts +26 -7
- package/src/chat/mentions.ts +56 -0
- package/src/chat/pending-prompts.ts +16 -0
- package/src/chat/persisted-json.ts +15 -0
- package/src/chat/preferences.ts +16 -0
- package/src/chat/prompt-hold.ts +2 -0
- package/src/chat/quote.ts +7 -0
- package/src/chat/reading-width.ts +1 -0
- package/src/chat/recent-messages.ts +5 -0
- package/src/chat/resume-compaction-dismissals.ts +1 -0
- package/src/chat/stash.ts +12 -0
- package/src/chat/subagent-conversation.ts +24 -4
- package/src/chat/subagent-list.ts +14 -0
- package/src/chat/subagent-support.ts +1 -0
- package/src/chat/subagent-view.ts +9 -0
- package/src/chat/thumbnails.ts +14 -0
- package/src/chat/timeline-flash.ts +2 -0
- package/src/chat/timeline-scroll.ts +23 -0
- package/src/chat/ui/AccountPill.tsx +4 -0
- package/src/chat/ui/AnsiOutput.tsx +1 -0
- package/src/chat/ui/BookmarkMarker.tsx +5 -0
- package/src/chat/ui/BookmarkSubmenu.tsx +1 -0
- package/src/chat/ui/ChatActivity.tsx +13 -0
- package/src/chat/ui/CodeBlock.tsx +8 -0
- package/src/chat/ui/Composer.tsx +15 -0
- package/src/chat/ui/ComposerInput.tsx +22 -0
- package/src/chat/ui/DiffPool.tsx +3 -0
- package/src/chat/ui/EditDiff.tsx +5 -0
- package/src/chat/ui/GoalDock.tsx +13 -1
- package/src/chat/ui/ImageView.tsx +11 -0
- package/src/chat/ui/LimitState.tsx +23 -6
- package/src/chat/ui/Markdown.tsx +41 -0
- package/src/chat/ui/MermaidBlock.tsx +16 -0
- package/src/chat/ui/MessageActions.tsx +8 -0
- package/src/chat/ui/ModelMarks.tsx +1 -0
- package/src/chat/ui/Pickers.tsx +26 -0
- package/src/chat/ui/PromptComposer.tsx +2 -0
- package/src/chat/ui/PromptEditor.tsx +6 -0
- package/src/chat/ui/QuoteButton.tsx +12 -0
- package/src/chat/ui/ReferenceChip.tsx +3 -0
- package/src/chat/ui/ResumeCompactionDock.tsx +1 -0
- package/src/chat/ui/RowTime.tsx +1 -0
- package/src/chat/ui/RunSettings.tsx +38 -0
- package/src/chat/ui/Scrubber.tsx +14 -0
- package/src/chat/ui/SessionLine.tsx +1 -0
- package/src/chat/ui/ShellCommand.tsx +32 -0
- package/src/chat/ui/SubagentControls.tsx +7 -0
- package/src/chat/ui/SubagentInfo.tsx +1 -0
- package/src/chat/ui/SubagentStopButton.tsx +6 -0
- package/src/chat/ui/SubagentTimeline.tsx +10 -0
- package/src/chat/ui/Timeline.tsx +119 -0
- package/src/chat/ui/TimelineMenu.tsx +5 -0
- package/src/chat/ui/UnifiedDiff.tsx +6 -0
- package/src/chat/ui/UploadThumb.tsx +2 -0
- package/src/chat/ui/VisualDialogs.tsx +3 -0
- package/src/chat/ui/VisualFrame.tsx +15 -0
- package/src/chat/ui/Welcome.tsx +1 -0
- package/src/chat/ui/chip-clipboard.ts +20 -0
- package/src/chat/ui/code-lines.ts +14 -0
- package/src/chat/ui/code-theme.ts +1 -0
- package/src/chat/ui/composer/ComposerControls.tsx +5 -0
- package/src/chat/ui/composer/ComposerMenu.tsx +12 -0
- package/src/chat/ui/composer/DraftParts.tsx +2 -0
- package/src/chat/ui/composer/QueuedMessages.tsx +4 -0
- package/src/chat/ui/composer/chip-paste.ts +16 -0
- package/src/chat/ui/composer/chips.ts +6 -0
- package/src/chat/ui/composer/editor.ts +9 -0
- package/src/chat/ui/composer/insert.ts +2 -0
- package/src/chat/ui/composer/key-handler.ts +39 -0
- package/src/chat/ui/composer/keys.ts +23 -0
- package/src/chat/ui/composer/placeholder.ts +6 -0
- package/src/chat/ui/composer/prompt-picks.ts +1 -0
- package/src/chat/ui/composer/surface.ts +5 -0
- package/src/chat/ui/composer/use-chat-controls.ts +13 -0
- package/src/chat/ui/composer/use-compaction-offer.ts +3 -0
- package/src/chat/ui/composer/use-composer-menus.ts +2 -0
- package/src/chat/ui/composer/use-composer-submit.ts +27 -0
- package/src/chat/ui/composer/use-continuable-turn.ts +3 -5
- package/src/chat/ui/composer/use-draft-files.ts +24 -0
- package/src/chat/ui/composer/use-effort-stepper.ts +8 -0
- package/src/chat/ui/composer/use-notice.ts +4 -1
- package/src/chat/ui/composer/use-pending-requests.ts +3 -0
- package/src/chat/ui/composer/use-prompt-history.ts +20 -11
- package/src/chat/ui/composer/use-prompt-hold.ts +3 -0
- package/src/chat/ui/composer/use-prompt-menus.ts +34 -14
- package/src/chat/ui/composer/use-take-back.ts +20 -2
- package/src/chat/ui/diff/ApprovalReview.tsx +18 -15
- package/src/chat/ui/diff/DiffFallbackBoundary.tsx +1 -0
- package/src/chat/ui/diff/DiffOmitted.tsx +1 -0
- package/src/chat/ui/diff/DiffStack.tsx +2 -0
- package/src/chat/ui/diff/DiffUnavailable.tsx +1 -0
- package/src/chat/ui/diff/EditorEditDiff.tsx +13 -0
- package/src/chat/ui/diff/EditorPatchDiff.tsx +4 -0
- package/src/chat/ui/diff/LegacyDiffPool.tsx +2 -0
- package/src/chat/ui/diff/LegacyEditDiff.tsx +2 -0
- package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +8 -0
- package/src/chat/ui/diff/RawDiff.tsx +1 -0
- package/src/chat/ui/diff/ReviewDiff.tsx +1 -0
- package/src/chat/ui/diff/diff-source-budget.ts +8 -0
- package/src/chat/ui/diff/editor-edit-model.ts +4 -0
- package/src/chat/ui/diff/review-plan.ts +9 -0
- package/src/chat/ui/diff/review-settle.ts +1 -0
- package/src/chat/ui/diff/syntax-runtime.ts +52 -0
- package/src/chat/ui/diff/use-review-stack.ts +9 -0
- package/src/chat/ui/diff-syntax.ts +12 -0
- package/src/chat/ui/diff-theme.ts +2 -0
- package/src/chat/ui/file-links.ts +2 -0
- package/src/chat/ui/find-reveal.ts +1 -0
- package/src/chat/ui/full-diff.ts +1 -0
- package/src/chat/ui/highlighter.ts +29 -15
- package/src/chat/ui/icons.tsx +2 -4
- package/src/chat/ui/index.ts +4 -0
- package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +25 -0
- package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +1 -0
- package/src/chat/ui/intelligent-ui/UiReply.tsx +63 -0
- package/src/chat/ui/intelligent-ui/block-local.ts +5 -0
- package/src/chat/ui/intelligent-ui/chart-data.ts +15 -0
- package/src/chat/ui/intelligent-ui/node-text.ts +17 -0
- package/src/chat/ui/intelligent-ui/renderers/binding.ts +1 -0
- package/src/chat/ui/intelligent-ui/renderers/chart.tsx +31 -0
- package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -0
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +18 -0
- package/src/chat/ui/intelligent-ui/renderers/data.tsx +11 -0
- package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +13 -0
- package/src/chat/ui/intelligent-ui/renderers/links.tsx +9 -0
- package/src/chat/ui/intelligent-ui/renderers/map-slots.ts +15 -0
- package/src/chat/ui/intelligent-ui/renderers/map-style.ts +15 -0
- package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +48 -0
- package/src/chat/ui/intelligent-ui/renderers/map.tsx +20 -0
- package/src/chat/ui/intelligent-ui/renderers/place-point.ts +3 -0
- package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -0
- package/src/chat/ui/intelligent-ui/renderers/text.tsx +8 -0
- package/src/chat/ui/intelligent-ui/reply-parts.ts +5 -0
- package/src/chat/ui/intelligent-ui/table-data.ts +17 -0
- package/src/chat/ui/intelligent-ui/use-in-view.ts +4 -0
- package/src/chat/ui/intelligent-ui/use-later.ts +4 -0
- package/src/chat/ui/intelligent-ui/use-truncated.ts +5 -0
- package/src/chat/ui/intelligent-ui/use-ui-links.ts +29 -0
- package/src/chat/ui/intelligent-ui/use-ui-queries.ts +60 -0
- package/src/chat/ui/markdown-blocks.ts +64 -0
- package/src/chat/ui/mermaid.ts +4 -0
- package/src/chat/ui/quote-selection.ts +10 -0
- package/src/chat/ui/rehype-chips.ts +5 -0
- package/src/chat/ui/rehype-fade.ts +2 -0
- package/src/chat/ui/remark-html-as-text.ts +5 -0
- package/src/chat/ui/reveal.ts +18 -0
- package/src/chat/ui/rows/ForksRow.tsx +5 -0
- package/src/chat/ui/rows/GeneratedImageRow.tsx +10 -0
- package/src/chat/ui/rows/MessageRows.tsx +29 -5
- package/src/chat/ui/rows/RowContainer.tsx +1 -0
- package/src/chat/ui/rows/Rows.tsx +2 -0
- package/src/chat/ui/rows/SubagentRow.tsx +13 -0
- package/src/chat/ui/rows/TaskRow.tsx +7 -0
- package/src/chat/ui/rows/VisualRow.tsx +4 -0
- package/src/chat/ui/rows/WorkRows.tsx +46 -0
- package/src/chat/ui/rows/WorkflowRow.tsx +10 -0
- package/src/chat/ui/rows/row-rhythm.ts +7 -5
- package/src/chat/ui/theme-watch.ts +8 -7
- package/src/chat/ui/thread-references.ts +7 -0
- package/src/chat/ui/use-diff-source-tokens.ts +8 -0
- package/src/chat/ui/useToggleSet.ts +3 -0
- package/src/chat/ui/visual-theme.ts +30 -0
- package/src/chat/visual-bridge.ts +23 -0
- package/src/chat/visual-viewport.ts +12 -0
- package/src/host-hooks.ts +6 -4
- package/src/host.ts +2 -0
- package/src/index.ts +3 -0
- package/src/lazy.tsx +9 -0
- package/src/mounted-registry.ts +4 -0
- package/src/port-transport.ts +32 -0
- package/src/prompts/index.ts +2 -0
- package/src/prompts/logic/focus.ts +5 -0
- package/src/prompts/logic/keys.ts +12 -0
- package/src/prompts/logic/prompts.ts +8 -0
- package/src/prompts/logic/subjects.ts +8 -0
- package/src/prompts/logic/useFocusAfterAnswer.ts +2 -0
- package/src/prompts/logic/usePromptSession.ts +13 -1
- package/src/prompts/ui/ApprovalBody.tsx +2 -0
- package/src/prompts/ui/PromptActions.tsx +2 -0
- package/src/prompts/ui/PromptCard.tsx +6 -0
- package/src/prompts/ui/PromptView.tsx +6 -0
- package/src/prompts/ui/QuestionBody.tsx +11 -0
- package/src/providers/AccountColors.tsx +1 -0
- package/src/providers/AccountDetail.tsx +7 -0
- package/src/providers/AccountVariables.tsx +2 -0
- package/src/providers/AddAccountForm.tsx +5 -1
- package/src/providers/CliDetail.tsx +6 -5
- package/src/providers/InstallPage.tsx +11 -0
- package/src/providers/ProviderList.tsx +3 -0
- package/src/providers/ProvidersPane.tsx +18 -0
- package/src/providers/account-actions.ts +10 -8
- package/src/providers/install-steps.ts +3 -0
- package/src/providers/pane-target.ts +5 -0
- package/src/providers/provider-abilities.ts +1 -0
- package/src/providers/provider-groups.ts +6 -0
- package/src/providers/variables.ts +12 -0
- package/src/scope.ts +2 -0
- package/src/state/chats.ts +61 -14
- package/src/state/index.ts +2 -0
- package/src/state/provider-accounts.ts +7 -9
- package/src/state/providers.ts +1 -0
- package/src/state/usage.ts +6 -0
- package/src/storage.ts +18 -0
- package/src/testing/prompts.ts +5 -0
- package/src/transport.ts +18 -0
- package/src/usage/ChartLogo.tsx +12 -0
- package/src/usage/LimitsList.tsx +7 -8
- package/src/usage/UsageBreakdown.tsx +11 -4
- package/src/usage/UsageChart.tsx +5 -0
- package/src/usage/UsageLimits.tsx +10 -7
- package/src/usage/UsageLimitsCard.tsx +2 -0
- package/src/usage/UsagePage.tsx +16 -19
- package/src/usage/UsageSummary.tsx +4 -5
- package/src/usage/UsageTiles.tsx +2 -0
- package/src/usage/format.ts +7 -0
- package/src/usage/limit-groups.ts +14 -0
- package/src/usage/limits.ts +11 -13
- package/src/usage/money.ts +1 -0
- package/src/usage/summary.ts +15 -7
|
@@ -5,6 +5,7 @@ import { ChatScopeContext } from '../scope.js';
|
|
|
5
5
|
import { useProvidersStore } from '../state/providers.js';
|
|
6
6
|
import { AgentIcon } from './AgentIcon.js';
|
|
7
7
|
import { modelName } from './model-name.js';
|
|
8
|
+
import { hasProviderLogo } from './provider-paths.js';
|
|
8
9
|
import { ProviderLogo } from './ProviderLogo.js';
|
|
9
10
|
/*
|
|
10
11
|
* Who answered or will answer, in one line: the CLI's mark and the model, named the way the machine's
|
|
@@ -55,7 +56,7 @@ export function AgentModelLabel(t0) {
|
|
|
55
56
|
}
|
|
56
57
|
let t5;
|
|
57
58
|
if ($[10] !== provider || $[11] !== size) {
|
|
58
|
-
t5 = provider
|
|
59
|
+
t5 = hasProviderLogo(provider) ? /*#__PURE__*/_jsx(ProviderLogo, {
|
|
59
60
|
provider: provider,
|
|
60
61
|
size: size
|
|
61
62
|
}) : /*#__PURE__*/_jsx(AgentIcon, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useProviders } from '../state/providers.js';
|
|
3
|
+
import { hasProviderLogo } from './provider-paths.js';
|
|
3
4
|
/*
|
|
4
5
|
* A model id as a person reads it, for a model no catalog names: without its vendor prefix and its
|
|
5
6
|
* date, and with the version number put back together (`claude-opus-4-5` is one 4.5, not a 4 and a
|
|
@@ -25,7 +26,7 @@ export function modelName(slug, models) {
|
|
|
25
26
|
export function agentChipOf(providers, provider, model) {
|
|
26
27
|
const owner = providers.find(entry => entry.kind === provider);
|
|
27
28
|
return {
|
|
28
|
-
mark: provider
|
|
29
|
+
mark: hasProviderLogo(provider) ? 'logo' : 'icon',
|
|
29
30
|
name: owner?.name ?? provider,
|
|
30
31
|
model: modelName(model, owner?.models)
|
|
31
32
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { UsageProvider } from '@adecore/agent-contracts';
|
|
1
|
+
import type { AgentKind, UsageProvider } from '@adecore/agent-contracts';
|
|
2
2
|
export declare const PROVIDER_PATHS: Record<UsageProvider, string>;
|
|
3
|
+
export declare function hasProviderLogo(kind: AgentKind): kind is 'claude' | 'codex';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { siGithubcopilot } from 'simple-icons';
|
|
2
2
|
/*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Lucide has no brand marks, so these are the icon rule's exception for provider marks. One path each,
|
|
4
|
+
* in `currentColor`, so a row decides how loud the logo is.
|
|
5
5
|
*/
|
|
6
6
|
const CLAUDE_PATH = 'M4.709 15.955l4.72-2.647.079-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.377-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.048.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.607.212-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.914-1.316-.012.01z';
|
|
7
7
|
export const PROVIDER_PATHS = {
|
|
@@ -11,4 +11,8 @@ export const PROVIDER_PATHS = {
|
|
|
11
11
|
nanogpt: 'M5 20V4h2.6l8.8 11.2V4H19v16h-2.6L7.6 8.8V20z',
|
|
12
12
|
grok: 'M6.469 8.776 16.512 23h-4.464L2.005 8.776H6.47Zm-.004 7.9 2.233 3.164L6.467 23H2l4.465-6.324ZM22 2.582V23h-3.659V7.764L22 2.582ZM22 1l-9.952 14.095-2.233-3.163L17.533 1H22Z',
|
|
13
13
|
copilot: siGithubcopilot.path
|
|
14
|
-
};
|
|
14
|
+
};
|
|
15
|
+
/* The CLIs drawn with the logo of the usage page rather than their agent mark. */
|
|
16
|
+
export function hasProviderLogo(kind) {
|
|
17
|
+
return kind === 'claude' || kind === 'codex';
|
|
18
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import { accountName, accountsOfKind, hasAccountChoice, offeredAccounts } from '../agents/accounts.js';
|
|
4
3
|
import { useProviderAccounts } from '../state/provider-accounts.js';
|
|
5
4
|
import { useProviders } from '../state/providers.js';
|
|
@@ -8,48 +7,78 @@ import { useProviders } from '../state/providers.js';
|
|
|
8
7
|
* the CLI has fewer than two accounts that are on: with one there is nothing to choose or tell apart.
|
|
9
8
|
*/
|
|
10
9
|
export function useAccountChoice(kind, account) {
|
|
11
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(17);
|
|
12
11
|
const accounts = useProviderAccounts(_temp);
|
|
13
12
|
const providerName = useProviders(row_0 => row_0.providers.find(entry => entry.kind === kind)?.name) ?? kind ?? "";
|
|
13
|
+
if (kind === null || accounts === null) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
14
16
|
let t0;
|
|
15
|
-
|
|
17
|
+
let t1;
|
|
18
|
+
let t2;
|
|
19
|
+
let t3;
|
|
20
|
+
let t4;
|
|
21
|
+
if ($[0] !== account || $[1] !== accounts || $[2] !== kind) {
|
|
22
|
+
t4 = Symbol.for("react.early_return_sentinel");
|
|
16
23
|
bb0: {
|
|
17
|
-
if (kind === null || accounts === null) {
|
|
18
|
-
t0 = null;
|
|
19
|
-
break bb0;
|
|
20
|
-
}
|
|
21
24
|
const entries = accountsOfKind(accounts, kind);
|
|
22
25
|
if (!hasAccountChoice(entries)) {
|
|
23
|
-
|
|
26
|
+
t4 = null;
|
|
24
27
|
break bb0;
|
|
25
28
|
}
|
|
26
29
|
const currentId = account ?? kind;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
$[6] = t1;
|
|
32
|
-
} else {
|
|
33
|
-
t1 = $[6];
|
|
34
|
-
}
|
|
35
|
-
t0 = {
|
|
36
|
-
accounts,
|
|
37
|
-
offered: offeredAccounts(entries, currentId),
|
|
38
|
-
currentId,
|
|
39
|
-
current: entries.find(entry_0 => entry_0.id === currentId) ?? null,
|
|
40
|
-
providerName,
|
|
41
|
-
nameOf: t1
|
|
42
|
-
};
|
|
30
|
+
t0 = accounts;
|
|
31
|
+
t1 = offeredAccounts(entries, currentId);
|
|
32
|
+
t2 = currentId;
|
|
33
|
+
t3 = entries.find(entry_0 => entry_0.id === currentId) ?? null;
|
|
43
34
|
}
|
|
44
35
|
$[0] = account;
|
|
45
36
|
$[1] = accounts;
|
|
46
37
|
$[2] = kind;
|
|
47
|
-
$[3] =
|
|
48
|
-
$[4] =
|
|
38
|
+
$[3] = t0;
|
|
39
|
+
$[4] = t1;
|
|
40
|
+
$[5] = t2;
|
|
41
|
+
$[6] = t3;
|
|
42
|
+
$[7] = t4;
|
|
43
|
+
} else {
|
|
44
|
+
t0 = $[3];
|
|
45
|
+
t1 = $[4];
|
|
46
|
+
t2 = $[5];
|
|
47
|
+
t3 = $[6];
|
|
48
|
+
t4 = $[7];
|
|
49
|
+
}
|
|
50
|
+
if (t4 !== Symbol.for("react.early_return_sentinel")) {
|
|
51
|
+
return t4;
|
|
52
|
+
}
|
|
53
|
+
let t5;
|
|
54
|
+
if ($[8] !== providerName) {
|
|
55
|
+
t5 = entry_1 => accountName(entry_1, providerName);
|
|
56
|
+
$[8] = providerName;
|
|
57
|
+
$[9] = t5;
|
|
49
58
|
} else {
|
|
50
|
-
|
|
59
|
+
t5 = $[9];
|
|
51
60
|
}
|
|
52
|
-
|
|
61
|
+
let t6;
|
|
62
|
+
if ($[10] !== providerName || $[11] !== t0 || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t5) {
|
|
63
|
+
t6 = {
|
|
64
|
+
accounts: t0,
|
|
65
|
+
offered: t1,
|
|
66
|
+
currentId: t2,
|
|
67
|
+
current: t3,
|
|
68
|
+
providerName,
|
|
69
|
+
nameOf: t5
|
|
70
|
+
};
|
|
71
|
+
$[10] = providerName;
|
|
72
|
+
$[11] = t0;
|
|
73
|
+
$[12] = t1;
|
|
74
|
+
$[13] = t2;
|
|
75
|
+
$[14] = t3;
|
|
76
|
+
$[15] = t5;
|
|
77
|
+
$[16] = t6;
|
|
78
|
+
} else {
|
|
79
|
+
t6 = $[16];
|
|
80
|
+
}
|
|
81
|
+
return t6;
|
|
53
82
|
}
|
|
54
83
|
// One object each, so a render that changes nothing hands back the same answer.
|
|
55
84
|
function _temp(row) {
|
package/dist/chat/bookmarks.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
2
|
import { create } from 'zustand';
|
|
3
|
+
import { errorMessage } from '../transport.js';
|
|
3
4
|
import { jumpToTimelineItem } from './timeline-scroll.js';
|
|
4
5
|
export const useBookmarkNaming = create(set => ({
|
|
5
6
|
chatKey: null,
|
|
@@ -16,7 +17,7 @@ export const useBookmarkNaming = create(set => ({
|
|
|
16
17
|
function failed(host, title, e) {
|
|
17
18
|
host.notify({
|
|
18
19
|
title,
|
|
19
|
-
description:
|
|
20
|
+
description: errorMessage(e),
|
|
20
21
|
kind: 'error'
|
|
21
22
|
});
|
|
22
23
|
}
|
package/dist/chat/drafts.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export declare function isEmptyDraft(draft: ChatDraft): boolean;
|
|
|
15
15
|
export declare const useDrafts: import("zustand").UseBoundStore<import("zustand").StoreApi<{
|
|
16
16
|
ids: string[];
|
|
17
17
|
}>>;
|
|
18
|
-
export declare function useHasDraft(chatId: string): boolean;
|
|
19
18
|
export declare function readDraft(chatId: string): ChatDraft;
|
|
20
19
|
export declare function writeDraft(chatId: string, draft: ChatDraft): void;
|
|
21
20
|
export declare function joinDraftText(current: string, added: string): string;
|
package/dist/chat/drafts.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { chatStorageKey, chatStorageLegacyKeys, createChatStore } from '../storage.js';
|
|
3
2
|
import { checkAttachmentLimits, uploadBytes } from './attachments.js';
|
|
4
3
|
import { persistedJson } from './persisted-json.js';
|
|
@@ -26,18 +25,6 @@ export const useDrafts = createChatStore(() => ({
|
|
|
26
25
|
}), store => store.setState({
|
|
27
26
|
ids: Object.keys(storage.read())
|
|
28
27
|
}));
|
|
29
|
-
export function useHasDraft(chatId) {
|
|
30
|
-
const $ = _c(2);
|
|
31
|
-
let t0;
|
|
32
|
-
if ($[0] !== chatId) {
|
|
33
|
-
t0 = s => s.ids.includes(chatId);
|
|
34
|
-
$[0] = chatId;
|
|
35
|
-
$[1] = t0;
|
|
36
|
-
} else {
|
|
37
|
-
t0 = $[1];
|
|
38
|
-
}
|
|
39
|
-
return useDrafts(t0);
|
|
40
|
-
}
|
|
41
28
|
function trackDraft(chatId, held) {
|
|
42
29
|
const {
|
|
43
30
|
ids
|
|
@@ -74,28 +61,23 @@ export function writeDraft(chatId, draft) {
|
|
|
74
61
|
storage.write(drafts);
|
|
75
62
|
return;
|
|
76
63
|
}
|
|
77
|
-
drafts[chatId] =
|
|
78
|
-
text: draft.text,
|
|
79
|
-
mentions: draft.mentions,
|
|
80
|
-
skills: draft.skills,
|
|
81
|
-
chats: draft.chats,
|
|
82
|
-
attachments: draft.attachments,
|
|
83
|
-
quote: draft.quote,
|
|
84
|
-
...(draft.quoteSource === null ? {} : {
|
|
85
|
-
quoteSource: draft.quoteSource
|
|
86
|
-
}),
|
|
87
|
-
references: draft.references,
|
|
88
|
-
...namesOf(draft)
|
|
89
|
-
};
|
|
64
|
+
drafts[chatId] = recordOf(draft, true);
|
|
90
65
|
if (storage.write(drafts)) {
|
|
91
66
|
return;
|
|
92
67
|
}
|
|
93
68
|
// A file can outgrow the storage quota; the text is the part worth keeping then.
|
|
94
|
-
drafts[chatId] =
|
|
69
|
+
drafts[chatId] = recordOf(draft, false);
|
|
70
|
+
storage.write(drafts);
|
|
71
|
+
}
|
|
72
|
+
function recordOf(draft, withFiles) {
|
|
73
|
+
return {
|
|
95
74
|
text: draft.text,
|
|
96
75
|
mentions: draft.mentions,
|
|
97
76
|
skills: draft.skills,
|
|
98
77
|
chats: draft.chats,
|
|
78
|
+
...(withFiles ? {
|
|
79
|
+
attachments: draft.attachments
|
|
80
|
+
} : {}),
|
|
99
81
|
quote: draft.quote,
|
|
100
82
|
...(draft.quoteSource === null ? {} : {
|
|
101
83
|
quoteSource: draft.quoteSource
|
|
@@ -103,7 +85,6 @@ export function writeDraft(chatId, draft) {
|
|
|
103
85
|
references: draft.references,
|
|
104
86
|
...namesOf(draft)
|
|
105
87
|
};
|
|
106
|
-
storage.write(drafts);
|
|
107
88
|
}
|
|
108
89
|
function namesOf(draft) {
|
|
109
90
|
return draft.referenceNames === undefined ? {} : {
|
|
@@ -113,14 +113,8 @@ export function pickerEntriesOf(providers, query, legacyOpen, expanded = NONE, c
|
|
|
113
113
|
open: false
|
|
114
114
|
}];
|
|
115
115
|
});
|
|
116
|
-
|
|
117
|
-
return live;
|
|
118
|
-
}
|
|
119
|
-
return legacyOpen ? [...live, {
|
|
120
|
-
kind: 'legacy',
|
|
121
|
-
count: legacy.length
|
|
122
|
-
}, ...legacy] : [...live, {
|
|
116
|
+
return legacy.length === 0 ? live : [...live, {
|
|
123
117
|
kind: 'legacy',
|
|
124
118
|
count: legacy.length
|
|
125
|
-
}];
|
|
119
|
+
}, ...(legacyOpen ? legacy : [])];
|
|
126
120
|
}
|
|
@@ -35,11 +35,8 @@ function offerableTurn({
|
|
|
35
35
|
if (turn === null || turn.endedAt === null || turn.id === dismissedTurnId) {
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* come straight back after a compaction. A native compaction is a turn without a message of the
|
|
41
|
-
* person, which is why this looks at the turn and not at the last thing that was said.
|
|
42
|
-
*/
|
|
38
|
+
// `contextTokens` keeps the old number until the next request, so the offer would return right after
|
|
39
|
+
// a compaction. A native one is a turn without a message of the person, hence the look at the turn.
|
|
43
40
|
if (items.some(item => item.kind === 'compaction' && item.turnId === turn.id)) {
|
|
44
41
|
return null;
|
|
45
42
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { stripAnsi } from './ansi.js';
|
|
2
2
|
/*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* source itself stays available as "Copy as Markdown".
|
|
6
|
-
*/
|
|
7
|
-
/*
|
|
8
|
-
* The marks that only exist to be rendered come off, what they marked stays. `_` is left alone on
|
|
9
|
-
* purpose: it is a letter in half the identifiers an agent writes, and no italic is worth mangling
|
|
10
|
-
* `file_path`.
|
|
3
|
+
* An answer is markdown on the wire and rendered text on screen, so a copy as text undoes the marks the
|
|
4
|
+
* renderer swallowed. `_` stays: it is a letter in half the identifiers an agent writes (`file_path`).
|
|
11
5
|
*/
|
|
12
6
|
export function stripMarkdown(text) {
|
|
13
7
|
return text.replace(/^ *```[^\n]*\n?/gm, '').replace(/^ *(#{1,6}) +/gm, '').replace(/^ *> ?/gm, '').replace(/!\[([^\]]*)\]\([^)]*\)/g, '$1').replace(/\[([^\]]*)\]\([^)]*\)/g, '$1').replace(/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, '$2').replace(/\*(?=\S)([^*\n]*\S)\*/g, '$1').replace(/`+([^`]+)`+/g, '$1').trim();
|
|
@@ -479,7 +479,7 @@ function withLiveThought(rows, items) {
|
|
|
479
479
|
const index = rows.findIndex(row => row.kind === 'work-live' && after.has(row.tool.id));
|
|
480
480
|
const call = rows[index];
|
|
481
481
|
const shownAt = rows.findIndex(row => row.kind === 'thinking' && row.id === thought.id);
|
|
482
|
-
const inSight = shownAt !== -1 && shownAt < index && !rows.slice(shownAt + 1, index).some(row => row.kind === 'work');
|
|
482
|
+
const inSight = shownAt !== -1 && shownAt < index && !rows.slice(shownAt + 1, index).some(row => row.kind === 'work' || row.kind === 'work-group');
|
|
483
483
|
if (call?.kind !== 'work-live' || inSight) {
|
|
484
484
|
return rows;
|
|
485
485
|
}
|
|
@@ -496,8 +496,8 @@ function chunksByTurn(items) {
|
|
|
496
496
|
const byTurn = new Map();
|
|
497
497
|
for (const item of items) {
|
|
498
498
|
if (item.turnId === null) {
|
|
499
|
-
const last = chunks
|
|
500
|
-
if (last
|
|
499
|
+
const last = chunks.at(-1);
|
|
500
|
+
if (last?.turnId === null) {
|
|
501
501
|
last.items.push(item);
|
|
502
502
|
} else {
|
|
503
503
|
chunks.push({
|
|
@@ -561,12 +561,13 @@ export function deriveTimelineRows(items, options) {
|
|
|
561
561
|
const work = rowsForItems(rest, options, children);
|
|
562
562
|
// The closing answer stays visible; the work after the last input folds behind the label.
|
|
563
563
|
const finalAssistant = lastAssistantRow(work);
|
|
564
|
-
const
|
|
564
|
+
const closing = finalAssistant ? work.indexOf(finalAssistant) : work.length;
|
|
565
|
+
const before = work.slice(0, closing);
|
|
565
566
|
// Images remain a turn's visible result, and a workflow or a background subagent may still be running after its turn ends.
|
|
566
567
|
const standing = before.filter(row => isImageRow(row) || row.kind === 'workflow' && row.tool.state === 'running' || row.kind === 'subagent' && row.item.status === 'running');
|
|
567
|
-
const folded = before.
|
|
568
|
+
const folded = before.length - standing.length;
|
|
568
569
|
const expanded = options.expandedTurns.has(turnId);
|
|
569
|
-
if (folded
|
|
570
|
+
if (folded > 0) {
|
|
570
571
|
const tools = rest.filter(item => item.kind === 'tool' && parentOf(item) === null && handbackReportOf(item) === null && !isImageGeneration(item));
|
|
571
572
|
rows.push({
|
|
572
573
|
kind: 'turn-fold',
|
|
@@ -574,7 +575,7 @@ export function deriveTimelineRows(items, options) {
|
|
|
574
575
|
turn,
|
|
575
576
|
label: turnLabel(turn, chunk.items),
|
|
576
577
|
work: summarizeTurn(tools, options.commandLooks),
|
|
577
|
-
hiddenCount: folded
|
|
578
|
+
hiddenCount: folded,
|
|
578
579
|
expanded
|
|
579
580
|
});
|
|
580
581
|
}
|
|
@@ -583,9 +584,7 @@ export function deriveTimelineRows(items, options) {
|
|
|
583
584
|
if (changed) {
|
|
584
585
|
rows.push(changed);
|
|
585
586
|
}
|
|
586
|
-
|
|
587
|
-
rows.push(...work.slice(work.indexOf(finalAssistant)));
|
|
588
|
-
}
|
|
587
|
+
rows.push(...work.slice(closing));
|
|
589
588
|
if (options.forkedTurns?.has(turnId) === true) {
|
|
590
589
|
rows.push({
|
|
591
590
|
kind: 'forks',
|
|
@@ -55,8 +55,7 @@ export function workflowAgentTime(view) {
|
|
|
55
55
|
}
|
|
56
56
|
/* The CLI's previews start with a markdown heading as often as not, which says nothing on one line. */
|
|
57
57
|
function firstLine(text) {
|
|
58
|
-
|
|
59
|
-
return line === undefined ? null : line;
|
|
58
|
+
return text?.split('\n').map(part => part.replace(/^#+\s*/, '').trim()).find(part => part !== '') ?? null;
|
|
60
59
|
}
|
|
61
60
|
/* The second line of an agent: what it does while at work, what it answered once it stopped, what it was asked before. */
|
|
62
61
|
export function workflowAgentPreview(view) {
|
|
@@ -140,6 +139,5 @@ function metaLiteral(script) {
|
|
|
140
139
|
export function workflowDescription(input) {
|
|
141
140
|
const script = typeof input === 'object' && input !== null && 'script' in input ? input.script : undefined;
|
|
142
141
|
const meta = typeof script === 'string' ? metaLiteral(script) : null;
|
|
143
|
-
|
|
144
|
-
return found ? found : null;
|
|
142
|
+
return (meta === null ? undefined : DESCRIPTION.exec(meta)?.[2]?.replace(/\\(.)/g, '$1').trim()) || null;
|
|
145
143
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
|
+
import { isWaiting } from '../state/chats.js';
|
|
2
3
|
import { errorCode, isConnectionError } from '../transport.js';
|
|
3
4
|
// What the panel opens on: the newest end of the conversation, which is where an agent that works is.
|
|
4
5
|
export const SUBAGENT_PAGE = 60;
|
|
@@ -42,7 +43,7 @@ export function mergeNewest(current, currentCursor, page, pageCursor) {
|
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
function pendingOf(items) {
|
|
45
|
-
return items.filter(
|
|
46
|
+
return items.filter(isWaiting);
|
|
46
47
|
}
|
|
47
48
|
function messageOf(error) {
|
|
48
49
|
return error instanceof Error ? error.message : i18next.t('agent-chat:subagents.noAnswer');
|
package/dist/chat/ui/GoalDock.js
CHANGED
|
@@ -10,6 +10,7 @@ import { useChatScope } from '../../scope.js';
|
|
|
10
10
|
import { useChats } from '../../state/chats.js';
|
|
11
11
|
import { useChatActions } from '../actions.js';
|
|
12
12
|
import { goalView } from '../logic/goal.js';
|
|
13
|
+
import { errorMessage } from '../../transport.js';
|
|
13
14
|
/* How far the goal got, in what its CLI counts: the checks that sent the agent on, or the tokens it spent. */
|
|
14
15
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
function progressOf(goal, t) {
|
|
@@ -71,7 +72,7 @@ export function GoalDock(t0) {
|
|
|
71
72
|
actions.goal(chatId, action).catch(e => host.notify({
|
|
72
73
|
kind: "error",
|
|
73
74
|
title: t("goal.failed"),
|
|
74
|
-
description:
|
|
75
|
+
description: errorMessage(e)
|
|
75
76
|
})).finally(() => setChanging(false));
|
|
76
77
|
};
|
|
77
78
|
$[9] = actions;
|
|
@@ -18,6 +18,7 @@ import { useChatActions } from '../actions.js';
|
|
|
18
18
|
import { useUsageStore } from '../../state/usage.js';
|
|
19
19
|
import { SessionLine } from './SessionLine.js';
|
|
20
20
|
import { useHostResumeAtReset } from '../../host-hooks.js';
|
|
21
|
+
import { errorMessage } from '../../transport.js';
|
|
21
22
|
// A time a limit names reads as a clock today and with its day after that, so the words follow the minute.
|
|
22
23
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
24
|
const MINUTE_MS = 60_000;
|
|
@@ -121,11 +122,8 @@ function ResumeAtResetToggle(t0) {
|
|
|
121
122
|
return t7;
|
|
122
123
|
}
|
|
123
124
|
/*
|
|
124
|
-
* Another account of the chat's CLI
|
|
125
|
-
*
|
|
126
|
-
* work. Only ever offered, since going on there spends someone's other plan, and nothing is
|
|
127
|
-
* remembered: the next limit suggests the one with the most room again. An account that reads the
|
|
128
|
-
* chat's conversation takes it over; any other goes on in a fork, which then opens the way a fork does.
|
|
125
|
+
* Another account of the chat's CLI with room, only ever offered since it spends someone's other plan, and
|
|
126
|
+
* never remembered. One that reads the chat's conversation takes it over; any other goes on in a fork.
|
|
129
127
|
*/
|
|
130
128
|
function _temp() {}
|
|
131
129
|
function ContinueOn(t0) {
|
|
@@ -187,7 +185,7 @@ function ContinueOn(t0) {
|
|
|
187
185
|
title: t("limit.continueFailed", {
|
|
188
186
|
account: choice.nameOf(entry)
|
|
189
187
|
}),
|
|
190
|
-
description:
|
|
188
|
+
description: errorMessage(e)
|
|
191
189
|
})).finally(() => setBusy(false));
|
|
192
190
|
};
|
|
193
191
|
$[9] = actions;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import { useChatRow } from '../../../state/chats.js';
|
|
4
3
|
import { continuableTurn } from '../../logic/continue-after-stop.js';
|
|
5
4
|
/* The turn a person stopped that Continue would pick up, or null when there is none. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
+
import { errorMessage } from '../../../transport.js';
|
|
3
4
|
const NOTICE_MS = 4000;
|
|
4
5
|
/* A line under the box that says what went wrong, gone again after a few seconds. */
|
|
5
6
|
export function useNotice() {
|
|
@@ -42,7 +43,7 @@ export function useNotice() {
|
|
|
42
43
|
const t4 = shown?.tone ?? "error";
|
|
43
44
|
let t5;
|
|
44
45
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45
|
-
t5 = error => setNotice(
|
|
46
|
+
t5 = error => setNotice(errorMessage(error));
|
|
46
47
|
$[4] = t5;
|
|
47
48
|
} else {
|
|
48
49
|
t5 = $[4];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { useChatRow } from '../../../state/chats.js';
|
|
4
4
|
// How many sent prompts the arrow keys walk back through, per chat.
|
|
5
5
|
const PROMPT_HISTORY = 50;
|