@smart-cloud/ai-kit-ui 1.5.17 → 1.5.19
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,14 @@
|
|
|
1
|
+
import type { ProcessedCitations } from "@smart-cloud/ai-kit-core";
|
|
2
|
+
export type CitationLike = {
|
|
3
|
+
url?: string;
|
|
4
|
+
sourceUrl?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
snippet?: string;
|
|
7
|
+
};
|
|
8
|
+
type CitationPayload = ProcessedCitations | CitationLike[] | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Normalize both the current structured citation response and the legacy flat
|
|
11
|
+
* response used by older backends during rolling upgrades.
|
|
12
|
+
*/
|
|
13
|
+
export declare function normalizeChatCitations(citations: CitationPayload): CitationLike[] | undefined;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface LocalizedOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
/** Keep canonical filter values while ordering options by their visible labels. */
|
|
6
|
+
export declare function buildLocalizedOptions(values: string[], translate: (value: string) => string, locale: string): LocalizedOption[];
|