@smart-cloud/ai-kit-ui 1.5.31 → 1.5.32

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.
@@ -0,0 +1,5 @@
1
+ import type { AnswerPresentation } from "@smart-cloud/ai-kit-core";
2
+ /** The same source-independent layouts render approved REST, MCP and CPT data. */
3
+ export declare function AnswerPresentationView({ presentation }: {
4
+ presentation?: AnswerPresentation;
5
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import { type AnswerEntity, type AnswerPresentation } from "@smart-cloud/ai-kit-core";
2
+ /** Browser storage and transport values are untrusted, including old history. */
3
+ export declare function normalizeAnswerPresentation(value: unknown): AnswerPresentation | undefined;
4
+ export declare function answerAttributeText(attribute: AnswerEntity["attributes"][number]): string;
5
+ /** Retain only a validated envelope when crossing a history boundary. */
6
+ export declare function withSafeAnswerPresentation<T extends {
7
+ presentation?: unknown;
8
+ }>(value: T): Omit<T, "presentation"> & {
9
+ presentation?: AnswerPresentation;
10
+ };
@@ -1,4 +1,4 @@
1
- import { type ProcessedCitations, type PromptResult } from "@smart-cloud/ai-kit-core";
1
+ import { type ProcessedCitations, type PromptResult, type AnswerPresentation } from "@smart-cloud/ai-kit-core";
2
2
  export type ChatActivity = {
3
3
  activityId: string;
4
4
  kind: "knowledge_search" | "web_search" | "web_read" | "calculation" | "script" | "validation" | "thinking" | "generating_response" | "checking_sources" | "other";
@@ -23,6 +23,7 @@ export type ChatStreamCheckpoint = {
23
23
  };
24
24
  export type ChatStreamView = {
25
25
  text: string;
26
+ presentation?: AnswerPresentation;
26
27
  activities: ChatActivity[];
27
28
  citations: StreamCitation[];
28
29
  checkpoint?: ChatStreamCheckpoint;
@@ -37,6 +38,7 @@ export type StreamCitation = {
37
38
  };
38
39
  export type ChatStreamResult = {
39
40
  result: string;
41
+ presentation?: AnswerPresentation;
40
42
  sessionId: string;
41
43
  messageId?: string;
42
44
  citations?: ProcessedCitations | StreamCitation[];
@@ -1 +1,2 @@
1
1
  export { AiChatbot, DEFAULT_CHATBOT_LABELS } from "./AiChatbot";
2
+ export { AnswerPresentationView } from "./AnswerPresentation";