Web: "Updated ChatsModel to use FilesModel instead of XFile, and modified AiMessageBar to comment out dart:html imports and usage, and to use FilesModel instead of file paths."

This commit is contained in:
OkaykOrhmn 2024-09-30 17:30:33 +03:30
parent 147a363c47
commit ee342e8d18
2 changed files with 6 additions and 5 deletions

View File

@ -148,7 +148,7 @@ class Prompts {
String? text,
String? file,
String? fileName,
XFile? fileLocal,
FilesModel? fileLocal,
String? role,
String? createdAt,
bool? finished,
@ -162,6 +162,7 @@ class Prompts {
text: text ?? this.text,
file: file ?? this.file,
fileName: fileName ?? this.fileName,
fileLocal: fileLocal ?? this.fileLocal,
role: role ?? this.role,
createdAt: createdAt ?? this.createdAt,
finished: finished ?? this.finished,

View File

@ -472,8 +472,8 @@ class _AiMessageBarState extends State<AiMessageBar> {
state.messages.last.prompts.add(Prompts(
error: false,
text: state.message.text,
file: state.file?.path,
fileName: state.file?.basename,
// file: state.file?.path,
// fileName: state.file?.basename,
fileLocal: state.file,
finished: true,
role: 'user',
@ -491,8 +491,8 @@ class _AiMessageBarState extends State<AiMessageBar> {
error: false,
text: state.message.text,
finished: true,
file: state.file?.path,
fileName: state.file?.basename,
// file: state.file?.path,
// fileName: state.file?.basename,
fileLocal: state.file,
role: 'user',
createdAt: DateTime.now()