Skip to content

Commit 93316ee

Browse files
committed
docs(chat): document citation display helpers
1 parent 8622463 commit 93316ee

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libs/chat/src/lib/agent/citation-display.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ function readableSourceTypeLabel(type: string): string | null {
100100
return words ? words.charAt(0).toUpperCase() + words.slice(1) : null;
101101
}
102102

103+
/**
104+
* Derive normalized source-type metadata for badges, icons, and tone tokens.
105+
*/
103106
export function citationTypeMeta(c: Citation): CitationTypeMeta {
104107
const type = deriveSourceType(c);
105108
const canonicalType = type.toLowerCase();
@@ -122,6 +125,9 @@ export function citationTypeMeta(c: Citation): CitationTypeMeta {
122125
};
123126
}
124127

128+
/**
129+
* Choose the visual source marker for a citation: provider image, type icon, or monogram.
130+
*/
125131
export function citationSourceVisual(c: Citation): CitationSourceVisual {
126132
const iconUrl = c.iconUrl?.trim();
127133
if (iconUrl) {

0 commit comments

Comments
 (0)