@usabledev/usable-chat 1.223.1 → 1.223.2
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/cli.js +20 -3
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -52968,7 +52968,7 @@ var init_model_registry = __esm({
|
|
|
52968
52968
|
var version2;
|
|
52969
52969
|
var init_package = __esm({
|
|
52970
52970
|
"package.json"() {
|
|
52971
|
-
version2 = "1.223.
|
|
52971
|
+
version2 = "1.223.2";
|
|
52972
52972
|
}
|
|
52973
52973
|
});
|
|
52974
52974
|
|
|
@@ -99344,6 +99344,20 @@ var init_persist_injected_pause = __esm({
|
|
|
99344
99344
|
}
|
|
99345
99345
|
});
|
|
99346
99346
|
|
|
99347
|
+
// src/core/tools/reported-error.ts
|
|
99348
|
+
var ToolReportedError;
|
|
99349
|
+
var init_reported_error = __esm({
|
|
99350
|
+
"src/core/tools/reported-error.ts"() {
|
|
99351
|
+
"use strict";
|
|
99352
|
+
ToolReportedError = class extends Error {
|
|
99353
|
+
constructor(message2) {
|
|
99354
|
+
super(message2);
|
|
99355
|
+
this.name = "ToolReportedError";
|
|
99356
|
+
}
|
|
99357
|
+
};
|
|
99358
|
+
}
|
|
99359
|
+
});
|
|
99360
|
+
|
|
99347
99361
|
// src/components/chat/language-prompt.ts
|
|
99348
99362
|
var LANGUAGE_PROMPT;
|
|
99349
99363
|
var init_language_prompt = __esm({
|
|
@@ -379534,7 +379548,7 @@ ${combinedSystemMessage}` : combinedSystemMessage;
|
|
|
379534
379548
|
executionContext: orchestratorToolContext
|
|
379535
379549
|
});
|
|
379536
379550
|
if (result && typeof result === "object" && "error" in result && result.error) {
|
|
379537
|
-
throw new
|
|
379551
|
+
throw new ToolReportedError(
|
|
379538
379552
|
typeof result.error === "string" ? result.error : JSON.stringify(result.error)
|
|
379539
379553
|
);
|
|
379540
379554
|
}
|
|
@@ -379552,7 +379566,9 @@ ${combinedSystemMessage}` : combinedSystemMessage;
|
|
|
379552
379566
|
toolName,
|
|
379553
379567
|
error: errorMessage
|
|
379554
379568
|
});
|
|
379555
|
-
|
|
379569
|
+
const message2 = `MCP tool "${toolName}" failed: ${errorMessage}`;
|
|
379570
|
+
if (error42 instanceof ToolReportedError) throw new ToolReportedError(message2);
|
|
379571
|
+
throw new Error(message2);
|
|
379556
379572
|
}
|
|
379557
379573
|
}
|
|
379558
379574
|
if (!context3.sessionPathway) {
|
|
@@ -381168,6 +381184,7 @@ var init_orchestrator = __esm({
|
|
|
381168
381184
|
init_tool_authorization();
|
|
381169
381185
|
init_persist_injected_pause();
|
|
381170
381186
|
init_argument_validation();
|
|
381187
|
+
init_reported_error();
|
|
381171
381188
|
init_language_prompt();
|
|
381172
381189
|
init_visualization_prompt();
|
|
381173
381190
|
init_prompt();
|