@qilin-agent/client-ui-chat 0.0.0-stage → 3.1.3

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 (96) hide show
  1. package/LICENSE +21 -0
  2. package/README.i18n.yaml +55 -0
  3. package/README.md +122 -2
  4. package/README.zh.md +124 -0
  5. package/lib/client.js +13227 -0
  6. package/lib/index.js +54 -0
  7. package/lib/types/chat-settings.d.ts +47 -0
  8. package/lib/types/client/apply.d.ts +10 -0
  9. package/lib/types/client/chat/ApprovalCommand.d.ts +20 -0
  10. package/lib/types/client/chat/AssistantMarkdown.d.ts +47 -0
  11. package/lib/types/client/chat/AssistantNodeView.d.ts +7 -0
  12. package/lib/types/client/chat/ChatGroupSeat.d.ts +14 -0
  13. package/lib/types/client/chat/ChatNodeSeat.d.ts +22 -0
  14. package/lib/types/client/chat/ChatView.d.ts +7 -0
  15. package/lib/types/client/chat/CommandNodeView.d.ts +9 -0
  16. package/lib/types/client/chat/CompactionCommandCard.d.ts +8 -0
  17. package/lib/types/client/chat/CompactionItem.d.ts +19 -0
  18. package/lib/types/client/chat/ContextBody.d.ts +131 -0
  19. package/lib/types/client/chat/ContextInjectionRow.d.ts +26 -0
  20. package/lib/types/client/chat/GenericCommandCard.d.ts +9 -0
  21. package/lib/types/client/chat/MessageIconActions.d.ts +37 -0
  22. package/lib/types/client/chat/MessageItem.d.ts +42 -0
  23. package/lib/types/client/chat/ReasoningRow.d.ts +20 -0
  24. package/lib/types/client/chat/RunningSeal.d.ts +6 -0
  25. package/lib/types/client/chat/RunningStatus.d.ts +13 -0
  26. package/lib/types/client/chat/StatsPills.d.ts +71 -0
  27. package/lib/types/client/chat/SystemPromptRow.d.ts +22 -0
  28. package/lib/types/client/chat/TurnNavigator.d.ts +28 -0
  29. package/lib/types/client/chat/TurnProcessNodeView.d.ts +4 -0
  30. package/lib/types/client/chat/TurnTailNodeView.d.ts +7 -0
  31. package/lib/types/client/chat/TurnTriggerNodeView.d.ts +4 -0
  32. package/lib/types/client/chat/TurnUsagePanel.d.ts +15 -0
  33. package/lib/types/client/chat/message-chrome.d.ts +50 -0
  34. package/lib/types/client/chat/register-node-renderers.d.ts +14 -0
  35. package/lib/types/client/chat/render-entry.d.ts +9 -0
  36. package/lib/types/client/chat/searchable-hidden.d.ts +9 -0
  37. package/lib/types/client/chat/stat-dialog.d.ts +20 -0
  38. package/lib/types/client/chat/step-process.d.ts +11 -0
  39. package/lib/types/client/chat/token-format.d.ts +25 -0
  40. package/lib/types/client/chat/turn-assistant.d.ts +8 -0
  41. package/lib/types/client/chat/turn-rail-items.d.ts +37 -0
  42. package/lib/types/client/chat/turn-trigger.d.ts +15 -0
  43. package/lib/types/client/chat/use-calendar-day.d.ts +6 -0
  44. package/lib/types/client/chat/use-chat-navigation.d.ts +69 -0
  45. package/lib/types/client/chat/use-chat-reading.d.ts +102 -0
  46. package/lib/types/client/chat/use-chat-scroll.d.ts +35 -0
  47. package/lib/types/client/chat/use-chat-viewport.d.ts +169 -0
  48. package/lib/types/client/chat/use-disclosure.d.ts +15 -0
  49. package/lib/types/client/chat/use-process-scroll.d.ts +23 -0
  50. package/lib/types/client/chat/use-scroll-follow.d.ts +105 -0
  51. package/lib/types/client/chat/use-turn-data.d.ts +9 -0
  52. package/lib/types/client/contract/assistant-content.d.ts +9 -0
  53. package/lib/types/client/contract/chat-nodes.d.ts +108 -0
  54. package/lib/types/client/contract/chat-visibility.d.ts +10 -0
  55. package/lib/types/client/contract/process-groups.d.ts +25 -0
  56. package/lib/types/client/contract/slots.d.ts +258 -0
  57. package/lib/types/client/contract/snapshot.d.ts +105 -0
  58. package/lib/types/client/contract/store.d.ts +13 -0
  59. package/lib/types/client/contract/turn-metrics.d.ts +19 -0
  60. package/lib/types/client/contract/turn-process.d.ts +40 -0
  61. package/lib/types/client/conversation-nodes/assistant.d.ts +36 -0
  62. package/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +103 -0
  63. package/lib/types/client/conversation-nodes/command.d.ts +53 -0
  64. package/lib/types/client/conversation-nodes/common.d.ts +41 -0
  65. package/lib/types/client/conversation-nodes/compaction.d.ts +21 -0
  66. package/lib/types/client/conversation-nodes/event-projection.d.ts +63 -0
  67. package/lib/types/client/conversation-nodes/fallback.d.ts +16 -0
  68. package/lib/types/client/conversation-nodes/inbox.d.ts +40 -0
  69. package/lib/types/client/conversation-nodes/message.d.ts +42 -0
  70. package/lib/types/client/conversation-nodes/process-activity.d.ts +9 -0
  71. package/lib/types/client/conversation-nodes/process-groups.d.ts +27 -0
  72. package/lib/types/client/conversation-nodes/register.d.ts +7 -0
  73. package/lib/types/client/conversation-nodes/request-prompt.d.ts +44 -0
  74. package/lib/types/client/conversation-nodes/retry.d.ts +22 -0
  75. package/lib/types/client/conversation-nodes/tool.d.ts +23 -0
  76. package/lib/types/client/conversation-nodes/turn-error.d.ts +30 -0
  77. package/lib/types/client/conversation-nodes/turn-max-tokens.d.ts +22 -0
  78. package/lib/types/client/conversation-nodes/turn-navigation.d.ts +17 -0
  79. package/lib/types/client/conversation-nodes/turn-process-presentation.d.ts +30 -0
  80. package/lib/types/client/conversation-nodes/turn-process.d.ts +34 -0
  81. package/lib/types/client/conversation-nodes/turn-tail.d.ts +28 -0
  82. package/lib/types/client/index.d.ts +38 -0
  83. package/lib/types/client/locale.d.ts +378 -0
  84. package/lib/types/client/markdown-labels.d.ts +10 -0
  85. package/lib/types/client/model/conversation-context.d.ts +21 -0
  86. package/lib/types/client/model/tool-call-tree.d.ts +45 -0
  87. package/lib/types/client/performance-usage.d.ts +20 -0
  88. package/lib/types/client/presentation-policy.d.ts +35 -0
  89. package/lib/types/client/settings/LinkOpeningRow.d.ts +24 -0
  90. package/lib/types/client/settings/PerformanceUsageRow.d.ts +22 -0
  91. package/lib/types/client/settings/PreferenceRow.d.ts +18 -0
  92. package/lib/types/client/settings/TranscriptViewRow.d.ts +22 -0
  93. package/lib/types/client/stores.d.ts +20 -0
  94. package/lib/types/client/transcript-view.d.ts +25 -0
  95. package/lib/types/index.d.ts +6 -0
  96. package/package.json +106 -3
