@deepseek-ai/dsh-client-ui-chat 0.2.2-alpha.3 → 0.2.2-rc.2
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.i18n.yaml +16 -16
- package/README.md +17 -5
- package/README.zh.md +17 -5
- package/lib/client.js +18 -15587
- package/lib/client.js.map +1 -0
- package/lib/types/chat-settings.d.ts.map +1 -0
- package/lib/types/chat-settings.js.map +1 -0
- package/lib/types/client/apply.d.ts.map +1 -0
- package/lib/types/client/apply.js.map +1 -0
- package/lib/types/client/chat/ApprovalCommand.d.ts +4 -3
- package/lib/types/client/chat/ApprovalCommand.d.ts.map +1 -0
- package/lib/types/client/chat/ApprovalCommand.js.map +1 -0
- package/lib/types/client/chat/AssistantMarkdown.d.ts.map +1 -0
- package/lib/types/client/chat/AssistantMarkdown.js.map +1 -0
- package/lib/types/client/chat/AssistantNodeView.d.ts.map +1 -0
- package/lib/types/client/chat/AssistantNodeView.js.map +1 -0
- package/lib/types/client/chat/ChatFlow.d.ts.map +1 -0
- package/lib/types/client/chat/ChatFlow.js.map +1 -0
- package/lib/types/client/chat/ChatGroupSeat.d.ts.map +1 -0
- package/lib/types/client/chat/ChatGroupSeat.js.map +1 -0
- package/lib/types/client/chat/ChatNodeSeat.d.ts.map +1 -0
- package/lib/types/client/chat/ChatNodeSeat.js.map +1 -0
- package/lib/types/client/chat/ChatView.d.ts +1 -1
- package/lib/types/client/chat/ChatView.d.ts.map +1 -0
- package/lib/types/client/chat/ChatView.js.map +1 -0
- package/lib/types/client/chat/CommandNodeView.d.ts.map +1 -0
- package/lib/types/client/chat/CommandNodeView.js.map +1 -0
- package/lib/types/client/chat/CompactionCommandCard.d.ts.map +1 -0
- package/lib/types/client/chat/CompactionCommandCard.js.map +1 -0
- package/lib/types/client/chat/CompactionItem.d.ts.map +1 -0
- package/lib/types/client/chat/CompactionItem.js.map +1 -0
- package/lib/types/client/chat/ContextBody.d.ts.map +1 -0
- package/lib/types/client/chat/ContextBody.js.map +1 -0
- package/lib/types/client/chat/ContextInjectionRow.d.ts.map +1 -0
- package/lib/types/client/chat/ContextInjectionRow.js.map +1 -0
- package/lib/types/client/chat/GenericCommandCard.d.ts.map +1 -0
- package/lib/types/client/chat/GenericCommandCard.js.map +1 -0
- package/lib/types/client/chat/MessageIconActions.d.ts.map +1 -0
- package/lib/types/client/chat/MessageIconActions.js.map +1 -0
- package/lib/types/client/chat/MessageItem.d.ts.map +1 -0
- package/lib/types/client/chat/MessageItem.js.map +1 -0
- package/lib/types/client/chat/QuotaNoticeHost.d.ts.map +1 -0
- package/lib/types/client/chat/QuotaNoticeHost.js.map +1 -0
- package/lib/types/client/chat/ReasoningContent.d.ts.map +1 -0
- package/lib/types/client/chat/ReasoningContent.js.map +1 -0
- package/lib/types/client/chat/ReasoningRow.d.ts.map +1 -0
- package/lib/types/client/chat/ReasoningRow.js.map +1 -0
- package/lib/types/client/chat/RunningStatus.d.ts.map +1 -0
- package/lib/types/client/chat/RunningStatus.js.map +1 -0
- package/lib/types/client/chat/RunningWhaleTail.d.ts.map +1 -0
- package/lib/types/client/chat/RunningWhaleTail.js.map +1 -0
- package/lib/types/client/chat/StatsPills.d.ts.map +1 -0
- package/lib/types/client/chat/StatsPills.js.map +1 -0
- package/lib/types/client/chat/SystemPromptRow.d.ts.map +1 -0
- package/lib/types/client/chat/SystemPromptRow.js.map +1 -0
- package/lib/types/client/chat/TurnNavigator.d.ts.map +1 -0
- package/lib/types/client/chat/TurnNavigator.js.map +1 -0
- package/lib/types/client/chat/TurnProcessNodeView.d.ts.map +1 -0
- package/lib/types/client/chat/TurnProcessNodeView.js.map +1 -0
- package/lib/types/client/chat/TurnTailNodeView.d.ts.map +1 -0
- package/lib/types/client/chat/TurnTailNodeView.js.map +1 -0
- package/lib/types/client/chat/TurnTriggerNodeView.d.ts.map +1 -0
- package/lib/types/client/chat/TurnTriggerNodeView.js.map +1 -0
- package/lib/types/client/chat/TurnUsagePanel.d.ts.map +1 -0
- package/lib/types/client/chat/TurnUsagePanel.js.map +1 -0
- package/lib/types/client/chat/UserContent.d.ts.map +1 -0
- package/lib/types/client/chat/UserContent.js.map +1 -0
- package/lib/types/client/chat/flow-motion.d.ts +2 -0
- package/lib/types/client/chat/flow-motion.d.ts.map +1 -0
- package/lib/types/client/chat/flow-motion.js.map +1 -0
- package/lib/types/client/chat/message-chrome.d.ts.map +1 -0
- package/lib/types/client/chat/message-chrome.js.map +1 -0
- package/lib/types/client/chat/register-node-renderers.d.ts.map +1 -0
- package/lib/types/client/chat/register-node-renderers.js.map +1 -0
- package/lib/types/client/chat/render-entry.d.ts.map +1 -0
- package/lib/types/client/chat/render-entry.js.map +1 -0
- package/lib/types/client/chat/searchable-hidden.d.ts.map +1 -0
- package/lib/types/client/chat/searchable-hidden.js.map +1 -0
- package/lib/types/client/chat/stat-dialog.d.ts +5 -10
- package/lib/types/client/chat/stat-dialog.d.ts.map +1 -0
- package/lib/types/client/chat/stat-dialog.js.map +1 -0
- package/lib/types/client/chat/step-process.d.ts.map +1 -0
- package/lib/types/client/chat/step-process.js.map +1 -0
- package/lib/types/client/chat/text-interaction.d.ts.map +1 -0
- package/lib/types/client/chat/text-interaction.js.map +1 -0
- package/lib/types/client/chat/text-selection.d.ts.map +1 -0
- package/lib/types/client/chat/text-selection.js.map +1 -0
- package/lib/types/client/chat/token-format.d.ts.map +1 -0
- package/lib/types/client/chat/token-format.js.map +1 -0
- package/lib/types/client/chat/turn-assistant.d.ts.map +1 -0
- package/lib/types/client/chat/turn-assistant.js.map +1 -0
- package/lib/types/client/chat/turn-rail-items.d.ts.map +1 -0
- package/lib/types/client/chat/turn-rail-items.js.map +1 -0
- package/lib/types/client/chat/turn-trigger.d.ts +3 -2
- package/lib/types/client/chat/turn-trigger.d.ts.map +1 -0
- package/lib/types/client/chat/turn-trigger.js.map +1 -0
- package/lib/types/client/chat/use-calendar-day.d.ts.map +1 -0
- package/lib/types/client/chat/use-calendar-day.js.map +1 -0
- package/lib/types/client/chat/use-chat-navigation.d.ts +21 -5
- package/lib/types/client/chat/use-chat-navigation.d.ts.map +1 -0
- package/lib/types/client/chat/use-chat-navigation.js.map +1 -0
- package/lib/types/client/chat/use-chat-reading.d.ts.map +1 -0
- package/lib/types/client/chat/use-chat-reading.js.map +1 -0
- package/lib/types/client/chat/use-chat-scroll.d.ts +5 -2
- package/lib/types/client/chat/use-chat-scroll.d.ts.map +1 -0
- package/lib/types/client/chat/use-chat-scroll.js.map +1 -0
- package/lib/types/client/chat/use-chat-viewport.d.ts +53 -0
- package/lib/types/client/chat/use-chat-viewport.d.ts.map +1 -0
- package/lib/types/client/chat/use-chat-viewport.js.map +1 -0
- package/lib/types/client/chat/use-disclosure.d.ts.map +1 -0
- package/lib/types/client/chat/use-disclosure.js.map +1 -0
- package/lib/types/client/chat/use-process-scroll.d.ts.map +1 -0
- package/lib/types/client/chat/use-process-scroll.js.map +1 -0
- package/lib/types/client/chat/use-scroll-follow.d.ts.map +1 -0
- package/lib/types/client/chat/use-scroll-follow.js.map +1 -0
- package/lib/types/client/chat/use-turn-data.d.ts.map +1 -0
- package/lib/types/client/chat/use-turn-data.js.map +1 -0
- package/lib/types/client/contract/assistant-content.d.ts.map +1 -0
- package/lib/types/client/contract/assistant-content.js.map +1 -0
- package/lib/types/client/contract/chat-nodes.d.ts.map +1 -0
- package/lib/types/client/contract/chat-nodes.js.map +1 -0
- package/lib/types/client/contract/chat-visibility.d.ts +2 -2
- package/lib/types/client/contract/chat-visibility.d.ts.map +1 -0
- package/lib/types/client/contract/chat-visibility.js.map +1 -0
- package/lib/types/client/contract/group-tree.d.ts.map +1 -0
- package/lib/types/client/contract/group-tree.js.map +1 -0
- package/lib/types/client/contract/process-groups.d.ts +6 -3
- package/lib/types/client/contract/process-groups.d.ts.map +1 -0
- package/lib/types/client/contract/process-groups.js.map +1 -0
- package/lib/types/client/contract/slots.d.ts +11 -2
- package/lib/types/client/contract/slots.d.ts.map +1 -0
- package/lib/types/client/contract/slots.js.map +1 -0
- package/lib/types/client/contract/snapshot.d.ts.map +1 -0
- package/lib/types/client/contract/snapshot.js.map +1 -0
- package/lib/types/client/contract/store.d.ts.map +1 -0
- package/lib/types/client/contract/store.js.map +1 -0
- package/lib/types/client/contract/turn-metrics.d.ts.map +1 -0
- package/lib/types/client/contract/turn-metrics.js.map +1 -0
- package/lib/types/client/contract/turn-process.d.ts.map +1 -0
- package/lib/types/client/contract/turn-process.js.map +1 -0
- package/lib/types/client/conversation-nodes/assistant.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/assistant.js.map +1 -0
- package/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/chat-snapshot-builder.js.map +1 -0
- package/lib/types/client/conversation-nodes/command.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/command.js.map +1 -0
- package/lib/types/client/conversation-nodes/common.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/common.js.map +1 -0
- package/lib/types/client/conversation-nodes/compaction.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/compaction.js.map +1 -0
- package/lib/types/client/conversation-nodes/event-projection.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/event-projection.js.map +1 -0
- package/lib/types/client/conversation-nodes/fallback.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/fallback.js.map +1 -0
- package/lib/types/client/conversation-nodes/group-tree-segments.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/group-tree-segments.js.map +1 -0
- package/lib/types/client/conversation-nodes/inbox.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/inbox.js.map +1 -0
- package/lib/types/client/conversation-nodes/message.d.ts +1 -1
- package/lib/types/client/conversation-nodes/message.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/message.js.map +1 -0
- package/lib/types/client/conversation-nodes/process-activity.d.ts +1 -0
- package/lib/types/client/conversation-nodes/process-activity.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/process-activity.js.map +1 -0
- package/lib/types/client/conversation-nodes/process-groups.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/process-groups.js.map +1 -0
- package/lib/types/client/conversation-nodes/register.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/register.js.map +1 -0
- package/lib/types/client/conversation-nodes/request-prompt.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/request-prompt.js.map +1 -0
- package/lib/types/client/conversation-nodes/retry.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/retry.js.map +1 -0
- package/lib/types/client/conversation-nodes/tool.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/tool.js.map +1 -0
- package/lib/types/client/conversation-nodes/turn-error.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/turn-error.js.map +1 -0
- package/lib/types/client/conversation-nodes/turn-max-tokens.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/turn-max-tokens.js.map +1 -0
- package/lib/types/client/conversation-nodes/turn-navigation.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/turn-navigation.js.map +1 -0
- package/lib/types/client/conversation-nodes/turn-process-presentation.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/turn-process-presentation.js.map +1 -0
- package/lib/types/client/conversation-nodes/turn-process.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/turn-process.js.map +1 -0
- package/lib/types/client/conversation-nodes/turn-tail.d.ts.map +1 -0
- package/lib/types/client/conversation-nodes/turn-tail.js.map +1 -0
- package/lib/types/client/fence/FenceLayers.d.ts +21 -0
- package/lib/types/client/fence/FenceLayers.d.ts.map +1 -0
- package/lib/types/client/fence/FenceLayers.js.map +1 -0
- package/lib/types/client/fence/register.d.ts +10 -0
- package/lib/types/client/fence/register.d.ts.map +1 -0
- package/lib/types/client/fence/register.js.map +1 -0
- package/lib/types/client/file-path.d.ts.map +1 -0
- package/lib/types/client/file-path.js.map +1 -0
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/locale.d.ts +96 -0
- package/lib/types/client/locale.d.ts.map +1 -0
- package/lib/types/client/locale.js.map +1 -0
- package/lib/types/client/markdown-labels.d.ts.map +1 -0
- package/lib/types/client/markdown-labels.js.map +1 -0
- package/lib/types/client/model/conversation-context.d.ts.map +1 -0
- package/lib/types/client/model/conversation-context.js.map +1 -0
- package/lib/types/client/model/steering-history.d.ts.map +1 -0
- package/lib/types/client/model/steering-history.js.map +1 -0
- package/lib/types/client/model/tool-call-tree.d.ts.map +1 -0
- package/lib/types/client/model/tool-call-tree.js.map +1 -0
- package/lib/types/client/performance-usage.d.ts.map +1 -0
- package/lib/types/client/performance-usage.js.map +1 -0
- package/lib/types/client/presentation-policy.d.ts.map +1 -0
- package/lib/types/client/presentation-policy.js.map +1 -0
- package/lib/types/client/reasoning-text.d.ts.map +1 -0
- package/lib/types/client/reasoning-text.js.map +1 -0
- package/lib/types/client/settings/LinkOpeningRow.d.ts.map +1 -0
- package/lib/types/client/settings/LinkOpeningRow.js.map +1 -0
- package/lib/types/client/settings/PerformanceUsageRow.d.ts.map +1 -0
- package/lib/types/client/settings/PerformanceUsageRow.js.map +1 -0
- package/lib/types/client/settings/PreferenceRow.d.ts.map +1 -0
- package/lib/types/client/settings/PreferenceRow.js.map +1 -0
- package/lib/types/client/settings/TranscriptViewRow.d.ts.map +1 -0
- package/lib/types/client/settings/TranscriptViewRow.js.map +1 -0
- package/lib/types/client/stores.d.ts.map +1 -0
- package/lib/types/client/stores.js.map +1 -0
- package/lib/types/client/transcript-view.d.ts.map +1 -0
- package/lib/types/client/transcript-view.js.map +1 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js.map +1 -0
- package/package.json +47 -44
- package/src/chat-settings.ts +98 -0
- package/src/client/apply.ts +355 -0
- package/src/client/assets/running-whale@2x.png +0 -0
- package/src/client/chat/ApprovalCommand.tsx +42 -0
- package/src/client/chat/AssistantMarkdown.module.css +88 -0
- package/src/client/chat/AssistantMarkdown.tsx +170 -0
- package/src/client/chat/AssistantNodeView.tsx +67 -0
- package/src/client/chat/ChatFlow.tsx +100 -0
- package/src/client/chat/ChatGroupSeat.module.css +166 -0
- package/src/client/chat/ChatGroupSeat.tsx +208 -0
- package/src/client/chat/ChatNodeSeat.tsx +179 -0
- package/src/client/chat/ChatView.module.css +426 -0
- package/src/client/chat/ChatView.tsx +351 -0
- package/src/client/chat/CommandNodeView.tsx +40 -0
- package/src/client/chat/CompactionCommandCard.tsx +26 -0
- package/src/client/chat/CompactionItem.tsx +76 -0
- package/src/client/chat/ContextBody.module.css +161 -0
- package/src/client/chat/ContextBody.tsx +592 -0
- package/src/client/chat/ContextInjectionRow.module.css +68 -0
- package/src/client/chat/ContextInjectionRow.tsx +94 -0
- package/src/client/chat/GenericCommandCard.module.css +49 -0
- package/src/client/chat/GenericCommandCard.tsx +75 -0
- package/src/client/chat/MessageIconActions.module.css +116 -0
- package/src/client/chat/MessageIconActions.tsx +90 -0
- package/src/client/chat/MessageItem.module.css +360 -0
- package/src/client/chat/MessageItem.tsx +410 -0
- package/src/client/chat/QuotaNoticeHost.tsx +27 -0
- package/src/client/chat/ReasoningContent.tsx +26 -0
- package/src/client/chat/ReasoningRow.module.css +77 -0
- package/src/client/chat/ReasoningRow.tsx +112 -0
- package/src/client/chat/RunningStatus.tsx +48 -0
- package/src/client/chat/RunningWhaleTail.tsx +19 -0
- package/src/client/chat/StatsPills.module.css +63 -0
- package/src/client/chat/StatsPills.tsx +348 -0
- package/src/client/chat/SystemPromptRow.tsx +50 -0
- package/src/client/chat/TurnNavigator.module.css +223 -0
- package/src/client/chat/TurnNavigator.tsx +295 -0
- package/src/client/chat/TurnProcessNodeView.module.css +62 -0
- package/src/client/chat/TurnProcessNodeView.tsx +62 -0
- package/src/client/chat/TurnTailNodeView.module.css +12 -0
- package/src/client/chat/TurnTailNodeView.tsx +81 -0
- package/src/client/chat/TurnTriggerNodeView.module.css +50 -0
- package/src/client/chat/TurnTriggerNodeView.tsx +57 -0
- package/src/client/chat/TurnUsagePanel.module.css +79 -0
- package/src/client/chat/TurnUsagePanel.tsx +110 -0
- package/src/client/chat/UserContent.tsx +60 -0
- package/src/client/chat/accessibility.module.css +8 -0
- package/src/client/chat/flow-motion.ts +556 -0
- package/src/client/chat/message-chrome.ts +100 -0
- package/src/client/chat/register-node-renderers.ts +100 -0
- package/src/client/chat/render-entry.ts +16 -0
- package/src/client/chat/searchable-hidden.ts +45 -0
- package/src/client/chat/stat-dialog.module.css +149 -0
- package/src/client/chat/stat-dialog.ts +55 -0
- package/src/client/chat/step-process.ts +28 -0
- package/src/client/chat/text-interaction.ts +298 -0
- package/src/client/chat/text-selection.ts +180 -0
- package/src/client/chat/token-format.ts +98 -0
- package/src/client/chat/turn-assistant.ts +10 -0
- package/src/client/chat/turn-rail-items.ts +89 -0
- package/src/client/chat/turn-trigger.ts +88 -0
- package/src/client/chat/use-calendar-day.ts +25 -0
- package/src/client/chat/use-chat-navigation.ts +309 -0
- package/src/client/chat/use-chat-reading.ts +283 -0
- package/src/client/chat/use-chat-scroll.ts +209 -0
- package/src/client/chat/use-chat-viewport.ts +1130 -0
- package/src/client/chat/use-disclosure.ts +35 -0
- package/src/client/chat/use-process-scroll.ts +88 -0
- package/src/client/chat/use-scroll-follow.ts +182 -0
- package/src/client/chat/use-turn-data.ts +23 -0
- package/src/client/contract/assistant-content.ts +15 -0
- package/src/client/contract/chat-nodes.ts +135 -0
- package/src/client/contract/chat-visibility.ts +20 -0
- package/src/client/contract/group-tree.ts +37 -0
- package/src/client/contract/process-groups.ts +30 -0
- package/src/client/contract/slots.ts +508 -0
- package/src/client/contract/snapshot.ts +171 -0
- package/src/client/contract/store.ts +17 -0
- package/src/client/contract/turn-metrics.ts +43 -0
- package/src/client/contract/turn-process.ts +58 -0
- package/src/client/conversation-nodes/README.i18n.yaml +64 -0
- package/src/client/conversation-nodes/README.md +338 -0
- package/src/client/conversation-nodes/README.zh.md +338 -0
- package/src/client/conversation-nodes/assistant.ts +384 -0
- package/src/client/conversation-nodes/chat-snapshot-builder.ts +1244 -0
- package/src/client/conversation-nodes/command.ts +227 -0
- package/src/client/conversation-nodes/common.ts +83 -0
- package/src/client/conversation-nodes/compaction.ts +65 -0
- package/src/client/conversation-nodes/event-projection.ts +179 -0
- package/src/client/conversation-nodes/fallback.ts +41 -0
- package/src/client/conversation-nodes/group-tree-segments.ts +91 -0
- package/src/client/conversation-nodes/inbox.ts +148 -0
- package/src/client/conversation-nodes/message.ts +182 -0
- package/src/client/conversation-nodes/process-activity.ts +170 -0
- package/src/client/conversation-nodes/process-groups.ts +303 -0
- package/src/client/conversation-nodes/register.ts +38 -0
- package/src/client/conversation-nodes/request-prompt.ts +169 -0
- package/src/client/conversation-nodes/retry.ts +97 -0
- package/src/client/conversation-nodes/tool.ts +371 -0
- package/src/client/conversation-nodes/turn-error.ts +120 -0
- package/src/client/conversation-nodes/turn-max-tokens.ts +82 -0
- package/src/client/conversation-nodes/turn-navigation.ts +97 -0
- package/src/client/conversation-nodes/turn-process-presentation.ts +149 -0
- package/src/client/conversation-nodes/turn-process.ts +374 -0
- package/src/client/conversation-nodes/turn-tail.ts +164 -0
- package/src/client/fence/FenceLayers.tsx +33 -0
- package/src/client/fence/register.ts +22 -0
- package/src/client/file-path.ts +19 -0
- package/src/client/index.ts +69 -0
- package/src/client/locale.ts +1695 -0
- package/src/client/markdown-labels.ts +16 -0
- package/src/client/model/conversation-context.ts +24 -0
- package/src/client/model/steering-history.ts +64 -0
- package/src/client/model/tool-call-tree.ts +204 -0
- package/src/client/performance-usage.ts +34 -0
- package/src/client/presentation-policy.ts +109 -0
- package/src/client/reasoning-text.ts +25 -0
- package/src/client/settings/LinkOpeningRow.tsx +47 -0
- package/src/client/settings/PerformanceUsageRow.tsx +46 -0
- package/src/client/settings/PreferenceRow.module.css +66 -0
- package/src/client/settings/PreferenceRow.tsx +59 -0
- package/src/client/settings/TranscriptViewRow.tsx +93 -0
- package/src/client/stores.ts +62 -0
- package/src/client/transcript-view.ts +81 -0
- package/src/css-modules.d.ts +6 -0
- package/src/index.ts +45 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import type { ChatViewSlotProps } from '../contract/slots.ts'
|
|
3
|
+
import { DisclosureRow, IconBrowseOutlineRegular, IconContextInjectionOutlineRegular, ReferenceIconRegular } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
4
|
+
import type { ContextMessageNode } from '../contract/snapshot.ts'
|
|
5
|
+
import { contextBody } from './ContextBody.tsx'
|
|
6
|
+
import css from './ContextInjectionRow.module.css'
|
|
7
|
+
|
|
8
|
+
/** Props for the logged non-user message presentation. */
|
|
9
|
+
export interface ContextInjectionRowProps {
|
|
10
|
+
content: ContextMessageNode['content']
|
|
11
|
+
source: ContextMessageNode['source']
|
|
12
|
+
/** Role and producer name projected from the durable source. */
|
|
13
|
+
producer: ContextMessageNode['producer']
|
|
14
|
+
/** Producer-declared information form; null renders the opaque body. */
|
|
15
|
+
form: ContextMessageNode['form']
|
|
16
|
+
/** The owning view's locale seat, passed down as a plain prop. */
|
|
17
|
+
t: ChatViewSlotProps['t']
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Render logged context with the Tool calls disclosure chrome from Figma.
|
|
22
|
+
*
|
|
23
|
+
* The header names the role the context plays and, beside it, the producer the
|
|
24
|
+
* durable source identifies, so a reader can tell an injected skill catalog
|
|
25
|
+
* from a workspace instruction file or a recalled session without expanding.
|
|
26
|
+
* The expanded body follows the producer-declared form; an absent or unknown
|
|
27
|
+
* form renders the opaque body.
|
|
28
|
+
* @param props - Durable content, its projected producer role/name and form, and the locale seat.
|
|
29
|
+
* @returns A collapsed context row with a bounded, form-specific body.
|
|
30
|
+
*/
|
|
31
|
+
export function ContextInjectionRow({ content, source, producer, form, t }: ContextInjectionRowProps) {
|
|
32
|
+
const [open, setOpen] = useState(false)
|
|
33
|
+
// Resolved rather than declared: a form whose fields are unreadable renders
|
|
34
|
+
// the opaque body, and the marker must say what the row actually shows.
|
|
35
|
+
const { rendered, summary, body } = contextBody(form, { content, source, t })
|
|
36
|
+
|
|
37
|
+
const toolBlocks = content.length > 0
|
|
38
|
+
&& content.every(block => block.type === 'tool-addition' || block.type === 'tool-removal')
|
|
39
|
+
? content : undefined
|
|
40
|
+
const added = toolBlocks?.flatMap(block => block.type === 'tool-addition' ? [block.toolName] : []) ?? []
|
|
41
|
+
const removed = toolBlocks?.flatMap(block => block.type === 'tool-removal' ? [block.toolName] : []) ?? []
|
|
42
|
+
const single = toolBlocks?.length === 1 ? toolBlocks[0] : undefined
|
|
43
|
+
const toolSummary = toolBlocks === undefined || single !== undefined ? null
|
|
44
|
+
: added.length > 0 && removed.length > 0
|
|
45
|
+
? t('message.toolsChanged', { added: added.length, removed: removed.length })
|
|
46
|
+
: added.length > 0
|
|
47
|
+
? t('message.toolsAddedCount', { count: added.length })
|
|
48
|
+
: t('message.toolsRemovedCount', { count: removed.length })
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<DisclosureRow
|
|
52
|
+
className={css.root}
|
|
53
|
+
icon={toolBlocks !== undefined ? <IconBrowseOutlineRegular size={14} /> : producer.role === 'recall'
|
|
54
|
+
? <span data-context-recall-icon><ReferenceIconRegular kind="session" /></span>
|
|
55
|
+
: <IconContextInjectionOutlineRegular size={14} />}
|
|
56
|
+
chevronClassName={css.chevron}
|
|
57
|
+
title={single !== undefined ? t(single.type === 'tool-addition' ? 'message.toolAdded' : 'message.toolRemoved', { name: single.toolName }) : t(toolBlocks !== undefined ? 'message.toolsUpdated' : producer.role === 'recall' ? 'message.contextRecall' : 'message.contextInjection')}
|
|
58
|
+
collapsedContent={toolSummary !== null ? (
|
|
59
|
+
<>
|
|
60
|
+
<span className={css.sep} aria-hidden />
|
|
61
|
+
<span className={css.summary}>{toolSummary}</span>
|
|
62
|
+
</>
|
|
63
|
+
) : toolBlocks !== undefined || producer.label === null ? undefined : (
|
|
64
|
+
/* ToolRow's separator shape: an aria-hidden dot, so the accessible name
|
|
65
|
+
stays the two readable parts and the two disclosure rows expose one
|
|
66
|
+
name shape. A source that names no producer drops the dot with it. */
|
|
67
|
+
<>
|
|
68
|
+
<span className={css.sep} aria-hidden />
|
|
69
|
+
<span className={css.source} data-context-source>{producer.label}</span>
|
|
70
|
+
{summary !== null && (
|
|
71
|
+
<>
|
|
72
|
+
<span className={css.sep} aria-hidden />
|
|
73
|
+
<span className={css.summary} data-context-summary>{summary}</span>
|
|
74
|
+
</>
|
|
75
|
+
)}
|
|
76
|
+
</>
|
|
77
|
+
)}
|
|
78
|
+
keepContentWhenOpen
|
|
79
|
+
open={open && single === undefined}
|
|
80
|
+
expandable={single === undefined}
|
|
81
|
+
expandOnRowClick
|
|
82
|
+
onToggle={() => { setOpen(value => !value) }}
|
|
83
|
+
>
|
|
84
|
+
<div className={css.body} data-context-injection-body data-context-form={rendered ?? undefined}>
|
|
85
|
+
{toolBlocks === undefined ? body : (
|
|
86
|
+
<div className={css.toolChanges}>
|
|
87
|
+
{added.length > 0 && <div>{t('message.toolsAdded', { names: added.join(', ') })}</div>}
|
|
88
|
+
{removed.length > 0 && <div>{t('message.toolsRemoved', { names: removed.join(', ') })}</div>}
|
|
89
|
+
</div>
|
|
90
|
+
)}
|
|
91
|
+
</div>
|
|
92
|
+
</DisclosureRow>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.leading {
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.title {
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.separator {
|
|
15
|
+
flex: none;
|
|
16
|
+
width: 2px;
|
|
17
|
+
height: 2px;
|
|
18
|
+
margin: 0 8px;
|
|
19
|
+
border-radius: 1px;
|
|
20
|
+
background: var(--dsw-alias-label-caption);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.summary {
|
|
24
|
+
min-width: 0;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
flex: 1 1 auto;
|
|
27
|
+
font-size: var(--dsh-content-font-size-secondary, 13px);
|
|
28
|
+
line-height: calc(24px + var(--dsh-content-font-delta, 0px));
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.summary[data-error],
|
|
34
|
+
.body[data-error] {
|
|
35
|
+
color: var(--dsw-alias-state-error-primary);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.body {
|
|
39
|
+
max-height: 260px;
|
|
40
|
+
margin: 4px 0 4px 4px;
|
|
41
|
+
padding: 12px 16px;
|
|
42
|
+
overflow: auto;
|
|
43
|
+
border: 0.5px solid var(--dsw-alias-border-l1);
|
|
44
|
+
border-radius: var(--dsw-radius-lg);
|
|
45
|
+
background: var(--dsw-alias-markdown-code-block);
|
|
46
|
+
color: var(--dsw-alias-label-primary);
|
|
47
|
+
font: var(--dsw-font-markdown-code-block-small);
|
|
48
|
+
white-space: pre-wrap;
|
|
49
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { memo, useCallback, useMemo, useState } from 'react'
|
|
2
|
+
import type { ChatViewSlotProps, CommandRowOwnerProps } from '../contract/slots.ts'
|
|
3
|
+
import { DisclosureRow, IconApiOutlineRegular, TextShimmer } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
4
|
+
import a11yCss from './accessibility.module.css'
|
|
5
|
+
import css from './GenericCommandCard.module.css'
|
|
6
|
+
|
|
7
|
+
type CommandRowState = 'running' | 'ok' | 'error'
|
|
8
|
+
|
|
9
|
+
const COMMAND_ICON = <IconApiOutlineRegular size={14} />
|
|
10
|
+
|
|
11
|
+
/** Node state → row state semantic (running while unsettled; outcome kind after). */
|
|
12
|
+
function stateOf(outcome: CommandRowOwnerProps['node']['outcome']): CommandRowState {
|
|
13
|
+
if (outcome === null) return 'running'
|
|
14
|
+
return outcome.kind === 'error' ? 'error' : 'ok'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Card props: the owner payload plus the render site's locale seat (plain prop). */
|
|
18
|
+
export interface GenericCommandCardProps extends CommandRowOwnerProps {
|
|
19
|
+
t: ChatViewSlotProps['t']
|
|
20
|
+
/** Command-specific running copy; absent uses the generic command label. */
|
|
21
|
+
runningSummary?: string | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Render a command summary and its lazily mounted multiline output.
|
|
26
|
+
* @param props - command, locale, and optional running label.
|
|
27
|
+
* @returns the command disclosure.
|
|
28
|
+
*/
|
|
29
|
+
export const GenericCommandCard = memo(function GenericCommandCard({ node, t, runningSummary }: GenericCommandCardProps) {
|
|
30
|
+
const [expanded, setExpanded] = useState(false)
|
|
31
|
+
const text = node.outcome?.text
|
|
32
|
+
const summary = node.outcome === null
|
|
33
|
+
? runningSummary ?? t('command.running')
|
|
34
|
+
: text ?? (node.outcome.kind === 'error' ? t('command.failed') : t('command.done'))
|
|
35
|
+
// The summary already carries the settlement text, so the title is the bare
|
|
36
|
+
// command name.
|
|
37
|
+
const title = node.name ?? t('command.title')
|
|
38
|
+
const state = stateOf(node.outcome)
|
|
39
|
+
const running = state === 'running'
|
|
40
|
+
const body = text !== undefined && text.includes('\n') ? text : null
|
|
41
|
+
const open = expanded && body !== null
|
|
42
|
+
const toggle = useCallback(() => { setExpanded(value => !value) }, [])
|
|
43
|
+
const collapsedContent = useMemo(() => (
|
|
44
|
+
<>
|
|
45
|
+
<span className={css.separator} data-shimmer-decoration aria-hidden />
|
|
46
|
+
<span className={css.summary} data-error={state === 'error' || undefined}>
|
|
47
|
+
<TextShimmer>{summary}</TextShimmer>
|
|
48
|
+
</span>
|
|
49
|
+
</>
|
|
50
|
+
), [running, state, summary])
|
|
51
|
+
const content = useMemo(() => open
|
|
52
|
+
? <pre className={css.body} data-error={state === 'error' || undefined}>{body}</pre>
|
|
53
|
+
: undefined, [body, open, state])
|
|
54
|
+
return (
|
|
55
|
+
<div className={css.root} data-variant="others" data-state={state}>
|
|
56
|
+
{state === 'running' && <span className={a11yCss.visuallyHidden}>{t('row.running')}</span>}
|
|
57
|
+
{state === 'error' && <span className={a11yCss.visuallyHidden}>{t('row.failed')}</span>}
|
|
58
|
+
<DisclosureRow
|
|
59
|
+
leadingClassName={css.leading}
|
|
60
|
+
titleClassName={css.title}
|
|
61
|
+
icon={COMMAND_ICON}
|
|
62
|
+
title={title}
|
|
63
|
+
running={running}
|
|
64
|
+
open={open}
|
|
65
|
+
expandable={body !== null}
|
|
66
|
+
expandOnRowClick
|
|
67
|
+
keepContentWhenOpen
|
|
68
|
+
onToggle={toggle}
|
|
69
|
+
collapsedContent={collapsedContent}
|
|
70
|
+
>
|
|
71
|
+
{content}
|
|
72
|
+
</DisclosureRow>
|
|
73
|
+
</div>
|
|
74
|
+
)
|
|
75
|
+
})
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* Shared message IconActions row (user + assistant). Parent modules own
|
|
2
|
+
layout offsets via the composed className. Row containers gate visibility
|
|
3
|
+
by recency through data-actions-reveal. */
|
|
4
|
+
|
|
5
|
+
.actions {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
height: calc(28px + var(--dsh-content-font-delta, 0px));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* The user clock keeps the secondary tier. */
|
|
13
|
+
.timeStart {
|
|
14
|
+
padding-right: 12px;
|
|
15
|
+
font-size: var(--dsh-content-font-size-secondary, 13px);
|
|
16
|
+
line-height: calc(24px + var(--dsh-content-font-delta, 0px));
|
|
17
|
+
color: var(--dsw-alias-label-tertiary);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Assistant-tail metadata keeps the smaller information size while sharing
|
|
22
|
+
the action icons' resting color. */
|
|
23
|
+
.timeEnd {
|
|
24
|
+
font-size: calc(var(--dsh-content-font-size-secondary, 13px) - 1px);
|
|
25
|
+
line-height: calc(24px + var(--dsh-content-font-delta, 0px));
|
|
26
|
+
color: inherit;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.endInfo {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
min-width: 0;
|
|
35
|
+
margin-left: 8px;
|
|
36
|
+
color: var(--dsw-alias-label-tertiary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Earlier user-authored flow rows and opted-in turn tails reveal the complete
|
|
40
|
+
actions row on hover or focus-within. Opacity keeps layout stable, and
|
|
41
|
+
devices without hover keep every row visible. */
|
|
42
|
+
@media (hover: hover) {
|
|
43
|
+
[data-actions-reveal='hover'] .actions,
|
|
44
|
+
:is([data-chat-flow-kind='user'], [data-chat-flow-kind='steering']):has(
|
|
45
|
+
~ :is([data-chat-flow-kind='user'], [data-chat-flow-kind='steering'])
|
|
46
|
+
) .actions {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
transition: opacity 80ms ease;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-actions-reveal='hover']:hover .actions,
|
|
52
|
+
[data-actions-reveal='hover']:focus-within .actions,
|
|
53
|
+
:is([data-chat-flow-kind='user'], [data-chat-flow-kind='steering']):has(
|
|
54
|
+
~ :is([data-chat-flow-kind='user'], [data-chat-flow-kind='steering'])
|
|
55
|
+
):hover .actions,
|
|
56
|
+
:is([data-chat-flow-kind='user'], [data-chat-flow-kind='steering']):has(
|
|
57
|
+
~ :is([data-chat-flow-kind='user'], [data-chat-flow-kind='steering'])
|
|
58
|
+
):focus-within .actions {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.action {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
width: calc(28px + var(--dsh-content-font-delta, 0px));
|
|
68
|
+
height: calc(28px + var(--dsh-content-font-delta, 0px));
|
|
69
|
+
padding: 6px;
|
|
70
|
+
border: none;
|
|
71
|
+
border-radius: var(--dsw-radius-sm);
|
|
72
|
+
background: transparent;
|
|
73
|
+
color: var(--dsw-alias-label-tertiary);
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Action glyphs follow the same px delta as the text they serve; the
|
|
78
|
+
assistant completion row gives them two extra pixels. */
|
|
79
|
+
.action svg {
|
|
80
|
+
width: calc(15px + var(--dsh-content-font-delta, 0px));
|
|
81
|
+
height: calc(15px + var(--dsh-content-font-delta, 0px));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.actions[data-clock='end'] .action svg {
|
|
85
|
+
width: calc(17px + var(--dsh-content-font-delta, 0px));
|
|
86
|
+
height: calc(17px + var(--dsh-content-font-delta, 0px));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (hover: hover) {
|
|
90
|
+
.action:hover {
|
|
91
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
92
|
+
color: var(--dsw-alias-label-secondary);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Unavailable stays focusable and hoverable so Tooltip can explain why. */
|
|
97
|
+
.action[data-unavailable] {
|
|
98
|
+
cursor: default;
|
|
99
|
+
opacity: 0.4;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (hover: hover) {
|
|
103
|
+
.action[data-unavailable]:hover {
|
|
104
|
+
background: transparent;
|
|
105
|
+
color: var(--dsw-alias-label-tertiary);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.visuallyHidden {
|
|
110
|
+
position: absolute;
|
|
111
|
+
width: 1px;
|
|
112
|
+
height: 1px;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
clip: rect(0 0 0 0);
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Shared IconActions chrome for user and assistant messages: copy
|
|
2
|
+
// live, optional branch wiring, and an optional date-aware clock.
|
|
3
|
+
|
|
4
|
+
import { useId, type ReactNode } from 'react'
|
|
5
|
+
import {
|
|
6
|
+
IconBranchOutlineRegular, IconCheckOutlineRegular, IconCopyOutlineRegular, Tooltip, useClipboardCopy,
|
|
7
|
+
} from '@deepseek-ai/dsh-client-ui-primitives'
|
|
8
|
+
import type { ChatViewSlotProps } from '../contract/slots.ts'
|
|
9
|
+
import { formatMessageClock } from './message-chrome.ts'
|
|
10
|
+
import { useCalendarDay } from './use-calendar-day.ts'
|
|
11
|
+
import css from './MessageIconActions.module.css'
|
|
12
|
+
|
|
13
|
+
export interface MessageIconActionsProps {
|
|
14
|
+
/** Plain text the copy action writes. */
|
|
15
|
+
text: string
|
|
16
|
+
/** Unix epoch ms for the clock label; omitted for transient messages. */
|
|
17
|
+
time?: number | undefined
|
|
18
|
+
/** Clock before icons (user) or after (assistant). */
|
|
19
|
+
clock: 'start' | 'end'
|
|
20
|
+
/** Fork the session at this message; omission hides the branch action. */
|
|
21
|
+
onBranch?: (() => void) | undefined
|
|
22
|
+
/** The message is not a completed transcript tail, so branch stays visible but unavailable. */
|
|
23
|
+
branchUnavailable?: boolean | undefined
|
|
24
|
+
/** Parent layout class composed onto the actions row. */
|
|
25
|
+
className?: string | undefined
|
|
26
|
+
/**
|
|
27
|
+
* Slot-rendered actions owned by independent plugins, placed between the
|
|
28
|
+
* built-in copy and branch controls.
|
|
29
|
+
*/
|
|
30
|
+
extraActions?: ReactNode
|
|
31
|
+
/**
|
|
32
|
+
* Icon-row Turn-usage trigger (the TurnUsagePanel pill), seated after the
|
|
33
|
+
* branch control at the end of the icon cluster.
|
|
34
|
+
*/
|
|
35
|
+
usageAction?: ReactNode
|
|
36
|
+
/** The owning view's locale seat, passed down as a plain prop. */
|
|
37
|
+
t: ChatViewSlotProps['t']
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Copy / branch (/ clock) IconActions row shared by user and assistant chrome.
|
|
42
|
+
* @param props - Copy text, event time, clock side, branch callback, className.
|
|
43
|
+
* @returns The actions row element.
|
|
44
|
+
*/
|
|
45
|
+
export function MessageIconActions({
|
|
46
|
+
text, time, clock, onBranch, branchUnavailable = false, className,
|
|
47
|
+
extraActions, usageAction, t,
|
|
48
|
+
}: MessageIconActionsProps) {
|
|
49
|
+
const day = useCalendarDay()
|
|
50
|
+
const reasonId = useId()
|
|
51
|
+
const { copied, onCopy } = useClipboardCopy(text)
|
|
52
|
+
const clockEl = time === undefined ? null : (
|
|
53
|
+
<span className={clock === 'start' ? css.timeStart : css.timeEnd}>
|
|
54
|
+
{formatMessageClock(time, t, day)}
|
|
55
|
+
</span>
|
|
56
|
+
)
|
|
57
|
+
return (
|
|
58
|
+
<div className={className === undefined ? css.actions : `${css.actions} ${className}`} data-clock={clock}>
|
|
59
|
+
{clock === 'start' ? clockEl : null}
|
|
60
|
+
<Tooltip label={copied ? t('copied') : t('copy')} side="bottom">
|
|
61
|
+
<button type="button" className={css.action} aria-label={copied ? t('copied') : t('copy')} onClick={onCopy}>
|
|
62
|
+
{copied ? <IconCheckOutlineRegular /> : <IconCopyOutlineRegular />}
|
|
63
|
+
</button>
|
|
64
|
+
</Tooltip>
|
|
65
|
+
{extraActions}
|
|
66
|
+
{onBranch !== undefined && (
|
|
67
|
+
<Tooltip label={branchUnavailable ? t('message.branchUnavailable') : t('message.branch')} side="bottom" openOnClick={branchUnavailable}>
|
|
68
|
+
{/* Native disabled buttons do not deliver the hover/focus events Tooltip needs. */}
|
|
69
|
+
<button
|
|
70
|
+
type="button"
|
|
71
|
+
className={css.action}
|
|
72
|
+
aria-label={t('message.branch')}
|
|
73
|
+
aria-disabled={branchUnavailable || undefined}
|
|
74
|
+
aria-describedby={branchUnavailable ? reasonId : undefined}
|
|
75
|
+
data-unavailable={branchUnavailable || undefined}
|
|
76
|
+
onClick={branchUnavailable ? undefined : onBranch}
|
|
77
|
+
>
|
|
78
|
+
<IconBranchOutlineRegular />
|
|
79
|
+
</button>
|
|
80
|
+
</Tooltip>
|
|
81
|
+
)}
|
|
82
|
+
{onBranch !== undefined && branchUnavailable && (
|
|
83
|
+
<span id={reasonId} className={css.visuallyHidden}>{t('message.branchUnavailable')}</span>
|
|
84
|
+
)}
|
|
85
|
+
{clock === 'end'
|
|
86
|
+
? <span className={css.endInfo}>{usageAction}{clockEl}</span>
|
|
87
|
+
: usageAction}
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
}
|