@deepseek-ai/dsh-client-ui-chat 0.1.3-alpha.2 → 0.1.5-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 +2 -2
- package/README.md +6 -6
- package/README.zh.md +6 -4
- package/lib/client.js +430 -409
- package/lib/types/client/chat/AssistantMarkdown.d.ts +11 -0
- package/lib/types/client/chat/ChatNodeSeat.d.ts +1 -1
- package/lib/types/client/chat/ReasoningRow.d.ts +3 -1
- package/lib/types/client/chat/{StatsLine.d.ts → StatsPills.d.ts} +3 -3
- package/lib/types/client/chat/SystemPromptRow.d.ts +6 -3
- package/lib/types/client/chat/stat-dialog.d.ts +22 -0
- package/lib/types/client/contract/slots.d.ts +12 -29
- package/lib/types/client/contract/snapshot.d.ts +1 -1
- package/lib/types/client/contract/store.d.ts +1 -9
- package/lib/types/client/conversation-nodes/request-prompt.d.ts +18 -4
- package/lib/types/client/conversation-nodes/tool.d.ts +1 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/locale.d.ts +14 -28
- package/lib/types/client/model/tool-call-tree.d.ts +2 -2
- package/lib/types/client/stores.d.ts +3 -4
- package/package.json +32 -28
- package/lib/types/client/details/DetailsPanel.d.ts +0 -4
- package/lib/types/client/details/tool-node-reader.d.ts +0 -9
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { MarkdownFileMentions } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
2
2
|
import type { ChatNodeOwnerProps, ChatViewSlotProps } from '../contract/slots.ts';
|
|
3
3
|
import type { AssistantBlock } from '../contract/snapshot.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Map one authored media destination to the same-origin workspace-file URL.
|
|
6
|
+
* @param protocol - `window.location.protocol` at render time.
|
|
7
|
+
* @param origin - `window.location.origin` at render time.
|
|
8
|
+
* @param value - The authored markdown destination, exactly as written.
|
|
9
|
+
* @returns The API URL for an absolute POSIX path on an HTTP(S) page, or
|
|
10
|
+
* undefined when the destination cannot be a Host-served local file
|
|
11
|
+
* (non-HTTP transport such as Electron `file://`, protocol-relative or
|
|
12
|
+
* relative destinations).
|
|
13
|
+
*/
|
|
14
|
+
export declare function localPathMediaUrl(protocol: string, origin: string, value: string): string | undefined;
|
|
4
15
|
export interface AssistantMarkdownProps {
|
|
5
16
|
blocks: readonly AssistantBlock[];
|
|
6
17
|
streaming: boolean;
|
|
@@ -11,6 +11,6 @@ interface ChatNodeSeatProps extends ChatNodeOwnerProps {
|
|
|
11
11
|
readonly t: ChatViewSlotProps['t'];
|
|
12
12
|
}
|
|
13
13
|
/** Subscribe, apply Turn-process visibility, and dispatch one stable Context key. */
|
|
14
|
-
export declare const ChatNodeSeat: import("react").MemoExoticComponent<({ nodeKey, useChatNode, useChatNodeProcess, historyIncomplete, compactTranscript,
|
|
14
|
+
export declare const ChatNodeSeat: import("react").MemoExoticComponent<({ nodeKey, useChatNode, useChatNodeProcess, historyIncomplete, compactTranscript, cwd, openFile, inspectCall, forkAt, loadImage, renderMessageImages, fileMentions, useStore, actions, renderSlot, t, }: ChatNodeSeatProps) => import("react").JSX.Element | null>;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=ChatNodeSeat.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ChatViewSlotProps } from '../contract/slots.ts';
|
|
2
2
|
/**
|
|
3
|
-
* Render one assistant reasoning block as the Think disclosure row.
|
|
3
|
+
* Render one assistant reasoning block as the Think disclosure row. The
|
|
4
|
+
* collapsed summary omits double-asterisk markers; expanded content preserves
|
|
5
|
+
* the complete text.
|
|
4
6
|
* @param props.text - complete or streaming reasoning text.
|
|
5
7
|
* @param props.running - whether this block is the streaming tail.
|
|
6
8
|
* @param props.t - conversation locale seat for the running status.
|
|
@@ -53,12 +53,12 @@ export declare function cacheHitPercent(usage: TokenUsageProjection): string | n
|
|
|
53
53
|
*/
|
|
54
54
|
export declare function billedInputTokens(usage: TokenUsageProjection): number;
|
|
55
55
|
/** Props: the conversation-snapshot selector plus the projection read seat. */
|
|
56
|
-
export interface
|
|
56
|
+
export interface StatsPillsProps {
|
|
57
57
|
useChat: SnapshotSelectorHook<ChatSnapshot>;
|
|
58
58
|
useProjection: UseProjection;
|
|
59
59
|
/** The owning dock's locale seat. */
|
|
60
60
|
t: ChatViewSlotProps['t'];
|
|
61
61
|
}
|
|
62
|
-
export declare const
|
|
62
|
+
export declare const StatsPills: import("react").MemoExoticComponent<({ useChat, useProjection, t }: StatsPillsProps) => import("react").JSX.Element | null>;
|
|
63
63
|
export {};
|
|
64
|
-
//# sourceMappingURL=
|
|
64
|
+
//# sourceMappingURL=StatsPills.d.ts.map
|
|
@@ -3,17 +3,20 @@ import type { ChatNodeViewProps, ChatViewSlotProps } from '../contract/slots.ts'
|
|
|
3
3
|
export interface SystemPromptRowProps {
|
|
4
4
|
/** Complete model-visible prompt text. */
|
|
5
5
|
text: string;
|
|
6
|
+
/** True when the prompt replaced an earlier one from this position in the history. */
|
|
7
|
+
update?: boolean;
|
|
6
8
|
/** The owning view's locale seat. */
|
|
7
9
|
t: ChatViewSlotProps['t'];
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Render one complete system prompt as a collapsed disclosure whose expanded
|
|
11
13
|
* body is the same opaque context chrome: 141px code-block scrollport and
|
|
12
|
-
* model-facing text with its real line breaks.
|
|
13
|
-
*
|
|
14
|
+
* model-facing text with its real line breaks. An in-history update uses the
|
|
15
|
+
* same row under its own title.
|
|
16
|
+
* @param props - Complete prompt text, whether it is an update, and the locale seat.
|
|
14
17
|
* @returns The system-prompt disclosure row.
|
|
15
18
|
*/
|
|
16
|
-
export declare function SystemPromptRow({ text, t }: SystemPromptRowProps): import("react").JSX.Element;
|
|
19
|
+
export declare function SystemPromptRow({ text, update, t }: SystemPromptRowProps): import("react").JSX.Element;
|
|
17
20
|
/** System-prompt keyed Chat renderer. */
|
|
18
21
|
export declare const SystemPromptNodeView: import("react").MemoExoticComponent<({ node, t, }: Pick<ChatNodeViewProps<"system-prompt">, "node" | "t">) => import("react").JSX.Element>;
|
|
19
22
|
//# sourceMappingURL=SystemPromptRow.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CSSProperties, type MutableRefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Unplaced portal panel: hidden but laid out so the clamp measures real
|
|
4
|
+
* dimensions (the `useAnchoredPosition` measure pass).
|
|
5
|
+
*/
|
|
6
|
+
export declare const MEASURE_STYLE: CSSProperties;
|
|
7
|
+
/** Open state, refs, and clamped placement for one stat dialog. */
|
|
8
|
+
export interface StatDialogSeat {
|
|
9
|
+
open: boolean;
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
rootRef: MutableRefObject<HTMLSpanElement | null>;
|
|
12
|
+
panelRef: MutableRefObject<HTMLDivElement | null>;
|
|
13
|
+
pos: CSSProperties | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
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
|
+
* @returns the seat; spread `pos ?? MEASURE_STYLE` onto the portaled panel.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useStatDialog(controlled?: Pick<StatDialogSeat, 'open' | 'setOpen'>): StatDialogSeat;
|
|
22
|
+
//# sourceMappingURL=stat-dialog.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** Chat-owned Slot declarations and composed component props. */
|
|
2
2
|
import type { MessageId } from '@deepseek-ai/dsh-llm/brand';
|
|
3
|
-
import type { SessionSeq } from '@deepseek-ai/dsh-session/types';
|
|
4
|
-
import type { CommandNode, CompactionSummaryNode, ConversationLocationDataStore, ConversationTurnDataMap, MessageImageLoader, MessageImagesOwnerProps, RenderMessageImages,
|
|
3
|
+
import type { SessionId, SessionSeq } from '@deepseek-ai/dsh-session/types';
|
|
4
|
+
import type { CommandNode, CompactionSummaryNode, ConversationLocationDataStore, ConversationTurnDataMap, MessageImageLoader, MessageImagesOwnerProps, RenderMessageImages, TurnLocation } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
5
5
|
import type { InjectFace, KeyedSnapshotSelectorHook, PropsLocale, PropsRenderSlots, PropsRuntime, PropsStore, SlotHookFactory, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
|
|
6
6
|
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
7
7
|
import type { MarkdownFileMentions } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
8
8
|
import type { createChatStore } from '../stores.ts';
|
|
9
|
-
import type { ToolCallId
|
|
9
|
+
import type { ToolCallId } from './store.ts';
|
|
10
10
|
import type { ChatConversationViewNode, ChatNode, ChatNodeKind } from './chat-nodes.ts';
|
|
11
11
|
import type { ChatNodeProcessSource, ChatNodeSource, ChatSnapshot, ChatTurnProcessPresentation } from './snapshot.ts';
|
|
12
12
|
import type { TurnProcessSpec } from './turn-process.ts';
|
|
@@ -17,6 +17,11 @@ export type UseChat = SnapshotSelectorHook<ChatSnapshot>;
|
|
|
17
17
|
export type UseChatNode = KeyedSnapshotSelectorHook<ChatConversationViewNode | undefined>;
|
|
18
18
|
/** Per-key selector hook over one Chat Node's Turn-process presentation. */
|
|
19
19
|
export type UseChatNodeProcess = KeyedSnapshotSelectorHook<ChatTurnProcessPresentation | undefined>;
|
|
20
|
+
/** Where in a file an open should land. */
|
|
21
|
+
export interface OpenFileOptions {
|
|
22
|
+
/** 1-based line to reveal; absent = the file's beginning. */
|
|
23
|
+
readonly line?: number;
|
|
24
|
+
}
|
|
20
25
|
/** Owner currency of the completed-Turn extension chain. */
|
|
21
26
|
export interface TurnTailOwnerProps {
|
|
22
27
|
turn: TurnLocation;
|
|
@@ -32,9 +37,10 @@ export interface ChatFileMentions {
|
|
|
32
37
|
/**
|
|
33
38
|
* Resolve prose links for one closing Turn.
|
|
34
39
|
* @param owner - closing-Turn identity and file opener.
|
|
40
|
+
* @param sessionId - viewed Session, including when history is inherited from a fork.
|
|
35
41
|
* @returns link resolver when available.
|
|
36
42
|
*/
|
|
37
|
-
forClosing(owner: TurnTailOwnerProps): MarkdownFileMentions | undefined;
|
|
43
|
+
forClosing(owner: TurnTailOwnerProps, sessionId: SessionId): MarkdownFileMentions | undefined;
|
|
38
44
|
}
|
|
39
45
|
declare module '@deepseek-ai/cordis' {
|
|
40
46
|
interface Context {
|
|
@@ -52,9 +58,8 @@ export interface ChatNodeTurnDataInjected {
|
|
|
52
58
|
}
|
|
53
59
|
/** Stable owner currency delivered to a keyed Chat renderer. */
|
|
54
60
|
export interface ChatNodeOwnerProps {
|
|
55
|
-
selectedCallId?: ToolCallId | undefined;
|
|
56
61
|
cwd?: string | undefined;
|
|
57
|
-
openFile: (path: string) => void;
|
|
62
|
+
openFile: (path: string, options?: OpenFileOptions) => void;
|
|
58
63
|
inspectCall: (callId: ToolCallId) => void;
|
|
59
64
|
forkAt: (seq: number) => void;
|
|
60
65
|
/**
|
|
@@ -78,11 +83,6 @@ export interface TurnProcessOwnerProps {
|
|
|
78
83
|
}
|
|
79
84
|
/** Full props of one keyed Chat renderer. */
|
|
80
85
|
export type ChatNodeViewProps<Kind extends ChatNodeKind = ChatNodeKind> = PropsRuntime<'conversation.chat.node', Kind> & PropsLocale<'chat'>;
|
|
81
|
-
/** Tool block rendered in the details panel. */
|
|
82
|
-
export interface DetailsToolOwnerProps {
|
|
83
|
-
block: ToolCallBlock;
|
|
84
|
-
cwd?: string | undefined;
|
|
85
|
-
}
|
|
86
86
|
/** Command-row owner share. */
|
|
87
87
|
export interface CommandRowOwnerProps {
|
|
88
88
|
node: CommandNode;
|
|
@@ -110,8 +110,7 @@ export interface ChatViewInjected {
|
|
|
110
110
|
/** Resolve the stable Turn-process source for one Chat Node key. */
|
|
111
111
|
chatNodeProcess: (key: string) => ChatNodeProcessSource;
|
|
112
112
|
};
|
|
113
|
-
|
|
114
|
-
openFile: (path: string) => Promise<void>;
|
|
113
|
+
openFile: (path: string, options?: OpenFileOptions) => Promise<void>;
|
|
115
114
|
loadOlder: () => void;
|
|
116
115
|
/** Jump loader: page history back through seq; resolves when the window covers it. */
|
|
117
116
|
loadThrough: (seq: SessionSeq) => Promise<void>;
|
|
@@ -127,12 +126,6 @@ export interface ChatViewInjected {
|
|
|
127
126
|
export type ChatViewSlotProps = PropsRuntime<'conversation.view'> & PropsRenderSlots<'conversation.chat.node' | 'conversation.message.images'> & PropsStore<ChatStore> & InjectFace<ChatViewInjected> & PropsLocale<'chat'>;
|
|
128
127
|
/** Full props of the durable-message image renderer. */
|
|
129
128
|
export type MessageImagesProps = PropsRuntime<'conversation.message.images'> & PropsLocale<'conversation'>;
|
|
130
|
-
/** Details-panel callbacks. */
|
|
131
|
-
export interface DetailsInjected {
|
|
132
|
-
closeDetails: () => void;
|
|
133
|
-
}
|
|
134
|
-
/** Full details-panel props. */
|
|
135
|
-
export type DetailsSlotProps = PropsRuntime<'details'> & PropsRenderSlots<'conversation.details.tool'> & PropsStore<ChatStore> & InjectFace<DetailsInjected> & PropsLocale<'chat'>;
|
|
136
129
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
137
130
|
interface SessionStandardProps {
|
|
138
131
|
/** Selector hook over the current Conversation binding's Chat target. */
|
|
@@ -200,16 +193,6 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
200
193
|
scope: 'session';
|
|
201
194
|
owner: AssistantActionOwnerProps;
|
|
202
195
|
};
|
|
203
|
-
/**
|
|
204
|
-
* Whole details-panel body for the selected Tool call. The component receives
|
|
205
|
-
* the running or settled block and optional workspace root. A registration
|
|
206
|
-
* replaces the shipped Tool details renderer; absence uses the raw fallback.
|
|
207
|
-
*/
|
|
208
|
-
'conversation.details.tool': {
|
|
209
|
-
kind: 'single';
|
|
210
|
-
scope: 'session';
|
|
211
|
-
owner: DetailsToolOwnerProps;
|
|
212
|
-
};
|
|
213
196
|
}
|
|
214
197
|
}
|
|
215
198
|
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -62,7 +62,7 @@ export interface ChatTurnProcessPresentation {
|
|
|
62
62
|
readonly hasExternalProcess: boolean;
|
|
63
63
|
readonly compactAnswer: boolean;
|
|
64
64
|
}
|
|
65
|
-
/** Compatibility projection backing
|
|
65
|
+
/** Compatibility projection backing StatsPills and the legacy top-level snapshot fields. */
|
|
66
66
|
export interface LegacyConversationSlice {
|
|
67
67
|
readonly nodes: readonly ConversationNode[];
|
|
68
68
|
readonly turnTimings: ReadonlyMap<number, {
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/** Chat-owned
|
|
1
|
+
/** Chat-owned per-Session view state. */
|
|
2
2
|
/** Tool call identity as carried by Chat nodes. */
|
|
3
3
|
export type ToolCallId = string;
|
|
4
|
-
/** Selection target for the Chat details linkage channel. */
|
|
5
|
-
export interface SelectionTarget {
|
|
6
|
-
turnSeq: number;
|
|
7
|
-
stepSeq?: number;
|
|
8
|
-
callId?: ToolCallId;
|
|
9
|
-
toolName?: string;
|
|
10
|
-
}
|
|
11
4
|
/** One manually expanded Turn answer generation. */
|
|
12
5
|
export interface TurnProcessViewEntry {
|
|
13
6
|
readonly turn: number;
|
|
@@ -15,7 +8,6 @@ export interface TurnProcessViewEntry {
|
|
|
15
8
|
}
|
|
16
9
|
/** Per-Session state shared only by the Chat view and details surface. */
|
|
17
10
|
export interface ChatStoreState {
|
|
18
|
-
selection: SelectionTarget | null;
|
|
19
11
|
turnProcesses: TurnProcessViewEntry[];
|
|
20
12
|
}
|
|
21
13
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import type { ConversationNodeDefinition, RequestPromptInspector } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { ConversationNodeDefinition, RequestPromptInspector, SystemPromptState, SystemPromptInspector } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
3
3
|
declare module '../contract/chat-nodes.ts' {
|
|
4
4
|
interface ChatNodeDataMap {
|
|
5
|
-
/** Complete system prompt rendered for one model request. */
|
|
5
|
+
/** Complete system prompt rendered for one model request, or an in-history prompt update at its own position. */
|
|
6
6
|
'system-prompt': {
|
|
7
7
|
readonly text: string;
|
|
8
|
+
readonly update?: true;
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
11
|
}
|
|
@@ -15,14 +16,27 @@ interface RequestPromptState extends ReturnType<RequestPromptInspector> {
|
|
|
15
16
|
readonly step?: number;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* System-prompt surface node Definition for the Chat target. It owns every
|
|
20
|
+
* `system/message` event on the Chat target so the unknown-surface fallback
|
|
21
|
+
* never renders the prompt as a transcript row. Each nonempty append owns a
|
|
22
|
+
* prompt card, even without a loaded request header. Initial cards precede
|
|
23
|
+
* their step's input; in-history updates stay at their own positions. The
|
|
24
|
+
* request-prompt Definition owns replacement and later-series cards. Positional
|
|
25
|
+
* replacements advance the effective prompt without changing historical cards.
|
|
26
|
+
* @param inspect - Pure surface interpretation supplied by uiConversation.
|
|
27
|
+
* @returns The Chat system-prompt Definition.
|
|
28
|
+
*/
|
|
29
|
+
export declare function systemMessageDefinition(inspect: SystemPromptInspector): ConversationNodeDefinition<SystemPromptState>;
|
|
30
|
+
/**
|
|
31
|
+
* Request-header prompt Definition for the Chat target. Resume and explicit
|
|
32
|
+
* series starts retain a prompt card even when the system text is unchanged.
|
|
19
33
|
* @param inspect - the shared prompt interpretation, supplied by the
|
|
20
34
|
* uiConversation service (a client bundle cannot value-import it).
|
|
21
35
|
* @returns the Chat request-prompt Definition.
|
|
22
36
|
*/
|
|
23
37
|
export declare function requestPromptDefinition(inspect: RequestPromptInspector): ConversationNodeDefinition<RequestPromptState>;
|
|
24
38
|
/**
|
|
25
|
-
* Register model-request
|
|
39
|
+
* Register the system-prompt surface node and the model-request prompt card in the Chat flow.
|
|
26
40
|
* @param ctx - Owning UI Conversation context.
|
|
27
41
|
*/
|
|
28
42
|
export declare function registerRequestPromptConversationNode(ctx: Context): void;
|
|
@@ -11,7 +11,7 @@ interface ToolState {
|
|
|
11
11
|
readonly children: ReadonlyMap<string, readonly ToolCallBlock[]>;
|
|
12
12
|
readonly parents: ReadonlyMap<string, string>;
|
|
13
13
|
}
|
|
14
|
-
/** Root Tool lifecycle and nested
|
|
14
|
+
/** Root Tool lifecycle and nested PTC dispatch Definition. */
|
|
15
15
|
export declare const toolDefinition: ConversationNodeDefinition<ToolState>;
|
|
16
16
|
/**
|
|
17
17
|
* Register the root Tool lifecycle and nested-subcall contribution.
|
|
@@ -14,10 +14,10 @@ export type {} from './conversation-nodes/turn-process.ts';
|
|
|
14
14
|
export type {} from './conversation-nodes/turn-tail.ts';
|
|
15
15
|
export type { AssistantBlock, AssistantMessageNode, AssistantProvenanceView, AssistantRequestConfig, AssistantTiming, ChatLocationNodeIndex, ChatNodeProcessSource, ChatNodeSource, ChatNodeStore, ChatSnapshot, ChatTurnNavigationIndex, ChatTurnProcessPresentation, CommandNode, CompactionSummaryNode, ContextMessageNode, ConversationNode, LegacyConversationSlice, ModelRetryNode, PartialAssistant, RunningToolCall, SteeringMessageNode, ToolCallBlock, ToolResultNode, TurnErrorNode, TurnMaxTokensNode, TurnNavigationItem, UnknownSurfaceNode, UserMessageNode, } from './contract/snapshot.ts';
|
|
16
16
|
export type { AssistantChatData, ChatConversationViewNode, ChatNode, ChatNodeKind, FinalAssistantChatData, ManualCompactionChatData, RetryChatData, ToolChatData, TurnProcessChatData, TurnTailChatData, } from './contract/chat-nodes.ts';
|
|
17
|
-
export type { ChatStoreState,
|
|
17
|
+
export type { ChatStoreState, ToolCallId, TurnProcessViewEntry } from './contract/store.ts';
|
|
18
18
|
export type { TranscriptViewRowInjected, TranscriptViewRowProps } from './settings/TranscriptViewRow.tsx';
|
|
19
19
|
export type { TranscriptViewMode } from '../chat-settings.ts';
|
|
20
|
-
export type { AssistantActionOwnerProps, ChatFileMentions, ChatNodeOwnerProps, ChatNodeTurnDataInjected, ChatNodeViewProps, ChatScrollPosition, ChatStore, ChatViewInjected, ChatViewSlotProps, CommandRowOwnerProps, CommandRowProps,
|
|
20
|
+
export type { AssistantActionOwnerProps, ChatFileMentions, ChatNodeOwnerProps, ChatNodeTurnDataInjected, ChatNodeViewProps, ChatScrollPosition, ChatStore, ChatViewInjected, ChatViewSlotProps, CommandRowOwnerProps, CommandRowProps, MessageImagesProps, OpenFileOptions, TurnProcessOwnerProps, TurnTailOwnerProps, UseChat, UseChatNodeTurnData, } from './contract/slots.ts';
|
|
21
21
|
export type { TurnProcessSpec, } from './contract/turn-process.ts';
|
|
22
22
|
export type { ChatKey } from './locale.ts';
|
|
23
23
|
export type { ConversationContext, ConversationContextOriginKind } from './model/conversation-context.ts';
|
|
@@ -9,19 +9,13 @@ export declare const zh: {
|
|
|
9
9
|
'duration.compactMinutes': string;
|
|
10
10
|
'duration.milliseconds': string;
|
|
11
11
|
'stats.counts': string;
|
|
12
|
-
'stats.llm': string;
|
|
13
|
-
'stats.toolCall': string;
|
|
14
|
-
'stats.ttftAverage': string;
|
|
15
|
-
'stats.tokensPerSecond': string;
|
|
16
12
|
'stats.cacheHit': string;
|
|
17
|
-
'stats.
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'details.output': string;
|
|
24
|
-
'details.running': string;
|
|
13
|
+
'stats.dialog.title': string;
|
|
14
|
+
'stats.dialog.usageTitle': string;
|
|
15
|
+
'stats.dialog.llmTime': string;
|
|
16
|
+
'stats.dialog.toolTime': string;
|
|
17
|
+
'stats.dialog.ttft': string;
|
|
18
|
+
'stats.dialog.speed': string;
|
|
25
19
|
'chat.loadingHistory': string;
|
|
26
20
|
'chat.loadError': string;
|
|
27
21
|
'chat.loadOlder': string;
|
|
@@ -37,10 +31,9 @@ export declare const zh: {
|
|
|
37
31
|
'settings.transcript.compact': string;
|
|
38
32
|
'fileOpen.title': string;
|
|
39
33
|
'fileOpen.unknown': string;
|
|
40
|
-
'fileOpen.folderTitle': string;
|
|
41
|
-
'fileOpen.folderUnknown': string;
|
|
42
34
|
'message.extraBlock': string;
|
|
43
35
|
'message.systemPrompt': string;
|
|
36
|
+
'message.systemPromptUpdate': string;
|
|
44
37
|
'message.contextInjection': string;
|
|
45
38
|
'message.contextRecall': string;
|
|
46
39
|
'message.referenceSummary': string;
|
|
@@ -124,19 +117,13 @@ export declare const en: {
|
|
|
124
117
|
'duration.compactMinutes': string;
|
|
125
118
|
'duration.milliseconds': string;
|
|
126
119
|
'stats.counts': string;
|
|
127
|
-
'stats.llm': string;
|
|
128
|
-
'stats.toolCall': string;
|
|
129
|
-
'stats.ttftAverage': string;
|
|
130
|
-
'stats.tokensPerSecond': string;
|
|
131
120
|
'stats.cacheHit': string;
|
|
132
|
-
'stats.
|
|
133
|
-
'
|
|
134
|
-
'
|
|
135
|
-
'
|
|
136
|
-
'
|
|
137
|
-
'
|
|
138
|
-
'details.output': string;
|
|
139
|
-
'details.running': string;
|
|
121
|
+
'stats.dialog.title': string;
|
|
122
|
+
'stats.dialog.usageTitle': string;
|
|
123
|
+
'stats.dialog.llmTime': string;
|
|
124
|
+
'stats.dialog.toolTime': string;
|
|
125
|
+
'stats.dialog.ttft': string;
|
|
126
|
+
'stats.dialog.speed': string;
|
|
140
127
|
'chat.loadingHistory': string;
|
|
141
128
|
'chat.loadError': string;
|
|
142
129
|
'chat.loadOlder': string;
|
|
@@ -152,10 +139,9 @@ export declare const en: {
|
|
|
152
139
|
'settings.transcript.compact': string;
|
|
153
140
|
'fileOpen.title': string;
|
|
154
141
|
'fileOpen.unknown': string;
|
|
155
|
-
'fileOpen.folderTitle': string;
|
|
156
|
-
'fileOpen.folderUnknown': string;
|
|
157
142
|
'message.extraBlock': string;
|
|
158
143
|
'message.systemPrompt': string;
|
|
144
|
+
'message.systemPromptUpdate': string;
|
|
159
145
|
'message.contextInjection': string;
|
|
160
146
|
'message.contextRecall': string;
|
|
161
147
|
'message.referenceSummary': string;
|
|
@@ -3,7 +3,7 @@ import type { ConversationNode, RunningToolCall } from '@deepseek-ai/dsh-client-
|
|
|
3
3
|
/** Fixed wire-safety ceiling for every recursive Tool call consumer. */
|
|
4
4
|
export declare const MAX_TOOL_CALL_TREE_DEPTH = 256;
|
|
5
5
|
/**
|
|
6
|
-
* Owns
|
|
6
|
+
* Owns PTC dispatch pairing and projects its private parent index into the
|
|
7
7
|
* recursive Tool call contract exposed by conversation snapshots.
|
|
8
8
|
*/
|
|
9
9
|
export declare class ToolCallTree {
|
|
@@ -16,7 +16,7 @@ export declare class ToolCallTree {
|
|
|
16
16
|
/** Forget all event-derived child calls before replaying a new window. */
|
|
17
17
|
reset(): void;
|
|
18
18
|
/**
|
|
19
|
-
* Fold one event when it belongs to the
|
|
19
|
+
* Fold one event when it belongs to the PTC dispatch lifecycle.
|
|
20
20
|
* @param event - Session event from the current live or history window.
|
|
21
21
|
* @returns Whether the event was consumed as a child-call lifecycle event.
|
|
22
22
|
*/
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/** Per-Session Chat
|
|
1
|
+
/** Per-Session Chat view store. */
|
|
2
2
|
import { type EngineStoreHandle } from '@deepseek-ai/dsh-client-store';
|
|
3
|
-
import type { ChatStoreState,
|
|
3
|
+
import type { ChatStoreState, TurnProcessViewEntry } from './contract/store.ts';
|
|
4
4
|
type ChatActions = {
|
|
5
|
-
select: (draft: ChatStoreState, target: SelectionTarget | null) => void;
|
|
6
5
|
setTurnProcessOpen: (draft: ChatStoreState, turn: number, answerStep: number, open: boolean) => void;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
@@ -13,7 +12,7 @@ type ChatActions = {
|
|
|
13
12
|
*/
|
|
14
13
|
export declare function storedTurnProcessEntry(state: Readonly<ChatStoreState>, turn: number): Readonly<TurnProcessViewEntry> | undefined;
|
|
15
14
|
/**
|
|
16
|
-
* Create the Chat
|
|
15
|
+
* Create the Chat view store handle.
|
|
17
16
|
* @returns a handle instantiated once per rendered Session scope.
|
|
18
17
|
*/
|
|
19
18
|
export declare function createChatStore(): EngineStoreHandle<ChatStoreState, ChatActions>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-chat",
|
|
3
3
|
"description": "Chat Conversation target, node definitions, renderers, and details surface",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@deepseek-ai/dsh-client-ui-layout",
|
|
36
36
|
"@deepseek-ai/dsh-client-ui-renderer",
|
|
37
37
|
"@deepseek-ai/dsh-client-ui-session",
|
|
38
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
38
39
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
39
40
|
"@deepseek-ai/dsh-client-ui-workspace"
|
|
40
41
|
],
|
|
@@ -51,33 +52,36 @@
|
|
|
51
52
|
"react": "^18.2.0",
|
|
52
53
|
"react-dom": "^18.2.0",
|
|
53
54
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
54
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
55
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.
|
|
57
|
-
"@deepseek-ai/dsh-api-workspace-controller": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-client-
|
|
61
|
-
"@deepseek-ai/dsh-client-
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.
|
|
70
|
-
"@deepseek-ai/dsh-commands": "^0.1.
|
|
71
|
-
"@deepseek-ai/dsh-compaction": "^0.1.
|
|
72
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
73
|
-
"@deepseek-ai/dsh-llm-retry": "^0.1.
|
|
74
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
75
|
-
"@deepseek-ai/dsh-session-stats": "^0.1.
|
|
76
|
-
"@deepseek-ai/dsh-
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/dsh-token-meter": "^0.1.
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-
|
|
55
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.5-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.5-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-api-workspace-controller": "^0.1.5-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-api-workspace-files": "^0.1.5-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-attachment": "^0.1.5-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.5-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-store": "^0.1.5-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-approval": "^0.1.5-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.5-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.5-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "^0.1.5-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.5-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.5-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-commands": "^0.1.5-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-compaction": "^0.1.5-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
|
|
74
|
+
"@deepseek-ai/dsh-llm-retry": "^0.1.5-alpha.2",
|
|
75
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
|
|
76
|
+
"@deepseek-ai/dsh-session-stats": "^0.1.5-alpha.2",
|
|
77
|
+
"@deepseek-ai/dsh-session-turn-outline": "^0.1.5-alpha.2",
|
|
78
|
+
"@deepseek-ai/dsh-settings": "^0.1.5-alpha.2",
|
|
79
|
+
"@deepseek-ai/dsh-token-meter": "^0.1.5-alpha.2",
|
|
80
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.2",
|
|
81
|
+
"@deepseek-ai/dsh-util-workspace-path": "^0.1.5-alpha.2",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.5-alpha.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-sidebar-documentpreview": "^0.1.5-alpha.2",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.5-alpha.2"
|
|
81
85
|
},
|
|
82
86
|
"dependencies": {
|
|
83
87
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DetailsSlotProps } from '../contract/slots.ts';
|
|
2
|
-
export type DetailsPanelProps = DetailsSlotProps;
|
|
3
|
-
export declare function DetailsPanel({ useChat, useSessions, sessionId, useStore, renderSlot, closeDetails, t }: DetailsPanelProps): import("react").JSX.Element;
|
|
4
|
-
//# sourceMappingURL=DetailsPanel.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ChatSnapshot, ToolCallBlock } from '../contract/snapshot.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Find any root or nested Tool lifecycle through the internal Node store.
|
|
4
|
-
* @param snapshot - current Conversation snapshot.
|
|
5
|
-
* @param callId - root or nested call identity.
|
|
6
|
-
* @returns current Tool lifecycle when materialized in the loaded window.
|
|
7
|
-
*/
|
|
8
|
-
export declare function findToolCall(snapshot: ChatSnapshot, callId: string): ToolCallBlock | undefined;
|
|
9
|
-
//# sourceMappingURL=tool-node-reader.d.ts.map
|