@athenaintel/react 0.57.0 → 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 +25 -2
- package/dist/chat/AthenaChat.cjs +61 -3
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.js +62 -4
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat-ui/index.cjs +1 -0
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +1 -1
- package/dist/chat-ui/index.js +2 -1
- package/dist/chat-ui/messages/inbound-channel-message.cjs +23 -0
- package/dist/chat-ui/messages/inbound-channel-message.cjs.map +1 -1
- package/dist/chat-ui/messages/inbound-channel-message.d.ts +13 -20
- package/dist/chat-ui/messages/inbound-channel-message.js +24 -1
- package/dist/chat-ui/messages/inbound-channel-message.js.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +14 -1
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.js +15 -2
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -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/dist/chat/AthenaChat.js
CHANGED
|
@@ -12,6 +12,7 @@ import { WaitingOnYouBanner } from "./WaitingOnYouBanner.js";
|
|
|
12
12
|
import { DrivingOnChip } from "./DrivingOnChip.js";
|
|
13
13
|
import { OfflineSnapshotBanner } from "../offline/offline-history.js";
|
|
14
14
|
import { WakeMarkerMessage } from "../chat-ui/messages/wake-marker.js";
|
|
15
|
+
import { RuntimeMessageCard } from "../chat-ui/messages/runtime-message.js";
|
|
15
16
|
import { ToolFallback, ToolFallbackAppearanceProvider } from "../tools/tool-fallback.js";
|
|
16
17
|
import { AppendDocumentToolUI } from "../tools/append-document-tool-ui.js";
|
|
17
18
|
import { ReadAssetToolUI } from "../tools/read-asset-tool-ui.js";
|
|
@@ -45,7 +46,7 @@ import { useAccountIdentity } from "../chat-ui/mentions/use-account-workspace-id
|
|
|
45
46
|
import { AnswerLabel } from "../chat-ui/messages/answer-label.js";
|
|
46
47
|
import { useMessageArrivalAnimation, MESSAGE_ARRIVAL_ANIMATION_CLASS } from "../chat-ui/messages/arrival-animation.js";
|
|
47
48
|
import { MessageImagePart, MessageImageGallery } from "../chat-ui/messages/message-images.js";
|
|
48
|
-
import { withInboundMessageBody, InboundChannelLine, InboundChannelSubject } from "../chat-ui/messages/inbound-channel-message.js";
|
|
49
|
+
import { withInboundMessageBody, InboundChannelLine, InboundChannelSubject, useUserMessageCopy } from "../chat-ui/messages/inbound-channel-message.js";
|
|
49
50
|
import { ACTION_BAR_REVEAL_CLASS, BranchPicker, UserMessageText } from "../chat-ui/messages/message-components.js";
|
|
50
51
|
import { useMessageActionsReadOnly } from "../chat-ui/messages/message-actions-config.js";
|
|
51
52
|
import { useAthenaRunLive } from "./use-athena-run-live.js";
|
|
@@ -82,6 +83,7 @@ import { isStatewireChannelLive } from "../runtime/statewire-lifecycle.js";
|
|
|
82
83
|
import { useComposerChatVoice, ChatVoiceButton, ChatVoiceStatus, ChatVoiceContinueOffer } from "./chat-voice-controls.js";
|
|
83
84
|
import { TASK_TOOL_NAME } from "../agent-runtime/src/tool-names.js";
|
|
84
85
|
import { useTurnToolCallsAwaitingApproval } from "../agent-runtime/src/subagents.js";
|
|
86
|
+
import { readSoleRuntimeMessageKind, readRuntimeMessageFromSourceMessages } from "../agent-runtime/src/runtime-messages.js";
|
|
85
87
|
import { isGithubWakeMessage } from "../agent-runtime/src/github-wake-event.js";
|
|
86
88
|
import { isSubscriptionWakeMessage } from "../agent-runtime/src/subscription-wake-event.js";
|
|
87
89
|
import { useDeepAgentConnection, readRunLive } from "../agent-runtime/src/thread-status.js";
|
|
@@ -1003,6 +1005,12 @@ const AthenaReasoningPart = ({
|
|
|
1003
1005
|
};
|
|
1004
1006
|
const noToolGrouping = () => null;
|
|
1005
1007
|
const isInlineToolOrSubagent = (toolName) => toolName === TASK_TOOL_NAME || isSdkInlineTool(toolName);
|
|
1008
|
+
const AthenaRuntimeEndingCard = () => {
|
|
1009
|
+
const message = useAuiState((s) => s.message);
|
|
1010
|
+
const runtime = useMemo(() => readRuntimeMessageFromSourceMessages(message), [message]);
|
|
1011
|
+
if (!runtime || runtime.silent) return null;
|
|
1012
|
+
return /* @__PURE__ */ jsx(RuntimeMessageCard, { message: runtime });
|
|
1013
|
+
};
|
|
1006
1014
|
const AthenaAssistantMessage = ({
|
|
1007
1015
|
toolUIs,
|
|
1008
1016
|
AvatarComponent,
|
|
@@ -1035,6 +1043,43 @@ const AthenaAssistantMessage = ({
|
|
|
1035
1043
|
[EmptyComponent, TextComponent, effectiveReasoningComponent, toolUIsWithNestedMessages]
|
|
1036
1044
|
);
|
|
1037
1045
|
const arrivedLive = useMessageArrivalAnimation();
|
|
1046
|
+
const soleEndingKind = useAuiState((s) => readSoleRuntimeMessageKind(s.message));
|
|
1047
|
+
const endingSilent = useAuiState(
|
|
1048
|
+
(s) => {
|
|
1049
|
+
var _a;
|
|
1050
|
+
return ((_a = readRuntimeMessageFromSourceMessages(s.message)) == null ? void 0 : _a.silent) === true;
|
|
1051
|
+
}
|
|
1052
|
+
);
|
|
1053
|
+
const chunkedEndingText = useAuiState((s) => {
|
|
1054
|
+
const runtime = readRuntimeMessageFromSourceMessages(s.message);
|
|
1055
|
+
if (!runtime || runtime.isSoleSourceMessage || runtime.kind === "handoff") return void 0;
|
|
1056
|
+
const markerText = runtime.text;
|
|
1057
|
+
const last = s.message.content.at(-1);
|
|
1058
|
+
if (markerText === void 0 || (last == null ? void 0 : last.type) !== "text" || last.text !== markerText) return void 0;
|
|
1059
|
+
const sameText = s.message.content.filter((part) => part.type === "text" && part.text === markerText);
|
|
1060
|
+
return sameText.length === 1 ? markerText : void 0;
|
|
1061
|
+
});
|
|
1062
|
+
const AnswerTextComponent = useMemo(() => {
|
|
1063
|
+
if (chunkedEndingText === void 0) return TextComponent;
|
|
1064
|
+
const Base = TextComponent;
|
|
1065
|
+
return function TextOrRunEnding(props) {
|
|
1066
|
+
return props.text === chunkedEndingText ? /* @__PURE__ */ jsx(AthenaRuntimeEndingCard, {}) : /* @__PURE__ */ jsx(Base, { ...props });
|
|
1067
|
+
};
|
|
1068
|
+
}, [TextComponent, chunkedEndingText]);
|
|
1069
|
+
if (soleEndingKind !== void 0 && soleEndingKind !== "handoff") {
|
|
1070
|
+
if (endingSilent) return null;
|
|
1071
|
+
return /* @__PURE__ */ jsxs(
|
|
1072
|
+
MessagePrimitive.Root,
|
|
1073
|
+
{
|
|
1074
|
+
className: "aui-assistant-message-root aui-run-ending-root mx-auto w-full max-w-(--thread-max-width) px-2 py-1",
|
|
1075
|
+
"data-role": "assistant",
|
|
1076
|
+
children: [
|
|
1077
|
+
/* @__PURE__ */ jsx(MessageDaySeparator, {}),
|
|
1078
|
+
/* @__PURE__ */ jsx(AthenaRuntimeEndingCard, {})
|
|
1079
|
+
]
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1038
1083
|
return /* @__PURE__ */ jsxs(
|
|
1039
1084
|
MessagePrimitive.Root,
|
|
1040
1085
|
{
|
|
@@ -1069,7 +1114,7 @@ const AthenaAssistantMessage = ({
|
|
|
1069
1114
|
renderRunningMeta: renderGroupedRunningMeta
|
|
1070
1115
|
}
|
|
1071
1116
|
),
|
|
1072
|
-
/* @__PURE__ */ jsx(SuperGroupingFinalText, { TextComponent })
|
|
1117
|
+
/* @__PURE__ */ jsx(SuperGroupingFinalText, { TextComponent: AnswerTextComponent })
|
|
1073
1118
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1074
1119
|
/* @__PURE__ */ jsx(AthenaMessageEmptyIndicator, { EmptyComponent }),
|
|
1075
1120
|
/* @__PURE__ */ jsx(MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
|
|
@@ -1089,7 +1134,7 @@ const AthenaAssistantMessage = ({
|
|
|
1089
1134
|
if (textPart.text === "" && ((_a = textPart.status) == null ? void 0 : _a.type) === "running") {
|
|
1090
1135
|
return /* @__PURE__ */ jsx(EmptyComponent, { status: textPart.status });
|
|
1091
1136
|
}
|
|
1092
|
-
return /* @__PURE__ */ jsx(
|
|
1137
|
+
return /* @__PURE__ */ jsx(AnswerTextComponent, { ...textPart });
|
|
1093
1138
|
}
|
|
1094
1139
|
default:
|
|
1095
1140
|
return null;
|
|
@@ -1114,6 +1159,19 @@ const CopyMessageButton = () => /* @__PURE__ */ jsx(ActionBarPrimitive.Copy, { a
|
|
|
1114
1159
|
/* @__PURE__ */ jsx(AuiIf, { condition: (s) => s.message.isCopied, children: /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
1115
1160
|
/* @__PURE__ */ jsx(AuiIf, { condition: (s) => !s.message.isCopied, children: /* @__PURE__ */ jsx(CopyIcon, {}) })
|
|
1116
1161
|
] }) });
|
|
1162
|
+
const UserCopyMessageButton = () => {
|
|
1163
|
+
const { copy, disabled, isCopied } = useUserMessageCopy();
|
|
1164
|
+
return /* @__PURE__ */ jsx(
|
|
1165
|
+
TooltipIconButton,
|
|
1166
|
+
{
|
|
1167
|
+
tooltip: "Copy",
|
|
1168
|
+
onClick: copy,
|
|
1169
|
+
disabled,
|
|
1170
|
+
"data-copied": isCopied ? "true" : void 0,
|
|
1171
|
+
children: isCopied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
};
|
|
1117
1175
|
const RegenerateMessageButton = () => {
|
|
1118
1176
|
const readOnly = useMessageActionsReadOnly();
|
|
1119
1177
|
if (readOnly) return null;
|
|
@@ -1153,7 +1211,7 @@ const AthenaUserActionBar = () => {
|
|
|
1153
1211
|
]
|
|
1154
1212
|
),
|
|
1155
1213
|
children: [
|
|
1156
|
-
/* @__PURE__ */ jsx(
|
|
1214
|
+
/* @__PURE__ */ jsx(UserCopyMessageButton, {}),
|
|
1157
1215
|
/* @__PURE__ */ jsx(EditMessageButton, {})
|
|
1158
1216
|
]
|
|
1159
1217
|
}
|