@invergent/agent-chat-react 2.2.8 → 2.3.0
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.cjs +23 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8577,7 +8577,7 @@ function SimpleFinalAnswer({
|
|
|
8577
8577
|
}) {
|
|
8578
8578
|
const content = useSmoothStream(text, isStreaming);
|
|
8579
8579
|
const revealComplete = content.length >= text.length;
|
|
8580
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8580
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8581
8581
|
/* @__PURE__ */ jsxRuntime.jsx(MessageResponse, { children: content }),
|
|
8582
8582
|
tail?.status === "complete" && revealComplete && /* @__PURE__ */ jsxRuntime.jsx(TurnFeedback, { msg: tail })
|
|
8583
8583
|
] });
|
|
@@ -8683,16 +8683,6 @@ var _SIMPLE_MODE_HIDDEN_TOOLS = /* @__PURE__ */ new Set([
|
|
|
8683
8683
|
"terminal",
|
|
8684
8684
|
"execute_code"
|
|
8685
8685
|
]);
|
|
8686
|
-
var _SKILL_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
8687
|
-
"skills_list",
|
|
8688
|
-
"skill_view",
|
|
8689
|
-
"skill_manage"
|
|
8690
|
-
]);
|
|
8691
|
-
function _isSkillOnlyIteration(message) {
|
|
8692
|
-
const calls = message.toolCalls ?? [];
|
|
8693
|
-
if (calls.length === 0) return false;
|
|
8694
|
-
return calls.every((tc) => _SKILL_TOOL_NAMES.has(tc.toolName));
|
|
8695
|
-
}
|
|
8696
8686
|
function _isHiddenSimpleTool(tc) {
|
|
8697
8687
|
if (_SIMPLE_MODE_HIDDEN_TOOLS.has(tc.toolName)) return true;
|
|
8698
8688
|
if (tc.toolName.startsWith("browser_")) return true;
|
|
@@ -8867,7 +8857,6 @@ function IterationGroup({
|
|
|
8867
8857
|
}) {
|
|
8868
8858
|
const summary = message.iterationSummary?.summary;
|
|
8869
8859
|
const [open, setOpen] = react.useState(false);
|
|
8870
|
-
if (_isSkillOnlyIteration(message)) return null;
|
|
8871
8860
|
if (isIterationLive(message)) {
|
|
8872
8861
|
const askCall = (message.toolCalls ?? []).find(
|
|
8873
8862
|
(tc) => tc.toolName === "ask_user_question" && tc.status === "running"
|
|
@@ -8876,7 +8865,7 @@ function IterationGroup({
|
|
|
8876
8865
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-1 py-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(AskUserQuestionToolBlock, { tc: askCall }) });
|
|
8877
8866
|
}
|
|
8878
8867
|
const label2 = liveIterationLabel(message);
|
|
8879
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
8868
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-0.5 text-sm", children: /* @__PURE__ */ jsxRuntime.jsx(Shimmer, { duration: 3, spread: 3, className: "text-sm", children: label2 }) });
|
|
8880
8869
|
}
|
|
8881
8870
|
const label = summary ?? deriveIterationLabel(message);
|
|
8882
8871
|
if (!label) {
|
|
@@ -8983,7 +8972,8 @@ function SimpleAssistantGroup({
|
|
|
8983
8972
|
const tailIsTextOnly = !!tail && !tailHasTools;
|
|
8984
8973
|
const finalText = tailIsTextOnly && tail.content ? tail.content : "";
|
|
8985
8974
|
const isTailGroup = lastGlobalIndex === totalMessages - 1;
|
|
8986
|
-
const
|
|
8975
|
+
const tailRendersOwnShimmer = !!tail && isIterationLive(tail) && !tailIsTextOnly;
|
|
8976
|
+
const showThinkingShim = isTailGroup && isRunning && !tailRendersOwnShimmer;
|
|
8987
8977
|
const showErrorInfo = !!tail && tail.status === "error" && !!tail.errorInfo;
|
|
8988
8978
|
const turnComplete = !isRunning && tail?.status === "complete";
|
|
8989
8979
|
const effectiveTurnSummary = (() => {
|
|
@@ -9001,34 +8991,31 @@ function SimpleAssistantGroup({
|
|
|
9001
8991
|
};
|
|
9002
8992
|
})();
|
|
9003
8993
|
return /* @__PURE__ */ jsxRuntime.jsx(Message, { from: "assistant", children: /* @__PURE__ */ jsxRuntime.jsxs(MessageContent, { children: [
|
|
9004
|
-
/* @__PURE__ */ jsxRuntime.
|
|
9005
|
-
|
|
9006
|
-
if (message.
|
|
9007
|
-
if (message.systemKind === "skill_invoked") return null;
|
|
9008
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9009
|
-
OrphanSystemMarker,
|
|
9010
|
-
{
|
|
9011
|
-
message,
|
|
9012
|
-
sessionId,
|
|
9013
|
-
onRetry: void 0
|
|
9014
|
-
},
|
|
9015
|
-
message.id
|
|
9016
|
-
);
|
|
9017
|
-
}
|
|
9018
|
-
if (message === tail && tailIsTextOnly) return null;
|
|
8994
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: messages.map((message) => {
|
|
8995
|
+
if (message.role === "system") {
|
|
8996
|
+
if (message.systemKind === "skill_invoked") return null;
|
|
9019
8997
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9020
|
-
|
|
8998
|
+
OrphanSystemMarker,
|
|
9021
8999
|
{
|
|
9022
9000
|
message,
|
|
9023
9001
|
sessionId,
|
|
9024
|
-
|
|
9025
|
-
onFileSelect
|
|
9002
|
+
onRetry: void 0
|
|
9026
9003
|
},
|
|
9027
9004
|
message.id
|
|
9028
9005
|
);
|
|
9029
|
-
}
|
|
9030
|
-
|
|
9031
|
-
|
|
9006
|
+
}
|
|
9007
|
+
if (message === tail && tailIsTextOnly) return null;
|
|
9008
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9009
|
+
IterationGroup,
|
|
9010
|
+
{
|
|
9011
|
+
message,
|
|
9012
|
+
sessionId,
|
|
9013
|
+
artifactFallbacks,
|
|
9014
|
+
onFileSelect
|
|
9015
|
+
},
|
|
9016
|
+
message.id
|
|
9017
|
+
);
|
|
9018
|
+
}) }),
|
|
9032
9019
|
finalText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9033
9020
|
SimpleFinalAnswer,
|
|
9034
9021
|
{
|
|
@@ -9037,6 +9024,7 @@ function SimpleAssistantGroup({
|
|
|
9037
9024
|
tail
|
|
9038
9025
|
}
|
|
9039
9026
|
),
|
|
9027
|
+
showThinkingShim && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Shimmer, { duration: 3, spread: 3, className: "text-sm", children: "Working on it..." }) }),
|
|
9040
9028
|
effectiveTurnSummary ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9041
9029
|
TurnSummaryCard,
|
|
9042
9030
|
{
|