@athenaintel/react 0.60.0 → 0.61.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/README.md +225 -2
- package/dist/agent-runtime/src/client-tool-bridge.cjs +20 -2
- package/dist/agent-runtime/src/client-tool-bridge.cjs.map +1 -1
- package/dist/agent-runtime/src/client-tool-bridge.d.ts +9 -4
- package/dist/agent-runtime/src/client-tool-bridge.js +20 -2
- package/dist/agent-runtime/src/client-tool-bridge.js.map +1 -1
- package/dist/agent-runtime/src/client-tools.cjs.map +1 -1
- package/dist/agent-runtime/src/client-tools.d.ts +9 -0
- package/dist/agent-runtime/src/client-tools.js.map +1 -1
- package/dist/agent-ui/AgentTarget.cjs +11 -0
- package/dist/agent-ui/AgentTarget.cjs.map +1 -0
- package/dist/agent-ui/AgentTarget.d.ts +17 -0
- package/dist/agent-ui/AgentTarget.js +11 -0
- package/dist/agent-ui/AgentTarget.js.map +1 -0
- package/dist/agent-ui/AgentUiLayer.cjs +387 -0
- package/dist/agent-ui/AgentUiLayer.cjs.map +1 -0
- package/dist/agent-ui/AgentUiLayer.d.ts +40 -0
- package/dist/agent-ui/AgentUiLayer.js +387 -0
- package/dist/agent-ui/AgentUiLayer.js.map +1 -0
- package/dist/agent-ui/contract.cjs +104 -0
- package/dist/agent-ui/contract.cjs.map +1 -0
- package/dist/agent-ui/contract.d.ts +113 -0
- package/dist/agent-ui/contract.js +104 -0
- package/dist/agent-ui/contract.js.map +1 -0
- package/dist/agent-ui/driver.cjs +335 -0
- package/dist/agent-ui/driver.cjs.map +1 -0
- package/dist/agent-ui/driver.d.ts +66 -0
- package/dist/agent-ui/driver.js +335 -0
- package/dist/agent-ui/driver.js.map +1 -0
- package/dist/agent-ui/index.cjs +33 -0
- package/dist/agent-ui/index.cjs.map +1 -0
- package/dist/agent-ui/index.d.ts +19 -0
- package/dist/agent-ui/index.js +33 -0
- package/dist/agent-ui/index.js.map +1 -0
- package/dist/agent-ui/pace.cjs +121 -0
- package/dist/agent-ui/pace.cjs.map +1 -0
- package/dist/agent-ui/pace.d.ts +66 -0
- package/dist/agent-ui/pace.js +121 -0
- package/dist/agent-ui/pace.js.map +1 -0
- package/dist/agent-ui/screen.cjs +471 -0
- package/dist/agent-ui/screen.cjs.map +1 -0
- package/dist/agent-ui/screen.d.ts +97 -0
- package/dist/agent-ui/screen.js +471 -0
- package/dist/agent-ui/screen.js.map +1 -0
- package/dist/agent-ui/secret-fields.cjs +50 -0
- package/dist/agent-ui/secret-fields.cjs.map +1 -0
- package/dist/agent-ui/secret-fields.d.ts +15 -0
- package/dist/agent-ui/secret-fields.js +50 -0
- package/dist/agent-ui/secret-fields.js.map +1 -0
- package/dist/agent-ui/stage.cjs +196 -0
- package/dist/agent-ui/stage.cjs.map +1 -0
- package/dist/agent-ui/stage.d.ts +110 -0
- package/dist/agent-ui/stage.js +196 -0
- package/dist/agent-ui/stage.js.map +1 -0
- package/dist/agent-ui/tools.cjs +448 -0
- package/dist/agent-ui/tools.cjs.map +1 -0
- package/dist/agent-ui/tools.d.ts +103 -0
- package/dist/agent-ui/tools.js +448 -0
- package/dist/agent-ui/tools.js.map +1 -0
- package/dist/agent-ui/use-agent-target.cjs +63 -0
- package/dist/agent-ui/use-agent-target.cjs.map +1 -0
- package/dist/agent-ui/use-agent-target.d.ts +27 -0
- package/dist/agent-ui/use-agent-target.js +63 -0
- package/dist/agent-ui/use-agent-target.js.map +1 -0
- package/dist/agent-ui/use-agent-ui.cjs +15 -0
- package/dist/agent-ui/use-agent-ui.cjs.map +1 -0
- package/dist/agent-ui/use-agent-ui.d.ts +24 -0
- package/dist/agent-ui/use-agent-ui.js +15 -0
- package/dist/agent-ui/use-agent-ui.js.map +1 -0
- package/dist/chat/AthenaChat.cjs +19 -4
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +13 -0
- package/dist/chat/AthenaChat.js +19 -4
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +74 -1
- package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
- package/dist/chat/StatewireClientToolBridge.d.ts +16 -1
- package/dist/chat/StatewireClientToolBridge.js +75 -2
- package/dist/chat/StatewireClientToolBridge.js.map +1 -1
- package/dist/chat/StatewireClientToolConsentCard.cjs +66 -0
- package/dist/chat/StatewireClientToolConsentCard.cjs.map +1 -0
- package/dist/chat/StatewireClientToolConsentCard.d.ts +25 -0
- package/dist/chat/StatewireClientToolConsentCard.js +66 -0
- package/dist/chat/StatewireClientToolConsentCard.js.map +1 -0
- package/dist/chat/chat-voice-controls.cjs +5 -2
- package/dist/chat/chat-voice-controls.cjs.map +1 -1
- package/dist/chat/chat-voice-controls.d.ts +6 -1
- package/dist/chat/chat-voice-controls.js +6 -3
- package/dist/chat/chat-voice-controls.js.map +1 -1
- package/dist/chat/client-tool-write-consent.cjs +122 -0
- package/dist/chat/client-tool-write-consent.cjs.map +1 -0
- package/dist/chat/client-tool-write-consent.d.ts +79 -0
- package/dist/chat/client-tool-write-consent.js +122 -0
- package/dist/chat/client-tool-write-consent.js.map +1 -0
- package/dist/chat/statewire-client-tools.cjs +30 -5
- package/dist/chat/statewire-client-tools.cjs.map +1 -1
- package/dist/chat/statewire-client-tools.d.ts +34 -2
- package/dist/chat/statewire-client-tools.js +30 -5
- package/dist/chat/statewire-client-tools.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +13 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.d.ts +12 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +13 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +2 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +3 -2
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs +2 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.d.ts +2 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.js +2 -1
- package/dist/chat-ui/mentions/use-asset-icon-app-url.js.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +1 -1
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.d.ts +2 -2
- package/dist/chat-ui/messages/message-components.js +1 -1
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/statewire.cjs +4 -0
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -0
- package/dist/chat-ui/statewire.js +4 -0
- package/dist/chat-ui/statewire.js.map +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +59 -11
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +25 -1
- package/dist/provider/AthenaProvider.js +55 -7
- 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/styles.css +1 -1
- package/package.json +6 -1
|
@@ -19,6 +19,12 @@ export interface AthenaChatProps {
|
|
|
19
19
|
welcomeMessage?: string;
|
|
20
20
|
/** Welcome subheading text. */
|
|
21
21
|
welcomeSubtext?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The host's own empty-state welcome, in place of the greeting (`welcomeMessage`,
|
|
24
|
+
* `welcomeSubtext`): rendered as given where the greeting sits, in the viewport's free space while
|
|
25
|
+
* the thread is empty. Absent: the greeting.
|
|
26
|
+
*/
|
|
27
|
+
welcomeContent?: ReactNode;
|
|
22
28
|
/**
|
|
23
29
|
* Maximum width of the reading column (messages, welcome, composer).
|
|
24
30
|
* Defaults to "46rem" — about 760 px, a comfortable measure for 15 px text.
|
|
@@ -181,6 +187,13 @@ export interface AthenaChatComposerSlots {
|
|
|
181
187
|
toolbarStart?: ReactNode;
|
|
182
188
|
/** Toolbar contents before the mic and the send/stop control. */
|
|
183
189
|
toolbarEnd?: ReactNode;
|
|
190
|
+
/**
|
|
191
|
+
* One button for voice and Send, as ChatGPT's composer has it: while the draft is empty, no run is
|
|
192
|
+
* live and no call is connecting or live, the voice control stands in for Send (drawn as Send);
|
|
193
|
+
* once the person types, Send takes its place. A call that is connecting or live keeps its own
|
|
194
|
+
* mute or cancel beside Send or Stop. Default `false`: voice and Send side by side.
|
|
195
|
+
*/
|
|
196
|
+
voiceInSend?: boolean;
|
|
184
197
|
/**
|
|
185
198
|
* The composer's own attach button (the paperclip). `false` leaves it out, for a host that offers
|
|
186
199
|
* attaching from a control of its own in a slot (`useAthenaComposerActions().openFilePicker`);
|
package/dist/chat/AthenaChat.js
CHANGED
|
@@ -2,6 +2,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { TiptapText } from "./tiptap-text.js";
|
|
3
3
|
import { AthenaChatErrorBoundary } from "./AthenaChatErrorBoundary.js";
|
|
4
4
|
import { StatewireApprovalCard } from "./StatewireApprovalCard.js";
|
|
5
|
+
import { StatewireClientToolConsentCard } from "./StatewireClientToolConsentCard.js";
|
|
5
6
|
import { statewireTypedInterrupts } from "./typed-interrupts/StatewireTypedInterruptCard.js";
|
|
6
7
|
import { AthenaPlanStrip } from "./AthenaPlanStrip.js";
|
|
7
8
|
import { StatewireQueuedMessages } from "./StatewireQueuedMessages.js";
|
|
@@ -180,6 +181,7 @@ const AthenaChatContent = ({
|
|
|
180
181
|
className,
|
|
181
182
|
welcomeMessage = "Hello there!",
|
|
182
183
|
welcomeSubtext = "What can I help you with?",
|
|
184
|
+
welcomeContent,
|
|
183
185
|
maxWidth = "46rem",
|
|
184
186
|
turnAnchor = "bottom",
|
|
185
187
|
readOnly = false,
|
|
@@ -347,7 +349,7 @@ const AthenaChatContent = ({
|
|
|
347
349
|
/* @__PURE__ */ jsx(HandoffCursorReveal, { threadId: statewireThreadId }),
|
|
348
350
|
/* @__PURE__ */ jsx(ThreadScrollToTop, {})
|
|
349
351
|
] }),
|
|
350
|
-
welcome: /* @__PURE__ */ jsx(AthenaChatWelcome, { welcomeMessage, welcomeSubtext }),
|
|
352
|
+
welcome: welcomeContent ?? /* @__PURE__ */ jsx(AthenaChatWelcome, { welcomeMessage, welcomeSubtext }),
|
|
351
353
|
beforeMessages: /* @__PURE__ */ jsx(StatewireHistoryEdge, { className: "aui-thread-history-edge" }),
|
|
352
354
|
components: messageComponents,
|
|
353
355
|
runningIndicator: null,
|
|
@@ -366,6 +368,7 @@ const AthenaChatContent = ({
|
|
|
366
368
|
typedInterrupts: statewireTypedInterrupts
|
|
367
369
|
}
|
|
368
370
|
),
|
|
371
|
+
/* @__PURE__ */ jsx(StatewireClientToolConsentCard, {}),
|
|
369
372
|
plan === void 0 ? /* @__PURE__ */ jsx(AthenaPlanStrip, { className: "mx-3" }) : plan,
|
|
370
373
|
/* @__PURE__ */ jsx(StatewireQueuedMessages, {}),
|
|
371
374
|
/* @__PURE__ */ jsx(AttachmentProvider, { children: /* @__PURE__ */ jsxs(QuoteProvider, { children: [
|
|
@@ -595,6 +598,10 @@ const AthenaChatComposer = ({
|
|
|
595
598
|
const hasExtras = attachments.length > 0 || quote !== null;
|
|
596
599
|
const sendStateRef = useRef({ isRunning, liveVoice: false });
|
|
597
600
|
sendStateRef.current = { isRunning, liveVoice: voice.phase === "live" && !hasExtras };
|
|
601
|
+
const voiceDisabled = isUploading || dictationCtl.isActive || !isStatewireChannelLive(connection);
|
|
602
|
+
const voiceCallIdle = voice.phase !== "live" && voice.phase !== "connecting";
|
|
603
|
+
const voiceMerged = (slots == null ? void 0 : slots.voiceInSend) === true && voiceEnabled && voiceCallIdle;
|
|
604
|
+
const voiceAsSend = voiceMerged && !hasText && !hasExtras && !isRunning;
|
|
598
605
|
const onBeforeSend = slots == null ? void 0 : slots.onBeforeSend;
|
|
599
606
|
const beforeSubmit = useCallback(
|
|
600
607
|
async ({ text }) => {
|
|
@@ -927,15 +934,23 @@ const AthenaChatComposer = ({
|
|
|
927
934
|
disabledReason: needsConnectionReason
|
|
928
935
|
}
|
|
929
936
|
),
|
|
930
|
-
voiceEnabled && /* @__PURE__ */ jsx(
|
|
937
|
+
voiceEnabled && !voiceMerged && /* @__PURE__ */ jsx(
|
|
931
938
|
ChatVoiceButton,
|
|
932
939
|
{
|
|
933
940
|
voice,
|
|
934
|
-
disabled:
|
|
941
|
+
disabled: voiceDisabled,
|
|
935
942
|
disabledReason: needsConnectionReason
|
|
936
943
|
}
|
|
937
944
|
),
|
|
938
|
-
/* @__PURE__ */ jsx(
|
|
945
|
+
voiceAsSend ? /* @__PURE__ */ jsx(
|
|
946
|
+
ChatVoiceButton,
|
|
947
|
+
{
|
|
948
|
+
voice,
|
|
949
|
+
appearance: "send",
|
|
950
|
+
disabled: voiceDisabled,
|
|
951
|
+
disabledReason: needsConnectionReason
|
|
952
|
+
}
|
|
953
|
+
) : /* @__PURE__ */ jsx(
|
|
939
954
|
ComposerSendOrStop,
|
|
940
955
|
{
|
|
941
956
|
composerRef,
|