diff --git a/packages/client/ui-chat/README.i18n.yaml b/packages/client/ui-chat/README.i18n.yaml index 28af833f22..a986f761c4 100644 --- a/packages/client/ui-chat/README.i18n.yaml +++ b/packages/client/ui-chat/README.i18n.yaml @@ -24,8 +24,8 @@ en: 30878be703edac57 zh: 16b84188c8660850 /deepseek-ai-dsh-client-ui-chat/inherited-history-divider: - en: b8b735733697ffdf - zh: 9c735d3798b89d4d + en: a191f90e9a64f6fe + zh: 8e91b8660f9baa18 /deepseek-ai-dsh-client-ui-chat/turn-token-usage: en: d363057b5c0b2571 zh: 0f6fe864d9673576 diff --git a/packages/client/ui-chat/README.md b/packages/client/ui-chat/README.md index 8d6a921724..70921859ae 100644 --- a/packages/client/ui-chat/README.md +++ b/packages/client/ui-chat/README.md @@ -79,7 +79,7 @@ Chat adapts Markdown targets at `MarkdownDelegateProvider.getTriggerProps`. The ## Inherited history divider -A forked Session, such as a fork subagent or a branched conversation, shows a divider labelled “Inherited history above” at its latest inherited `session/end-seed` marker, between the copied history and the Session's own messages. A cut inside a Turn keeps the divider outside that Turn's process folding. The divider appears once the history page that holds the marker is loaded, so a long inherited history may show it only after scrolling up. Sessions without inherited history show no divider. +A forked Session, such as a fork subagent or a branched conversation, shows a divider labelled “Inherited history above” at its latest inherited `session/end-seed` marker, between the copied history and the Session's own messages. The caption starts with the branch glyph that the branch action uses. A cut inside a Turn keeps the divider outside that Turn's process folding. The divider appears once the history page that holds the marker is loaded, so a long inherited history may show it only after scrolling up. Sessions without inherited history show no divider. ----- diff --git a/packages/client/ui-chat/README.zh.md b/packages/client/ui-chat/README.zh.md index bd57e895a5..d50ba90f91 100644 --- a/packages/client/ui-chat/README.zh.md +++ b/packages/client/ui-chat/README.zh.md @@ -79,7 +79,7 @@ Chat 在 `MarkdownDelegateProvider.getTriggerProps` 接入处适配 Markdown 目 ## 继承历史分隔线 -分叉产生的会话(例如 fork 子智能体或分支出的对话)在最后一个继承的 `session/end-seed` 标记处显示一条标注“以上为继承的历史消息”的分隔线,把复制来的历史与该会话自己的消息分开。切点位于某个 Turn 内部时,分隔线留在该 Turn 的过程折叠之外。分隔线在包含标记的历史页加载后才出现,因此继承历史较长时,可能要向上滚动才能看到。没有继承历史的会话不显示分隔线。 +分叉产生的会话(例如 fork 子智能体或分支出的对话)在最后一个继承的 `session/end-seed` 标记处显示一条标注“以上为继承的历史消息”的分隔线,把复制来的历史与该会话自己的消息分开。标注以“在新对话中分支”操作所用的分支图标开头。切点位于某个 Turn 内部时,分隔线留在该 Turn 的过程折叠之外。分隔线在包含标记的历史页加载后才出现,因此继承历史较长时,可能要向上滚动才能看到。没有继承历史的会话不显示分隔线。 ----- diff --git a/packages/client/ui-chat/src/client/chat/MessageItem.module.css b/packages/client/ui-chat/src/client/chat/MessageItem.module.css index 7bb1349e59..02a83126a7 100644 --- a/packages/client/ui-chat/src/client/chat/MessageItem.module.css +++ b/packages/client/ui-chat/src/client/chat/MessageItem.module.css @@ -44,11 +44,31 @@ border-top: 0.5px solid var(--dsw-alias-border-l2); } +/* Glyph and label share one caption and its tertiary ink. The 6px gap matches + a flow row's glyph-to-label gap; without the flow row's 16px leading box the + label starts 20px in rather than 22px. */ +.inheritedHistoryCaption { + flex: 0 1 auto; + display: flex; + align-items: center; + gap: 6px; + min-width: 0; + color: var(--dsw-alias-label-tertiary); +} + +/* The 14px flow-row glyph edge shared with DisclosureRow's leading icon: the + CSS edge overrides the svg's own width/height so the glyph follows the font + delta. */ +.inheritedHistoryIcon { + flex: none; + width: calc(14px + var(--dsh-content-font-delta, 0px)); + height: calc(14px + var(--dsh-content-font-delta, 0px)); +} + .inheritedHistoryLabel { flex: 0 1 auto; min-width: 0; overflow: hidden; - color: var(--dsw-alias-label-tertiary); font-size: var(--dsh-content-font-size-secondary, 13px); line-height: calc(24px + var(--dsh-content-font-delta, 0px)); text-overflow: ellipsis; diff --git a/packages/client/ui-chat/src/client/chat/MessageItem.tsx b/packages/client/ui-chat/src/client/chat/MessageItem.tsx index 8c637e6e6c..d946cc620b 100644 --- a/packages/client/ui-chat/src/client/chat/MessageItem.tsx +++ b/packages/client/ui-chat/src/client/chat/MessageItem.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react' import type { PendingSubmission } from '@deepseek-ai/dsh-api-session-controller/client' import type { PropsRenderFactories, PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots' import type { UserTextFacts } from '@deepseek-ai/dsh-client-ui-conversation/client' -import { JsonBlock, StateDot, TextShimmer } from '@deepseek-ai/dsh-client-ui-primitives' +import { IconBranchOutlineRegular, JsonBlock, StateDot, TextShimmer } from '@deepseek-ai/dsh-client-ui-primitives' import type { ChatNodeOwnerProps, ChatNodeViewProps, ChatViewSlotProps, UserContentAttachment, UserContentData, UserContentInput, } from '../contract/slots.ts' @@ -384,7 +384,10 @@ export const InheritedHistoryNodeView = memo(function InheritedHistoryNodeView({ return (