@adecore/agents-react 0.53.3 → 0.54.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/AgentIcon.js +1 -1
- package/dist/agents/AgentModelLabel.js +1 -1
- package/dist/agents/accounts.js +1 -1
- package/dist/chat/attachments.js +1 -1
- package/dist/chat/forks.js +1 -1
- package/dist/chat/logic/limit.js +1 -1
- package/dist/chat/logic/scrubber.js +1 -1
- package/dist/chat/logic/selection-switch.d.ts +6 -0
- package/dist/chat/logic/selection-switch.js +42 -0
- package/dist/chat/logic/timeline-target.d.ts +1 -1
- package/dist/chat/logic/timeline.d.ts +6 -1
- package/dist/chat/logic/timeline.js +16 -2
- package/dist/chat/logic/tool-looks.js +1 -1
- package/dist/chat/logic/tools.js +1 -1
- package/dist/chat/logic/workflow.js +1 -1
- package/dist/chat/preferences.js +1 -1
- package/dist/chat/runtime-modes.js +1 -1
- package/dist/chat/send-key.js +1 -1
- package/dist/chat/stash.js +2 -2
- package/dist/chat/subagent-list.js +1 -1
- package/dist/chat/ui/AccountPill.js +3 -3
- package/dist/chat/ui/BookmarkMarker.js +6 -6
- package/dist/chat/ui/BookmarkSubmenu.js +5 -5
- package/dist/chat/ui/ChatActivity.js +15 -14
- package/dist/chat/ui/CodeBlock.js +9 -7
- package/dist/chat/ui/Composer.js +13 -13
- package/dist/chat/ui/ComposerInput.d.ts +1 -1
- package/dist/chat/ui/ComposerInput.js +35 -18
- package/dist/chat/ui/DiffPool.js +1 -1
- package/dist/chat/ui/EditDiff.js +2 -2
- package/dist/chat/ui/GoalDock.js +5 -5
- package/dist/chat/ui/ImageView.js +4 -4
- package/dist/chat/ui/LimitState.js +12 -12
- package/dist/chat/ui/Markdown.d.ts +1 -1
- package/dist/chat/ui/Markdown.js +11 -10
- package/dist/chat/ui/MermaidBlock.js +7 -6
- package/dist/chat/ui/MessageActions.js +7 -7
- package/dist/chat/ui/ModelMarks.js +2 -2
- package/dist/chat/ui/Pickers.d.ts +1 -1
- package/dist/chat/ui/Pickers.js +32 -27
- package/dist/chat/ui/PromptComposer.d.ts +1 -1
- package/dist/chat/ui/PromptComposer.js +5 -5
- package/dist/chat/ui/PromptEditor.js +3 -3
- package/dist/chat/ui/QuoteButton.js +2 -2
- package/dist/chat/ui/ReferenceChip.js +3 -3
- package/dist/chat/ui/ReferenceTrail.js +2 -2
- package/dist/chat/ui/ResumeCompactionDock.js +3 -3
- package/dist/chat/ui/RunSettings.js +11 -11
- package/dist/chat/ui/Scrubber.js +4 -4
- package/dist/chat/ui/SessionLine.js +2 -2
- package/dist/chat/ui/ShellCommand.d.ts +1 -1
- package/dist/chat/ui/ShellCommand.js +2 -2
- package/dist/chat/ui/SubagentControls.js +3 -3
- package/dist/chat/ui/SubagentInfo.js +5 -5
- package/dist/chat/ui/SubagentStopButton.js +2 -2
- package/dist/chat/ui/SubagentTimeline.js +18 -16
- package/dist/chat/ui/Timeline.js +231 -145
- package/dist/chat/ui/TimelineMenu.js +7 -7
- package/dist/chat/ui/UnifiedDiff.js +2 -2
- package/dist/chat/ui/VisualDialogs.js +1 -1
- package/dist/chat/ui/VisualFrame.js +4 -4
- package/dist/chat/ui/WorkflowAgentLine.d.ts +1 -1
- package/dist/chat/ui/WorkflowAgentLine.js +3 -3
- package/dist/chat/ui/chip-clipboard.d.ts +1 -1
- package/dist/chat/ui/composer/ComposerControls.d.ts +1 -1
- package/dist/chat/ui/composer/ComposerControls.js +4 -4
- package/dist/chat/ui/composer/ComposerMenu.js +5 -4
- package/dist/chat/ui/composer/DraftParts.js +2 -2
- package/dist/chat/ui/composer/QueuedMessages.js +2 -2
- package/dist/chat/ui/composer/chip-paste.d.ts +1 -1
- package/dist/chat/ui/composer/chips.d.ts +1 -1
- package/dist/chat/ui/composer/chips.js +2 -2
- package/dist/chat/ui/composer/key-handler.js +1 -1
- package/dist/chat/ui/composer/placeholder.js +1 -1
- package/dist/chat/ui/composer/use-composer-menus.d.ts +1 -1
- package/dist/chat/ui/composer/use-composer-menus.js +1 -1
- package/dist/chat/ui/composer/use-composer-submit.d.ts +1 -1
- package/dist/chat/ui/composer/use-draft-files.d.ts +2 -2
- package/dist/chat/ui/composer/use-draft-files.js +1 -1
- package/dist/chat/ui/composer/use-effort-stepper.js +1 -1
- package/dist/chat/ui/composer/use-prompt-menus.d.ts +2 -2
- package/dist/chat/ui/composer/use-prompt-menus.js +1 -1
- package/dist/chat/ui/diff/ApprovalReview.js +2 -2
- package/dist/chat/ui/diff/DiffOmitted.js +1 -1
- package/dist/chat/ui/diff/DiffStack.js +2 -2
- package/dist/chat/ui/diff/EditorEditDiff.d.ts +1 -1
- package/dist/chat/ui/diff/EditorEditDiff.js +5 -5
- package/dist/chat/ui/diff/EditorPatchDiff.d.ts +1 -1
- package/dist/chat/ui/diff/EditorPatchDiff.js +1 -1
- package/dist/chat/ui/diff/LegacyEditDiff.js +47 -31
- package/dist/chat/ui/diff/LegacyUnifiedDiff.js +93 -69
- package/dist/chat/ui/diff/RawDiff.js +54 -35
- package/dist/chat/ui/diff/syntax-runtime.d.ts +1 -1
- package/dist/chat/ui/highlighter.d.ts +1 -1
- package/dist/chat/ui/highlighter.js +1 -1
- package/dist/chat/ui/icons.js +1 -1
- package/dist/chat/ui/intelligent-ui/UiBlockFrame.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/UiBlockFrame.js +4 -4
- package/dist/chat/ui/intelligent-ui/UiFallbackPart.js +2 -2
- package/dist/chat/ui/intelligent-ui/UiReply.d.ts +2 -2
- package/dist/chat/ui/intelligent-ui/UiReply.js +8 -8
- package/dist/chat/ui/intelligent-ui/node-text.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/render-context.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/renderers/chart.js +28 -15
- package/dist/chat/ui/intelligent-ui/renderers/choices.js +4 -4
- package/dist/chat/ui/intelligent-ui/renderers/content.js +6 -6
- package/dist/chat/ui/intelligent-ui/renderers/data.js +104 -87
- package/dist/chat/ui/intelligent-ui/renderers/inputs.js +3 -3
- package/dist/chat/ui/intelligent-ui/renderers/links.js +2 -2
- package/dist/chat/ui/intelligent-ui/renderers/map-view.js +4 -4
- package/dist/chat/ui/intelligent-ui/renderers/map.js +3 -3
- package/dist/chat/ui/intelligent-ui/renderers/structure.js +2 -2
- package/dist/chat/ui/intelligent-ui/renderers/text.js +5 -5
- package/dist/chat/ui/intelligent-ui/tones.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/use-ui-links.d.ts +1 -1
- package/dist/chat/ui/intelligent-ui/use-ui-links.js +2 -2
- package/dist/chat/ui/intelligent-ui/use-ui-queries.js +1 -1
- package/dist/chat/ui/reference-icons.d.ts +1 -1
- package/dist/chat/ui/reference-icons.js +2 -2
- package/dist/chat/ui/reply-context.d.ts +1 -1
- package/dist/chat/ui/rows/ForksRow.js +3 -3
- package/dist/chat/ui/rows/GeneratedImageRow.js +5 -5
- package/dist/chat/ui/rows/MessageRows.d.ts +6 -1
- package/dist/chat/ui/rows/MessageRows.js +151 -22
- package/dist/chat/ui/rows/Rows.js +39 -21
- package/dist/chat/ui/rows/SubagentRow.js +16 -16
- package/dist/chat/ui/rows/TaskRow.js +3 -3
- package/dist/chat/ui/rows/VisualRow.js +2 -2
- package/dist/chat/ui/rows/WorkRows.d.ts +2 -2
- package/dist/chat/ui/rows/WorkRows.js +37 -25
- package/dist/chat/ui/rows/WorkflowRow.js +8 -8
- package/dist/chat/ui/use-diff-source-tokens.js +1 -1
- package/dist/chat/ui/visual-theme.d.ts +1 -1
- package/dist/chat/ui/visual-theme.js +2 -2
- package/dist/chat/workflow-list.js +1 -1
- package/dist/host.d.ts +4 -4
- package/dist/host.js +1 -1
- package/dist/lazy.js +1 -1
- package/dist/locales/en/agent-chat.d.ts +4 -0
- package/dist/locales/en/agent-chat.js +4 -0
- package/dist/locales/nl/agent-chat.d.ts +4 -0
- package/dist/locales/nl/agent-chat.js +4 -0
- package/dist/port-transport.js +1 -1
- package/dist/prompts/logic/subjects.d.ts +1 -1
- package/dist/prompts/ui/ApprovalBody.js +16 -7
- package/dist/prompts/ui/PromptActions.js +2 -2
- package/dist/prompts/ui/PromptCard.js +5 -4
- package/dist/prompts/ui/PromptView.js +1 -1
- package/dist/prompts/ui/QuestionBody.js +4 -4
- package/dist/providers/AccountDetail.js +4 -4
- package/dist/providers/AccountOrderList.js +2 -2
- package/dist/providers/AccountVariables.js +3 -3
- package/dist/providers/AddAccountForm.js +6 -6
- package/dist/providers/CliDetail.js +8 -8
- package/dist/providers/InstallPage.js +3 -3
- package/dist/providers/ProviderList.js +2 -2
- package/dist/providers/ProvidersPane.d.ts +1 -1
- package/dist/providers/ProvidersPane.js +5 -5
- package/dist/providers/install-steps.d.ts +1 -1
- package/dist/settings/sections.d.ts +2 -2
- package/dist/state/chats.js +1 -1
- package/dist/state/usage.js +2 -2
- package/dist/theme.css +4 -4
- package/dist/transport.d.ts +1 -1
- package/dist/usage/LimitsList.js +4 -4
- package/dist/usage/UsageBreakdown.js +5 -5
- package/dist/usage/UsageChart.js +1 -1
- package/dist/usage/UsageDialog.js +1 -1
- package/dist/usage/UsageLimits.js +6 -6
- package/dist/usage/UsageLimitsCard.js +2 -2
- package/dist/usage/UsagePage.js +200 -189
- package/dist/usage/UsagePane.js +2 -2
- package/dist/usage/UsageSummary.js +1 -1
- package/dist/usage/UsageTiles.js +1 -1
- package/dist/usage/limit-groups.js +2 -2
- package/dist/usage/summary.js +1 -1
- package/package.json +9 -8
- package/src/agents/AgentIcon.tsx +1 -1
- package/src/agents/AgentModelLabel.tsx +2 -2
- package/src/agents/ProviderLogo.tsx +1 -1
- package/src/agents/accounts.ts +1 -1
- package/src/agents/option-words.ts +1 -1
- package/src/chat/attachments.ts +1 -1
- package/src/chat/bookmarks.ts +1 -1
- package/src/chat/drafts.ts +1 -1
- package/src/chat/forks.ts +1 -1
- package/src/chat/logic/fork.ts +1 -1
- package/src/chat/logic/limit.ts +1 -1
- package/src/chat/logic/scrubber.ts +1 -1
- package/src/chat/logic/selection-switch.ts +47 -0
- package/src/chat/logic/timeline-copy.ts +1 -1
- package/src/chat/logic/timeline-target.ts +1 -1
- package/src/chat/logic/timeline.ts +28 -4
- package/src/chat/logic/tool-looks.ts +1 -1
- package/src/chat/logic/tools.ts +1 -1
- package/src/chat/logic/workflow.ts +1 -1
- package/src/chat/pending-prompts.ts +1 -1
- package/src/chat/preferences.ts +1 -1
- package/src/chat/reading-width.ts +1 -1
- package/src/chat/runtime-modes.ts +1 -1
- package/src/chat/send-key.ts +1 -1
- package/src/chat/stash.ts +2 -2
- package/src/chat/subagent-conversation.ts +1 -1
- package/src/chat/subagent-list.ts +1 -1
- package/src/chat/subagent-view.ts +1 -1
- package/src/chat/thumbnails.ts +1 -1
- package/src/chat/ui/AccountPill.tsx +4 -4
- package/src/chat/ui/BookmarkMarker.tsx +6 -6
- package/src/chat/ui/BookmarkSubmenu.tsx +5 -5
- package/src/chat/ui/ChatActivity.tsx +15 -15
- package/src/chat/ui/CodeBlock.tsx +10 -8
- package/src/chat/ui/Composer.tsx +13 -13
- package/src/chat/ui/ComposerInput.tsx +10 -2
- package/src/chat/ui/DiffPool.tsx +1 -1
- package/src/chat/ui/EditDiff.tsx +3 -4
- package/src/chat/ui/GoalDock.tsx +6 -6
- package/src/chat/ui/ImageView.tsx +4 -4
- package/src/chat/ui/LimitState.tsx +13 -13
- package/src/chat/ui/Markdown.tsx +12 -12
- package/src/chat/ui/MermaidBlock.tsx +6 -6
- package/src/chat/ui/MessageActions.tsx +7 -7
- package/src/chat/ui/ModelMarks.tsx +2 -2
- package/src/chat/ui/Pickers.tsx +10 -10
- package/src/chat/ui/PromptComposer.tsx +6 -6
- package/src/chat/ui/PromptEditor.tsx +4 -4
- package/src/chat/ui/QuoteButton.tsx +2 -2
- package/src/chat/ui/ReferenceChip.tsx +3 -3
- package/src/chat/ui/ReferenceTrail.tsx +2 -2
- package/src/chat/ui/ResumeCompactionDock.tsx +3 -3
- package/src/chat/ui/RunSettings.tsx +13 -13
- package/src/chat/ui/Scrubber.tsx +4 -4
- package/src/chat/ui/SessionLine.tsx +2 -2
- package/src/chat/ui/ShellCommand.tsx +2 -2
- package/src/chat/ui/SubagentControls.tsx +3 -3
- package/src/chat/ui/SubagentInfo.tsx +5 -5
- package/src/chat/ui/SubagentStopButton.tsx +3 -3
- package/src/chat/ui/SubagentTimeline.tsx +20 -17
- package/src/chat/ui/Timeline.tsx +232 -143
- package/src/chat/ui/TimelineMenu.tsx +7 -7
- package/src/chat/ui/UnifiedDiff.tsx +3 -3
- package/src/chat/ui/VisualDialogs.tsx +2 -2
- package/src/chat/ui/VisualFrame.tsx +4 -4
- package/src/chat/ui/WorkflowAgentLine.tsx +4 -4
- package/src/chat/ui/chip-clipboard.ts +1 -1
- package/src/chat/ui/composer/ComposerControls.tsx +4 -4
- package/src/chat/ui/composer/ComposerMenu.tsx +6 -6
- package/src/chat/ui/composer/DraftParts.tsx +2 -2
- package/src/chat/ui/composer/QueuedMessages.tsx +2 -2
- package/src/chat/ui/composer/chip-paste.ts +1 -1
- package/src/chat/ui/composer/chips.ts +2 -2
- package/src/chat/ui/composer/key-handler.ts +2 -2
- package/src/chat/ui/composer/placeholder.ts +1 -1
- package/src/chat/ui/composer/use-chat-controls.ts +1 -1
- package/src/chat/ui/composer/use-compaction-offer.ts +1 -1
- package/src/chat/ui/composer/use-composer-menus.ts +2 -2
- package/src/chat/ui/composer/use-composer-submit.ts +2 -2
- package/src/chat/ui/composer/use-draft-files.ts +3 -3
- package/src/chat/ui/composer/use-effort-stepper.ts +2 -2
- package/src/chat/ui/composer/use-pending-requests.ts +1 -1
- package/src/chat/ui/composer/use-prompt-menus.ts +3 -3
- package/src/chat/ui/composer/use-take-back.ts +1 -1
- package/src/chat/ui/diff/ApprovalReview.tsx +3 -3
- package/src/chat/ui/diff/DiffOmitted.tsx +1 -1
- package/src/chat/ui/diff/DiffStack.tsx +2 -2
- package/src/chat/ui/diff/EditorEditDiff.tsx +5 -5
- package/src/chat/ui/diff/EditorPatchDiff.tsx +1 -1
- package/src/chat/ui/diff/LegacyDiffPool.tsx +1 -1
- package/src/chat/ui/diff/LegacyEditDiff.tsx +18 -9
- package/src/chat/ui/diff/LegacyUnifiedDiff.tsx +24 -13
- package/src/chat/ui/diff/RawDiff.tsx +8 -5
- package/src/chat/ui/diff/syntax-runtime.ts +1 -1
- package/src/chat/ui/highlighter.ts +1 -1
- package/src/chat/ui/icons.tsx +2 -2
- package/src/chat/ui/intelligent-ui/UiBlockFrame.tsx +5 -5
- package/src/chat/ui/intelligent-ui/UiFallbackPart.tsx +2 -2
- package/src/chat/ui/intelligent-ui/UiReply.tsx +18 -18
- package/src/chat/ui/intelligent-ui/node-text.ts +1 -1
- package/src/chat/ui/intelligent-ui/render-context.ts +1 -1
- package/src/chat/ui/intelligent-ui/renderers/chart.tsx +15 -7
- package/src/chat/ui/intelligent-ui/renderers/choices.tsx +4 -4
- package/src/chat/ui/intelligent-ui/renderers/content.tsx +7 -7
- package/src/chat/ui/intelligent-ui/renderers/data.tsx +8 -7
- package/src/chat/ui/intelligent-ui/renderers/inputs.tsx +3 -3
- package/src/chat/ui/intelligent-ui/renderers/links.tsx +4 -4
- package/src/chat/ui/intelligent-ui/renderers/map-view.tsx +4 -4
- package/src/chat/ui/intelligent-ui/renderers/map.tsx +5 -5
- package/src/chat/ui/intelligent-ui/renderers/structure.tsx +3 -3
- package/src/chat/ui/intelligent-ui/renderers/text.tsx +5 -5
- package/src/chat/ui/intelligent-ui/tones.ts +1 -1
- package/src/chat/ui/intelligent-ui/use-ui-links.ts +2 -2
- package/src/chat/ui/intelligent-ui/use-ui-queries.ts +1 -1
- package/src/chat/ui/reference-icons.ts +2 -2
- package/src/chat/ui/reply-context.ts +1 -1
- package/src/chat/ui/rows/ForksRow.tsx +3 -3
- package/src/chat/ui/rows/GeneratedImageRow.tsx +7 -7
- package/src/chat/ui/rows/MessageRows.tsx +57 -33
- package/src/chat/ui/rows/RowContainer.tsx +1 -1
- package/src/chat/ui/rows/Rows.tsx +7 -4
- package/src/chat/ui/rows/SubagentRow.tsx +16 -16
- package/src/chat/ui/rows/TaskRow.tsx +4 -4
- package/src/chat/ui/rows/VisualRow.tsx +2 -2
- package/src/chat/ui/rows/WorkRows.tsx +44 -32
- package/src/chat/ui/rows/WorkflowRow.tsx +9 -9
- package/src/chat/ui/rows/row-rhythm.ts +1 -1
- package/src/chat/ui/use-diff-source-tokens.ts +1 -1
- package/src/chat/ui/visual-theme.ts +2 -2
- package/src/chat/workflow-list.ts +1 -1
- package/src/host.ts +6 -6
- package/src/lazy.tsx +1 -1
- package/src/locales/en/agent-chat.ts +4 -0
- package/src/locales/nl/agent-chat.ts +4 -0
- package/src/port-transport.ts +1 -1
- package/src/prompts/logic/subjects.ts +1 -1
- package/src/prompts/ui/ApprovalBody.tsx +19 -9
- package/src/prompts/ui/PromptActions.tsx +2 -2
- package/src/prompts/ui/PromptCard.tsx +4 -4
- package/src/prompts/ui/PromptView.tsx +1 -1
- package/src/prompts/ui/QuestionBody.tsx +5 -5
- package/src/providers/AccountDetail.tsx +5 -5
- package/src/providers/AccountOrderList.tsx +2 -2
- package/src/providers/AccountVariables.tsx +4 -4
- package/src/providers/AddAccountForm.tsx +7 -7
- package/src/providers/CliDetail.tsx +9 -9
- package/src/providers/InstallPage.tsx +4 -4
- package/src/providers/ProviderList.tsx +4 -4
- package/src/providers/ProvidersPane.tsx +7 -7
- package/src/providers/account-actions.ts +1 -1
- package/src/providers/install-steps.ts +1 -1
- package/src/providers/parts.tsx +1 -1
- package/src/providers/provider-abilities.ts +1 -1
- package/src/providers/provider-groups.ts +1 -1
- package/src/providers/variables.ts +1 -1
- package/src/settings/sections.ts +2 -2
- package/src/state/chats.ts +2 -2
- package/src/state/provider-accounts.ts +1 -1
- package/src/state/providers.ts +1 -1
- package/src/state/usage.ts +2 -2
- package/src/theme.css +4 -4
- package/src/transport.ts +1 -1
- package/src/usage/LimitsList.tsx +5 -5
- package/src/usage/UsageBreakdown.tsx +6 -6
- package/src/usage/UsageChart.tsx +2 -2
- package/src/usage/UsageDialog.tsx +2 -2
- package/src/usage/UsageLimits.tsx +7 -7
- package/src/usage/UsageLimitsCard.tsx +2 -2
- package/src/usage/UsagePage.tsx +5 -5
- package/src/usage/UsagePane.tsx +2 -2
- package/src/usage/UsageSummary.tsx +2 -2
- package/src/usage/UsageTiles.tsx +1 -1
- package/src/usage/limit-groups.ts +2 -2
- package/src/usage/limits.ts +1 -1
- package/src/usage/summary.ts +1 -1
- package/dist/chat/logic/json.d.ts +0 -1
- package/dist/chat/logic/json.js +0 -4
- package/src/chat/logic/json.ts +0 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { createContext, useContext, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { ChevronLeft, ChevronRight, ImageOff, Minus, Plus, RotateCcw } from 'lucide-react';
|
|
6
2
|
import { ButtonGroup, CloseButton, Dialog, Icon, IconButton, Tooltip } from '@adecore/ui';
|
|
7
3
|
import { formatNumber } from '@adecore/ui/format';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { ChevronLeft, ChevronRight, ImageOff, Minus, Plus, RotateCcw } from 'lucide-react';
|
|
6
|
+
import { createContext, useContext, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { BUTTON_STEP, clamped, MAX_SCALE, MIN_SCALE, START, stepped, wheeled, zoomed } from '../logic/lightbox.js';
|
|
9
9
|
import { DisplayImage } from './DisplayImage.js';
|
|
10
10
|
/* The pictures of one group in the order they stand on the page, which is the order the arrows walk. */
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Switch, Button, ButtonGroup, Icon, Menu, Pill, Tooltip, useNow } from '@adecore/ui';
|
|
3
|
+
import { useFormatLocale } from '@adecore/ui/format';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { ChevronDown, Hourglass } from 'lucide-react';
|
|
6
|
-
import {
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
7
8
|
import { continueTargets, hasUnreadAccount, limitsOfAccount, sessionWindow } from '../../agents/account-limits.js';
|
|
9
|
+
import { AccountDot } from '../../agents/AccountDot.js';
|
|
8
10
|
import { canContinueOn } from '../../agents/accounts.js';
|
|
9
|
-
import { useAccountChoice } from '../account-choice.js';
|
|
10
|
-
import { limitView } from '../logic/limit.js';
|
|
11
|
-
import { useFormatLocale } from '@adecore/ui/format';
|
|
12
|
-
import { Switch, Button, ButtonGroup, Icon, Menu, Pill, Tooltip, useNow } from '@adecore/ui';
|
|
13
|
-
import { useUsageLimits } from '../../usage/limits.js';
|
|
14
|
-
import { useChats } from '../../state/chats.js';
|
|
15
11
|
import { useChatHost } from '../../host.js';
|
|
12
|
+
import { useHostResumeAtReset } from '../../host-hooks.js';
|
|
16
13
|
import { useChatScope } from '../../scope.js';
|
|
17
|
-
import {
|
|
14
|
+
import { useChats } from '../../state/chats.js';
|
|
18
15
|
import { useUsageStore } from '../../state/usage.js';
|
|
19
|
-
import { SessionLine } from './SessionLine.js';
|
|
20
|
-
import { useHostResumeAtReset } from '../../host-hooks.js';
|
|
21
16
|
import { errorMessage } from '../../transport.js';
|
|
17
|
+
import { useUsageLimits } from '../../usage/limits.js';
|
|
18
|
+
import { useAccountChoice } from '../account-choice.js';
|
|
19
|
+
import { useChatActions } from '../actions.js';
|
|
20
|
+
import { limitView } from '../logic/limit.js';
|
|
21
|
+
import { SessionLine } from './SessionLine.js';
|
|
22
22
|
// A time a limit names reads as a clock today and with its day after that, so the words follow the minute.
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
24
|
const MINUTE_MS = 60_000;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Components, type Options } from 'react-markdown';
|
|
2
|
-
import type { ReferenceToken } from '../mentions.js';
|
|
3
2
|
import { type ShellCodeBlockContext } from '../../host.js';
|
|
3
|
+
import type { ReferenceToken } from '../mentions.js';
|
|
4
4
|
type ShellCodeBlockReply = Pick<ShellCodeBlockContext, 'scopeId' | 'chatId' | 'itemId'> & {
|
|
5
5
|
streaming: boolean;
|
|
6
6
|
};
|
package/dist/chat/ui/Markdown.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ErrorBoundary, FileIcon, Icon, ScrollArea } from '@adecore/ui';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { Zap } from 'lucide-react';
|
|
5
|
+
import { createContext, memo, useContext, useState } from 'react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
5
7
|
import ReactMarkdown from 'react-markdown';
|
|
6
8
|
import remarkBreaks from 'remark-breaks';
|
|
7
9
|
import remarkGfm from 'remark-gfm';
|
|
10
|
+
import { useChatHost } from '../../host.js';
|
|
8
11
|
import { MENTION_TONE, SKILL_TONE, TOKEN_ICON } from './chips.js';
|
|
9
|
-
import { CodeBlock } from './CodeBlock.js';
|
|
10
|
-
import { MermaidBlock } from './MermaidBlock.js';
|
|
11
12
|
import { CodeStreamingContext } from './code-streaming.js';
|
|
13
|
+
import { CodeBlock } from './CodeBlock.js';
|
|
14
|
+
import { DisplayImage } from './DisplayImage.js';
|
|
15
|
+
import { useFileLinkCwd, useFileLinkScopeId, useFileLinkTarget, useOpenFileLink } from './file-links.js';
|
|
12
16
|
import { createMarkdownBlockSplitter } from './markdown-blocks.js';
|
|
13
|
-
import {
|
|
17
|
+
import { MermaidBlock } from './MermaidBlock.js';
|
|
14
18
|
import { ReferenceLookupContext } from './reference-lookup.js';
|
|
19
|
+
import { ReferenceChip, TokenChip } from './ReferenceChip.js';
|
|
15
20
|
import { rehypeChips, rehypeNamedReferences } from './rehype-chips.js';
|
|
16
21
|
import { rehypeFadeWords } from './rehype-fade.js';
|
|
17
22
|
import { remarkHtmlAsText } from './remark-html-as-text.js';
|
|
18
|
-
import { useChatHost } from '../../host.js';
|
|
19
|
-
import { useFileLinkCwd, useFileLinkScopeId, useFileLinkTarget, useOpenFileLink } from './file-links.js';
|
|
20
|
-
import { ErrorBoundary, FileIcon, Icon } from '@adecore/ui';
|
|
21
|
-
import { useTranslation } from 'react-i18next';
|
|
22
|
-
import { DisplayImage } from './DisplayImage.js';
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
const ShellCodeBlockReplyContext = createContext(null);
|
|
25
25
|
const BlockCodeContext = createContext(false);
|
|
@@ -526,7 +526,8 @@ const components = {
|
|
|
526
526
|
children
|
|
527
527
|
}) {
|
|
528
528
|
// A table wider than the column scrolls on its own instead of pushing the thread sideways.
|
|
529
|
-
return /*#__PURE__*/_jsx(
|
|
529
|
+
return /*#__PURE__*/_jsx(ScrollArea, {
|
|
530
|
+
axis: "x",
|
|
530
531
|
className: "chat-table",
|
|
531
532
|
children: /*#__PURE__*/_jsx("table", {
|
|
532
533
|
children: children
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { IconButton, ScrollArea } from '@adecore/ui';
|
|
3
|
+
import { Code, Workflow } from 'lucide-react';
|
|
2
4
|
import { useContext, useEffect, useId, useRef, useState } from 'react';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import {
|
|
5
|
-
import { IconButton } from '@adecore/ui';
|
|
6
|
-
import { CodeBlock } from './CodeBlock.js';
|
|
6
|
+
import { useHostCodeMode } from '../../host-hooks.js';
|
|
7
7
|
import { CodeStreamingContext } from './code-streaming.js';
|
|
8
|
+
import { CodeBlock } from './CodeBlock.js';
|
|
8
9
|
import { DIAGRAM_TOKENS, GROUND_TOKEN, renderOptions, svgDataUrl, themedSvg } from './mermaid.js';
|
|
9
10
|
import { watchTheme } from './theme-watch.js';
|
|
10
|
-
import { useHostCodeMode } from '../../host-hooks.js';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
let probeCanvas = null;
|
|
13
13
|
/* A token as an opaque `#rrggbb` over `ground`, so a border with an alpha mixes with the ground and not with what is under the image. */
|
|
@@ -219,8 +219,9 @@ export function MermaidBlock(t0) {
|
|
|
219
219
|
t10 = code;
|
|
220
220
|
t11 = "mermaid";
|
|
221
221
|
t12 = toggle;
|
|
222
|
-
t13 = showsDiagram ? /*#__PURE__*/_jsx(
|
|
223
|
-
|
|
222
|
+
t13 = showsDiagram ? /*#__PURE__*/_jsx(ScrollArea, {
|
|
223
|
+
axis: "x",
|
|
224
|
+
viewportClassName: "p-3",
|
|
224
225
|
"aria-busy": image_0 === null || undefined,
|
|
225
226
|
children: image_0 !== null && /*#__PURE__*/_jsx("img", {
|
|
226
227
|
src: svgDataUrl(image_0.svg),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonGroup, IconButton, Tooltip } from '@adecore/ui';
|
|
3
|
+
import { formatClock, formatDateTime, useFormatLocale } from '@adecore/ui/format';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Bookmark, Check, Copy, GitFork } from 'lucide-react';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { markdownOf, messageTextOf } from '../logic/timeline-copy.js';
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
9
8
|
import { useChatHost } from '../../host.js';
|
|
10
9
|
import { useChatScope } from '../../scope.js';
|
|
11
10
|
import { useChatRow, useChats } from '../../state/chats.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
11
|
+
import { placeBookmark } from '../bookmarks.js';
|
|
12
|
+
import { forkRefusal } from '../logic/fork.js';
|
|
13
|
+
import { markdownOf, messageTextOf } from '../logic/timeline-copy.js';
|
|
14
14
|
import { copyWithChips, messageClipboardChips } from './chip-clipboard.js';
|
|
15
15
|
import { useReferenceLookup } from './thread-references.js';
|
|
16
16
|
import { TIMESTAMP_FORMAT } from './timestamp-format.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Wrench } from 'lucide-react';
|
|
4
2
|
import { Icon, Pill, Tooltip } from '@adecore/ui';
|
|
3
|
+
import { Wrench } from 'lucide-react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
5
|
/* What a model row says beside the name: its badge, and a mark when the provider says the model can call tools. */
|
|
6
6
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export function ModelMarks(t0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ReactNode, type RefObject } from 'react';
|
|
2
1
|
import type { AgentKind, ModelSelection, ProviderInfo } from '@adecore/agent-contracts';
|
|
2
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
3
3
|
import { type StashedPrompt } from '../stash.js';
|
|
4
4
|
interface ModelPickerProps {
|
|
5
5
|
providers: ProviderInfo[];
|
package/dist/chat/ui/Pickers.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Button, Icon, IconButton, Menu, Popover, ScrollArea, Tooltip } from '@adecore/ui';
|
|
3
|
+
import { Bookmark, ChevronDown, ChevronRight, Search, Star, Trash2 } from 'lucide-react';
|
|
2
4
|
import { useContext, useEffect, useRef, useState } from 'react';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Bookmark, ChevronDown, ChevronRight, Search, Star, Trash2 } from 'lucide-react';
|
|
5
6
|
import { AgentIcon } from '../../agents/AgentIcon.js';
|
|
6
|
-
import { ProviderLogo } from '../../agents/ProviderLogo.js';
|
|
7
7
|
import { agentChipOf, modelName } from '../../agents/model-name.js';
|
|
8
8
|
import { modelRequirementOf } from '../../agents/model-requirement.js';
|
|
9
|
+
import { ProviderLogo } from '../../agents/ProviderLogo.js';
|
|
9
10
|
import { useChatHost } from '../../host.js';
|
|
11
|
+
import { useHostMachineLabel } from '../../host-hooks.js';
|
|
10
12
|
import { ChatScopeContext } from '../../scope.js';
|
|
11
13
|
import { useReportedModels } from '../../state/chats.js';
|
|
12
|
-
import { ModelMarks } from './ModelMarks.js';
|
|
13
14
|
import { inPickerOrder, pickerEntriesOf, separatesGroups } from '../logic/picker-entries.js';
|
|
14
15
|
import { favoriteModelsOf, toggleFavoriteModel, useChatPreferences } from '../preferences.js';
|
|
15
16
|
import { forgetStashed, STASH_SHORTCUT, useStash } from '../stash.js';
|
|
16
|
-
import {
|
|
17
|
-
import { useHostMachineLabel } from '../../host-hooks.js';
|
|
17
|
+
import { ModelMarks } from './ModelMarks.js';
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const triggerClass = 'flex h-7 shrink-0 items-center gap-1 whitespace-nowrap rounded-md px-2 text-xs text-text-muted hover:bg-surface-hover hover:text-text data-[popup-open]:bg-surface-active data-[popup-open]:text-text';
|
|
20
20
|
/*
|
|
@@ -23,7 +23,7 @@ const triggerClass = 'flex h-7 shrink-0 items-center gap-1 whitespace-nowrap rou
|
|
|
23
23
|
* provider's model is also how a chat picks its provider; with one CLI the group headers drop.
|
|
24
24
|
*/
|
|
25
25
|
export function ModelPicker(t0) {
|
|
26
|
-
const $ = _c(
|
|
26
|
+
const $ = _c(51);
|
|
27
27
|
const {
|
|
28
28
|
providers,
|
|
29
29
|
provider,
|
|
@@ -334,13 +334,15 @@ export function ModelPicker(t0) {
|
|
|
334
334
|
} else {
|
|
335
335
|
t22 = $[44];
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
const
|
|
339
|
-
const
|
|
337
|
+
const T0 = ScrollArea;
|
|
338
|
+
const t23 = "max-h-72";
|
|
339
|
+
const t24 = "p-1";
|
|
340
|
+
const t25 = "listbox";
|
|
341
|
+
const t26 = entries.length === 0 && /*#__PURE__*/_jsx("div", {
|
|
340
342
|
className: "px-3 py-6 text-center text-xs text-text-faint",
|
|
341
343
|
children: providers.length === 0 ? t("pickers.model.noProvider") : t("pickers.model.noMatch")
|
|
342
344
|
});
|
|
343
|
-
const
|
|
345
|
+
const t27 = entries.map((entry_3, i_2) => {
|
|
344
346
|
if (entry_3.kind === "all") {
|
|
345
347
|
const before_0 = entries[i_2 - 1];
|
|
346
348
|
const header = grouped && (before_0 === undefined || before_0.kind === "legacy" || before_0.provider.kind !== entry_3.provider.kind);
|
|
@@ -455,30 +457,32 @@ export function ModelPicker(t0) {
|
|
|
455
457
|
})]
|
|
456
458
|
}, `${entry_3.provider.kind}/${entry_3.model.slug}`);
|
|
457
459
|
});
|
|
458
|
-
let
|
|
459
|
-
if ($[45] !==
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
let t28;
|
|
461
|
+
if ($[45] !== T0 || $[46] !== t26 || $[47] !== t27) {
|
|
462
|
+
t28 = /*#__PURE__*/_jsxs(T0, {
|
|
463
|
+
viewportRef: listRef,
|
|
462
464
|
className: t23,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
+
viewportClassName: t24,
|
|
466
|
+
role: t25,
|
|
467
|
+
children: [t26, t27]
|
|
465
468
|
});
|
|
466
|
-
$[45] =
|
|
469
|
+
$[45] = T0;
|
|
467
470
|
$[46] = t26;
|
|
468
471
|
$[47] = t27;
|
|
472
|
+
$[48] = t28;
|
|
469
473
|
} else {
|
|
470
|
-
|
|
474
|
+
t28 = $[48];
|
|
471
475
|
}
|
|
472
|
-
let
|
|
473
|
-
if ($[
|
|
474
|
-
|
|
476
|
+
let t29;
|
|
477
|
+
if ($[49] !== footer) {
|
|
478
|
+
t29 = footer !== undefined && /*#__PURE__*/_jsx("div", {
|
|
475
479
|
className: "border-t border-border-soft px-3 py-2 text-xs text-text-faint",
|
|
476
480
|
children: footer
|
|
477
481
|
});
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
482
|
+
$[49] = footer;
|
|
483
|
+
$[50] = t29;
|
|
480
484
|
} else {
|
|
481
|
-
|
|
485
|
+
t29 = $[50];
|
|
482
486
|
}
|
|
483
487
|
return /*#__PURE__*/_jsxs(Popover.Root, {
|
|
484
488
|
open: open,
|
|
@@ -499,7 +503,7 @@ export function ModelPicker(t0) {
|
|
|
499
503
|
onChange: t22,
|
|
500
504
|
onKeyDown: onKeyDown
|
|
501
505
|
})]
|
|
502
|
-
}),
|
|
506
|
+
}), t28, t29]
|
|
503
507
|
})]
|
|
504
508
|
});
|
|
505
509
|
}
|
|
@@ -618,8 +622,9 @@ export function StashPicker(t0) {
|
|
|
618
622
|
variant: "picker",
|
|
619
623
|
side: "top",
|
|
620
624
|
className: "w-80",
|
|
621
|
-
children: /*#__PURE__*/_jsx(
|
|
622
|
-
className: "max-h-72
|
|
625
|
+
children: /*#__PURE__*/_jsx(ScrollArea, {
|
|
626
|
+
className: "max-h-72",
|
|
627
|
+
viewportClassName: "p-1",
|
|
623
628
|
children: t5
|
|
624
629
|
})
|
|
625
630
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { HoldRelease } from '../prompt-hold.js';
|
|
3
2
|
import { type PromptSubject } from '../../prompts/logic/subjects.js';
|
|
3
|
+
import type { HoldRelease } from '../prompt-hold.js';
|
|
4
4
|
export interface PromptHold {
|
|
5
5
|
held: boolean;
|
|
6
6
|
releasedBy: HoldRelease | null;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Button, Icon } from '@adecore/ui';
|
|
3
|
+
import { ArrowDown, Hand, MessageCircleQuestionMark } from 'lucide-react';
|
|
2
4
|
import { useEffect, useRef } from 'react';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import {
|
|
6
|
+
import { useChatHost } from '../../host.js';
|
|
7
|
+
import { useHostExtraPrompts } from '../../host-hooks.js';
|
|
5
8
|
import { focusPromptHeading, focusPromptStart } from '../../prompts/logic/focus.js';
|
|
6
9
|
import { orderPrompts } from '../../prompts/logic/prompts.js';
|
|
7
10
|
import { answerPrompt, isBlockingSubject, promptCreatedAt, promptIdOf } from '../../prompts/logic/subjects.js';
|
|
8
11
|
import { useFocusAfterAnswer } from '../../prompts/logic/useFocusAfterAnswer.js';
|
|
9
12
|
import { usePromptSession } from '../../prompts/logic/usePromptSession.js';
|
|
10
13
|
import { PromptView } from '../../prompts/ui/PromptView.js';
|
|
11
|
-
import { useChatHost } from '../../host.js';
|
|
12
14
|
import { useChatScope } from '../../scope.js';
|
|
13
|
-
import { useChatActions } from '../actions.js';
|
|
14
|
-
import { Button, Icon } from '@adecore/ui';
|
|
15
15
|
import { useProviders } from '../../state/providers.js';
|
|
16
|
-
import {
|
|
16
|
+
import { useChatActions } from '../actions.js';
|
|
17
17
|
/* The one being read stays in front; otherwise blocking before optional, oldest first, as everywhere else. */
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
function pickSubject(waiting, activeId) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useLayoutEffect, useRef } from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
1
|
import { Surface } from '@adecore/ui';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useLayoutEffect, useRef } from 'react';
|
|
4
4
|
import { useChatHost } from '../../host.js';
|
|
5
|
-
import { ComposerInput } from './ComposerInput.js';
|
|
6
5
|
import { chipDecorations } from './composer/chips.js';
|
|
7
6
|
import { ComposerMenu } from './composer/ComposerMenu.js';
|
|
8
7
|
import { pickInMenu } from './composer/key-handler.js';
|
|
9
8
|
import { usePromptMenus } from './composer/use-prompt-menus.js';
|
|
9
|
+
import { ComposerInput } from './ComposerInput.js';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const NO_COMMANDS = [];
|
|
12
12
|
/*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Button, Icon, Surface } from '@adecore/ui';
|
|
3
|
+
import { Quote } from 'lucide-react';
|
|
2
4
|
import { useEffect, useState } from 'react';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Quote } from 'lucide-react';
|
|
5
6
|
import { selectedAnswerQuote } from './quote-selection.js';
|
|
6
|
-
import { Button, Icon, Surface } from '@adecore/ui';
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const GAP_PX = 6;
|
|
9
9
|
// Keeps the button's middle far enough from the edges that it never sticks out of the thread.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon, Tooltip } from '@adecore/ui';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
4
|
import { CircleOff } from 'lucide-react';
|
|
6
|
-
import {
|
|
5
|
+
import { useContext } from 'react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { useChatHost } from '../../host.js';
|
|
8
8
|
import { REFERENCE_GONE_TONE, REFERENCE_TONE, TOKEN_ICON, TOKEN_ICON_BOX, TOKEN_IN_MESSAGE } from './chips.js';
|
|
9
9
|
import { referenceGlyph } from './reference-icons.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
import { ChevronRight } from 'lucide-react';
|
|
4
2
|
import { Icon } from '@adecore/ui';
|
|
3
|
+
import { ChevronRight } from 'lucide-react';
|
|
4
|
+
import { Fragment } from 'react';
|
|
5
5
|
import { referenceGlyph } from './reference-icons.js';
|
|
6
6
|
/* Where a reference stands, in front of its own mark. Each place may shorten, so the name it leads to stays whole. */
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Minimize2 } from 'lucide-react';
|
|
4
|
-
import { formatTokens } from '@adecore/ui/format';
|
|
5
2
|
import { Button, Icon } from '@adecore/ui';
|
|
3
|
+
import { formatTokens } from '@adecore/ui/format';
|
|
4
|
+
import { Minimize2 } from 'lucide-react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
6
|
/*
|
|
7
7
|
* The offer at the top of the composer, for a chat whose prompt cache went cold, so the next message
|
|
8
8
|
* pays for the whole thread again. It takes no keys and blocks nothing: typing and sending keeps the
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Icon, Menu, Tooltip, useNow } from '@adecore/ui';
|
|
3
|
+
import { formatPercent, formatTokens } from '@adecore/ui/format';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Activity, TriangleAlert, ChevronDown, ChevronRight, ChevronUp, FilePen, Gauge, Hand, Search, Settings, Shield, ShieldAlert, SlidersHorizontal, Star } from 'lucide-react';
|
|
6
|
-
import {
|
|
6
|
+
import { Fragment, useEffect, useRef, useState } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
7
8
|
import { limitsOfAccount, sessionWindow } from '../../agents/account-limits.js';
|
|
9
|
+
import { AccountDot } from '../../agents/AccountDot.js';
|
|
8
10
|
import { canContinueOn } from '../../agents/accounts.js';
|
|
9
11
|
import { AgentIcon } from '../../agents/AgentIcon.js';
|
|
10
12
|
import { modelName, shortModelName } from '../../agents/model-name.js';
|
|
11
|
-
import { ModelMarks } from './ModelMarks.js';
|
|
12
|
-
import { SessionLine } from './SessionLine.js';
|
|
13
|
-
import { favoritesFirst, inPickerOrder, searchModels, separatesGroups, shortlistOf, wantsModelSearch } from '../logic/picker-entries.js';
|
|
14
|
-
import { favoriteModelsOf, toggleFavoriteModel, useChatPreferences } from '../preferences.js';
|
|
15
|
-
import { CONTEXT_OPTION, contextFraction, contextSegments, orderOptions } from '../logic/context-usage.js';
|
|
16
|
-
import { RUNTIME_MODES } from '../runtime-modes.js';
|
|
17
13
|
import { localizedOption } from '../../agents/option-words.js';
|
|
18
|
-
import { formatPercent, formatTokens } from '@adecore/ui/format';
|
|
19
|
-
import { Icon, Menu, Tooltip, useNow } from '@adecore/ui';
|
|
20
14
|
import { useChatHost } from '../../host.js';
|
|
21
15
|
import { useUsageLimits } from '../../usage/limits.js';
|
|
16
|
+
import { CONTEXT_OPTION, contextFraction, contextSegments, orderOptions } from '../logic/context-usage.js';
|
|
17
|
+
import { favoritesFirst, inPickerOrder, searchModels, separatesGroups, shortlistOf, wantsModelSearch } from '../logic/picker-entries.js';
|
|
18
|
+
import { favoriteModelsOf, toggleFavoriteModel, useChatPreferences } from '../preferences.js';
|
|
19
|
+
import { RUNTIME_MODES } from '../runtime-modes.js';
|
|
20
|
+
import { ModelMarks } from './ModelMarks.js';
|
|
21
|
+
import { SessionLine } from './SessionLine.js';
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
23
|
const MINUTE_MS = 60_000;
|
|
24
24
|
const MODE_ICONS = {
|
package/dist/chat/ui/Scrubber.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { cameThroughPortal, ContextMenu, copyText, Icon, Menu, PreviewCard } from '@adecore/ui';
|
|
3
|
+
import { formatMoment } from '@adecore/ui/format';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Bookmark, Copy, GitFork } from 'lucide-react';
|
|
6
|
+
import { Fragment, memo, useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import { useTranslation } from 'react-i18next';
|
|
6
8
|
import { layoutTicks, messageAt, slotInView, slotOf, tickWidth, TICK_HEIGHT_PX } from '../logic/scrubber.js';
|
|
7
9
|
import { BookmarkMenuItems } from './TimelineMenu.js';
|
|
8
|
-
import { formatMoment } from '@adecore/ui/format';
|
|
9
|
-
import { cameThroughPortal, ContextMenu, copyText, Icon, Menu, PreviewCard } from '@adecore/ui';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
11
|
const PREVIEW_CHARS = 280;
|
|
12
12
|
const FOUND_WIDTH_PX = 4;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
2
|
import { formatClock, formatPercent, formatWeekdayClock, isSameDay } from '@adecore/ui/format';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { evenPace, paceText } from '../../usage/limit-groups.js';
|
|
6
6
|
/* Red where a window is nearly spent, amber where it is worth knowing, as the usage bars have it. */
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
2
|
import { Tooltip } from '@adecore/ui';
|
|
4
|
-
import {
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
5
4
|
import { useChatHost } from '../../host.js';
|
|
5
|
+
import { EMBEDDED_CODE_LIMIT, SHELL_LANGUAGE, embeddedCode } from '../logic/embedded-code.js';
|
|
6
6
|
import { useCodeTheme } from './code-theme.js';
|
|
7
7
|
import { tokenStyle, useCodeHighlighter } from './highlighter.js';
|
|
8
8
|
import { ReferenceChip } from './ReferenceChip.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon, IconButton } from '@adecore/ui';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
4
|
import { ChevronRight, X } from 'lucide-react';
|
|
5
|
+
import { Fragment } from 'react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
6
7
|
import { breadcrumbOf, MAIN_AGENT, trailTo, useOpenableSubagents, useSubagentTrail } from '../subagent-view.js';
|
|
7
8
|
import { SubagentStopButton } from './SubagentStopButton.js';
|
|
8
|
-
import { Icon, IconButton } from '@adecore/ui';
|
|
9
9
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const CRUMB_LINK = 'truncate text-text-muted hover:text-text';
|
|
11
11
|
/* The chat's own title in the bar; while a sub-agent stands in the chat's place, pressing it goes back to the main agent. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useNow } from '@adecore/ui';
|
|
2
3
|
import { Fragment } from 'react';
|
|
3
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { useModelName } from '../../agents/model-name.js';
|
|
6
|
+
import { useHostTask } from '../../host-hooks.js';
|
|
7
|
+
import { useChatScope } from '../../scope.js';
|
|
8
|
+
import { useChatRow } from '../../state/chats.js';
|
|
4
9
|
import { entryTimeOf, statusWordOf, subagentFacts, taskIdOf } from '../subagent-list.js';
|
|
5
10
|
import { useSubagentItem } from '../subagent-view.js';
|
|
6
11
|
import { StatusIcon } from './ChatActivity.js';
|
|
7
12
|
import { SubagentActions, SubagentBreadcrumb } from './SubagentControls.js';
|
|
8
|
-
import { useNow } from '@adecore/ui';
|
|
9
|
-
import { useModelName } from '../../agents/model-name.js';
|
|
10
|
-
import { useChatRow } from '../../state/chats.js';
|
|
11
|
-
import { useChatScope } from '../../scope.js';
|
|
12
|
-
import { useHostTask } from '../../host-hooks.js';
|
|
13
13
|
/*
|
|
14
14
|
* What a sub-agent is, over its conversation: the way down to it, its state and time, the model it runs on
|
|
15
15
|
* and what it spent, and the way out. Only the way down and out for a conversation whose row the thread lost.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { IconButton } from '@adecore/ui';
|
|
3
3
|
import { Square } from 'lucide-react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
4
5
|
import { useChatHost } from '../../host.js';
|
|
5
6
|
import { useChatScope } from '../../scope.js';
|
|
6
7
|
import { useChatRow } from '../../state/chats.js';
|
|
7
8
|
import { useChatActions } from '../actions.js';
|
|
8
9
|
import { stopLabel, stopOf, subagentTitle } from '../subagent-list.js';
|
|
9
|
-
import { IconButton } from '@adecore/ui';
|
|
10
10
|
/* Stops one active sub-agent of a chat, or says nothing when stopping it is not on offer. */
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
export function SubagentStopButton(t0) {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { EmptyState, ContextMenu, Icon, ScrollArea } from '@adecore/ui';
|
|
3
|
+
import { Bot, LoaderCircle } from 'lucide-react';
|
|
2
4
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
5
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import {
|
|
6
|
+
import { useChatHost } from '../../host.js';
|
|
7
|
+
import { useHostHidesToolCalls } from '../../host-hooks.js';
|
|
8
|
+
import { useChatScope } from '../../scope.js';
|
|
9
|
+
import { useChatRow } from '../../state/chats.js';
|
|
5
10
|
import { deriveTimelineRows } from '../logic/timeline.js';
|
|
11
|
+
import { EMPTY_TARGET, readTimelineTarget } from '../logic/timeline-target.js';
|
|
12
|
+
import { useChatPreferences } from '../preferences.js';
|
|
13
|
+
import { readingWidthStyle } from '../reading-width.js';
|
|
6
14
|
import { INITIAL_CONVERSATION, SubagentConversation } from '../subagent-conversation.js';
|
|
7
15
|
import { useSubagentSupport } from '../subagent-support.js';
|
|
8
|
-
import { firstRowInView, restoreAnchor, wantsEarlier } from '../timeline-scroll.js';
|
|
9
|
-
import { EMPTY_TARGET, readTimelineTarget } from '../logic/timeline-target.js';
|
|
10
16
|
import { openBelow, useSubagentTrail } from '../subagent-view.js';
|
|
11
|
-
import {
|
|
17
|
+
import { firstRowInView, restoreAnchor, wantsEarlier } from '../timeline-scroll.js';
|
|
18
|
+
import { FileLinkContext } from './file-links.js';
|
|
12
19
|
import { ReplyContext } from './reply-context.js';
|
|
20
|
+
import { FOLLOW_THRESHOLD_PX, rowRhythm } from './rows/row-rhythm.js';
|
|
21
|
+
import { Row } from './rows/Rows.js';
|
|
13
22
|
import { SubagentInfo } from './SubagentInfo.js';
|
|
14
23
|
import { TimelineMenuPopup } from './TimelineMenu.js';
|
|
15
|
-
import { FOLLOW_THRESHOLD_PX, rowRhythm } from './rows/row-rhythm.js';
|
|
16
24
|
import { useToggleSet } from './useToggleSet.js';
|
|
17
|
-
import { FileLinkContext } from './file-links.js';
|
|
18
|
-
import { useChatRow } from '../../state/chats.js';
|
|
19
|
-
import { useChatPreferences } from '../preferences.js';
|
|
20
|
-
import { readingWidthStyle } from '../reading-width.js';
|
|
21
|
-
import { useChatHost } from '../../host.js';
|
|
22
|
-
import { useHostHidesToolCalls } from '../../host-hooks.js';
|
|
23
|
-
import { useChatScope } from '../../scope.js';
|
|
24
|
-
import { EmptyState, ContextMenu, Icon } from '@adecore/ui';
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
26
|
const NO_TURNS = new Set();
|
|
27
27
|
/*
|
|
@@ -265,11 +265,13 @@ export function SubagentTimeline(t0) {
|
|
|
265
265
|
value: state.context ?? {
|
|
266
266
|
provider: state.source === "codex-thread" ? "codex" : "claude"
|
|
267
267
|
},
|
|
268
|
-
children: /*#__PURE__*/_jsx(
|
|
269
|
-
|
|
268
|
+
children: /*#__PURE__*/_jsx(ScrollArea, {
|
|
269
|
+
axis: "y",
|
|
270
|
+
viewportRef: scrollRef,
|
|
270
271
|
"data-file-cwd": state.context?.cwd ?? cwd ?? "",
|
|
271
272
|
"data-file-scope-id": scope.id,
|
|
272
|
-
className: "
|
|
273
|
+
className: "grow",
|
|
274
|
+
viewportClassName: "chat-thread relative px-4 pt-4 pb-3",
|
|
273
275
|
style: {
|
|
274
276
|
overflowAnchor: "none"
|
|
275
277
|
},
|