@athenaintel/react 0.57.1 → 0.57.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/README.md +19 -0
- package/dist/chat/AthenaChat.cjs +47 -2
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.js +47 -2
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +7 -0
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.js +9 -2
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/runtime/statewire-run-config.cjs +15 -0
- package/dist/runtime/statewire-run-config.cjs.map +1 -1
- package/dist/runtime/statewire-run-config.d.ts +13 -0
- package/dist/runtime/statewire-run-config.js +15 -0
- package/dist/runtime/statewire-run-config.js.map +1 -1
- package/dist/threads/SessionList.cjs +22 -19
- package/dist/threads/SessionList.cjs.map +1 -1
- package/dist/threads/SessionList.js +22 -19
- package/dist/threads/SessionList.js.map +1 -1
- package/dist/threads/live-session-rows.cjs +207 -0
- package/dist/threads/live-session-rows.cjs.map +1 -0
- package/dist/threads/live-session-rows.d.ts +175 -0
- package/dist/threads/live-session-rows.js +207 -0
- package/dist/threads/live-session-rows.js.map +1 -0
- package/dist/threads/statewire-thread-list.cjs +173 -20
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +44 -1
- package/dist/threads/statewire-thread-list.js +174 -21
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -474,6 +474,14 @@ Same visual language as `ThreadList` (Tailwind via `cn`, lucide icons), plus:
|
|
|
474
474
|
frame instead of the loading scrim while the statewire attach lands
|
|
475
475
|
(`useAthenaStatewireThreadList().prefetchThread(threadId)` for hosts
|
|
476
476
|
drawing their own rows);
|
|
477
|
+
- live rows, newest first: a session the signed-in user's conversation index
|
|
478
|
+
pushes (started in this tab, another tab, Slack…) shows the moment it is
|
|
479
|
+
pushed, before the list is read again; a session that becomes active moves
|
|
480
|
+
to the top; and a message sent from this chat moves its session to the top
|
|
481
|
+
as working the moment it is sent — a chat the server does not know yet as
|
|
482
|
+
a pending row titled with the message (`isPending: true` on its
|
|
483
|
+
`useAthenaStatewireThreadList().threads` entry, with no pin, rename or
|
|
484
|
+
archive), which the server's own row replaces within moments;
|
|
477
485
|
- skeleton rows (indicator, title line, meta line) while the first page
|
|
478
486
|
loads — including while no credential has resolved — and for a refresh
|
|
479
487
|
that has no rows to keep; "No sessions yet." only after a settled empty
|
|
@@ -980,6 +988,17 @@ Both use the same bearer / API key as session creation. The full recipe
|
|
|
980
988
|
template skill `voice-session-guide.md`. `createAthenaVoiceSession` is also
|
|
981
989
|
exported if you hold the bridge state yourself.
|
|
982
990
|
|
|
991
|
+
## What's new in 0.57.2
|
|
992
|
+
|
|
993
|
+
**A message you send shows in the session list the moment you send it.** The list used to wait for the server: a new chat appeared only after the server listed it and the list read its page again (about 5 seconds on staging), and a session you wrote to again stayed where it was. Now, in `SessionList`, `ThreadList` and any list a host draws from `useAthenaStatewireThreadList().threads`:
|
|
994
|
+
- **A new chat's row is at the top the moment its first message is sent**, titled with the message, until the server's own row (with its title) replaces it. The row carries `isPending: true` while the server does not know the chat yet; `SessionList` offers no pin, rename or archive on it.
|
|
995
|
+
- **A session you write to again moves to the top**, as working, at once.
|
|
996
|
+
- **A session started anywhere else** (another tab, Slack, email) shows as soon as the signed-in user's conversation index pushes it, without waiting for the list to be read again, and a session that becomes active moves up. The list stays newest first by `updatedAt`, the server's own order.
|
|
997
|
+
|
|
998
|
+
Nothing to change in your app. It sends nothing new: the list reads the same endpoints, and a list without the live index (an API key with no signed-in user) reads its page again a few seconds after a message is sent to an existing session.
|
|
999
|
+
|
|
1000
|
+
**A follow-up you send before the agent answers no longer reads as a stopped run.** A second message sent before the agent says anything joins the first in one turn: the run ends silently and the agent answers both. `AthenaChat` drew that ending as "⏹️ Run stopped by user." although nobody stopped anything, and Send now did the same. `AthenaChat`'s assistant row now draws how a run ended as the other surfaces do: nothing for Send now and a double text, and the status card (`RuntimeMessageCard`: "Conversation stopped", "Paused by a server update", "Run failed" with the error) for a stop, a server-update pause or a failure, in place of the marker's transcript line.
|
|
1001
|
+
|
|
983
1002
|
## What's new in 0.57.1
|
|
984
1003
|
|
|
985
1004
|
**Copy on a message from Slack, email, a text or Teams copies the words that were sent.** It used to copy the message's whole text, with the routing block the channel wrote for the agent ahead of the words. The user bubble's Copy, in `AthenaChat` and in chat-ui's `UserMessage`, now copies what the bubble shows: an email's subject, then the words; any other message copies as before. Hosts with their own user bubble get the same Copy from `useUserMessageCopy()` (`copy`, `disabled`, `isCopied`).
|
package/dist/chat/AthenaChat.cjs
CHANGED
|
@@ -14,6 +14,7 @@ const WaitingOnYouBanner = require("./WaitingOnYouBanner.cjs");
|
|
|
14
14
|
const DrivingOnChip = require("./DrivingOnChip.cjs");
|
|
15
15
|
const offlineHistory = require("../offline/offline-history.cjs");
|
|
16
16
|
const wakeMarker = require("../chat-ui/messages/wake-marker.cjs");
|
|
17
|
+
const runtimeMessage = require("../chat-ui/messages/runtime-message.cjs");
|
|
17
18
|
const toolFallback = require("../tools/tool-fallback.cjs");
|
|
18
19
|
const appendDocumentToolUi = require("../tools/append-document-tool-ui.cjs");
|
|
19
20
|
const readAssetToolUi = require("../tools/read-asset-tool-ui.cjs");
|
|
@@ -84,6 +85,7 @@ const statewireLifecycle = require("../runtime/statewire-lifecycle.cjs");
|
|
|
84
85
|
const chatVoiceControls = require("./chat-voice-controls.cjs");
|
|
85
86
|
const toolNames = require("../agent-runtime/src/tool-names.cjs");
|
|
86
87
|
const subagents = require("../agent-runtime/src/subagents.cjs");
|
|
88
|
+
const runtimeMessages = require("../agent-runtime/src/runtime-messages.cjs");
|
|
87
89
|
const githubWakeEvent = require("../agent-runtime/src/github-wake-event.cjs");
|
|
88
90
|
const subscriptionWakeEvent = require("../agent-runtime/src/subscription-wake-event.cjs");
|
|
89
91
|
const threadStatus = require("../agent-runtime/src/thread-status.cjs");
|
|
@@ -1005,6 +1007,12 @@ const AthenaReasoningPart = ({
|
|
|
1005
1007
|
};
|
|
1006
1008
|
const noToolGrouping = () => null;
|
|
1007
1009
|
const isInlineToolOrSubagent = (toolName) => toolName === toolNames.TASK_TOOL_NAME || inlineTools.isSdkInlineTool(toolName);
|
|
1010
|
+
const AthenaRuntimeEndingCard = () => {
|
|
1011
|
+
const message = react.useAuiState((s) => s.message);
|
|
1012
|
+
const runtime = require$$0.useMemo(() => runtimeMessages.readRuntimeMessageFromSourceMessages(message), [message]);
|
|
1013
|
+
if (!runtime || runtime.silent) return null;
|
|
1014
|
+
return /* @__PURE__ */ jsxRuntime.jsx(runtimeMessage.RuntimeMessageCard, { message: runtime });
|
|
1015
|
+
};
|
|
1008
1016
|
const AthenaAssistantMessage = ({
|
|
1009
1017
|
toolUIs,
|
|
1010
1018
|
AvatarComponent,
|
|
@@ -1037,6 +1045,43 @@ const AthenaAssistantMessage = ({
|
|
|
1037
1045
|
[EmptyComponent, TextComponent, effectiveReasoningComponent, toolUIsWithNestedMessages]
|
|
1038
1046
|
);
|
|
1039
1047
|
const arrivedLive = arrivalAnimation.useMessageArrivalAnimation();
|
|
1048
|
+
const soleEndingKind = react.useAuiState((s) => runtimeMessages.readSoleRuntimeMessageKind(s.message));
|
|
1049
|
+
const endingSilent = react.useAuiState(
|
|
1050
|
+
(s) => {
|
|
1051
|
+
var _a;
|
|
1052
|
+
return ((_a = runtimeMessages.readRuntimeMessageFromSourceMessages(s.message)) == null ? void 0 : _a.silent) === true;
|
|
1053
|
+
}
|
|
1054
|
+
);
|
|
1055
|
+
const chunkedEndingText = react.useAuiState((s) => {
|
|
1056
|
+
const runtime = runtimeMessages.readRuntimeMessageFromSourceMessages(s.message);
|
|
1057
|
+
if (!runtime || runtime.isSoleSourceMessage || runtime.kind === "handoff") return void 0;
|
|
1058
|
+
const markerText = runtime.text;
|
|
1059
|
+
const last = s.message.content.at(-1);
|
|
1060
|
+
if (markerText === void 0 || (last == null ? void 0 : last.type) !== "text" || last.text !== markerText) return void 0;
|
|
1061
|
+
const sameText = s.message.content.filter((part) => part.type === "text" && part.text === markerText);
|
|
1062
|
+
return sameText.length === 1 ? markerText : void 0;
|
|
1063
|
+
});
|
|
1064
|
+
const AnswerTextComponent = require$$0.useMemo(() => {
|
|
1065
|
+
if (chunkedEndingText === void 0) return TextComponent;
|
|
1066
|
+
const Base = TextComponent;
|
|
1067
|
+
return function TextOrRunEnding(props) {
|
|
1068
|
+
return props.text === chunkedEndingText ? /* @__PURE__ */ jsxRuntime.jsx(AthenaRuntimeEndingCard, {}) : /* @__PURE__ */ jsxRuntime.jsx(Base, { ...props });
|
|
1069
|
+
};
|
|
1070
|
+
}, [TextComponent, chunkedEndingText]);
|
|
1071
|
+
if (soleEndingKind !== void 0 && soleEndingKind !== "handoff") {
|
|
1072
|
+
if (endingSilent) return null;
|
|
1073
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1074
|
+
react.MessagePrimitive.Root,
|
|
1075
|
+
{
|
|
1076
|
+
className: "aui-assistant-message-root aui-run-ending-root mx-auto w-full max-w-(--thread-max-width) px-2 py-1",
|
|
1077
|
+
"data-role": "assistant",
|
|
1078
|
+
children: [
|
|
1079
|
+
/* @__PURE__ */ jsxRuntime.jsx(MessageDaySeparator, {}),
|
|
1080
|
+
/* @__PURE__ */ jsxRuntime.jsx(AthenaRuntimeEndingCard, {})
|
|
1081
|
+
]
|
|
1082
|
+
}
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1040
1085
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1041
1086
|
react.MessagePrimitive.Root,
|
|
1042
1087
|
{
|
|
@@ -1071,7 +1116,7 @@ const AthenaAssistantMessage = ({
|
|
|
1071
1116
|
renderRunningMeta: renderGroupedRunningMeta
|
|
1072
1117
|
}
|
|
1073
1118
|
),
|
|
1074
|
-
/* @__PURE__ */ jsxRuntime.jsx(SuperGroupingCard.SuperGroupingFinalText, { TextComponent })
|
|
1119
|
+
/* @__PURE__ */ jsxRuntime.jsx(SuperGroupingCard.SuperGroupingFinalText, { TextComponent: AnswerTextComponent })
|
|
1075
1120
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1076
1121
|
/* @__PURE__ */ jsxRuntime.jsx(AthenaMessageEmptyIndicator, { EmptyComponent }),
|
|
1077
1122
|
/* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
|
|
@@ -1091,7 +1136,7 @@ const AthenaAssistantMessage = ({
|
|
|
1091
1136
|
if (textPart.text === "" && ((_a = textPart.status) == null ? void 0 : _a.type) === "running") {
|
|
1092
1137
|
return /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent, { status: textPart.status });
|
|
1093
1138
|
}
|
|
1094
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AnswerTextComponent, { ...textPart });
|
|
1095
1140
|
}
|
|
1096
1141
|
default:
|
|
1097
1142
|
return null;
|