5#include "CoreMinimal.h"
6#include "EditorUtilityWidget.h"
7#include "Provider/Types/Chat/ChatCompletionChunkTypes.h"
8#include "Provider/Types/ModelTypes.h"
9#include "ChatMessageWidget.generated.h"
12class UMultiLineEditableText;
24 UPROPERTY(meta = (BindWidget))
25 TObjectPtr<UBorder> MainBorder;
27 UPROPERTY(meta = (BindWidget))
28 TObjectPtr<UTextBlock> RoleTextBox;
30 UPROPERTY(meta = (BindWidget))
31 TObjectPtr<UMultiLineEditableText> MessageText;
33 UPROPERTY(meta = (BindWidget))
34 TObjectPtr<UTextBlock> TimeTextBox;
36 UPROPERTY(meta = (BindWidget))
37 TObjectPtr<UWidgetSwitcher> WidgetSwitcher;
39 UPROPERTY(meta = (BindWidget))
40 TObjectPtr<UHorizontalBox> ImageHorizontalBox;
42 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category =
"UI")
43 TMap<ERole, FLinearColor> ColorMap{
44 {ERole::Assistant, FColor::FromHex(
"444654FF")},
45 {ERole::User, FColor::FromHex(
"343541FF")},
46 {ERole::System, FColor::FromHex(
"595a68FF")},
49 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category =
"UI")
50 FLinearColor DefaultColor{FColor::FromHex(
"0e0e0eFF")};
52 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category =
"UI")
53 FLinearColor ErrorColor{FColor::FromHex(
"41343dFF")};
55 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category =
"UI")
56 TSubclassOf<UImagePreviewWidget> ImagePreviewWidgetClass;
59 void SetMessage(
const FMessage& Message,
bool WasError =
false);
62 TArray<TObjectPtr<UImagePreviewWidget>> ImageWidgets;
Definition: ChatCommonTypes.h:75