@athenaintel/react 0.16.1 → 0.16.3
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/assets/asset-panel-store.d.ts +7 -0
- package/dist/assets/use-asset-embed.d.ts +4 -0
- package/dist/chat/AthenaChat.d.ts +8 -0
- package/dist/chat-ui.cjs +1 -1
- package/dist/chat-ui.js +2 -2
- package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
- package/dist/index.cjs +32 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -16
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +1 -1
- package/dist/{use-rest-conversation-history-CV7HyHGr.js → use-rest-conversation-history-BgG4VyZQ.js} +17 -4
- package/dist/use-rest-conversation-history-BgG4VyZQ.js.map +1 -0
- package/dist/{use-rest-conversation-history-Hc03lxFv.cjs → use-rest-conversation-history-CMuTZmsp.cjs} +17 -4
- package/dist/use-rest-conversation-history-CMuTZmsp.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/use-rest-conversation-history-CV7HyHGr.js.map +0 -1
- package/dist/use-rest-conversation-history-Hc03lxFv.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
var _mutations, _scopes, _mutationId, _a2, _queries, _b, _queryCache, _mutationCache, _defaultOptions, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _c;
|
|
20
|
-
import { a as athenaDiagnostics, D as DEFAULT_API_URL, b as DEFAULT_BACKEND_URL, g as getThreadState, C as CLIENT_TOOL_INTERRUPT_SOURCE, c as CLIENT_TOOL_RESULT_STATUS_ERROR, d as CLIENT_TOOL_RESULT_STATUS_SUCCESS, S as StatewireSuspended, e as Subscribable, M as Mutation, n as notifyManager, m as matchMutation, f as noop$1, h as hashQueryKeyByOptions, Q as Query, i as matchQuery, j as focusManager, o as onlineManager, r as resolveStaleTime, k as functionalUpdate, l as infiniteQueryBehavior, p as hashKey, q as partialMatchKey, s as skipToken, t as readDeepAgentStreamValues, u as isDeepAgentStateHydrated, v as DEEP_AGENT_PROTOCOL_VERSION, w as DEEP_AGENT_PROTOCOL_STATE_KEY, x as DEEP_AGENT_PROTOCOL_VERSION_HEADER, y as convertDeepAgentState, z as deepAgentMaterialize, A as readPersistedFailedSendStamps, B as QuotaSafeLocalStorageSession, E as useFloating, F as offset, G as shift, H as limitShift, I as flip, J as size, K as arrow$1, L as hide, N as autoUpdate, O as cn, P as archiveThread, R as listThreads, T as QueryClientProvider, U as createRestConversationListFetcher, V as useConversationList, W as installAthenaDiagnosticsGlobal, X as debugPropToDiagnosticsConfig, Y as getAthenaEnvironmentUrls, Z as deriveAthenaAppUrl, _ as resolveStatewireSyncUrl, $ as PostHogProvider, a0 as Mark, a1 as markPasteRule, a2 as mergeAttributes, a3 as Plugin, a4 as PluginKey, a5 as combineTransactionSteps, a6 as getChangedRanges, a7 as findChildrenInRange, a8 as getMarksBetween, a9 as getAttributes, aa as Selection, ab as SelectionRange, ac as TextSelection, ad as Fragment, ae as Slice, af as DecorationSet, ag as Decoration, ah as keydownHandler, ai as NodeSelection, aj as Transform, ak as Node$1, al as callOrReturn, am as getExtensionField, an as findParentNodeClosestToPos, ao as Schema, ap as Mark$1, aq as Extension, ar as index, as as DOMParser, at as getHTMLFromFragment, au as createLucideIcon, av as Wrench, aw as Workflow, ax as Users, ay as Package, az as Monitor, aA as MessageSquare, aB as Mail, aC as LayoutGrid, aD as HardDrive, aE as Globe, aF as FolderKanban, aG as Folder, aH as FileText, aI as Database, aJ as Calendar, aK as BookOpen, aL as NodeViewWrapper, aM as nodePasteRule, aN as ReactNodeViewRenderer, aO as useEditor, aP as EditorContent, aQ as StarterKit, aR as useStore$1, aS as getFilteredItems, aT as ChevronRight, aU as useFloating$1, aV as FloatingPortal, aW as Suggestion, aX as ReactRenderer, aY as Store, aZ as registerSource, a_ as addItems, a$ as createItemCache, b0 as createScopeRegistry, b1 as createAthenaSpacesUrl, b2 as DEFAULT_APP_URL, b3 as Placeholder, b4 as RefreshCw, b5 as Check, b6 as ChevronDown, b7 as Archive, b8 as Code$2, b9 as Search, ba as Table$3, bb as Image$2, bc as Sheet, bd as Camera, be as LoaderCircle, bf as Copy, bg as ChatThreadShell, bh as ChatComposerDock, bi as ComposerSendOrStop, bj as ArrowUp, bk as ListPlus, bl as File$1, bm as Plus, bn as useRestConversationHistory, bo as useMutation, bp as setThreadReadState } from "./use-rest-conversation-history-
|
|
21
|
-
import { bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI } from "./use-rest-conversation-history-
|
|
20
|
+
import { a as athenaDiagnostics, D as DEFAULT_API_URL, b as DEFAULT_BACKEND_URL, g as getThreadState, C as CLIENT_TOOL_INTERRUPT_SOURCE, c as CLIENT_TOOL_RESULT_STATUS_ERROR, d as CLIENT_TOOL_RESULT_STATUS_SUCCESS, S as StatewireSuspended, e as Subscribable, M as Mutation, n as notifyManager, m as matchMutation, f as noop$1, h as hashQueryKeyByOptions, Q as Query, i as matchQuery, j as focusManager, o as onlineManager, r as resolveStaleTime, k as functionalUpdate, l as infiniteQueryBehavior, p as hashKey, q as partialMatchKey, s as skipToken, t as readDeepAgentStreamValues, u as isDeepAgentStateHydrated, v as DEEP_AGENT_PROTOCOL_VERSION, w as DEEP_AGENT_PROTOCOL_STATE_KEY, x as DEEP_AGENT_PROTOCOL_VERSION_HEADER, y as convertDeepAgentState, z as deepAgentMaterialize, A as readPersistedFailedSendStamps, B as QuotaSafeLocalStorageSession, E as useFloating, F as offset, G as shift, H as limitShift, I as flip, J as size, K as arrow$1, L as hide, N as autoUpdate, O as cn, P as archiveThread, R as listThreads, T as QueryClientProvider, U as createRestConversationListFetcher, V as useConversationList, W as installAthenaDiagnosticsGlobal, X as debugPropToDiagnosticsConfig, Y as getAthenaEnvironmentUrls, Z as deriveAthenaAppUrl, _ as resolveStatewireSyncUrl, $ as PostHogProvider, a0 as Mark, a1 as markPasteRule, a2 as mergeAttributes, a3 as Plugin, a4 as PluginKey, a5 as combineTransactionSteps, a6 as getChangedRanges, a7 as findChildrenInRange, a8 as getMarksBetween, a9 as getAttributes, aa as Selection, ab as SelectionRange, ac as TextSelection, ad as Fragment, ae as Slice, af as DecorationSet, ag as Decoration, ah as keydownHandler, ai as NodeSelection, aj as Transform, ak as Node$1, al as callOrReturn, am as getExtensionField, an as findParentNodeClosestToPos, ao as Schema, ap as Mark$1, aq as Extension, ar as index, as as DOMParser, at as getHTMLFromFragment, au as createLucideIcon, av as Wrench, aw as Workflow, ax as Users, ay as Package, az as Monitor, aA as MessageSquare, aB as Mail, aC as LayoutGrid, aD as HardDrive, aE as Globe, aF as FolderKanban, aG as Folder, aH as FileText, aI as Database, aJ as Calendar, aK as BookOpen, aL as NodeViewWrapper, aM as nodePasteRule, aN as ReactNodeViewRenderer, aO as useEditor, aP as EditorContent, aQ as StarterKit, aR as useStore$1, aS as getFilteredItems, aT as ChevronRight, aU as useFloating$1, aV as FloatingPortal, aW as Suggestion, aX as ReactRenderer, aY as Store, aZ as registerSource, a_ as addItems, a$ as createItemCache, b0 as createScopeRegistry, b1 as createAthenaSpacesUrl, b2 as DEFAULT_APP_URL, b3 as Placeholder, b4 as RefreshCw, b5 as Check, b6 as ChevronDown, b7 as Archive, b8 as Code$2, b9 as Search, ba as Table$3, bb as Image$2, bc as Sheet, bd as Camera, be as LoaderCircle, bf as Copy, bg as ChatThreadShell, bh as ChatComposerDock, bi as ComposerSendOrStop, bj as ArrowUp, bk as ListPlus, bl as File$1, bm as Plus, bn as useRestConversationHistory, bo as useMutation, bp as setThreadReadState } from "./use-rest-conversation-history-BgG4VyZQ.js";
|
|
21
|
+
import { bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI } from "./use-rest-conversation-history-BgG4VyZQ.js";
|
|
22
22
|
import * as React from "react";
|
|
23
23
|
import React__default, { useSyncExternalStore, useCallback, useMemo, useState, useRef, useEffect, useContext, createContext, useReducer, forwardRef, useImperativeHandle, Component, Fragment as Fragment$1, memo } from "react";
|
|
24
24
|
import { jsx, jsxs, Fragment as Fragment$2 } from "react/jsx-runtime";
|
|
@@ -6196,7 +6196,7 @@ const convertLangChainToThreadMessages = (messages, isRunning = false, metadata
|
|
|
6196
6196
|
return convertExternalMessages(filteredMessages, convertLangChainMessage, isRunning, metadata);
|
|
6197
6197
|
};
|
|
6198
6198
|
const __vite_import_meta_env__ = { "DEV": false };
|
|
6199
|
-
const DEFAULT_MODEL = "claude-opus-4-
|
|
6199
|
+
const DEFAULT_MODEL = "claude-opus-4-8-thinking-max-fast";
|
|
6200
6200
|
const DEFAULT_AGENT = "athena_assist_agent";
|
|
6201
6201
|
const getIsDev = () => {
|
|
6202
6202
|
const importMetaEnv = __vite_import_meta_env__;
|
|
@@ -11034,6 +11034,14 @@ const useAssetPanelStore = create()(
|
|
|
11034
11034
|
slideNumber: meta == null ? void 0 : meta.slideNumber,
|
|
11035
11035
|
reference: meta == null ? void 0 : meta.reference
|
|
11036
11036
|
};
|
|
11037
|
+
if ((meta == null ? void 0 : meta.replaceActiveTab) && s.activeTabId) {
|
|
11038
|
+
const activeIndex = s.tabs.findIndex((t) => t.id === s.activeTabId);
|
|
11039
|
+
if (activeIndex >= 0) {
|
|
11040
|
+
const tabs = s.tabs.slice();
|
|
11041
|
+
tabs[activeIndex] = newTab;
|
|
11042
|
+
return { isOpen: true, tabs, activeTabId: assetId };
|
|
11043
|
+
}
|
|
11044
|
+
}
|
|
11037
11045
|
return { isOpen: true, tabs: [...s.tabs, newTab], activeTabId: assetId };
|
|
11038
11046
|
}),
|
|
11039
11047
|
closeTab: (assetId) => set2((s) => {
|
|
@@ -24656,7 +24664,11 @@ const useAthenaLinkClickHandler = () => {
|
|
|
24656
24664
|
type: citationLink.assetType ?? void 0,
|
|
24657
24665
|
// Carry the citation target so the panel's iframe navigates to
|
|
24658
24666
|
// the cited range/page instead of opening at the top.
|
|
24659
|
-
reference: citationLink.reference
|
|
24667
|
+
reference: citationLink.reference,
|
|
24668
|
+
// Reading references is one preview surface: a citation to a
|
|
24669
|
+
// different asset swaps the active tab rather than stacking a
|
|
24670
|
+
// tab per cited document.
|
|
24671
|
+
replaceActiveTab: true
|
|
24660
24672
|
});
|
|
24661
24673
|
} : void 0;
|
|
24662
24674
|
const context = {
|
|
@@ -31948,6 +31960,7 @@ const AthenaChat = ({
|
|
|
31948
31960
|
welcomeMessage = "Hello there!",
|
|
31949
31961
|
welcomeSubtext = "What can I help you with?",
|
|
31950
31962
|
maxWidth = "44rem",
|
|
31963
|
+
turnAnchor = "bottom",
|
|
31951
31964
|
toolUIs,
|
|
31952
31965
|
mentionTools,
|
|
31953
31966
|
welcomeSuggestions = DEFAULT_SUGGESTIONS,
|
|
@@ -32013,7 +32026,7 @@ const AthenaChat = ({
|
|
|
32013
32026
|
className
|
|
32014
32027
|
),
|
|
32015
32028
|
maxWidth,
|
|
32016
|
-
turnAnchor
|
|
32029
|
+
turnAnchor,
|
|
32017
32030
|
viewportClassName: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth px-4 pt-4",
|
|
32018
32031
|
contentClassName: "flex w-full flex-1 flex-col",
|
|
32019
32032
|
viewportOverlay: /* @__PURE__ */ jsx(ThreadScrollToTop, {}),
|
|
@@ -33031,17 +33044,21 @@ const AssetIframe = memo(
|
|
|
33031
33044
|
};
|
|
33032
33045
|
}
|
|
33033
33046
|
const initialSlideNumber = initialSlideRef.current.slideNumber;
|
|
33034
|
-
const iframeSrc = useMemo(
|
|
33035
|
-
()
|
|
33036
|
-
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33047
|
+
const iframeSrc = useMemo(() => {
|
|
33048
|
+
if (!embedUrl) return null;
|
|
33049
|
+
const base2 = buildAssetIframeSrc({
|
|
33050
|
+
embedUrl,
|
|
33051
|
+
assetType: tab.type,
|
|
33052
|
+
slideNumber: initialSlideNumber
|
|
33053
|
+
});
|
|
33054
|
+
try {
|
|
33055
|
+
const url = new URL(base2, window.location.href);
|
|
33056
|
+
appendCitationReferenceParams({ params: url.searchParams, reference: tab.reference });
|
|
33057
|
+
return url.toString();
|
|
33058
|
+
} catch {
|
|
33059
|
+
return base2;
|
|
33060
|
+
}
|
|
33061
|
+
}, [embedUrl, initialSlideNumber, tab.type, tab.reference]);
|
|
33045
33062
|
const navigationMessage = useMemo(
|
|
33046
33063
|
() => buildPresentationNavigationMessage({
|
|
33047
33064
|
assetId: tab.id,
|