@smartspace/chat-ui 1.14.4-dev.4d23cd2 → 1.14.4-dev.4e7ca0c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +70 -134
- package/dist/index.js +30 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,8 @@ type Message = {
|
|
|
319
319
|
message?: string | null;
|
|
320
320
|
data?: string | null;
|
|
321
321
|
blockId?: string | null;
|
|
322
|
+
/** Trace id of the request that recorded the error, for a support reference. */
|
|
323
|
+
traceId?: string | null;
|
|
322
324
|
}[] | null;
|
|
323
325
|
values?: MessageValue[] | null;
|
|
324
326
|
optimistic?: boolean;
|
|
@@ -546,6 +548,7 @@ declare const messagesResponseSchema: z.ZodObject<{
|
|
|
546
548
|
data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
547
549
|
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
550
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
551
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
549
552
|
}, z.core.$strip>>;
|
|
550
553
|
hasComments: z.ZodBoolean;
|
|
551
554
|
id: z.ZodString;
|
|
@@ -557,10 +560,7 @@ declare const messagesResponseSchema: z.ZodObject<{
|
|
|
557
560
|
createdByUserId: z.ZodString;
|
|
558
561
|
id: z.ZodString;
|
|
559
562
|
name: z.ZodString;
|
|
560
|
-
type: z.
|
|
561
|
-
Input: "Input";
|
|
562
|
-
Output: "Output";
|
|
563
|
-
}>;
|
|
563
|
+
type: z.ZodString;
|
|
564
564
|
value: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
565
565
|
}, z.core.$strip>>;
|
|
566
566
|
}, z.core.$strip>>;
|
|
@@ -576,6 +576,8 @@ type MessageErrorDto = NonNullable<MessageDto['errors']>[number] & {
|
|
|
576
576
|
};
|
|
577
577
|
type MessageError = NonNullable<Message['errors']>[number];
|
|
578
578
|
declare function mapMessageValueDtoToModel(dto: MessageValueDto): MessageValue;
|
|
579
|
+
/** `type` is an extensible enum; a value this UI cannot place is dropped. */
|
|
580
|
+
declare const mapMessageValuesDtoToModels: (dtos: MessageValueDto[]) => MessageValue[];
|
|
579
581
|
declare function mapMessageErrorDtoToModel(dto: MessageErrorDto): MessageError;
|
|
580
582
|
declare function mapMessageDtoToModel(dto: MessageDto): Message;
|
|
581
583
|
declare function mapMessagesDtoToModels(dto: MessageDto[]): Message[];
|
|
@@ -597,7 +599,7 @@ declare function applyDeltaToMessage(target: Message, delta: {
|
|
|
597
599
|
/**
|
|
598
600
|
* User-facing text for message errors.
|
|
599
601
|
*
|
|
600
|
-
* The backend attaches a stable machine-readable category to
|
|
602
|
+
* The backend attaches a stable machine-readable category to failures
|
|
601
603
|
* (`errorCode`, e.g. "llm.rate_limit") alongside the numeric HTTP `code`.
|
|
602
604
|
* Prefer the category — it distinguishes causes the HTTP code can't (a 400
|
|
603
605
|
* can be a content filter, a context-window blowout, or a malformed
|
|
@@ -776,11 +778,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
776
778
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
777
779
|
}, z.core.$strip>>>>;
|
|
778
780
|
variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
779
|
-
access: z.
|
|
780
|
-
None: "None";
|
|
781
|
-
Read: "Read";
|
|
782
|
-
Write: "Write";
|
|
783
|
-
}>;
|
|
781
|
+
access: z.ZodString;
|
|
784
782
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
785
783
|
}, z.core.$strip>>>>;
|
|
786
784
|
}, z.core.$strip>>;
|
|
@@ -803,10 +801,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
803
801
|
honourSourceDeletes: z.ZodBoolean;
|
|
804
802
|
id: z.ZodString;
|
|
805
803
|
inputName: z.ZodString;
|
|
806
|
-
type: z.
|
|
807
|
-
Periodic: "Periodic";
|
|
808
|
-
Container: "Container";
|
|
809
|
-
}>;
|
|
804
|
+
type: z.ZodString;
|
|
810
805
|
}, z.core.$strip>>;
|
|
811
806
|
}, z.core.$strip>>;
|
|
812
807
|
id: z.ZodString;
|
|
@@ -851,13 +846,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
851
846
|
providerDeploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
852
847
|
providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
853
848
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
854
|
-
status: z.
|
|
855
|
-
Deploying: "Deploying";
|
|
856
|
-
Ready: "Ready";
|
|
857
|
-
Failed: "Failed";
|
|
858
|
-
Deleting: "Deleting";
|
|
859
|
-
Deleted: "Deleted";
|
|
860
|
-
}>;
|
|
849
|
+
status: z.ZodString;
|
|
861
850
|
statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
862
851
|
statusUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
863
852
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -865,68 +854,52 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
865
854
|
id: z.ZodString;
|
|
866
855
|
index: z.ZodNumber;
|
|
867
856
|
message: z.ZodString;
|
|
868
|
-
name: z.
|
|
869
|
-
DeployVNet: "DeployVNet";
|
|
870
|
-
DeployVM: "DeployVM";
|
|
871
|
-
InstallDependencies: "InstallDependencies";
|
|
872
|
-
DownloadModel: "DownloadModel";
|
|
873
|
-
TestModel: "TestModel";
|
|
874
|
-
}>;
|
|
857
|
+
name: z.ZodString;
|
|
875
858
|
progress: z.ZodNumber;
|
|
876
859
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
877
860
|
}, z.core.$strip>>;
|
|
878
861
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
879
|
-
virtualMachineServerType: z.ZodOptional<z.
|
|
880
|
-
TextGenerationInference: "TextGenerationInference";
|
|
881
|
-
VLlm: "VLlm";
|
|
882
|
-
}>>;
|
|
862
|
+
virtualMachineServerType: z.ZodOptional<z.ZodString>;
|
|
883
863
|
virtualMachineUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
884
864
|
vmSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
885
865
|
}, z.core.$strip>>;
|
|
886
866
|
displayName: z.ZodString;
|
|
887
867
|
id: z.ZodString;
|
|
888
|
-
modelDeploymentProviderType: z.ZodOptional<z.
|
|
889
|
-
|
|
890
|
-
AzureOpenAi: "AzureOpenAi";
|
|
891
|
-
HuggingFace: "HuggingFace";
|
|
892
|
-
Cohere: "Cohere";
|
|
893
|
-
Anthropic: "Anthropic";
|
|
894
|
-
Gemini: "Gemini";
|
|
895
|
-
VertexAi: "VertexAi";
|
|
896
|
-
AzureFoundry: "AzureFoundry";
|
|
897
|
-
}>>;
|
|
898
|
-
modelPublisher: z.ZodOptional<z.ZodEnum<{
|
|
899
|
-
OpenAi: "OpenAi";
|
|
900
|
-
HuggingFace: "HuggingFace";
|
|
901
|
-
Cohere: "Cohere";
|
|
902
|
-
Anthropic: "Anthropic";
|
|
903
|
-
Google: "Google";
|
|
904
|
-
Meta: "Meta";
|
|
905
|
-
Mistral: "Mistral";
|
|
906
|
-
Microsoft: "Microsoft";
|
|
907
|
-
DeepSeek: "DeepSeek";
|
|
908
|
-
XAi: "XAi";
|
|
909
|
-
Amazon: "Amazon";
|
|
910
|
-
Qwen: "Qwen";
|
|
911
|
-
Other: "Other";
|
|
912
|
-
}>>;
|
|
868
|
+
modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
|
|
869
|
+
modelPublisher: z.ZodOptional<z.ZodString>;
|
|
913
870
|
name: z.ZodString;
|
|
914
|
-
properties: z.ZodArray<z.ZodObject<{
|
|
871
|
+
properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
872
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
873
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
874
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
915
875
|
name: z.ZodString;
|
|
876
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
916
877
|
type: z.ZodEnum<{
|
|
917
878
|
Boolean: "Boolean";
|
|
879
|
+
}>;
|
|
880
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
881
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
882
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
883
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
884
|
+
name: z.ZodString;
|
|
885
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
886
|
+
type: z.ZodEnum<{
|
|
918
887
|
Number: "Number";
|
|
888
|
+
}>;
|
|
889
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
890
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
891
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
892
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
893
|
+
name: z.ZodString;
|
|
894
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
895
|
+
type: z.ZodEnum<{
|
|
919
896
|
String: "String";
|
|
920
897
|
}>;
|
|
921
|
-
}, z.core.$strip>>;
|
|
898
|
+
}, z.core.$strip>]>>;
|
|
922
899
|
}, z.core.$strip>;
|
|
923
900
|
prePrompt: z.ZodString;
|
|
924
901
|
presencePenalty: z.ZodNumber;
|
|
925
|
-
role: z.
|
|
926
|
-
Document: "Document";
|
|
927
|
-
Agent: "Agent";
|
|
928
|
-
Analyzer: "Analyzer";
|
|
929
|
-
}>;
|
|
902
|
+
role: z.ZodString;
|
|
930
903
|
temperature: z.ZodNumber;
|
|
931
904
|
topP: z.ZodNumber;
|
|
932
905
|
}, z.core.$strip>>;
|
|
@@ -940,11 +913,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
940
913
|
supportsFiles: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
941
914
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
942
915
|
variables: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
943
|
-
access: z.
|
|
944
|
-
None: "None";
|
|
945
|
-
Read: "Read";
|
|
946
|
-
Write: "Write";
|
|
947
|
-
}>;
|
|
916
|
+
access: z.ZodString;
|
|
948
917
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
949
918
|
}, z.core.$strip>>;
|
|
950
919
|
}, z.core.$strip>;
|
|
@@ -1019,11 +988,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1019
988
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1020
989
|
}, z.core.$strip>>>>;
|
|
1021
990
|
variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1022
|
-
access: z.
|
|
1023
|
-
None: "None";
|
|
1024
|
-
Read: "Read";
|
|
1025
|
-
Write: "Write";
|
|
1026
|
-
}>;
|
|
991
|
+
access: z.ZodString;
|
|
1027
992
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1028
993
|
}, z.core.$strip>>>>;
|
|
1029
994
|
}, z.core.$strip>>;
|
|
@@ -1046,10 +1011,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1046
1011
|
honourSourceDeletes: z.ZodBoolean;
|
|
1047
1012
|
id: z.ZodString;
|
|
1048
1013
|
inputName: z.ZodString;
|
|
1049
|
-
type: z.
|
|
1050
|
-
Periodic: "Periodic";
|
|
1051
|
-
Container: "Container";
|
|
1052
|
-
}>;
|
|
1014
|
+
type: z.ZodString;
|
|
1053
1015
|
}, z.core.$strip>>;
|
|
1054
1016
|
}, z.core.$strip>>;
|
|
1055
1017
|
id: z.ZodString;
|
|
@@ -1094,13 +1056,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1094
1056
|
providerDeploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1095
1057
|
providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1096
1058
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1097
|
-
status: z.
|
|
1098
|
-
Deploying: "Deploying";
|
|
1099
|
-
Ready: "Ready";
|
|
1100
|
-
Failed: "Failed";
|
|
1101
|
-
Deleting: "Deleting";
|
|
1102
|
-
Deleted: "Deleted";
|
|
1103
|
-
}>;
|
|
1059
|
+
status: z.ZodString;
|
|
1104
1060
|
statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1105
1061
|
statusUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
1106
1062
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -1108,68 +1064,52 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1108
1064
|
id: z.ZodString;
|
|
1109
1065
|
index: z.ZodNumber;
|
|
1110
1066
|
message: z.ZodString;
|
|
1111
|
-
name: z.
|
|
1112
|
-
DeployVNet: "DeployVNet";
|
|
1113
|
-
DeployVM: "DeployVM";
|
|
1114
|
-
InstallDependencies: "InstallDependencies";
|
|
1115
|
-
DownloadModel: "DownloadModel";
|
|
1116
|
-
TestModel: "TestModel";
|
|
1117
|
-
}>;
|
|
1067
|
+
name: z.ZodString;
|
|
1118
1068
|
progress: z.ZodNumber;
|
|
1119
1069
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
1120
1070
|
}, z.core.$strip>>;
|
|
1121
1071
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1122
|
-
virtualMachineServerType: z.ZodOptional<z.
|
|
1123
|
-
TextGenerationInference: "TextGenerationInference";
|
|
1124
|
-
VLlm: "VLlm";
|
|
1125
|
-
}>>;
|
|
1072
|
+
virtualMachineServerType: z.ZodOptional<z.ZodString>;
|
|
1126
1073
|
virtualMachineUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1127
1074
|
vmSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1128
1075
|
}, z.core.$strip>>;
|
|
1129
1076
|
displayName: z.ZodString;
|
|
1130
1077
|
id: z.ZodString;
|
|
1131
|
-
modelDeploymentProviderType: z.ZodOptional<z.
|
|
1132
|
-
|
|
1133
|
-
AzureOpenAi: "AzureOpenAi";
|
|
1134
|
-
HuggingFace: "HuggingFace";
|
|
1135
|
-
Cohere: "Cohere";
|
|
1136
|
-
Anthropic: "Anthropic";
|
|
1137
|
-
Gemini: "Gemini";
|
|
1138
|
-
VertexAi: "VertexAi";
|
|
1139
|
-
AzureFoundry: "AzureFoundry";
|
|
1140
|
-
}>>;
|
|
1141
|
-
modelPublisher: z.ZodOptional<z.ZodEnum<{
|
|
1142
|
-
OpenAi: "OpenAi";
|
|
1143
|
-
HuggingFace: "HuggingFace";
|
|
1144
|
-
Cohere: "Cohere";
|
|
1145
|
-
Anthropic: "Anthropic";
|
|
1146
|
-
Google: "Google";
|
|
1147
|
-
Meta: "Meta";
|
|
1148
|
-
Mistral: "Mistral";
|
|
1149
|
-
Microsoft: "Microsoft";
|
|
1150
|
-
DeepSeek: "DeepSeek";
|
|
1151
|
-
XAi: "XAi";
|
|
1152
|
-
Amazon: "Amazon";
|
|
1153
|
-
Qwen: "Qwen";
|
|
1154
|
-
Other: "Other";
|
|
1155
|
-
}>>;
|
|
1078
|
+
modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
modelPublisher: z.ZodOptional<z.ZodString>;
|
|
1156
1080
|
name: z.ZodString;
|
|
1157
|
-
properties: z.ZodArray<z.ZodObject<{
|
|
1081
|
+
properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1082
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1083
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1084
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1158
1085
|
name: z.ZodString;
|
|
1086
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1159
1087
|
type: z.ZodEnum<{
|
|
1160
1088
|
Boolean: "Boolean";
|
|
1089
|
+
}>;
|
|
1090
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1091
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1092
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1093
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1094
|
+
name: z.ZodString;
|
|
1095
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1096
|
+
type: z.ZodEnum<{
|
|
1161
1097
|
Number: "Number";
|
|
1098
|
+
}>;
|
|
1099
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1100
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1101
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1102
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1103
|
+
name: z.ZodString;
|
|
1104
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1105
|
+
type: z.ZodEnum<{
|
|
1162
1106
|
String: "String";
|
|
1163
1107
|
}>;
|
|
1164
|
-
}, z.core.$strip>>;
|
|
1108
|
+
}, z.core.$strip>]>>;
|
|
1165
1109
|
}, z.core.$strip>;
|
|
1166
1110
|
prePrompt: z.ZodString;
|
|
1167
1111
|
presencePenalty: z.ZodNumber;
|
|
1168
|
-
role: z.
|
|
1169
|
-
Document: "Document";
|
|
1170
|
-
Agent: "Agent";
|
|
1171
|
-
Analyzer: "Analyzer";
|
|
1172
|
-
}>;
|
|
1112
|
+
role: z.ZodString;
|
|
1173
1113
|
temperature: z.ZodNumber;
|
|
1174
1114
|
topP: z.ZodNumber;
|
|
1175
1115
|
}, z.core.$strip>>;
|
|
@@ -1183,11 +1123,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1183
1123
|
supportsFiles: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1184
1124
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1185
1125
|
variables: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1186
|
-
access: z.
|
|
1187
|
-
None: "None";
|
|
1188
|
-
Read: "Read";
|
|
1189
|
-
Write: "Write";
|
|
1190
|
-
}>;
|
|
1126
|
+
access: z.ZodString;
|
|
1191
1127
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1192
1128
|
}, z.core.$strip>>;
|
|
1193
1129
|
}, z.core.$strip>>;
|
|
@@ -1576,4 +1512,4 @@ declare function useModels({ search, take, skip, }?: {
|
|
|
1576
1512
|
*/
|
|
1577
1513
|
declare function useSpeechConfig(): _tanstack_react_query.UseQueryResult<SpeechConfig, Error>;
|
|
1578
1514
|
|
|
1579
|
-
export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, DictationButton, type DictationButtonProps, type DictationError, type DictationState, type FileInfo$1 as FileInfo, type FileScope, type FlowRunVariables, MarkdownEditor, type MarkdownEditorHandle, type MentionUser, type Message, MessageComposer, type MessageComposerProps, type MessageContentItem, type MessageError, type MessageErrorLike, MessageList, type MessageListProps, MessageListSkeleton, MessageMarkdown, type MessageThread, type MessageValue, MessageValueType, type Model, type ModelProperty, NEW_THREAD_ID, type RetryStatus, type SpeechConfig, type SpeechToken, THREAD_LIST_PAGE_SIZE, type ThreadsResponse, type UseDictationOptions, type Variables, type Workspace, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorDetail, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, speechKeys, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDictation, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useIsDraftThreadId, useMessages, useModels, useSendMessage, useSpeechConfig, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };
|
|
1515
|
+
export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, DictationButton, type DictationButtonProps, type DictationError, type DictationState, type FileInfo$1 as FileInfo, type FileScope, type FlowRunVariables, MarkdownEditor, type MarkdownEditorHandle, type MentionUser, type Message, MessageComposer, type MessageComposerProps, type MessageContentItem, type MessageError, type MessageErrorLike, MessageList, type MessageListProps, MessageListSkeleton, MessageMarkdown, type MessageThread, type MessageValue, MessageValueType, type Model, type ModelProperty, NEW_THREAD_ID, type RetryStatus, type SpeechConfig, type SpeechToken, THREAD_LIST_PAGE_SIZE, type ThreadsResponse, type UseDictationOptions, type Variables, type Workspace, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorDetail, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessageValuesDtoToModels, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, speechKeys, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDictation, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useIsDraftThreadId, useMessages, useModels, useSendMessage, useSpeechConfig, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };
|
package/dist/index.js
CHANGED
|
@@ -19626,7 +19626,14 @@ var ERROR_CODE_TEXT = {
|
|
|
19626
19626
|
"llm.content_policy": "\u26A0\uFE0F **The response was blocked by a content filter**\n\nPlease rephrase your request.",
|
|
19627
19627
|
"llm.schema_validation": "\u26A0\uFE0F **The model returned an invalid response**\n\nPlease try again.",
|
|
19628
19628
|
"llm.unsupported_modality": "\u26A0\uFE0F **This model can't read images**\n\nSwitch to a vision-capable model, or remove the attachment and describe it instead.",
|
|
19629
|
-
"llm.unknown": GENERIC_ERROR_TEXT
|
|
19629
|
+
"llm.unknown": GENERIC_ERROR_TEXT,
|
|
19630
|
+
// Managed secrets. A secret's failure arrives as a 404 or 400, which the
|
|
19631
|
+
// status table below would read as a missing model or a generic error.
|
|
19632
|
+
"secret.user_value_not_set": "\u26A0\uFE0F **Your own key for this isn't set**\n\nThis step uses a credential each person sets for themselves, and none is set for you yet. Ask an administrator to add it.",
|
|
19633
|
+
"secret.run_has_no_user": "\u26A0\uFE0F **This step needs a signed-in user**\n\nIt uses a person's own credential, so it can't run when no one started the run.",
|
|
19634
|
+
"secret.user_mismatch": "\u26A0\uFE0F **A credential couldn't be loaded**\n\nAn administrator needs to check this flow's secrets.",
|
|
19635
|
+
"secret.run_required": "\u26A0\uFE0F **A credential couldn't be loaded**\n\nAn administrator needs to check this flow's secrets.",
|
|
19636
|
+
MS404: "\u26A0\uFE0F **A secret this flow uses doesn't exist**\n\nAn administrator needs to add it, or point the flow at another one."
|
|
19630
19637
|
};
|
|
19631
19638
|
var STATUS_CODE_TEXT = {
|
|
19632
19639
|
408: ERROR_CODE_TEXT["llm.timeout"],
|
|
@@ -19719,7 +19726,8 @@ var MessageErrorMessageSchema = z.object({
|
|
|
19719
19726
|
error_code: z.string().nullish(),
|
|
19720
19727
|
message: z.string().nullish(),
|
|
19721
19728
|
data: z.string().nullish(),
|
|
19722
|
-
blockId: z.string().nullish()
|
|
19729
|
+
blockId: z.string().nullish(),
|
|
19730
|
+
traceId: z.string().nullish()
|
|
19723
19731
|
});
|
|
19724
19732
|
var MessageSchema = z.object({
|
|
19725
19733
|
id: z.string().nullish(),
|
|
@@ -20567,7 +20575,10 @@ var MessageBubble = (props) => {
|
|
|
20567
20575
|
/* @__PURE__ */ jsx("div", { className: "mt-1.5", children: metaRow })
|
|
20568
20576
|
] });
|
|
20569
20577
|
};
|
|
20570
|
-
function MessageErrorDetails({
|
|
20578
|
+
function MessageErrorDetails({
|
|
20579
|
+
detail,
|
|
20580
|
+
traceId
|
|
20581
|
+
}) {
|
|
20571
20582
|
const [expanded, setExpanded] = useState(false);
|
|
20572
20583
|
return /* @__PURE__ */ jsxs("div", { className: "mt-1", children: [
|
|
20573
20584
|
/* @__PURE__ */ jsxs(
|
|
@@ -20583,7 +20594,13 @@ function MessageErrorDetails({ detail }) {
|
|
|
20583
20594
|
]
|
|
20584
20595
|
}
|
|
20585
20596
|
),
|
|
20586
|
-
expanded && /* @__PURE__ */
|
|
20597
|
+
expanded && /* @__PURE__ */ jsxs("div", { className: "mt-1.5 whitespace-pre-wrap break-words rounded-md bg-secondary/60 p-2 font-mono text-[11px] leading-relaxed text-muted-foreground", children: [
|
|
20598
|
+
detail,
|
|
20599
|
+
traceId && /* @__PURE__ */ jsxs("div", { className: detail ? "mt-1.5" : void 0, children: [
|
|
20600
|
+
"Reference: ",
|
|
20601
|
+
traceId
|
|
20602
|
+
] })
|
|
20603
|
+
] })
|
|
20587
20604
|
] });
|
|
20588
20605
|
}
|
|
20589
20606
|
var ThinkingSection = ({ status }) => /* @__PURE__ */ jsxs(
|
|
@@ -20891,7 +20908,7 @@ var MessageItem = ({
|
|
|
20891
20908
|
userInput: null
|
|
20892
20909
|
}
|
|
20893
20910
|
),
|
|
20894
|
-
detail && /* @__PURE__ */ jsx(MessageErrorDetails, { detail })
|
|
20911
|
+
(detail || error.traceId) && /* @__PURE__ */ jsx(MessageErrorDetails, { detail, traceId: error.traceId })
|
|
20895
20912
|
] }, key)
|
|
20896
20913
|
);
|
|
20897
20914
|
});
|
|
@@ -21147,6 +21164,11 @@ function MessageListSkeleton() {
|
|
|
21147
21164
|
i
|
|
21148
21165
|
)) });
|
|
21149
21166
|
}
|
|
21167
|
+
|
|
21168
|
+
// src/shared/utils/enums.ts
|
|
21169
|
+
var isMember = (e, value) => Object.values(e).includes(value);
|
|
21170
|
+
|
|
21171
|
+
// src/domains/messages/mapper.ts
|
|
21150
21172
|
var {
|
|
21151
21173
|
messageThreadsThreadMessagesIdMessagesResponse: messagesResponseSchema
|
|
21152
21174
|
} = ChatZod;
|
|
@@ -21173,6 +21195,7 @@ function mapMessageValueDtoToModel(dto) {
|
|
|
21173
21195
|
createdByUserId: dto.createdByUserId ?? void 0
|
|
21174
21196
|
};
|
|
21175
21197
|
}
|
|
21198
|
+
var mapMessageValuesDtoToModels = (dtos) => dtos.filter((dto) => isMember(MessageValueType, dto.type)).map(mapMessageValueDtoToModel);
|
|
21176
21199
|
function mapMessageErrorDtoToModel(dto) {
|
|
21177
21200
|
const { error_code, ...rest } = dto;
|
|
21178
21201
|
return {
|
|
@@ -21190,7 +21213,7 @@ function mapMessageDtoToModel(dto) {
|
|
|
21190
21213
|
createdByUserId: dto.createdByUserId ?? void 0,
|
|
21191
21214
|
messageThreadId: dto.messageThreadId ?? void 0,
|
|
21192
21215
|
errors: dto.errors?.map(mapMessageErrorDtoToModel) ?? void 0,
|
|
21193
|
-
values: dto.values
|
|
21216
|
+
values: dto.values && mapMessageValuesDtoToModels(dto.values)
|
|
21194
21217
|
};
|
|
21195
21218
|
}
|
|
21196
21219
|
function mapMessagesDtoToModels(dto) {
|
|
@@ -21320,6 +21343,6 @@ function getUserPhotoUrl(userId) {
|
|
|
21320
21343
|
return `${base2}/users/${userId}/photo`;
|
|
21321
21344
|
}
|
|
21322
21345
|
|
|
21323
|
-
export { ChatProvider, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, DictationButton, MarkdownEditor, MessageComposer, MessageList, MessageListSkeleton, MessageMarkdown, MessageValueType, NEW_THREAD_ID, THREAD_LIST_PAGE_SIZE, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorDetail, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, speechKeys, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDictation, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useIsDraftThreadId, useMessages, useModels, useSendMessage, useSpeechConfig, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };
|
|
21346
|
+
export { ChatProvider, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, DictationButton, MarkdownEditor, MessageComposer, MessageList, MessageListSkeleton, MessageMarkdown, MessageValueType, NEW_THREAD_ID, THREAD_LIST_PAGE_SIZE, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorDetail, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessageValuesDtoToModels, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, speechKeys, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDictation, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useIsDraftThreadId, useMessages, useModels, useSendMessage, useSpeechConfig, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };
|
|
21324
21347
|
//# sourceMappingURL=index.js.map
|
|
21325
21348
|
//# sourceMappingURL=index.js.map
|