@smartspace/chat-ui 1.14.6-main.9899093 → 1.14.6-main.a16cd14
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 +58 -7
- package/dist/index.js +23 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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;
|
|
@@ -596,7 +599,7 @@ declare function applyDeltaToMessage(target: Message, delta: {
|
|
|
596
599
|
/**
|
|
597
600
|
* User-facing text for message errors.
|
|
598
601
|
*
|
|
599
|
-
* The backend attaches a stable machine-readable category to
|
|
602
|
+
* The backend attaches a stable machine-readable category to failures
|
|
600
603
|
* (`errorCode`, e.g. "llm.rate_limit") alongside the numeric HTTP `code`.
|
|
601
604
|
* Prefer the category — it distinguishes causes the HTTP code can't (a 400
|
|
602
605
|
* can be a content filter, a context-window blowout, or a malformed
|
|
@@ -865,10 +868,34 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
865
868
|
modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
|
|
866
869
|
modelPublisher: z.ZodOptional<z.ZodString>;
|
|
867
870
|
name: z.ZodString;
|
|
868
|
-
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>>;
|
|
869
875
|
name: z.ZodString;
|
|
870
|
-
|
|
871
|
-
|
|
876
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
877
|
+
type: z.ZodEnum<{
|
|
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<{
|
|
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<{
|
|
896
|
+
String: "String";
|
|
897
|
+
}>;
|
|
898
|
+
}, z.core.$strip>]>>;
|
|
872
899
|
}, z.core.$strip>;
|
|
873
900
|
prePrompt: z.ZodString;
|
|
874
901
|
presencePenalty: z.ZodNumber;
|
|
@@ -1051,10 +1078,34 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1051
1078
|
modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
|
|
1052
1079
|
modelPublisher: z.ZodOptional<z.ZodString>;
|
|
1053
1080
|
name: z.ZodString;
|
|
1054
|
-
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>>;
|
|
1055
1085
|
name: z.ZodString;
|
|
1056
|
-
|
|
1057
|
-
|
|
1086
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1087
|
+
type: z.ZodEnum<{
|
|
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<{
|
|
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<{
|
|
1106
|
+
String: "String";
|
|
1107
|
+
}>;
|
|
1108
|
+
}, z.core.$strip>]>>;
|
|
1058
1109
|
}, z.core.$strip>;
|
|
1059
1110
|
prePrompt: z.ZodString;
|
|
1060
1111
|
presencePenalty: z.ZodNumber;
|
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
|
});
|
|
@@ -21312,8 +21329,7 @@ var mapWorkspacesDtoToModels = (arr) => arr.map(mapWorkspaceDtoToModel);
|
|
|
21312
21329
|
function getChatApiBaseUrl() {
|
|
21313
21330
|
try {
|
|
21314
21331
|
const w = window;
|
|
21315
|
-
const
|
|
21316
|
-
const cfg = w?.ssconfig?.Chat_Api_Uri ?? env2?.VITE_CHAT_API_URI;
|
|
21332
|
+
const cfg = w?.ssconfig?.Chat_Api_Uri;
|
|
21317
21333
|
return typeof cfg === "string" && cfg.trim() ? cfg.trim() : "";
|
|
21318
21334
|
} catch {
|
|
21319
21335
|
return "";
|