@deepseek-ai/dsh-client-ui-conversation 0.0.1-rc.1

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.
Files changed (77) hide show
  1. package/LICENSE +28 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +65 -0
  4. package/README.zh.md +65 -0
  5. package/lib/client.js +9612 -0
  6. package/lib/index.js +28 -0
  7. package/lib/invariant.js +25 -0
  8. package/lib/types/client/apply.d.ts +16 -0
  9. package/lib/types/client/chat/AssistantMarkdown.d.ts +19 -0
  10. package/lib/types/client/chat/AssistantNodeView.d.ts +4 -0
  11. package/lib/types/client/chat/ChatNodeSeat.d.ts +11 -0
  12. package/lib/types/client/chat/ChatView.d.ts +7 -0
  13. package/lib/types/client/chat/CommandNodeView.d.ts +9 -0
  14. package/lib/types/client/chat/CompactionCommandCard.d.ts +8 -0
  15. package/lib/types/client/chat/CompactionItem.d.ts +19 -0
  16. package/lib/types/client/chat/ContextBody.d.ts +130 -0
  17. package/lib/types/client/chat/ContextInjectionRow.d.ts +26 -0
  18. package/lib/types/client/chat/GenericCommandCard.d.ts +9 -0
  19. package/lib/types/client/chat/MessageIconActions.d.ts +30 -0
  20. package/lib/types/client/chat/MessageImage.d.ts +20 -0
  21. package/lib/types/client/chat/MessageItem.d.ts +27 -0
  22. package/lib/types/client/chat/ReasoningRow.d.ts +14 -0
  23. package/lib/types/client/chat/StatsLine.d.ts +83 -0
  24. package/lib/types/client/chat/TurnTailNodeView.d.ts +7 -0
  25. package/lib/types/client/chat/message-chrome.d.ts +49 -0
  26. package/lib/types/client/chat/register-node-renderers.d.ts +7 -0
  27. package/lib/types/client/chat/tool-node-reader.d.ts +16 -0
  28. package/lib/types/client/chat/turn-assistant.d.ts +8 -0
  29. package/lib/types/client/chat/turn-metrics.d.ts +38 -0
  30. package/lib/types/client/chat/use-calendar-day.d.ts +6 -0
  31. package/lib/types/client/chat/use-throttled-visual-update.d.ts +8 -0
  32. package/lib/types/client/contract/chat-nodes.d.ts +68 -0
  33. package/lib/types/client/contract/composer-submission.d.ts +8 -0
  34. package/lib/types/client/contract/queue.d.ts +9 -0
  35. package/lib/types/client/contract/slots.d.ts +614 -0
  36. package/lib/types/client/contract/views.d.ts +39 -0
  37. package/lib/types/client/conversation-nodes/assistant.d.ts +35 -0
  38. package/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +28 -0
  39. package/lib/types/client/conversation-nodes/command.d.ts +54 -0
  40. package/lib/types/client/conversation-nodes/common.d.ts +37 -0
  41. package/lib/types/client/conversation-nodes/compaction.d.ts +21 -0
  42. package/lib/types/client/conversation-nodes/fallback.d.ts +16 -0
  43. package/lib/types/client/conversation-nodes/inbox.d.ts +21 -0
  44. package/lib/types/client/conversation-nodes/message.d.ts +22 -0
  45. package/lib/types/client/conversation-nodes/register.d.ts +7 -0
  46. package/lib/types/client/conversation-nodes/retry.d.ts +23 -0
  47. package/lib/types/client/conversation-nodes/tool.d.ts +23 -0
  48. package/lib/types/client/conversation-nodes/turn-error.d.ts +27 -0
  49. package/lib/types/client/conversation-nodes/turn-tail.d.ts +28 -0
  50. package/lib/types/client/index.d.ts +29 -0
  51. package/lib/types/client/input/blocks.d.ts +57 -0
  52. package/lib/types/client/input/contract.d.ts +333 -0
  53. package/lib/types/client/input/decorations.d.ts +63 -0
  54. package/lib/types/client/input/facade.d.ts +219 -0
  55. package/lib/types/client/input/hub.d.ts +88 -0
  56. package/lib/types/client/input/machine.d.ts +114 -0
  57. package/lib/types/client/input/submission-policy.d.ts +46 -0
  58. package/lib/types/client/locales.d.ts +312 -0
  59. package/lib/types/client/queue/QueueDock.d.ts +29 -0
  60. package/lib/types/client/queue/store.d.ts +19 -0
  61. package/lib/types/client/service.d.ts +148 -0
  62. package/lib/types/client/settings/EnterBehaviorRow.d.ts +21 -0
  63. package/lib/types/client/skeleton/ApprovalPanel.d.ts +13 -0
  64. package/lib/types/client/skeleton/ContextMeter.d.ts +14 -0
  65. package/lib/types/client/skeleton/ConversationRoot.d.ts +5 -0
  66. package/lib/types/client/skeleton/ConversationSession.d.ts +20 -0
  67. package/lib/types/client/skeleton/DetailsPanel.d.ts +5 -0
  68. package/lib/types/client/skeleton/EmptyHero.d.ts +55 -0
  69. package/lib/types/client/skeleton/ImageLightbox.d.ts +9 -0
  70. package/lib/types/client/skeleton/InputBar.d.ts +16 -0
  71. package/lib/types/client/skeleton/PermissionSelect.d.ts +11 -0
  72. package/lib/types/client/skeleton/TodoPanel.d.ts +28 -0
  73. package/lib/types/client/stores.d.ts +22 -0
  74. package/lib/types/index.d.ts +9 -0
  75. package/lib/types/invariant.d.ts +16 -0
  76. package/lib/types/submission-settings.d.ts +20 -0
  77. package/package.json +105 -0
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Local calendar-day epoch that advances at each local midnight.
3
+ * @returns Midnight ms for the current local day; updates after the boundary.
4
+ */
5
+ export declare function useCalendarDay(): number;
6
+ //# sourceMappingURL=use-calendar-day.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Return a stable scheduler that coalesces visual updates over a frame interval.
3
+ * @param update - DOM alignment to run after the throttle interval.
4
+ * @param intervalFrames - frames to wait before applying the latest alignment.
5
+ * @returns a stable function that schedules the latest update.
6
+ */
7
+ export declare function useThrottledVisualUpdate(update: () => void, intervalFrames?: number): () => void;
8
+ //# sourceMappingURL=use-throttled-visual-update.d.ts.map
@@ -0,0 +1,68 @@
1
+ import type { AssistantBlock, AssistantMessageNode, ChatConversationViewNode, CommandNode, CompactionSummaryNode, ModelRetryNode, RunningToolCall, ToolCallBlock } from '@deepseek-ai/dsh-client-runtime/client';
2
+ /** Merge-extensible payload registry keyed by final Chat renderer kind. */
3
+ export interface ChatNodeDataMap {
4
+ }
5
+ /** Renderer kinds contributed by the currently installed Chat business modules. */
6
+ export type ChatNodeKind = Extract<keyof ChatNodeDataMap, string>;
7
+ /** Final Chat Node narrowed to one registered renderer kind and payload. */
8
+ export type ChatNode<Kind extends ChatNodeKind = ChatNodeKind> = {
9
+ [RegisteredKind in Kind]: ChatConversationViewNode & {
10
+ readonly kind: RegisteredKind;
11
+ readonly data: ChatNodeDataMap[RegisteredKind];
12
+ };
13
+ }[Kind];
14
+ /** Final Assistant row payload shared by streaming and settled states. */
15
+ export interface AssistantChatData {
16
+ readonly status: 'running' | 'settled' | 'interrupted';
17
+ readonly turn: number;
18
+ readonly step: number;
19
+ readonly blocks: readonly AssistantBlock[];
20
+ readonly time: number;
21
+ readonly usage?: unknown;
22
+ readonly finalNode?: AssistantMessageNode;
23
+ }
24
+ /** Settled or interrupted Assistant payload with its durable presentation node. */
25
+ export type FinalAssistantChatData = AssistantChatData & {
26
+ readonly finalNode: AssistantMessageNode;
27
+ };
28
+ /** Root Tool row payload; the root lifecycle owns all recursive subcalls. */
29
+ export interface ToolChatData {
30
+ readonly root: ToolCallBlock;
31
+ }
32
+ /** One manual command and its correlated compaction transaction. */
33
+ export interface ManualCompactionChatData {
34
+ readonly command: CommandNode;
35
+ readonly compaction: CompactionSummaryNode | null;
36
+ }
37
+ /** One durable retry chain rendered as a single row. */
38
+ export interface RetryChatData {
39
+ readonly attempts: readonly ModelRetryNode[];
40
+ readonly current: ModelRetryNode;
41
+ }
42
+ /** Turn-local footer row that owns actions and optional feature contributions. */
43
+ export interface TurnTailChatData {
44
+ readonly turn: number;
45
+ readonly seq: number;
46
+ readonly time: number;
47
+ /** Last finalized content-bearing Assistant in this Turn. */
48
+ readonly closing: FinalAssistantChatData | null;
49
+ /** Whether non-rendered later evidence makes the closing seq non-tail. */
50
+ readonly branchUnavailable: boolean;
51
+ readonly ttftMs?: number;
52
+ readonly tokensPerSecond?: number;
53
+ }
54
+ /**
55
+ * Test whether a Tool root has settled.
56
+ * @param block - Tool root lifecycle value.
57
+ * @returns whether the root carries its final result.
58
+ */
59
+ export declare function isSettledTool(block: ToolCallBlock): block is Extract<ToolCallBlock, {
60
+ kind: 'tool-result';
61
+ }>;
62
+ /**
63
+ * Test whether a Tool root is still running.
64
+ * @param block - Tool root lifecycle value.
65
+ * @returns whether the root lacks a final result.
66
+ */
67
+ export declare function isRunningTool(block: ToolCallBlock): block is RunningToolCall;
68
+ //# sourceMappingURL=chat-nodes.d.ts.map
@@ -0,0 +1,8 @@
1
+ /** Composer submission vocabulary shared by the input and settings domains. */
2
+ import type { BusyEnterBehavior } from '../../submission-settings.ts';
3
+ export type { BusyEnterBehavior } from '../../submission-settings.ts';
4
+ /** Delivery mode requested for one ordinary composer message. */
5
+ export type InputSubmitMode = BusyEnterBehavior;
6
+ /** Keyboard gesture whose delivery mode the submission policy resolves. */
7
+ export type ComposerSubmitGesture = 'enter' | 'accelerated';
8
+ //# sourceMappingURL=composer-submission.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** Queue contracts derived from the runtime session face and snapshot. */
2
+ import type { ConversationSnapshot, SessionFace } from '@deepseek-ai/dsh-client-runtime/client';
3
+ /** One address accepted by the runtime session's queue mutation verb. */
4
+ export type QueueItemId = Parameters<SessionFace['updateQueue']>[0];
5
+ /** One mutation accepted by the runtime session's queue mutation verb. */
6
+ export type QueueAction = Parameters<SessionFace['updateQueue']>[1];
7
+ /** One row projected by the runtime session's authoritative queue snapshot. */
8
+ export type QueueRow = ConversationSnapshot['queue'][number];
9
+ //# sourceMappingURL=queue.d.ts.map