feat(chat): Add context attachment and knowledge base support

This commit is contained in:
cogwheel0
2025-11-26 22:19:19 +05:30
parent 97e882c173
commit 75ba0dc01d
11 changed files with 1052 additions and 65 deletions

View File

@@ -0,0 +1,27 @@
import 'package:flutter/foundation.dart';
/// Represents a non-file attachment that enriches a chat message,
/// such as a web page, YouTube video transcript, or an existing
/// knowledge base document reference.
@immutable
class ChatContextAttachment {
const ChatContextAttachment({
required this.id,
required this.type,
required this.displayName,
this.url,
this.content,
this.collectionName,
this.fileId,
});
final String id;
final ChatContextAttachmentType type;
final String displayName;
final String? url;
final String? content;
final String? collectionName;
final String? fileId;
}
enum ChatContextAttachmentType { web, youtube, knowledge }