@deepseek-ai/dsh-client-ui-chat 0.2.0-rc.2 → 0.2.1-alpha.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 +10 -10
- package/README.md +17 -7
- package/README.zh.md +17 -7
- package/lib/client.js +6675 -5246
- package/lib/types/client/apply.d.ts +5 -0
- package/lib/types/client/chat/AssistantMarkdown.d.ts +6 -3
- package/lib/types/client/chat/AssistantNodeView.d.ts +3 -3
- package/lib/types/client/chat/ChatFlow.d.ts +4 -0
- package/lib/types/client/chat/ChatGroupSeat.d.ts +4 -3
- package/lib/types/client/chat/ChatNodeSeat.d.ts +11 -8
- package/lib/types/client/chat/ChatView.d.ts +1 -1
- package/lib/types/client/chat/ReasoningContent.d.ts +16 -0
- package/lib/types/client/chat/ReasoningRow.d.ts +5 -3
- package/lib/types/client/chat/StatsPills.d.ts +11 -4
- package/lib/types/client/chat/flow-motion.d.ts +59 -0
- package/lib/types/client/chat/searchable-hidden.d.ts +10 -2
- package/lib/types/client/chat/stat-dialog.d.ts +1 -3
- package/lib/types/client/chat/turn-trigger.d.ts +1 -1
- package/lib/types/client/chat/use-chat-reading.d.ts +12 -4
- package/lib/types/client/chat/use-chat-scroll.d.ts +4 -0
- package/lib/types/client/chat/use-chat-viewport.d.ts +28 -4
- package/lib/types/client/chat/use-scroll-follow.d.ts +4 -3
- package/lib/types/client/contract/slots.d.ts +85 -4
- package/lib/types/client/contract/snapshot.d.ts +4 -2
- package/lib/types/client/contract/store.d.ts +3 -1
- package/lib/types/client/conversation-nodes/process-activity.d.ts +0 -1
- package/lib/types/client/conversation-nodes/tool.d.ts +2 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/locale.d.ts +8 -0
- package/lib/types/client/presentation-policy.d.ts +15 -13
- package/lib/types/client/settings/TranscriptViewRow.d.ts +7 -2
- package/lib/types/client/stores.d.ts +11 -1
- package/lib/types/client/transcript-view.d.ts +9 -1
- package/package.json +41 -41
- package/lib/types/client/conversation-nodes/partial.d.ts +0 -34
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { ChatFlowInjected, ChatNodeInjected } from './contract/slots.ts';
|
|
3
|
+
/** Bind group and header visibility to the viewport of one flow render. */
|
|
4
|
+
export declare const CHAT_FLOW_INJECT: ChatFlowInjected;
|
|
5
|
+
/** Bind node-local sources and forward the flow's existing visibility hook. */
|
|
6
|
+
export declare const CHAT_NODE_INJECT: ChatNodeInjected;
|
|
2
7
|
/** Services required by the Chat target and its presentation registrations. */
|
|
3
8
|
export declare const inject: string[];
|
|
4
9
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
|
|
1
2
|
import type { MarkdownFileMentions } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
2
|
-
import type { ChatNodeOwnerProps, ChatViewSlotProps, UseDisclosure, UsePresentation } from '../contract/slots.ts';
|
|
3
|
+
import type { ChatNodeOwnerProps, ChatViewSlotProps, UseDisclosure, UsePresentation, UseGroupAction } from '../contract/slots.ts';
|
|
3
4
|
import type { AssistantBlock } from '../contract/snapshot.ts';
|
|
4
5
|
/**
|
|
5
6
|
* Standalone fallback for image destinations (query/fragment suffixes are ignored).
|
|
@@ -12,7 +13,7 @@ import type { AssistantBlock } from '../contract/snapshot.ts';
|
|
|
12
13
|
* protocols and non-local paths.
|
|
13
14
|
*/
|
|
14
15
|
export declare function localPathMediaUrl(base: string, value: string): string | undefined;
|
|
15
|
-
export interface AssistantMarkdownProps {
|
|
16
|
+
export interface AssistantMarkdownProps extends Pick<PropsRenderSlots<'conversation.chat.reasoning.body'>, 'renderSlot'> {
|
|
16
17
|
/** Render only the requested business portion, preserving original block indexes. */
|
|
17
18
|
groupPart?: string | undefined;
|
|
18
19
|
/** Stable Hook forwarded to each independently expandable reasoning block. */
|
|
@@ -25,6 +26,8 @@ export interface AssistantMarkdownProps {
|
|
|
25
26
|
renderMessageImages: ChatNodeOwnerProps['renderMessageImages'];
|
|
26
27
|
/** Hide reasoning that belongs to the Turn-level process disclosure. */
|
|
27
28
|
reasoningHidden?: boolean | undefined;
|
|
29
|
+
/** Process hiding bound by the node slot to its current viewport. */
|
|
30
|
+
useGroupAction: UseGroupAction;
|
|
28
31
|
/** Live display policy for reasoning summaries. */
|
|
29
32
|
usePresentation: UsePresentation;
|
|
30
33
|
/** Reveal the disclosure that hides this reasoning. */
|
|
@@ -35,5 +38,5 @@ export interface AssistantMarkdownProps {
|
|
|
35
38
|
t: ChatViewSlotProps['t'];
|
|
36
39
|
}
|
|
37
40
|
/** Reasoning block as the Think variant summary row (figma 39:28304). */
|
|
38
|
-
export declare const AssistantMarkdown: import("react").MemoExoticComponent<({ blocks, streaming, interrupted, renderMessageImages, groupPart, useDisclosure, reasoningHidden, usePresentation, revealProcess, mentions, t, }: AssistantMarkdownProps) => import("react").JSX.Element | null>;
|
|
41
|
+
export declare const AssistantMarkdown: import("react").MemoExoticComponent<({ blocks, streaming, interrupted, renderMessageImages, groupPart, useDisclosure, reasoningHidden, usePresentation, revealProcess, mentions, renderSlot, useGroupAction, t, }: AssistantMarkdownProps) => import("react").JSX.Element | null>;
|
|
39
42
|
//# sourceMappingURL=AssistantMarkdown.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { InjectFace } from '@deepseek-ai/dsh-client-ui-slots';
|
|
1
|
+
import type { InjectFace, PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
2
|
import type { ChatNodeViewProps, PresentationInjected } from '../contract/slots.ts';
|
|
3
|
-
type AssistantNodeViewProps = ChatNodeViewProps<'assistant-step'> & InjectFace<PresentationInjected>;
|
|
3
|
+
type AssistantNodeViewProps = ChatNodeViewProps<'assistant-step'> & InjectFace<PresentationInjected> & PropsRenderSlots<'conversation.chat.reasoning.body'>;
|
|
4
4
|
/** Streaming, settled, and interrupted Assistant states share one keyed renderer instance. */
|
|
5
|
-
export declare const AssistantNodeView: import("react").MemoExoticComponent<({ node, groupPart, useDisclosure, useTurnData, turnProcess, openFile, renderMessageImages, fileMentions, usePresentation, t, }: AssistantNodeViewProps) => import("react").JSX.Element>;
|
|
5
|
+
export declare const AssistantNodeView: import("react").MemoExoticComponent<({ node, groupPart, useDisclosure, useGroupAction, useTurnData, turnProcess, openFile, renderMessageImages, fileMentions, usePresentation, renderSlot, t, }: AssistantNodeViewProps) => import("react").JSX.Element>;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=AssistantNodeView.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ChatFlowSlotProps } from '../contract/slots.ts';
|
|
2
|
+
/** Render the flow without adding a DOM parent or changing keyed row positions. */
|
|
3
|
+
export declare const ChatFlow: import("react").MemoExoticComponent<({ entries, pendingInputs, lastInputTurn, deferCollapse, useSession, useChat, useChatNode, useChatNodeBottom, useChatNodeProcess, useChatGroup, usePresentation, useStore, actions, renderSlot, t, useGroupAction, useGroupHeaderAction, cwd, openFile, openSkill, inspectCall, forkAt, loadImage, fileMentions, }: ChatFlowSlotProps) => import("react").JSX.Element[]>;
|
|
4
|
+
//# sourceMappingURL=ChatFlow.d.ts.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/** Stable process container; display policy changes visibility, never member parents. */
|
|
2
2
|
import { type ComponentProps } from 'react';
|
|
3
3
|
import type { GroupKey } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ChatFlowSlotProps } from '../contract/slots.ts';
|
|
5
5
|
import { ChatNodeSeat } from './ChatNodeSeat.tsx';
|
|
6
6
|
type SeatProps = Omit<ComponentProps<typeof ChatNodeSeat>, 'nodeKey' | 'groupPart'>;
|
|
7
7
|
type ChatGroupSeatProps = SeatProps & {
|
|
8
8
|
readonly groupKey: GroupKey;
|
|
9
|
-
readonly useChatGroup:
|
|
9
|
+
readonly useChatGroup: ChatFlowSlotProps['useChatGroup'];
|
|
10
|
+
readonly useGroupHeaderAction: ChatFlowSlotProps['useGroupHeaderAction'];
|
|
10
11
|
};
|
|
11
12
|
/** Render a process group with local disclosure and the existing outer-Turn visibility. */
|
|
12
|
-
export declare const ChatGroupSeat: import("react").MemoExoticComponent<({ groupKey, useChatGroup, ...props }: ChatGroupSeatProps) => import("react").JSX.Element | null>;
|
|
13
|
+
export declare const ChatGroupSeat: import("react").MemoExoticComponent<({ groupKey, useChatGroup, useGroupHeaderAction, ...props }: ChatGroupSeatProps) => import("react").JSX.Element | null>;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=ChatGroupSeat.d.ts.map
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import type { ChatNodeOwnerProps,
|
|
1
|
+
import type { ChatNodeOwnerProps, ChatFlowSlotProps, UsePresentation } from '../contract/slots.ts';
|
|
2
2
|
import type { ChatNodeStore } from '../contract/snapshot.ts';
|
|
3
3
|
interface ChatNodeSeatProps extends ChatNodeOwnerProps {
|
|
4
4
|
readonly nodeKey: string;
|
|
5
5
|
/** A replaced Builder must rebind keyed hooks even when references and keys survive. */
|
|
6
6
|
readonly nodeStore: ChatNodeStore;
|
|
7
|
-
readonly useChatNode:
|
|
8
|
-
readonly useChatNodeProcess:
|
|
7
|
+
readonly useChatNode: ChatFlowSlotProps['useChatNode'];
|
|
8
|
+
readonly useChatNodeProcess: ChatFlowSlotProps['useChatNodeProcess'];
|
|
9
9
|
readonly usePresentation: UsePresentation;
|
|
10
|
-
readonly useStore:
|
|
11
|
-
readonly actions:
|
|
12
|
-
readonly renderSlot:
|
|
13
|
-
readonly t:
|
|
10
|
+
readonly useStore: ChatFlowSlotProps['useStore'];
|
|
11
|
+
readonly actions: ChatFlowSlotProps['actions'];
|
|
12
|
+
readonly renderSlot: ChatFlowSlotProps['renderSlot'];
|
|
13
|
+
readonly t: ChatFlowSlotProps['t'];
|
|
14
|
+
readonly useChatNodeBottom: ChatFlowSlotProps['useChatNodeBottom'];
|
|
15
|
+
readonly deferCollapse: boolean;
|
|
16
|
+
readonly useGroupAction: ChatFlowSlotProps['useGroupAction'];
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* Subscribe, apply Turn-process visibility, and dispatch one stable Context key.
|
|
17
20
|
* Policy reads select this seat's own conclusion, so a mode change re-renders
|
|
18
21
|
* only seats whose visibility actually changes.
|
|
19
22
|
*/
|
|
20
|
-
export declare const ChatNodeSeat: import("react").MemoExoticComponent<({ nodeKey, groupPart, useChatNode, useChatNodeProcess, usePresentation, cwd, openFile, openSkill, inspectCall, forkAt, loadImage, renderMessageImages, fileMentions, useStore, actions, renderSlot, t, }: ChatNodeSeatProps) => import("react").JSX.Element | null>;
|
|
23
|
+
export declare const ChatNodeSeat: import("react").MemoExoticComponent<({ nodeKey, groupPart, useChatNode, useChatNodeProcess, usePresentation, cwd, openFile, openSkill, inspectCall, forkAt, loadImage, renderMessageImages, fileMentions, useStore, actions, renderSlot, t, useChatNodeBottom, deferCollapse, useGroupAction, }: ChatNodeSeatProps) => import("react").JSX.Element | null>;
|
|
21
24
|
export {};
|
|
22
25
|
//# sourceMappingURL=ChatNodeSeat.d.ts.map
|
|
@@ -3,5 +3,5 @@ import type { ChatViewSlotProps } from '../contract/slots.ts';
|
|
|
3
3
|
* The chat view slot entry: pure component over the composed props; each
|
|
4
4
|
* ordered business Node crosses the keyed renderer seat.
|
|
5
5
|
*/
|
|
6
|
-
export declare function ChatView({ useSession, useChat,
|
|
6
|
+
export declare function ChatView({ useSession, useChat, useConversation, useSessions, renderSlot, sessionId, openFile, openSkill, openExternalLink, loadOlder, loadThrough, loadImage, inspectCall, chatScroll, forkAt, fileMentions, usePresentation, useProjection, t, }: ChatViewSlotProps): import("react").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=ChatView.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FactoryComponentPropsOf, PropsRenderFactories, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
type ReasoningBodyProps = PropsRuntime<'conversation.chat.reasoning.body'> & PropsRenderFactories;
|
|
3
|
+
/**
|
|
4
|
+
* Render compact reasoning with caller-supplied labels or Chat's defaults.
|
|
5
|
+
* @param props - display text, streaming state, optional localized labels, and the Factory's locale seat; no Session is required.
|
|
6
|
+
* @returns the standard reasoning content; supplied labels are used without merging defaults.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ReasoningContent: import("react").MemoExoticComponent<({ text, running, labels, t }: FactoryComponentPropsOf<"conversation.chat.reasoning.content">) => import("react").JSX.Element>;
|
|
9
|
+
/**
|
|
10
|
+
* Render the default Body through the same Factory available to third-party wrappers.
|
|
11
|
+
* @param props - original reasoning and the framework's Factory renderer.
|
|
12
|
+
* @returns an occurrence of the official reasoning Content Factory.
|
|
13
|
+
*/
|
|
14
|
+
export declare function DefaultReasoningBody({ text, running, renderFactorySlot }: ReasoningBodyProps): import("react").ReactNode;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ReasoningContent.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
|
|
1
2
|
import type { ChatViewSlotProps, UseDisclosure, UsePresentation } from '../contract/slots.ts';
|
|
2
3
|
/**
|
|
3
4
|
* Render one assistant reasoning block collapsed until the reader opens it. The
|
|
@@ -9,14 +10,15 @@ import type { ChatViewSlotProps, UseDisclosure, UsePresentation } from '../contr
|
|
|
9
10
|
* @param props.running - whether this block is the streaming tail.
|
|
10
11
|
* @param props.usePresentation - live display-policy selector for this reasoning row.
|
|
11
12
|
* @param props.useDisclosure - independent open state with enclosing-Turn resets.
|
|
12
|
-
* @param props.
|
|
13
|
+
* @param props.renderSlot - framework renderer for the standard reasoning Body Slot.
|
|
14
|
+
* @param props.t - conversation locale seat for the disclosure and running status.
|
|
13
15
|
* @returns the reasoning disclosure.
|
|
14
16
|
*/
|
|
15
|
-
export declare const ReasoningRow: import("react").MemoExoticComponent<({ text, running, usePresentation, useDisclosure, t }: {
|
|
17
|
+
export declare const ReasoningRow: import("react").MemoExoticComponent<({ text, running, usePresentation, useDisclosure, renderSlot, t }: {
|
|
16
18
|
text: string;
|
|
17
19
|
running: boolean;
|
|
18
20
|
useDisclosure: UseDisclosure;
|
|
19
21
|
usePresentation: UsePresentation;
|
|
20
22
|
t: ChatViewSlotProps["t"];
|
|
21
|
-
}) => import("react").JSX.Element>;
|
|
23
|
+
} & Pick<PropsRenderSlots<"conversation.chat.reasoning.body">, "renderSlot">) => import("react").JSX.Element>;
|
|
22
24
|
//# sourceMappingURL=ReasoningRow.d.ts.map
|
|
@@ -52,13 +52,20 @@ export declare function cacheHitPercent(usage: TokenUsageProjection): string | n
|
|
|
52
52
|
* @returns billed input tokens.
|
|
53
53
|
*/
|
|
54
54
|
export declare function billedInputTokens(usage: TokenUsageProjection): number;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
type Translate = ChatViewSlotProps['t'];
|
|
56
|
+
/** Props shared by every composer stats pill: the conversation-snapshot selector plus the projection read seat. */
|
|
57
|
+
export interface StatPillProps extends InjectFace<PerformanceUsageInjected> {
|
|
57
58
|
useChat: SnapshotSelectorHook<ChatSnapshot>;
|
|
58
59
|
useProjection: UseProjection;
|
|
59
60
|
/** The owning dock's locale seat. */
|
|
60
|
-
t:
|
|
61
|
+
t: Translate;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Turn and step counts with whole-session speed, opening the time and speed
|
|
65
|
+
* dialog; Compact keeps only the speed reading.
|
|
66
|
+
*/
|
|
67
|
+
export declare const ActivityPill: import("react").MemoExoticComponent<({ useChat, useProjection, usePerformanceUsage, t }: StatPillProps) => import("react").JSX.Element | null>;
|
|
68
|
+
/** Whole-log token total and cache hit; Compact keeps only the cache hit. */
|
|
69
|
+
export declare const UsagePill: import("react").MemoExoticComponent<({ useProjection, usePerformanceUsage, t }: StatPillProps) => import("react").JSX.Element | null>;
|
|
63
70
|
export {};
|
|
64
71
|
//# sourceMappingURL=StatsPills.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fade-then-close transitions owned by one Chat viewport. Rows fade before their boxes close;
|
|
3
|
+
* the owner reserves removed height and holds scrolling until that viewport's folds finish.
|
|
4
|
+
* Motion is opt-in under `[data-chat-motion]`, respects reduced motion, and clears temporary styles.
|
|
5
|
+
*/
|
|
6
|
+
import { type RefObject } from 'react';
|
|
7
|
+
/** Row-local operations supplied by the containing viewport. */
|
|
8
|
+
export interface FlowMotionRows {
|
|
9
|
+
/** @param element - visible row. @param done - commits hidden state before idle callbacks run. */
|
|
10
|
+
collapse(element: HTMLElement, done: () => void): void;
|
|
11
|
+
/** @param element - newly visible row to grow to its natural size. */
|
|
12
|
+
reveal(element: HTMLElement): void;
|
|
13
|
+
/** @param element - row whose active transition should be cancelled without hiding it. */
|
|
14
|
+
cancelMotion(element: HTMLElement): void;
|
|
15
|
+
}
|
|
16
|
+
/** Animation lifetime and fold coordination for one viewport. */
|
|
17
|
+
export interface FlowMotion extends FlowMotionRows {
|
|
18
|
+
/** @returns whether a row owned by this viewport is closing. */
|
|
19
|
+
foldActive(): boolean;
|
|
20
|
+
/** @param listener - callback after the last fold. @returns cancellation for a pending callback. */
|
|
21
|
+
onFoldIdle(listener: () => void): () => void;
|
|
22
|
+
/** Cancel owned animations and pending work when the viewport detaches. */
|
|
23
|
+
clear(): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Decide whether a row may animate: inside a live scope and not under reduced motion.
|
|
27
|
+
* @param element - row about to be hidden.
|
|
28
|
+
* @returns whether the fade-then-close transition applies.
|
|
29
|
+
*/
|
|
30
|
+
export declare function motionEnabled(element: HTMLElement): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether a row is already hidden or on its way there.
|
|
33
|
+
* @param element - row under Turn-level visibility control.
|
|
34
|
+
* @returns hidden attribute present or a collapse transition outstanding.
|
|
35
|
+
*/
|
|
36
|
+
export declare function hiddenOrCollapsing(element: HTMLElement): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Create animation coordination without cross-viewport broadcasts.
|
|
39
|
+
* @param reserve - reserve the deduplicated removed height in this viewport.
|
|
40
|
+
* @param foldingChanged - disable or restore this viewport's native scroll anchoring.
|
|
41
|
+
* @returns stable callbacks and cleanup for this viewport's animations.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createFlowMotion(reserve: (px: number) => void, foldingChanged: (active: boolean) => void): FlowMotion;
|
|
44
|
+
/**
|
|
45
|
+
* Apply searchable hiding with the containing Chat viewport's optional fold animation.
|
|
46
|
+
* @param hidden - desired visibility.
|
|
47
|
+
* @param reveal - browser-find and focus-protection callback.
|
|
48
|
+
* @param motion - owning viewport's row callbacks; undefined applies visibility synchronously.
|
|
49
|
+
* @returns the stable subtree ref.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useFlowHidden(hidden: boolean, reveal: () => void, motion: FlowMotionRows | undefined): RefObject<HTMLDivElement>;
|
|
52
|
+
/**
|
|
53
|
+
* Toggle a plain hidden attribute on the fold clock, growing newly revealed headers.
|
|
54
|
+
* @param ref - element whose visibility follows hidden.
|
|
55
|
+
* @param hidden - desired hidden state.
|
|
56
|
+
* @param motion - containing viewport's row callbacks.
|
|
57
|
+
*/
|
|
58
|
+
export declare function useMotionHidden(ref: RefObject<HTMLElement | null>, hidden: boolean, motion: FlowMotionRows): void;
|
|
59
|
+
//# sourceMappingURL=flow-motion.d.ts.map
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Optional visibility operation; its caller owns cancellation and eventually commits the attribute.
|
|
4
|
+
* @param element - stable subtree root.
|
|
5
|
+
* @param hidden - desired hidden state.
|
|
6
|
+
* @param commit - apply the final visibility before reporting the operation complete.
|
|
7
|
+
*/
|
|
8
|
+
export type HiddenTransition = (element: HTMLElement, hidden: boolean, commit: () => void) => void;
|
|
2
9
|
/**
|
|
3
10
|
* Apply searchable hidden state without unmounting a stable subtree.
|
|
4
11
|
* @param hidden - whether the subtree is currently hidden.
|
|
5
|
-
* @param reveal - callback for browser find's
|
|
12
|
+
* @param reveal - callback for browser find's beforematch reveal.
|
|
13
|
+
* @param transition - optional caller-owned visibility operation; otherwise apply synchronously.
|
|
6
14
|
* @returns ref for the stable subtree root.
|
|
7
15
|
*/
|
|
8
|
-
export declare function useSearchableHidden(hidden: boolean, reveal: () => void): RefObject<HTMLDivElement>;
|
|
16
|
+
export declare function useSearchableHidden(hidden: boolean, reveal: () => void, transition?: HiddenTransition): RefObject<HTMLDivElement>;
|
|
9
17
|
//# sourceMappingURL=searchable-hidden.d.ts.map
|
|
@@ -14,9 +14,7 @@ export interface StatDialogSeat {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* One trigger-anchored dialog seat: open state, viewport-clamped placement, outside-close.
|
|
17
|
-
* @param controlled - external open state; when given the seat reads and writes
|
|
18
|
-
* it instead of owning its own, letting sibling dialogs share one exclusive slot.
|
|
19
17
|
* @returns the seat; spread `pos ?? MEASURE_STYLE` onto the portaled panel.
|
|
20
18
|
*/
|
|
21
|
-
export declare function useStatDialog(
|
|
19
|
+
export declare function useStatDialog(): StatDialogSeat;
|
|
22
20
|
//# sourceMappingURL=stat-dialog.d.ts.map
|
|
@@ -4,7 +4,7 @@ import type { ChatKey } from '../locale.ts';
|
|
|
4
4
|
/** Existing primitive glyph selected for a Turn trigger's source family. */
|
|
5
5
|
export type TurnTriggerIcon = 'agent' | 'github' | 'goal' | 'job' | 'plugin' | 'request' | 'schedule' | 'subagent' | 'team' | 'webhook';
|
|
6
6
|
/**
|
|
7
|
-
* Describe a waking message using its source
|
|
7
|
+
* Describe a waking message using its recorded source.
|
|
8
8
|
* @param node - durable context, including the original notification body.
|
|
9
9
|
* @returns localized title key and source-family icon.
|
|
10
10
|
*/
|
|
@@ -50,8 +50,13 @@ export declare class ChatReading {
|
|
|
50
50
|
dispose(): void;
|
|
51
51
|
/** Release bottom follow and pending sampling for an explicit navigation. */
|
|
52
52
|
pauseFollowing(): void;
|
|
53
|
-
/**
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Land at the current floor and clear saved reader position.
|
|
55
|
+
* @param behavior - immediate positioning, or one native animation when the reader's own input moved the tail.
|
|
56
|
+
*/
|
|
57
|
+
followTail(behavior?: 'instant' | 'smooth'): void;
|
|
58
|
+
/** Stop a native follow animation where it is; the next sampled position decides follow intent. */
|
|
59
|
+
interruptFollow(): void;
|
|
55
60
|
/** Restore the Session's semantic position, or follow the tail when none is saved. */
|
|
56
61
|
restore(): void;
|
|
57
62
|
/**
|
|
@@ -69,8 +74,11 @@ export declare class ChatReading {
|
|
|
69
74
|
* @param scroll - attributed scroll delivery; other reader movement remains pending until sampled.
|
|
70
75
|
*/
|
|
71
76
|
readonly onScroll: (scroll: ViewportScroll) => void;
|
|
72
|
-
/**
|
|
73
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Settle pending reader movement; only the outer scroller can finish its native follow animation.
|
|
79
|
+
* @param outer - whether the event belongs to the outer scroller rather than a process body.
|
|
80
|
+
*/
|
|
81
|
+
readonly onScrollEnd: (outer?: boolean) => void;
|
|
74
82
|
/** Reconcile a layout change without overriding unsampled reader input. */
|
|
75
83
|
onResize(): void;
|
|
76
84
|
/** Resolve the active turn from tail ownership or a coalesced reading-line probe. */
|
|
@@ -4,6 +4,7 @@ import type { ChatSnapshot } from '../contract/snapshot.ts';
|
|
|
4
4
|
import type { ChatViewSlotProps } from '../contract/slots.ts';
|
|
5
5
|
import { type ChatNavigation, type ChatNavigationInput } from './use-chat-navigation.ts';
|
|
6
6
|
import { type ChatReadingState } from './use-chat-reading.ts';
|
|
7
|
+
import type { FlowMotionRows } from './flow-motion.ts';
|
|
7
8
|
/** Committed content and Session operations used to reconcile scroll ownership. */
|
|
8
9
|
export interface ChatScrollInput extends ChatNavigationInput {
|
|
9
10
|
readonly chatScroll: ChatViewSlotProps['chatScroll'];
|
|
@@ -14,6 +15,8 @@ export interface ChatScrollInput extends ChatNavigationInput {
|
|
|
14
15
|
readonly steeringId: string | null;
|
|
15
16
|
readonly submissionId: string | null;
|
|
16
17
|
readonly running: boolean;
|
|
18
|
+
/** Enable the browser-local delayed-fold experiment and its input reveal animation. */
|
|
19
|
+
readonly deferCompletedTurns: boolean;
|
|
17
20
|
readonly loadedTurns: ReturnType<ChatSnapshot['navigation']['items']>;
|
|
18
21
|
}
|
|
19
22
|
interface ChatScrollState extends ChatReadingState {
|
|
@@ -23,6 +26,7 @@ interface ChatScrollState extends ChatReadingState {
|
|
|
23
26
|
readonly navigateToTurn: ChatNavigation['navigateToTurn'];
|
|
24
27
|
readonly loadEarlier: ChatNavigation['loadEarlier'];
|
|
25
28
|
readonly returnToBottom: () => void;
|
|
29
|
+
readonly motion: FlowMotionRows;
|
|
26
30
|
}
|
|
27
31
|
/**
|
|
28
32
|
* Coordinate scroll policy after Chat content commits.
|
|
@@ -17,9 +17,11 @@ export interface ViewportLanding {
|
|
|
17
17
|
}
|
|
18
18
|
interface ViewportEvents {
|
|
19
19
|
scroll: (event: ViewportScroll) => void;
|
|
20
|
-
scrollEnd: () => void;
|
|
20
|
+
scrollEnd: (outer: boolean) => void;
|
|
21
21
|
resize: () => void;
|
|
22
22
|
interact: () => void;
|
|
23
|
+
/** Any reading gesture, before paging ownership is consulted. */
|
|
24
|
+
intent?: () => void;
|
|
23
25
|
}
|
|
24
26
|
/** Owns one Chat scrollport's DOM operations, event listeners, and size observer. */
|
|
25
27
|
export declare class ChatViewport {
|
|
@@ -29,6 +31,8 @@ export declare class ChatViewport {
|
|
|
29
31
|
private turns;
|
|
30
32
|
private observation;
|
|
31
33
|
private paging;
|
|
34
|
+
/** Transition state and row callbacks owned by this viewport's attachment. */
|
|
35
|
+
readonly motion: import("./flow-motion.ts").FlowMotion;
|
|
32
36
|
/**
|
|
33
37
|
* Bind to the containing scrollport and observe content and viewport sizes.
|
|
34
38
|
* @param list - Chat root inside an optional shared conversation scrollport.
|
|
@@ -55,6 +59,24 @@ export declare class ChatViewport {
|
|
|
55
59
|
get latestTurn(): number | null;
|
|
56
60
|
/** Discard geometry-dependent landing knowledge while retaining scroll attribution. */
|
|
57
61
|
invalidate(): void;
|
|
62
|
+
private spacerHeight;
|
|
63
|
+
private setSpacer;
|
|
64
|
+
/**
|
|
65
|
+
* Add room below the flow before rows above the reader close, so the scrollport never clamps:
|
|
66
|
+
* the closing gap pulls the content below it upward while everything above stays put.
|
|
67
|
+
* @param px - height about to leave the flow.
|
|
68
|
+
*/
|
|
69
|
+
reserveBelow(px: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* Give reserved room back after acknowledged scrolling or content growth without clamping the reader.
|
|
72
|
+
* Holds still during folds and unsampled movement; following includes the room that remains.
|
|
73
|
+
*/
|
|
74
|
+
reclaimBelow(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Stop an outstanding native follow animation at its current position before a reading gesture.
|
|
77
|
+
* @param follow - follow controller bound to this scrollport.
|
|
78
|
+
*/
|
|
79
|
+
interruptFollow(follow: ScrollFollow): void;
|
|
58
80
|
/**
|
|
59
81
|
* Accept a sampled reader position without retaining a known landing.
|
|
60
82
|
* @param metrics - settled reader position used as the next attribution baseline.
|
|
@@ -121,11 +143,13 @@ export declare class ChatViewport {
|
|
|
121
143
|
*/
|
|
122
144
|
preserve(): ViewportLanding | null;
|
|
123
145
|
/**
|
|
124
|
-
* Align the
|
|
146
|
+
* Align with the physical floor, including fold room that newer content has not yet filled.
|
|
125
147
|
* @param follow - independent follow intent and scrolling controller.
|
|
126
|
-
* @
|
|
148
|
+
* @param behavior - immediate positioning, or one native animation for a reader-caused tail change.
|
|
149
|
+
* @returns the actual floor landing, or null while detached. A smooth landing reports the starting
|
|
150
|
+
* position; native scroll delivery moves it.
|
|
127
151
|
*/
|
|
128
|
-
scrollToBottom(follow: ScrollFollow): ViewportLanding | null;
|
|
152
|
+
scrollToBottom(follow: ScrollFollow, behavior?: 'instant' | 'smooth'): ViewportLanding | null;
|
|
129
153
|
private align;
|
|
130
154
|
private write;
|
|
131
155
|
private readonly onScroll;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Scroll position,
|
|
1
|
+
/** Scroll position, caller-supplied floor, and viewport height; raw measurements use the physical floor. */
|
|
2
2
|
export interface ViewportMetrics {
|
|
3
3
|
readonly top: number;
|
|
4
4
|
readonly floor: number;
|
|
@@ -80,11 +80,12 @@ export declare class ScrollFollow {
|
|
|
80
80
|
jump(element: HTMLElement, metrics: ViewportMetrics, top: number): ViewportMetrics;
|
|
81
81
|
/**
|
|
82
82
|
* Follow the measured floor, respecting reduced motion for smooth requests.
|
|
83
|
-
*
|
|
83
|
+
* Smooth requests preserve an outstanding target; immediate follow updates
|
|
84
|
+
* retarget active motion when content changes the floor.
|
|
84
85
|
* Within-tolerance positioning is immediate while no animation is outstanding.
|
|
85
86
|
* @param element - scrolling element.
|
|
86
87
|
* @param metrics - current geometry.
|
|
87
|
-
* @param behavior - native animation for growth, or immediate positioning.
|
|
88
|
+
* @param behavior - native animation for growth, or immediate positioning unless motion is already active.
|
|
88
89
|
* @returns current geometry; smooth requests retain their starting position until native scroll delivery.
|
|
89
90
|
*/
|
|
90
91
|
toBottom(element: HTMLElement, metrics: ViewportMetrics, behavior: 'instant' | 'smooth'): ViewportMetrics;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/** Chat-owned Slot declarations and composed component props. */
|
|
2
|
+
import type { RefObject } from 'react';
|
|
2
3
|
import type { MessageId } from '@deepseek-ai/dsh-llm/brand';
|
|
3
4
|
import type { SessionId, SessionSeq } from '@deepseek-ai/dsh-session/types';
|
|
4
|
-
import type {
|
|
5
|
+
import type { PendingSubmission } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
6
|
+
import type { InboxState } from '@deepseek-ai/dsh-agent/types';
|
|
7
|
+
import type { CommandNode, CompactionSummaryNode, ConversationLocationDataStore, ConversationTurnDataMap, ConversationGroupData, GroupSnapshot, MessageImageLoader, MessageImagesOwnerProps, RenderEntry, RenderMessageImages, TurnLocation } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
5
8
|
import type { HostObservable, InjectFace, KeyedSnapshotSelectorHook, PropsLocale, PropsRenderSlots, PropsRuntime, PropsStore, SlotHookFactory, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
|
|
6
9
|
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
|
|
7
|
-
import type { MarkdownFileMentions } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
10
|
+
import type { MarkdownFileMentions, MarkdownLabels } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
8
11
|
import type { createChatStore } from '../stores.ts';
|
|
9
12
|
import type { ChatPresentationPolicy } from '../presentation-policy.ts';
|
|
13
|
+
import type { FlowMotionRows } from '../chat/flow-motion.ts';
|
|
10
14
|
import type { ToolCallId } from './store.ts';
|
|
11
15
|
import type { ChatConversationViewNode, ChatNode, ChatNodeKind } from './chat-nodes.ts';
|
|
12
16
|
import type { ChatNodeProcessSource, ChatNodeSource, ChatSnapshot, ChatTurnProcessPresentation } from './snapshot.ts';
|
|
@@ -48,6 +52,18 @@ export interface QuotaNoticeState {
|
|
|
48
52
|
/** Per-publication sequence; the host keys its surface by it. */
|
|
49
53
|
seq: number;
|
|
50
54
|
}
|
|
55
|
+
/** Original model-provided reasoning offered to the expanded Body Slot. */
|
|
56
|
+
export interface ReasoningBodyOwnerProps {
|
|
57
|
+
/** Complete or streaming reasoning text. */
|
|
58
|
+
readonly text: string;
|
|
59
|
+
/** Whether the reasoning tail is still streaming. */
|
|
60
|
+
readonly running: boolean;
|
|
61
|
+
}
|
|
62
|
+
/** Session-independent original or derived display input to the Content Factory. */
|
|
63
|
+
export interface ReasoningContentInput extends ReasoningBodyOwnerProps {
|
|
64
|
+
/** Localized Markdown controls, used unchanged when supplied; omission uses Chat's defaults. */
|
|
65
|
+
readonly labels?: MarkdownLabels;
|
|
66
|
+
}
|
|
51
67
|
/** Owner currency of one quota notice offered to the frame-wide chain. */
|
|
52
68
|
export interface QuotaNoticeOwnerProps {
|
|
53
69
|
/** Stable failure code retained in the Session log. */
|
|
@@ -109,16 +125,42 @@ export type UseDisclosure = () => {
|
|
|
109
125
|
readonly setExpanded: (open: boolean) => void;
|
|
110
126
|
readonly toggle: () => void;
|
|
111
127
|
};
|
|
112
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* Searchable process hiding bound to the current node render's viewport.
|
|
130
|
+
* @param hidden - desired hidden state.
|
|
131
|
+
* @param reveal - browser-find and focus-protection callback.
|
|
132
|
+
* @returns the stable process-container ref.
|
|
133
|
+
*/
|
|
134
|
+
export type UseGroupAction = (hidden: boolean, reveal: () => void) => RefObject<HTMLDivElement>;
|
|
135
|
+
/**
|
|
136
|
+
* Plain header visibility bound to the flow's viewport, including growth on reveal.
|
|
137
|
+
* @param ref - stable header element.
|
|
138
|
+
* @param hidden - desired hidden state.
|
|
139
|
+
*/
|
|
140
|
+
export type UseGroupHeaderAction = (ref: RefObject<HTMLElement | null>, hidden: boolean) => void;
|
|
141
|
+
/** Viewport capability supplied once for each rendered Chat flow. */
|
|
142
|
+
export interface ChatFlowHookContext {
|
|
143
|
+
readonly motion: FlowMotionRows;
|
|
144
|
+
}
|
|
145
|
+
/** Flow-wide behavior hooks bound to one viewport, independently of Session identity. */
|
|
146
|
+
export interface ChatFlowInjected {
|
|
147
|
+
hooks: {
|
|
148
|
+
groupAction: SlotHookFactory<'conversation.chat.flow', UseGroupAction>;
|
|
149
|
+
groupHeaderAction: SlotHookFactory<'conversation.chat.flow', UseGroupHeaderAction>;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/** Stable sources and capabilities bound to one rendered Chat Node. */
|
|
113
153
|
export interface ChatNodeHookContext {
|
|
114
154
|
readonly turnData: ConversationLocationDataStore<ConversationTurnDataMap> | undefined;
|
|
115
155
|
readonly disclosureReset: ObservableSnapshot<number>;
|
|
156
|
+
readonly useGroupAction: UseGroupAction;
|
|
116
157
|
}
|
|
117
158
|
/** Slot-level Hook factories for keyed Chat renderers. */
|
|
118
159
|
export interface ChatNodeInjected {
|
|
119
160
|
hooks: {
|
|
120
161
|
turnData: SlotHookFactory<'conversation.chat.node', UseChatNodeTurnData>;
|
|
121
162
|
disclosure: SlotHookFactory<'conversation.chat.node', UseDisclosure>;
|
|
163
|
+
groupAction: SlotHookFactory<'conversation.chat.node', UseGroupAction>;
|
|
122
164
|
};
|
|
123
165
|
}
|
|
124
166
|
/** Stable owner currency delivered to a keyed Chat renderer. */
|
|
@@ -192,6 +234,8 @@ export interface ChatViewInjected {
|
|
|
192
234
|
keyedHooks: {
|
|
193
235
|
/** Resolve the stable source for one Chat Node key. */
|
|
194
236
|
chatNode: (key: string) => ChatNodeSource;
|
|
237
|
+
/** Observe assembler-owned bottom membership for one Node. */
|
|
238
|
+
chatNodeBottom: (key: string) => ObservableSnapshot<boolean>;
|
|
195
239
|
/** Resolve the stable Turn-process source for one Chat Node key. */
|
|
196
240
|
chatNodeProcess: (key: string) => ChatNodeProcessSource;
|
|
197
241
|
/** Resolve one optional group without subscribing the root View to its data. */
|
|
@@ -213,8 +257,19 @@ export interface ChatViewInjected {
|
|
|
213
257
|
forkAt: (seq: number) => void;
|
|
214
258
|
fileMentions: (owner: TurnTailOwnerProps) => MarkdownFileMentions | undefined;
|
|
215
259
|
}
|
|
260
|
+
/** Existing Session-owned node sources shared by the view and its flow renderer. */
|
|
261
|
+
export type ChatFlowDataInjected = Pick<ChatViewInjected, 'hooks' | 'keyedHooks'>;
|
|
262
|
+
/** Ordered rows and reconciled local echoes rendered inside one Chat viewport. */
|
|
263
|
+
export interface ChatFlowOwnerProps extends Pick<ChatNodeOwnerProps, 'cwd' | 'openSkill' | 'openFile' | 'inspectCall' | 'forkAt' | 'loadImage' | 'fileMentions'> {
|
|
264
|
+
readonly entries: readonly RenderEntry[];
|
|
265
|
+
readonly pendingInputs: readonly (PendingSubmission | InboxState['next-step'][number])[];
|
|
266
|
+
readonly lastInputTurn: number | undefined;
|
|
267
|
+
readonly deferCollapse: boolean;
|
|
268
|
+
}
|
|
269
|
+
/** Full props of the Chat-owned flow renderer. */
|
|
270
|
+
export type ChatFlowSlotProps = PropsRuntime<'conversation.chat.flow'> & PropsRenderSlots<'conversation.chat.node' | 'conversation.message.images'> & PropsStore<ChatStore> & InjectFace<ChatFlowDataInjected> & PropsLocale<'chat'>;
|
|
216
271
|
/** Full Chat view props. */
|
|
217
|
-
export type ChatViewSlotProps = PropsRuntime<'conversation.view'> & PropsRenderSlots<'conversation.chat.
|
|
272
|
+
export type ChatViewSlotProps = PropsRuntime<'conversation.view'> & PropsRenderSlots<'conversation.chat.flow'> & PropsStore<ChatStore> & InjectFace<ChatViewInjected> & PropsLocale<'chat'>;
|
|
218
273
|
/** Full props of the durable-message image renderer. */
|
|
219
274
|
export type MessageImagesProps = PropsRuntime<'conversation.message.images'> & PropsLocale<'conversation'>;
|
|
220
275
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
@@ -226,7 +281,23 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
226
281
|
/** Chat target, transcript node, statistics, and details copy. */
|
|
227
282
|
chat: import('../locale.ts').ChatKey;
|
|
228
283
|
}
|
|
284
|
+
interface SlotFactoryMap {
|
|
285
|
+
/** Session-independent reasoning Markdown with Chat labels and compact typography. */
|
|
286
|
+
'conversation.chat.reasoning.content': {
|
|
287
|
+
scope: 'root';
|
|
288
|
+
props: ReasoningContentInput;
|
|
289
|
+
locale: 'chat';
|
|
290
|
+
};
|
|
291
|
+
}
|
|
229
292
|
interface SlotMap {
|
|
293
|
+
/** Ordered Chat rows and local echoes with viewport-bound visibility hooks. */
|
|
294
|
+
'conversation.chat.flow': {
|
|
295
|
+
kind: 'single';
|
|
296
|
+
scope: 'session';
|
|
297
|
+
owner: ChatFlowOwnerProps;
|
|
298
|
+
hookContext: ChatFlowHookContext;
|
|
299
|
+
inject: ChatFlowInjected;
|
|
300
|
+
};
|
|
230
301
|
/**
|
|
231
302
|
* Final Chat node renderer, keyed by `ChatNodeKind`. The component receives
|
|
232
303
|
* the typed node, shared Chat actions, and Turn-data hook. Reusing a key
|
|
@@ -264,6 +335,16 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
264
335
|
scope: 'session';
|
|
265
336
|
owner: CommandRowOwnerProps;
|
|
266
337
|
};
|
|
338
|
+
/**
|
|
339
|
+
* Expanded reasoning body with the unchanged model text. The official entry
|
|
340
|
+
* has priority 100 and calls the reasoning Content Factory; smaller priority
|
|
341
|
+
* values replace it. Contributions must preserve access to the original text.
|
|
342
|
+
*/
|
|
343
|
+
'conversation.chat.reasoning.body': {
|
|
344
|
+
kind: 'single';
|
|
345
|
+
scope: 'session';
|
|
346
|
+
owner: ReasoningBodyOwnerProps;
|
|
347
|
+
};
|
|
267
348
|
/**
|
|
268
349
|
* Ordered feature contributions before a completed Turn's action row. Each
|
|
269
350
|
* entry receives the Turn, closing sequence, and file opener. A fresh `id`
|
|
@@ -2,7 +2,7 @@ import type { ConversationNode, ConversationTimelineSnapshot, PartialAssistant,
|
|
|
2
2
|
import type { ChatConversationViewNode, ChatNodeDataMap, ChatNodeKind } from './chat-nodes.ts';
|
|
3
3
|
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
|
|
4
4
|
import type { TurnProcessSpec } from './turn-process.ts';
|
|
5
|
-
export type { AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig, AssistantTiming, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall, SteeringMessageNode, TodoItem, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, UnknownSurfaceNode, UserMessageNode, } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
5
|
+
export type { AssistantBlock, AssistantMessageNode, AssistantProviderMetadataView, AssistantRequestConfig, AssistantTiming, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, ModelRetryNode, PartialAssistant, PreparingToolCall, RunningToolCall, StartedToolCall, SteeringMessageNode, TodoItem, ToolArgs, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, UnknownSurfaceNode, UserMessageNode, } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
6
6
|
/** Per-key observable used by one mounted Chat Node Seat. */
|
|
7
7
|
export interface ChatNodeSource {
|
|
8
8
|
/** @returns the current Node for this source's stable key. */
|
|
@@ -23,6 +23,8 @@ export interface ChatNodeStore {
|
|
|
23
23
|
get(key: string): ChatConversationViewNode | undefined;
|
|
24
24
|
/** @param key - stable Conversation Context key. @returns its identity-stable observable source. */
|
|
25
25
|
source(key: string): ChatNodeSource;
|
|
26
|
+
/** @param key - Chat Node identity. @returns whether the visible Node belongs to the last Turn in the loaded timeline. */
|
|
27
|
+
bottomSource(key: string): ObservableSnapshot<boolean>;
|
|
26
28
|
/**
|
|
27
29
|
* Observe one Turn's data for a single Node kind, including hidden Nodes, in anchor order.
|
|
28
30
|
* Other Turns and kinds do not notify this source.
|
|
@@ -75,7 +77,7 @@ export interface ChatTurnProcessPresentation {
|
|
|
75
77
|
readonly hasInterleavedInput: boolean;
|
|
76
78
|
readonly compactAnswer: boolean;
|
|
77
79
|
}
|
|
78
|
-
/** Compatibility projection backing StatsPills and the legacy top-level snapshot fields. */
|
|
80
|
+
/** Compatibility projection backing the composer stats pills (StatsPills.tsx) and the legacy top-level snapshot fields. */
|
|
79
81
|
export interface LegacyConversationSlice {
|
|
80
82
|
readonly nodes: readonly ConversationNode[];
|
|
81
83
|
readonly turnTimings: ReadonlyMap<number, {
|