package/lib/index.js ADDED
@@ -0,0 +1,54 @@
1
+ import z from "@qilin-agent/schemastery";
2
+ //#region lib/types/chat-settings.js
3
+ /** Chat display preferences stored in the Host user-settings document. */
4
+ /** Settings namespace owned by the Chat target. */
5
+ const CHAT_SETTINGS_NAMESPACE = "ui-chat";
6
+ /** Field carrying the work-details presentation mode. */
7
+ const TRANSCRIPT_VIEW_FIELD = "transcriptView";
8
+ /** Work-details presentation modes a user can choose. */
9
+ const TRANSCRIPT_VIEW_MODES = [
10
+ "compact",
11
+ "standard",
12
+ "detailed",
13
+ "verbose"
14
+ ];
15
+ /**
16
+ * Saved value from the two-mode generation of this setting. Read as `standard`;
17
+ * never offered as a choice and never written back.
18
+ */
19
+ const LEGACY_TRANSCRIPT_VIEW_MODE = "normal";
20
+ /** Saved `expanded` values read as `detailed`, without being offered or written back. */
21
+ const LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE = "expanded";
22
+ /** Every value the durable field accepts: current modes plus legacy saved values. */
23
+ const TRANSCRIPT_VIEW_SETTING_VALUES = [
24
+ ...TRANSCRIPT_VIEW_MODES,
25
+ LEGACY_TRANSCRIPT_VIEW_MODE,
26
+ LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE
27
+ ];
28
+ /** Standard process summaries for users without an explicit preference. */
29
+ const DEFAULT_TRANSCRIPT_VIEW_MODE = "detailed";
30
+ /** Performance and usage detail levels accepted by user settings. */
31
+ const PERFORMANCE_USAGE_MODES = ["compact", "detailed"];
32
+ /** Preserve detailed accounting for users without an explicit preference. */
33
+ const DEFAULT_PERFORMANCE_USAGE = "detailed";
34
+ /** Preserve the built-in browser for users without an explicit preference. */
35
+ const DEFAULT_LINK_OPENING = "sidebar";
36
+ /** Durable Chat schema; also the wire envelope the browser scope validates against. */
37
+ const ChatSettingsFields = {
38
+ linkOpening: z.union(["sidebar", "new-tab"]).default(DEFAULT_LINK_OPENING),
39
+ performanceUsage: z.union([...PERFORMANCE_USAGE_MODES]).default(DEFAULT_PERFORMANCE_USAGE),
40
+ [TRANSCRIPT_VIEW_FIELD]: z.union([...TRANSCRIPT_VIEW_SETTING_VALUES]).default(DEFAULT_TRANSCRIPT_VIEW_MODE).loose()
41
+ };
42
+ /** Schema for shared configuration values. */
43
+ const ChatSettingsSchema = z.object(ChatSettingsFields);
44
+ //#endregion
45
+ //#region lib/types/index.js
46
+ /** Host registration for browser Chat preferences. */
47
+ /** Register the durable Chat settings section when a provider exists. */
48
+ function apply(ctx) {
49
+ ctx.inject(["settings"], (settingsCtx) => {
50
+ settingsCtx.settings.register(CHAT_SETTINGS_NAMESPACE, ChatSettingsSchema);
51
+ });
52
+ }
53
+ //#endregion
54
+ export { CHAT_SETTINGS_NAMESPACE, ChatSettingsFields, DEFAULT_LINK_OPENING, DEFAULT_PERFORMANCE_USAGE, DEFAULT_TRANSCRIPT_VIEW_MODE, LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE, LEGACY_TRANSCRIPT_VIEW_MODE, PERFORMANCE_USAGE_MODES, TRANSCRIPT_VIEW_FIELD, TRANSCRIPT_VIEW_MODES, apply };
@@ -0,0 +1,47 @@
1
+ /** Chat display preferences stored in the Host user-settings document. */
2
+ import z from '@qilin-agent/schemastery';
3
+ /** Settings namespace owned by the Chat target. */
4
+ export declare const CHAT_SETTINGS_NAMESPACE = "ui-chat";
5
+ /** Field carrying the work-details presentation mode. */
6
+ export declare const TRANSCRIPT_VIEW_FIELD = "transcriptView";
7
+ /** Work-details presentation modes a user can choose. */
8
+ export declare const TRANSCRIPT_VIEW_MODES: readonly ["compact", "standard", "detailed", "verbose"];
9
+ /** Work-details presentation mode. */
10
+ export type TranscriptViewMode = typeof TRANSCRIPT_VIEW_MODES[number];
11
+ /**
12
+ * Saved value from the two-mode generation of this setting. Read as `standard`;
13
+ * never offered as a choice and never written back.
14
+ */
15
+ export declare const LEGACY_TRANSCRIPT_VIEW_MODE = "normal";
16
+ /** Saved `expanded` values read as `detailed`, without being offered or written back. */
17
+ export declare const LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE = "expanded";
18
+ /** Standard process summaries for users without an explicit preference. */
19
+ export declare const DEFAULT_TRANSCRIPT_VIEW_MODE: TranscriptViewMode;
20
+ /** Performance and usage detail levels accepted by user settings. */
21
+ export declare const PERFORMANCE_USAGE_MODES: readonly ["compact", "detailed"];
22
+ /** Performance and usage presentation. */
23
+ export type PerformanceUsageMode = typeof PERFORMANCE_USAGE_MODES[number];
24
+ /** Preserve detailed accounting for users without an explicit preference. */
25
+ export declare const DEFAULT_PERFORMANCE_USAGE: PerformanceUsageMode;
26
+ /** Destinations for ordinary clicks on Chat HTTP(S) links. */
27
+ export type LinkOpening = 'sidebar' | 'new-tab';
28
+ /** Preserve the built-in browser for users without an explicit preference. */
29
+ export declare const DEFAULT_LINK_OPENING: LinkOpening;
30
+ /** Durable Chat section shared by the Host schema and browser scope. */
31
+ export interface ChatSettings {
32
+ /** Work-details preference; legacy values are accepted only from existing saved settings. */
33
+ transcriptView: TranscriptViewMode | typeof LEGACY_TRANSCRIPT_VIEW_MODE | typeof LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE;
34
+ /** Detail level for composer statistics and completed-Turn usage. */
35
+ performanceUsage: PerformanceUsageMode;
36
+ /** Default destination for Chat HTTP(S) links. */
37
+ linkOpening: LinkOpening;
38
+ }
39
+ /** Durable Chat schema; also the wire envelope the browser scope validates against. */
40
+ export declare const ChatSettingsFields: {
41
+ linkOpening: z<"sidebar" | "new-tab", "sidebar" | "new-tab", "defined">;
42
+ performanceUsage: z<"compact" | "detailed", "compact" | "detailed", "defined">;
43
+ transcriptView: z<"compact" | "standard" | "detailed" | "verbose" | "normal" | "expanded", "compact" | "standard" | "detailed" | "verbose" | "normal" | "expanded", "defined">;
44
+ };
45
+ /** Schema for shared configuration values. */
46
+ export declare const ChatSettingsSchema: z<ChatSettings>;
47
+ //# sourceMappingURL=chat-settings.d.ts.map
@@ -0,0 +1,10 @@
1
+ /** Register the Chat Conversation target, renderers, stats, and details surface. */
2
+ import type { Context } from '@qilin-agent/kylin';
3
+ /** Services required by the Chat target and its presentation registrations. */
4
+ export declare const inject: string[];
5
+ /**
6
+ * Mount all Chat-owned contributions.
7
+ * @param ctx - Client root context.
8
+ */
9
+ export declare function apply(ctx: Context): void;
10
+ //# sourceMappingURL=apply.d.ts.map
@@ -0,0 +1,20 @@
1
+ /** Chat-owned approval detail resolving a correlated Tool call's command. */
2
+ import type { PropsRuntime } from '@qilin-agent/client-ui-slots';
3
+ interface ApprovalToolCall {
4
+ readonly callId: string;
5
+ readonly argsRaw: string;
6
+ }
7
+ /**
8
+ * Extract a shell command from a correlated Tool call when its arguments carry one.
9
+ * @param call - Tool call arguments, when a correlated call exists.
10
+ * @returns command text, or undefined for absent, malformed, or unrelated arguments.
11
+ */
12
+ export declare function commandOf(call: ApprovalToolCall | undefined): string | undefined;
13
+ /**
14
+ * Render the command of the Chat Tool node correlated with an approval.
15
+ * @param props - Approval identity and Session-standard Chat selector hook.
16
+ * @returns command text when the correlated call carries one.
17
+ */
18
+ export declare function ApprovalCommand({ callId, useChat }: PropsRuntime<'conversation.approval.detail'>): string | null;
19
+ export {};
20
+ //# sourceMappingURL=ApprovalCommand.d.ts.map
@@ -0,0 +1,47 @@
1
+ import type { MarkdownFileMentions } from '@qilin-agent/client-ui-primitives';
2
+ import type { ChatNodeOwnerProps, ChatViewSlotProps, UsePresentation } from '../contract/slots.ts';
3
+ import type { AssistantBlock } from '../contract/snapshot.ts';
4
+ /**
5
+ * Standalone fallback for image destinations (query/fragment suffixes are ignored).
6
+ * Chat fileImages resolves decoded file references against cwd; pathImages also
7
+ * serves this component outside that provider and accepts legacy image URL suffixes.
8
+ * Map one authored media destination to the same-origin workspace-file URL.
9
+ * @param protocol - `window.location.protocol` at render time.
10
+ * @param origin - `window.location.origin` at render time.
11
+ * @param value - The authored markdown destination, exactly as written; URL escapes are decoded once.
12
+ * @returns The API URL for an absolute local path on an HTTP(S) page, or
13
+ * undefined when the destination cannot be a Host-served local file
14
+ * (non-HTTP transport such as Electron `file://`, protocol-relative or
15
+ * relative destinations).
16
+ */
17
+ export declare function localPathMediaUrl(protocol: string, origin: string, value: string): string | undefined;
18
+ export interface AssistantMarkdownProps {
19
+ /**
20
+ * Business portion this seat renders: the enclosing process group renders a
21
+ * step's `reasoning` blocks, the Turn's answer seat renders the rest. Absent
22
+ * renders every block, for a step that owns its own seat.
23
+ */
24
+ groupPart?: string | undefined;
25
+ blocks: readonly AssistantBlock[];
26
+ streaming: boolean;
27
+ /** Frozen partial of an aborted turn: rendered with a stopped marker. */
28
+ interrupted?: boolean | undefined;
29
+ /** Render consecutive image blocks through the attachment slot. */
30
+ renderMessageImages: ChatNodeOwnerProps['renderMessageImages'];
31
+ /** Hide reasoning that belongs to the Turn-level process disclosure. */
32
+ reasoningHidden?: boolean | undefined;
33
+ /** Reveal the owning Turn-level process disclosure. */
34
+ revealProcess?: (() => void) | undefined;
35
+ /** Resolved prose file mentions for this Assistant's closing turn. */
36
+ mentions?: MarkdownFileMentions | undefined;
37
+ /**
38
+ * Live display-policy selector for the reasoning rows. Absent in detached
39
+ * compositions previews every settled reasoning summary (the Standard mode).
40
+ */
41
+ usePresentation?: UsePresentation | undefined;
42
+ /** The owning view's locale seat, passed down as a plain prop. */
43
+ t: ChatViewSlotProps['t'];
44
+ }
45
+ /** Reasoning block as the Think variant summary row (figma 39:28304). */
46
+ export declare const AssistantMarkdown: import("react").MemoExoticComponent<({ groupPart, blocks, streaming, interrupted, renderMessageImages, reasoningHidden, revealProcess, mentions, usePresentation, t, }: AssistantMarkdownProps) => import("react").JSX.Element | null>;
47
+ //# sourceMappingURL=AssistantMarkdown.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { InjectFace } from '@qilin-agent/client-ui-slots';
2
+ import type { ChatNodeViewProps, PresentationInjected } from '../contract/slots.ts';
3
+ type AssistantNodeViewProps = ChatNodeViewProps<'assistant-step'> & InjectFace<PresentationInjected>;
4
+ /** Streaming, settled, and interrupted Assistant states share one keyed renderer instance. */
5
+ export declare const AssistantNodeView: import("react").MemoExoticComponent<({ node, groupPart, useTurnData, turnProcess, openFile, renderMessageImages, fileMentions, usePresentation, t, }: AssistantNodeViewProps) => import("react").JSX.Element>;
6
+ export {};
7
+ //# sourceMappingURL=AssistantNodeView.d.ts.map
@@ -0,0 +1,14 @@
1
+ /** Stable process container; display policy changes visibility, never member parents. */
2
+ import { type ComponentProps } from 'react';
3
+ import type { GroupKey } from '@qilin-agent/client-ui-conversation/client';
4
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
5
+ import { ChatNodeSeat } from './ChatNodeSeat.tsx';
6
+ type SeatProps = Omit<ComponentProps<typeof ChatNodeSeat>, 'nodeKey' | 'groupPart'>;
7
+ type ChatGroupSeatProps = SeatProps & {
8
+ readonly groupKey: GroupKey;
9
+ readonly useChatGroup: ChatViewSlotProps['useChatGroup'];
10
+ };
11
+ /** 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 {};
14
+ //# sourceMappingURL=ChatGroupSeat.d.ts.map
@@ -0,0 +1,22 @@
1
+ import type { ChatNodeOwnerProps, ChatViewSlotProps, UsePresentation } from '../contract/slots.ts';
2
+ import type { ChatNodeStore } from '../contract/snapshot.ts';
3
+ interface ChatNodeSeatProps extends ChatNodeOwnerProps {
4
+ readonly nodeKey: string;
5
+ /** A replaced Builder must rebind keyed hooks even when references and keys survive. */
6
+ readonly nodeStore: ChatNodeStore;
7
+ readonly useChatNode: ChatViewSlotProps['useChatNode'];
8
+ readonly useChatNodeProcess: ChatViewSlotProps['useChatNodeProcess'];
9
+ readonly usePresentation: UsePresentation;
10
+ readonly useStore: ChatViewSlotProps['useStore'];
11
+ readonly actions: ChatViewSlotProps['actions'];
12
+ readonly renderSlot: ChatViewSlotProps['renderSlot'];
13
+ readonly t: ChatViewSlotProps['t'];
14
+ }
15
+ /**
16
+ * Subscribe, apply Turn-process visibility, and dispatch one stable Context key.
17
+ * Policy reads select this seat's own conclusion, so a mode change re-renders
18
+ * only seats whose visibility actually changes.
19
+ */
20
+ export declare const ChatNodeSeat: import("react").MemoExoticComponent<({ nodeKey, groupPart, useChatNode, useChatNodeProcess, usePresentation, cwd, openFile, openSkill, inspectCall, forkAt, editUserMessage, loadImage, renderMessageImages, fileMentions, useStore, actions, renderSlot, t, }: ChatNodeSeatProps) => import("react").JSX.Element | null>;
21
+ export {};
22
+ //# sourceMappingURL=ChatNodeSeat.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
2
+ /**
3
+ * The chat view slot entry: pure component over the composed props; each
4
+ * ordered business Node crosses the keyed renderer seat.
5
+ */
6
+ export declare function ChatView({ useSession, useChat, useChatNode, useChatNodeProcess, useChatGroup, useConversation, useSessions, useStore, actions, renderSlot, sessionId, openFile, openSkill, openExternalLink, loadOlder, loadThrough, loadImage, openTrajectory, chatScroll, forkAt, editUserMessage, fileMentions, usePresentation, useProjection, t, }: ChatViewSlotProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=ChatView.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { PropsRenderSlots } from '@qilin-agent/client-ui-slots';
2
+ import type { ChatNodeViewProps } from '../contract/slots.ts';
3
+ type CommandNodeViewProps = ChatNodeViewProps<'command'> & PropsRenderSlots<'conversation.chat.commandview'>;
4
+ /** Ordinary command lifecycle renderer with command-name keyed specialization. */
5
+ export declare const CommandNodeView: import("react").MemoExoticComponent<({ node, renderSlot, t }: CommandNodeViewProps) => import("react").JSX.Element>;
6
+ /** One integrated `/compact` command and compaction transaction renderer. */
7
+ export declare const ManualCompactionNodeView: import("react").MemoExoticComponent<({ node, t, }: ChatNodeViewProps<"manual-compaction">) => import("react").JSX.Element>;
8
+ export {};
9
+ //# sourceMappingURL=CommandNodeView.d.ts.map
@@ -0,0 +1,8 @@
1
+ import type { ChatViewSlotProps, CommandRowOwnerProps } from '../contract/slots.ts';
2
+ interface CompactionCommandCardProps extends CommandRowOwnerProps {
3
+ t: ChatViewSlotProps['t'];
4
+ }
5
+ /** Render one manual compaction lifecycle without duplicating its checkpoint marker. */
6
+ export declare function CompactionCommandCard({ node, compaction, t }: CompactionCommandCardProps): import("react").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=CompactionCommandCard.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
2
+ import type { CompactionSummaryNode } from '../contract/snapshot.ts';
3
+ interface CompactionItemProps {
4
+ node: CompactionSummaryNode;
5
+ /** Optional command title for a manual compaction folded into this marker. */
6
+ title?: string;
7
+ /** Command settlement text used when structured compaction counts are unavailable. */
8
+ fallbackSummary?: string | null;
9
+ /** The owning view's locale seat. */
10
+ t: ChatViewSlotProps['t'];
11
+ }
12
+ /**
13
+ * Renders the model-history compaction marker.
14
+ * @param props - the marker node off the snapshot cache.
15
+ * @returns the marker row, with the summary disclosure when one is available.
16
+ */
17
+ export declare const CompactionItem: import("react").MemoExoticComponent<({ node, title, fallbackSummary, t, }: CompactionItemProps) => import("react").JSX.Element>;
18
+ export {};
19
+ //# sourceMappingURL=CompactionItem.d.ts.map
@@ -0,0 +1,131 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
3
+ import type { ContextMessageNode } from '../contract/snapshot.ts';
4
+ import type { KnownContextForm } from '@qilin-agent/client-ui-conversation/client';
5
+ type Translate = ChatViewSlotProps['t'];
6
+ /**
7
+ * Default presentation: the model-facing text as text, with its real line
8
+ * breaks, and the remaining source fields beneath it. This is what every form
9
+ * this UI version does not recognize renders as.
10
+ * @param props - Durable content, its source, and the locale seat.
11
+ * @returns The opaque context body.
12
+ */
13
+ export declare function OpaqueBody({ content, source, t }: {
14
+ content: ContextMessageNode['content'];
15
+ source: unknown;
16
+ t: Translate;
17
+ }): ReactNode;
18
+ /**
19
+ * `instructions` form: the files this context reconciled, then their text.
20
+ *
21
+ * The text keeps its `<system-reminder>` framing verbatim — the framing is part
22
+ * of what the model read, so hiding it would misreport the request.
23
+ * @param props - Durable content, its source, and the locale seat.
24
+ * @returns The instructions context body, or the opaque body when the change
25
+ * list is unreadable.
26
+ */
27
+ export declare function InstructionsBody({ content, source, t }: {
28
+ content: ContextMessageNode['content'];
29
+ source: unknown;
30
+ t: Translate;
31
+ }): ReactNode;
32
+ /**
33
+ * `catalog` form: the published entries as a list, read from the source rather
34
+ * than re-parsed out of the model-facing prose.
35
+ *
36
+ * A catalog whose source carries no usable entries falls through to the opaque
37
+ * body, so an older or hand-edited log still shows its text.
38
+ * @param props - Durable content, its source, and the locale seat.
39
+ * @returns The catalog context body, or the opaque body when the entry list is
40
+ * unreadable.
41
+ */
42
+ export declare function CatalogBody({ content, source, t }: {
43
+ content: ContextMessageNode['content'];
44
+ source: unknown;
45
+ t: Translate;
46
+ }): ReactNode;
47
+ /**
48
+ * `snapshot` form: the named contributions this snapshot assembled, in order.
49
+ *
50
+ * The sections are the same bytes the model read, split at the boundaries the
51
+ * producer assembled them on, so a reader sees which subsystem contributed
52
+ * which state instead of one undifferentiated wall.
53
+ *
54
+ * One sentence of the model-facing text is NOT in any section: the producer's
55
+ * framing line declaring that this snapshot supersedes earlier ones. Unlike the
56
+ * `<system-reminder>` wrapper an instruction context carries — which wraps
57
+ * content and cannot be separated from it — that line states the form's own
58
+ * semantics, so the body states them as a caption instead of reprinting the
59
+ * joined prose beside the sections it was split from.
60
+ * @param props - Durable content, its source, and the locale seat.
61
+ * @returns The snapshot context body, or the opaque body when unreadable.
62
+ */
63
+ export declare function SnapshotBody({ content, source, t }: {
64
+ content: ContextMessageNode['content'];
65
+ source: unknown;
66
+ t: Translate;
67
+ }): ReactNode;
68
+ /**
69
+ * `notice` form: what just happened, with the model-facing text beneath it.
70
+ *
71
+ * The one-line account also rides the collapsed row ({@link contextBody}), so a
72
+ * notice is usually readable without expanding at all.
73
+ * @param props - Durable content, its source, and the locale seat.
74
+ * @returns The notice context body.
75
+ */
76
+ export declare function NoticeBody({ content, t }: {
77
+ content: ContextMessageNode['content'];
78
+ source: unknown;
79
+ t: Translate;
80
+ }): ReactNode;
81
+ /**
82
+ * `relay` form: which agent sent this, then what it said.
83
+ *
84
+ * The sender is an opaque session id; it is shown as a field rather than a
85
+ * label, because this client cannot resolve it to a title.
86
+ * @param props - Durable content, its source, and the locale seat.
87
+ * @returns The relay context body.
88
+ */
89
+ export declare function RelayBody({ content, source, t }: {
90
+ content: ContextMessageNode['content'];
91
+ source: unknown;
92
+ t: Translate;
93
+ }): ReactNode;
94
+ /**
95
+ * `recall` form: which sessions this material came from and how much of each
96
+ * survived the read, then the material itself.
97
+ *
98
+ * Completeness is the fact a reader needs first: recalled context is bounded on
99
+ * the way in, so a card that hid the omitted count would overstate what the
100
+ * model received.
101
+ * @param props - Durable content, its source, and the locale seat.
102
+ * @returns The recall context body, or the opaque body when unreadable.
103
+ */
104
+ export declare function RecallBody({ content, source, t }: {
105
+ content: ContextMessageNode['content'];
106
+ source: unknown;
107
+ t: Translate;
108
+ }): ReactNode;
109
+ /**
110
+ * Choose the body for one context node.
111
+ *
112
+ * Returns the form the body actually rendered as, which is not always the
113
+ * declared one: a declared form whose fields are unreadable falls back to
114
+ * opaque, and the caller labels the row with what it really shows.
115
+ * `summary` is the collapsed row's one-line account, which only a `notice`
116
+ * records: its whole point is being readable without expanding.
117
+ * @param form - the producer-declared form projected onto the node.
118
+ * @param props - durable content, its source, and the locale seat.
119
+ * @returns the rendered form (null for opaque), its collapsed summary, and its body.
120
+ */
121
+ export declare function contextBody(form: ContextMessageNode['form'], props: {
122
+ content: ContextMessageNode['content'];
123
+ source: unknown;
124
+ t: Translate;
125
+ }): {
126
+ rendered: KnownContextForm | null;
127
+ summary: string | null;
128
+ body: ReactNode;
129
+ };
130
+ export {};
131
+ //# sourceMappingURL=ContextBody.d.ts.map
@@ -0,0 +1,26 @@
1
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
2
+ import type { ContextMessageNode } from '../contract/snapshot.ts';
3
+ /** Props for the logged non-user message presentation. */
4
+ export interface ContextInjectionRowProps {
5
+ content: ContextMessageNode['content'];
6
+ source: ContextMessageNode['source'];
7
+ /** Role and producer name projected from the durable source. */
8
+ producer: ContextMessageNode['producer'];
9
+ /** Producer-declared information form; null renders the opaque body. */
10
+ form: ContextMessageNode['form'];
11
+ /** The owning view's locale seat, passed down as a plain prop. */
12
+ t: ChatViewSlotProps['t'];
13
+ }
14
+ /**
15
+ * Render logged context with the Tool calls disclosure chrome from Figma.
16
+ *
17
+ * The header names the role the context plays and, beside it, the producer the
18
+ * durable source identifies, so a reader can tell an injected skill catalog
19
+ * from a workspace instruction file or a recalled session without expanding.
20
+ * The expanded body follows the producer-declared form; an absent or unknown
21
+ * form renders the opaque body.
22
+ * @param props - Durable content, its projected producer role/name and form, and the locale seat.
23
+ * @returns A collapsed context row with a bounded, form-specific body.
24
+ */
25
+ export declare function ContextInjectionRow({ content, source, producer, form, t }: ContextInjectionRowProps): import("react").JSX.Element;
26
+ //# sourceMappingURL=ContextInjectionRow.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { ChatViewSlotProps, CommandRowOwnerProps } from '../contract/slots.ts';
2
+ /** Card props: the owner payload plus the render site's locale seat (plain prop). */
3
+ export interface GenericCommandCardProps extends CommandRowOwnerProps {
4
+ t: ChatViewSlotProps['t'];
5
+ /** Command-specific running copy; absent uses the generic command label. */
6
+ runningSummary?: string | undefined;
7
+ }
8
+ export declare function GenericCommandCard({ node, t, runningSummary }: GenericCommandCardProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=GenericCommandCard.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
3
+ export interface MessageIconActionsProps {
4
+ /** Plain text the copy action writes. */
5
+ text: string;
6
+ /** Unix epoch ms for the clock label; omitted for transient messages. */
7
+ time?: number | undefined;
8
+ /** Clock before icons (user) or after (assistant). */
9
+ clock: 'start' | 'end';
10
+ /** Fork the session at this message; omission hides the branch action. */
11
+ onBranch?: (() => void) | undefined;
12
+ /** Revise this message: replace the composer draft with its text; omission hides the edit action. */
13
+ onEdit?: (() => void) | undefined;
14
+ /** The message is not a completed transcript tail, so branch stays visible but unavailable. */
15
+ branchUnavailable?: boolean | undefined;
16
+ /** Parent layout class composed onto the actions row. */
17
+ className?: string | undefined;
18
+ /**
19
+ * Slot-rendered actions owned by independent plugins, placed between the
20
+ * built-in copy and branch controls.
21
+ */
22
+ extraActions?: ReactNode;
23
+ /**
24
+ * Icon-row Turn-usage trigger (the TurnUsagePanel pill), seated after the
25
+ * branch control at the end of the icon cluster.
26
+ */
27
+ usageAction?: ReactNode;
28
+ /** The owning view's locale seat, passed down as a plain prop. */
29
+ t: ChatViewSlotProps['t'];
30
+ }
31
+ /**
32
+ * Copy / branch (/ clock) IconActions row shared by user and assistant chrome.
33
+ * @param props - Copy text, event time, clock side, branch callback, className.
34
+ * @returns The actions row element.
35
+ */
36
+ export declare function MessageIconActions({ text, time, clock, onBranch, onEdit, branchUnavailable, className, extraActions, usageAction, t, }: MessageIconActionsProps): import("react").JSX.Element;
37
+ //# sourceMappingURL=MessageIconActions.d.ts.map
@@ -0,0 +1,42 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PendingSubmission } from '@qilin-agent/api-session-controller/client';
3
+ import type { ChatNodeOwnerProps, ChatNodeViewProps, ChatViewSlotProps } from '../contract/slots.ts';
4
+ /**
5
+ * Render one Host-authoritative pending steering item with the same visual
6
+ * language as its eventual durable transcript node.
7
+ * @param props - Pending message content and conversation translator.
8
+ * @returns the pending steering bubble.
9
+ */
10
+ export declare function PendingSteeringBubble({ content, renderMessageImages, t }: {
11
+ content: readonly unknown[];
12
+ renderMessageImages: ChatNodeOwnerProps['renderMessageImages'];
13
+ t: ChatViewSlotProps['t'];
14
+ }): ReactNode;
15
+ /**
16
+ * Render one local transcript or steering submission echo with the same
17
+ * visual language and surface marker as the Host occurrence that replaces
18
+ * it: draft text plus object-URL previews, visible from the submit click
19
+ * until the durable `user/message` or steering occurrence renders.
20
+ * @param props - the session snapshot's pending submission and render seats.
21
+ * @returns the echoed user bubble.
22
+ */
23
+ export declare function PendingSubmissionBubble({ submission, renderMessageImages, t }: {
24
+ submission: PendingSubmission;
25
+ renderMessageImages: ChatNodeOwnerProps['renderMessageImages'];
26
+ t: ChatViewSlotProps['t'];
27
+ }): ReactNode;
28
+ /** User and admitted-steering keyed Chat renderer. */
29
+ export declare const UserMessageNodeView: import("react").MemoExoticComponent<({ node, editUserMessage, renderMessageImages, openFile, openSkill, t, }: ChatNodeViewProps<"user" | "steering">) => import("react").JSX.Element>;
30
+ /** Injected-context keyed Chat renderer. */
31
+ export declare const ContextMessageNodeView: import("react").MemoExoticComponent<({ node, t }: ChatNodeViewProps<"context">) => import("react").JSX.Element>;
32
+ /** Automatic compaction keyed Chat renderer. */
33
+ export declare const CompactionNodeView: import("react").MemoExoticComponent<({ node, t }: ChatNodeViewProps<"compaction">) => import("react").JSX.Element>;
34
+ /** Correlated retry-chain keyed Chat renderer. */
35
+ export declare const RetryNodeView: import("react").MemoExoticComponent<({ node, t }: ChatNodeViewProps<"model-retry">) => import("react").JSX.Element>;
36
+ /** Terminal turn-error keyed Chat renderer. */
37
+ export declare const TurnErrorNodeView: import("react").MemoExoticComponent<({ node, t }: ChatNodeViewProps<"turn-error">) => import("react").JSX.Element>;
38
+ /** Max-tokens turn-end notice keyed Chat renderer. */
39
+ export declare const TurnMaxTokensNodeView: import("react").MemoExoticComponent<({ t }: ChatNodeViewProps<"turn-max-tokens">) => import("react").JSX.Element>;
40
+ /** Explicit unknown-surface keyed Chat renderer. */
41
+ export declare const UnknownNodeView: import("react").MemoExoticComponent<({ node, t }: ChatNodeViewProps<"unknown">) => import("react").JSX.Element>;
42
+ //# sourceMappingURL=MessageItem.d.ts.map
@@ -0,0 +1,20 @@
1
+ import type { ChatViewSlotProps, UsePresentation } from '../contract/slots.ts';
2
+ /**
3
+ * Render one assistant reasoning block collapsed until the reader opens it. The
4
+ * collapsed summary omits double-asterisk markers; expanded content renders
5
+ * the complete Markdown with secondary typography. A streaming row always
6
+ * previews its latest line; a settled row previews its first line only when
7
+ * the work-details mode allows it.
8
+ * @param props.text - complete or streaming reasoning text.
9
+ * @param props.running - whether this block is the streaming tail.
10
+ * @param props.usePresentation - live display-policy selector for this reasoning row.
11
+ * @param props.t - conversation locale seat for status and Markdown actions.
12
+ * @returns the reasoning disclosure.
13
+ */
14
+ export declare function ReasoningRow({ text, running, usePresentation, t }: {
15
+ text: string;
16
+ running: boolean;
17
+ usePresentation?: UsePresentation | undefined;
18
+ t: ChatViewSlotProps['t'];
19
+ }): import("react").JSX.Element;
20
+ //# sourceMappingURL=ReasoningRow.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Render the decorative running icon.
3
+ * @returns the seal svg breathing at the running label's left.
4
+ */
5
+ export declare function RunningSeal(): import("react").JSX.Element;
6
+ //# sourceMappingURL=RunningSeal.d.ts.map
@@ -0,0 +1,13 @@
1
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
2
+ interface RunningStatusProps {
3
+ readonly startTime: number | undefined;
4
+ readonly t: ChatViewSlotProps['t'];
5
+ }
6
+ /**
7
+ * Show live elapsed time after the current Turn's content without announcing ticks.
8
+ * @param props - Current Turn start time and localized copy.
9
+ * @returns the blue running indicator; mount only while the Session is running.
10
+ */
11
+ export declare const RunningStatus: import("react").MemoExoticComponent<({ startTime, t }: RunningStatusProps) => import("react").JSX.Element>;
12
+ export {};
13
+ //# sourceMappingURL=RunningStatus.d.ts.map