@smartspace/chat-ui 1.14.4-pr.663.bc5a7a7 → 1.14.4-pr.666.d23ffd2
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.js +16 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19669,15 +19669,12 @@ var ERROR_CODE_TEXT = {
|
|
|
19669
19669
|
"llm.timeout": "\u26A0\uFE0F **The model took too long to respond**\n\nPlease try again. If this keeps happening, try a shorter question.",
|
|
19670
19670
|
"llm.transient_connection": "\u26A0\uFE0F **The connection to the model was interrupted**\n\nThis is usually temporary. Please try again.",
|
|
19671
19671
|
"llm.upstream_error": "\u26A0\uFE0F **The model provider had a problem**\n\nPlease try again in a moment.",
|
|
19672
|
-
"llm.auth": "\u26A0\uFE0F **The model connection isn't authorised**\n\nAn administrator needs to check the model configuration.",
|
|
19673
19672
|
"llm.not_found": "\u26A0\uFE0F **The model or deployment could not be found**\n\nAn administrator needs to check the model configuration.",
|
|
19674
19673
|
"llm.invalid_request": "\u26A0\uFE0F **The request was rejected by the model provider**\n\nPlease try rephrasing your message.",
|
|
19675
19674
|
"llm.context_window": "\u26A0\uFE0F **This conversation is too long for the model**\n\nPlease start a new thread, or ask a shorter question.",
|
|
19676
19675
|
"llm.content_policy": "\u26A0\uFE0F **The response was blocked by a content filter**\n\nPlease rephrase your request.",
|
|
19677
19676
|
"llm.schema_validation": "\u26A0\uFE0F **The model returned an invalid response**\n\nPlease try again.",
|
|
19678
19677
|
"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.",
|
|
19679
|
-
"llm.unknown": GENERIC_ERROR_TEXT,
|
|
19680
|
-
// The AI API's current name for llm.auth; older messages stored that one.
|
|
19681
19678
|
"llm.auth_failed": "\u26A0\uFE0F **The model connection isn't authorised**\n\nAn administrator needs to check the model configuration.",
|
|
19682
19679
|
"llm.unsupported_tools": "\u26A0\uFE0F **This model can't use tools**\n\nAn administrator needs to choose a model that supports tools for this step.",
|
|
19683
19680
|
"embeddings.model_not_found": "\u26A0\uFE0F **The model or deployment could not be found**\n\nAn administrator needs to check the model configuration.",
|
|
@@ -19690,15 +19687,22 @@ var ERROR_CODE_TEXT = {
|
|
|
19690
19687
|
"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.",
|
|
19691
19688
|
"secret.user_mismatch": "\u26A0\uFE0F **A credential couldn't be loaded**\n\nAn administrator needs to check this flow's secrets.",
|
|
19692
19689
|
"secret.run_required": "\u26A0\uFE0F **A credential couldn't be loaded**\n\nAn administrator needs to check this flow's secrets.",
|
|
19693
|
-
"secret.not_found": "\u26A0\uFE0F **A secret this flow uses doesn't exist**\n\nAn administrator needs to add it, or point the flow at another one."
|
|
19694
|
-
|
|
19695
|
-
|
|
19690
|
+
"secret.not_found": "\u26A0\uFE0F **A secret this flow uses doesn't exist**\n\nAn administrator needs to add it, or point the flow at another one."
|
|
19691
|
+
};
|
|
19692
|
+
var LEGACY_CODE_TEXT = {
|
|
19693
|
+
"llm.auth": ERROR_CODE_TEXT["llm.auth_failed"],
|
|
19694
|
+
"llm.unknown": GENERIC_ERROR_TEXT,
|
|
19695
|
+
MS404: ERROR_CODE_TEXT["secret.not_found"]
|
|
19696
|
+
};
|
|
19697
|
+
var CODE_TEXT = {
|
|
19698
|
+
...LEGACY_CODE_TEXT,
|
|
19699
|
+
...ERROR_CODE_TEXT
|
|
19696
19700
|
};
|
|
19697
19701
|
var STATUS_CODE_TEXT = {
|
|
19698
19702
|
408: ERROR_CODE_TEXT["llm.timeout"],
|
|
19699
19703
|
429: ERROR_CODE_TEXT["llm.rate_limit"],
|
|
19700
|
-
401: ERROR_CODE_TEXT["llm.
|
|
19701
|
-
403: ERROR_CODE_TEXT["llm.
|
|
19704
|
+
401: ERROR_CODE_TEXT["llm.auth_failed"],
|
|
19705
|
+
403: ERROR_CODE_TEXT["llm.auth_failed"],
|
|
19702
19706
|
404: ERROR_CODE_TEXT["llm.not_found"],
|
|
19703
19707
|
500: ERROR_CODE_TEXT["llm.upstream_error"],
|
|
19704
19708
|
502: ERROR_CODE_TEXT["llm.upstream_error"],
|
|
@@ -19709,8 +19713,9 @@ var getMessageErrorText = (error) => {
|
|
|
19709
19713
|
if (typeof error === "number") {
|
|
19710
19714
|
return STATUS_CODE_TEXT[error] ?? GENERIC_ERROR_TEXT;
|
|
19711
19715
|
}
|
|
19712
|
-
|
|
19713
|
-
|
|
19716
|
+
const codeText = error.errorCode ? CODE_TEXT[error.errorCode] : void 0;
|
|
19717
|
+
if (codeText) {
|
|
19718
|
+
return codeText;
|
|
19714
19719
|
}
|
|
19715
19720
|
if (error.errorCode && !error.errorCode.startsWith("llm.")) {
|
|
19716
19721
|
return GENERIC_ERROR_TEXT;
|
|
@@ -19856,7 +19861,7 @@ var RETRY_REASON_TEXT = {
|
|
|
19856
19861
|
"llm.rate_limit": "the model is busy",
|
|
19857
19862
|
"llm.timeout": "the model took too long",
|
|
19858
19863
|
"llm.transient_connection": "the connection dropped",
|
|
19859
|
-
"llm.
|
|
19864
|
+
"llm.upstream_error": "the model provider had a problem"
|
|
19860
19865
|
};
|
|
19861
19866
|
var getRetryStatusText = (status) => {
|
|
19862
19867
|
const reason = status.errorCode ? RETRY_REASON_TEXT[status.errorCode] : void 0;
|