@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,33 @@
|
|
|
1
|
+
/** Chat's language layers for Markdown fences: display math and unified-diff rows. */
|
|
2
|
+
import { useMemo } from 'react'
|
|
3
|
+
import type { ReactNode } from 'react'
|
|
4
|
+
import { FenceCodeBlock, FenceMathBlock } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
5
|
+
import type { HocShare, PropsLocale, PropsRuntime, SlotMap } from '@deepseek-ai/dsh-client-ui-slots'
|
|
6
|
+
import { markdownLabels } from '../markdown-labels.ts'
|
|
7
|
+
|
|
8
|
+
/** Props of the math layer: the fence and the next inner content. */
|
|
9
|
+
export type MathFenceLayerProps = PropsRuntime<'conversation.chat.markdown.fence'> & HocShare<SlotMap['conversation.chat.markdown.fence']>
|
|
10
|
+
|
|
11
|
+
/** Props of the diff layer: the fence and the Chat locale seat. */
|
|
12
|
+
export type DiffFenceLayerProps = PropsRuntime<'conversation.chat.markdown.fence'> & PropsLocale<'chat'>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Show a `math` fence as display TeX once its document settles; while it
|
|
16
|
+
* streams, the inner code block shows the source so a partial formula never
|
|
17
|
+
* renders as an error.
|
|
18
|
+
* @param props - the fence and the inner content.
|
|
19
|
+
* @returns the formula, or the inner content while streaming.
|
|
20
|
+
*/
|
|
21
|
+
export function MathFenceLayer({ code, streaming, children }: MathFenceLayerProps): ReactNode {
|
|
22
|
+
return streaming ? children : <FenceMathBlock code={code} />
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Show a `diff` or `patch` fence as unified-diff rows in place of the inner code block.
|
|
27
|
+
* @param props - the fence and the Chat locale seat.
|
|
28
|
+
* @returns the diff code block.
|
|
29
|
+
*/
|
|
30
|
+
export function DiffFenceLayer({ lang, code, streaming, t }: DiffFenceLayerProps): ReactNode {
|
|
31
|
+
const labels = useMemo(() => markdownLabels(t).code, [t])
|
|
32
|
+
return <FenceCodeBlock lang={lang} code={code} streaming={streaming} labels={labels} diff />
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Registration of Chat's Markdown fence layers. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis'
|
|
3
|
+
import { NS } from '../locale.ts'
|
|
4
|
+
import { DiffFenceLayer, MathFenceLayer } from './FenceLayers.tsx'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Register Chat's fence layers into the flow's language-keyed fence Slot;
|
|
8
|
+
* they follow its declaration and the plugin's lifetime. Ids stay literal so
|
|
9
|
+
* the Client slot catalog can name each occupied layer.
|
|
10
|
+
* @param ctx - the Chat plugin context.
|
|
11
|
+
*/
|
|
12
|
+
export function registerFenceLayers(ctx: Context): void {
|
|
13
|
+
ctx.slots.inject('conversation.chat.markdown.fence', () => ctx.slots.register({
|
|
14
|
+
name: 'conversation.chat.markdown.fence', key: 'math', id: '@deepseek-ai/dsh-client-ui-chat/fence/math',
|
|
15
|
+
}, MathFenceLayer))
|
|
16
|
+
ctx.slots.inject('conversation.chat.markdown.fence', () => ctx.slots.register({
|
|
17
|
+
name: 'conversation.chat.markdown.fence', key: 'diff', id: '@deepseek-ai/dsh-client-ui-chat/fence/diff', locale: NS,
|
|
18
|
+
}, DiffFenceLayer))
|
|
19
|
+
ctx.slots.inject('conversation.chat.markdown.fence', () => ctx.slots.register({
|
|
20
|
+
name: 'conversation.chat.markdown.fence', key: 'patch', id: '@deepseek-ai/dsh-client-ui-chat/fence/diff', locale: NS,
|
|
21
|
+
}, DiffFenceLayer))
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Gesture-time path resolution for Chat-owned file references. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis'
|
|
3
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
4
|
+
import { resolveWorkspacePath } from '@deepseek-ai/dsh-util-workspace-path'
|
|
5
|
+
import type {} from '@deepseek-ai/dsh-api-session-controller/client'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Bind path resolution to the originating Session without capturing its current directory.
|
|
9
|
+
* @param ctx - Chat plugin context.
|
|
10
|
+
* @param sessionId - Original Session identity.
|
|
11
|
+
* @returns Resolver using the live working directory, falling back to the workspace root.
|
|
12
|
+
*/
|
|
13
|
+
export function sessionFilePath(ctx: Context, sessionId: SessionId): (path: string) => string {
|
|
14
|
+
return (path) => {
|
|
15
|
+
const cwd = ctx.sessions.list.getSnapshot().byId[sessionId]?.cwd
|
|
16
|
+
const current = ctx.sessions.binding(sessionId)?.session.projections.faceOf('workingDirectory').getSnapshot() as string | null | undefined
|
|
17
|
+
return resolveWorkspacePath(current ?? cwd, path)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type {} from '@deepseek-ai/dsh-client-ui-context-menu/client'
|
|
2
|
+
/** Browser Chat target plugin. */
|
|
3
|
+
export { apply, inject } from './apply.ts'
|
|
4
|
+
export type {} from './conversation-nodes/assistant.ts'
|
|
5
|
+
export type {} from './conversation-nodes/command.ts'
|
|
6
|
+
export type {} from './conversation-nodes/compaction.ts'
|
|
7
|
+
export type {} from './conversation-nodes/fallback.ts'
|
|
8
|
+
export type {} from './conversation-nodes/message.ts'
|
|
9
|
+
export type {} from './conversation-nodes/request-prompt.ts'
|
|
10
|
+
export type {} from './conversation-nodes/retry.ts'
|
|
11
|
+
export type {} from './conversation-nodes/tool.ts'
|
|
12
|
+
export type {} from './conversation-nodes/turn-error.ts'
|
|
13
|
+
export type {} from './conversation-nodes/turn-max-tokens.ts'
|
|
14
|
+
export type {} from './conversation-nodes/turn-process.ts'
|
|
15
|
+
export type {} from './conversation-nodes/turn-tail.ts'
|
|
16
|
+
|
|
17
|
+
export type {
|
|
18
|
+
AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig,
|
|
19
|
+
AssistantTiming, ChatLocationNodeIndex, ChatNodeProcessSource, ChatNodeSource, ChatNodeStore,
|
|
20
|
+
ChatSnapshot, ChatTurnNavigationIndex, ChatTurnProcessPresentation,
|
|
21
|
+
CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode,
|
|
22
|
+
LegacyConversationSlice, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall,
|
|
23
|
+
SteeringMessageNode, ToolArgs, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode,
|
|
24
|
+
TurnNavigationItem, UnknownSurfaceNode, UserMessageNode,
|
|
25
|
+
} from './contract/snapshot.ts'
|
|
26
|
+
export type {
|
|
27
|
+
AssistantChatData, ChatConversationViewNode, ChatNode, ChatNodeKind,
|
|
28
|
+
FinalAssistantChatData, ManualCompactionChatData, RetryChatData, ToolChatData,
|
|
29
|
+
TurnProcessChatData, TurnTailChatData,
|
|
30
|
+
} from './contract/chat-nodes.ts'
|
|
31
|
+
export type { ChatGroupTree } from './contract/group-tree.ts'
|
|
32
|
+
export type { ChatStoreState, ToolCallId, TurnProcessViewEntry } from './contract/store.ts'
|
|
33
|
+
export type { TranscriptViewRowInjected, TranscriptViewRowProps } from './settings/TranscriptViewRow.tsx'
|
|
34
|
+
export type { TranscriptViewMode } from '../chat-settings.ts'
|
|
35
|
+
export type { ChatPresentationPolicy } from './presentation-policy.ts'
|
|
36
|
+
export type {
|
|
37
|
+
AssistantActionOwnerProps, ChatFileMentions, ChatNodeHookContext, ChatNodeInjected, ChatNodeOwnerProps,
|
|
38
|
+
ChatNodeViewProps, ChatScrollPosition, ChatStore, ChatViewInjected, ChatViewSlotProps,
|
|
39
|
+
ChatFlowDataInjected, ChatFlowHookContext, ChatFlowInjected, ChatFlowOwnerProps, ChatFlowSlotProps, UseGroupHeaderAction,
|
|
40
|
+
CommandRowOwnerProps, CommandRowProps, MessageImagesProps, OpenFileOptions, PresentationInjected,
|
|
41
|
+
QuotaNoticeCode, QuotaNoticeHostProps, QuotaNoticeInjected, QuotaNoticeOwnerProps, QuotaNoticeState,
|
|
42
|
+
ReasoningBodyOwnerProps, ReasoningContentInput, UserContentAttachment, UserContentData, UserContentInput,
|
|
43
|
+
UserBeforeOwnerProps,
|
|
44
|
+
TurnProcessOwnerProps, TurnTailOwnerProps, UseChat, UseChatNodeTurnData, UseDisclosure, UsePresentation, UseGroupAction,
|
|
45
|
+
} from './contract/slots.ts'
|
|
46
|
+
export type {
|
|
47
|
+
TurnProcessSpec,
|
|
48
|
+
} from './contract/turn-process.ts'
|
|
49
|
+
export type { ChatKey } from './locale.ts'
|
|
50
|
+
export type { ConversationContext, ConversationContextOriginKind } from './model/conversation-context.ts'
|
|
51
|
+
export type {
|
|
52
|
+
ContextProducerView, ContextRole, KnownContextForm,
|
|
53
|
+
} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
54
|
+
export type {
|
|
55
|
+
ConversationPromptSnapshot, RequestInspectionSnapshot, RequestPromptChange, RequestView,
|
|
56
|
+
} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
57
|
+
|
|
58
|
+
export { isRunningTool, isSettledTool } from './contract/chat-nodes.ts'
|
|
59
|
+
export { EMPTY_CHAT_SNAPSHOT } from './contract/snapshot.ts'
|
|
60
|
+
|
|
61
|
+
/** Public merge surface for Chat renderer payloads contributed by other plugins. */
|
|
62
|
+
export interface ChatNodeDataMap {}
|
|
63
|
+
|
|
64
|
+
type PublicChatNodeDataMap = ChatNodeDataMap
|
|
65
|
+
|
|
66
|
+
declare module './contract/chat-nodes.ts' {
|
|
67
|
+
interface ChatNodeDataMap extends PublicChatNodeDataMap {}
|
|
68
|
+
}
|
|
69
|
+
export type { ProcessActivity, ProcessActivitySummary, ProcessGroupData, RunningProcessActivity } from './contract/process-groups.ts'
|