optimized ChatBox component.

This commit is contained in:
Xiaohan-Tian
2025-08-16 17:35:40 -07:00
parent 429efaf629
commit 8b0ddae58d
6 changed files with 351 additions and 294 deletions
+8
View File
@@ -5,6 +5,14 @@ export interface TimeSignature {
denominator: number;
}
export interface ChatMessage {
id: string;
role: 'user' | 'assistant';
content: string;
isStreaming?: boolean;
tokenCount?: number;
}
/**
* A reusable class-transformer decorator to apply a default value during deserialization.
* @param defaultValue The default value to apply if the field is undefined.