@athenaintel/react 0.30.0 → 0.32.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 +61 -0
- package/dist/agent-runtime/src/athena-asset-drag.cjs +44 -0
- package/dist/agent-runtime/src/athena-asset-drag.cjs.map +1 -0
- package/dist/agent-runtime/src/athena-asset-drag.js +44 -0
- package/dist/agent-runtime/src/athena-asset-drag.js.map +1 -0
- package/dist/agent-runtime/src/config-mutations.cjs +59 -0
- package/dist/agent-runtime/src/config-mutations.cjs.map +1 -0
- package/dist/agent-runtime/src/config-mutations.js +59 -0
- package/dist/agent-runtime/src/config-mutations.js.map +1 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +6 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.js +6 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +48 -0
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js +49 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.cjs +25 -6
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.js +25 -6
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-config.cjs +117 -1
- package/dist/agent-runtime/src/use-deep-agent-config.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-config.js +118 -2
- package/dist/agent-runtime/src/use-deep-agent-config.js.map +1 -1
- package/dist/assets/AthenaAssetEmbed.cjs +6 -1
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -1
- package/dist/assets/AthenaAssetEmbed.d.ts +2 -0
- package/dist/assets/AthenaAssetEmbed.js +7 -2
- package/dist/assets/AthenaAssetEmbed.js.map +1 -1
- package/dist/assets/asset-embed-messages.cjs +6 -0
- package/dist/assets/asset-embed-messages.cjs.map +1 -1
- package/dist/assets/asset-embed-messages.d.ts +7 -0
- package/dist/assets/asset-embed-messages.js +6 -0
- package/dist/assets/asset-embed-messages.js.map +1 -1
- package/dist/chat/AthenaChat.cjs +41 -26
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.js +41 -26
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +31 -11
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +14 -3
- package/dist/chat/super-grouping/SuperGroupingCard.js +32 -12
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +80 -53
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +2 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +81 -54
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +19 -4
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +20 -1
- package/dist/chat/super-grouping/activity-timeline.js +19 -4
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/super-grouping/index.cjs +2 -0
- package/dist/chat/super-grouping/index.cjs.map +1 -1
- package/dist/chat/super-grouping/index.d.ts +1 -1
- package/dist/chat/super-grouping/index.js +3 -1
- package/dist/chat/super-grouping/toolkit-map.cjs +1 -0
- package/dist/chat/super-grouping/toolkit-map.cjs.map +1 -1
- package/dist/chat/super-grouping/toolkit-map.js +1 -0
- package/dist/chat/super-grouping/toolkit-map.js.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.cjs +40 -4
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.js +40 -4
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +29 -2
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.d.ts +2 -5
- package/dist/chat-ui/mentions/mention-chip.js +30 -3
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.cjs +1 -1
- package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-extension.js +1 -1
- package/dist/chat-ui/mentions/mention-extension.js.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs +61 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +3 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.js +61 -0
- package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -0
- package/dist/chat-ui/mentions/use-member-avatar.cjs +75 -0
- package/dist/chat-ui/mentions/use-member-avatar.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-member-avatar.d.ts +2 -0
- package/dist/chat-ui/mentions/use-member-avatar.js +75 -0
- package/dist/chat-ui/mentions/use-member-avatar.js.map +1 -0
- package/dist/collab/client.cjs +80 -19
- package/dist/collab/client.cjs.map +1 -1
- package/dist/collab/client.d.ts +22 -0
- package/dist/collab/client.js +80 -19
- package/dist/collab/client.js.map +1 -1
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +3 -1
- package/dist/diagnostics/athena-diagnostics.js.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +34 -4
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +7 -1
- package/dist/provider/AthenaProvider.js +36 -6
- 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/StatewireModelLaneSync.cjs +96 -0
- package/dist/runtime/StatewireModelLaneSync.cjs.map +1 -0
- package/dist/runtime/StatewireModelLaneSync.d.ts +45 -0
- package/dist/runtime/StatewireModelLaneSync.js +96 -0
- package/dist/runtime/StatewireModelLaneSync.js.map +1 -0
- package/dist/runtime/statewire-lifecycle.cjs +5 -2
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.d.ts +5 -0
- package/dist/runtime/statewire-lifecycle.js +5 -2
- package/dist/runtime/statewire-lifecycle.js.map +1 -1
- package/dist/runtime/statewire-model-lane.cjs +28 -0
- package/dist/runtime/statewire-model-lane.cjs.map +1 -0
- package/dist/runtime/statewire-model-lane.d.ts +64 -0
- package/dist/runtime/statewire-model-lane.js +28 -0
- package/dist/runtime/statewire-model-lane.js.map +1 -0
- package/dist/runtime/statewire-run-config.cjs +16 -2
- package/dist/runtime/statewire-run-config.cjs.map +1 -1
- package/dist/runtime/statewire-run-config.d.ts +10 -0
- package/dist/runtime/statewire-run-config.js +16 -2
- package/dist/runtime/statewire-run-config.js.map +1 -1
- package/dist/runtime/statewire-server-lane-context.cjs +24 -0
- package/dist/runtime/statewire-server-lane-context.cjs.map +1 -0
- package/dist/runtime/statewire-server-lane-context.d.ts +30 -0
- package/dist/runtime/statewire-server-lane-context.js +24 -0
- package/dist/runtime/statewire-server-lane-context.js.map +1 -0
- package/dist/runtime/useAthenaStatewireRuntime.cjs +38 -18
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +8 -1
- package/dist/runtime/useAthenaStatewireRuntime.js +39 -19
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/threads/api.cjs +2 -1
- package/dist/threads/api.cjs.map +1 -1
- package/dist/threads/api.d.ts +1 -0
- package/dist/threads/api.js +2 -1
- package/dist/threads/api.js.map +1 -1
- package/dist/threads/use-athena-thread-model.cjs +14 -0
- package/dist/threads/use-athena-thread-model.cjs.map +1 -0
- package/dist/threads/use-athena-thread-model.d.ts +22 -0
- package/dist/threads/use-athena-thread-model.js +14 -0
- package/dist/threads/use-athena-thread-model.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-embed-messages.cjs","sources":["../../src/assets/asset-embed-messages.ts"],"sourcesContent":["export const ATHENA_ASSET_EMBED_READY_MESSAGE = \"athena:asset-embed-ready\" as const;\nexport const ATHENA_ASSET_EMBED_CONFIG_MESSAGE = \"athena:asset-embed-config\" as const;\nexport const ATHENA_ASSET_CITATION_CLICK_MESSAGE = \"athena:asset-citation-click\" as const;\nexport const ATHENA_ASSET_CITATION_ACTION_MESSAGE = \"athena:asset-citation-action\" as const;\n\nexport type AthenaAssetCitationBehavior = \"browser\" | \"host\";\nexport type AthenaAssetCitationAction = \"open-in-spaces\";\n\nexport interface AthenaAssetCitationReference {\n id: string;\n /**\n * Where in the asset the citation points. Either the anchor's raw query string as Athena links,\n * citations and search results carry it (`anchor=slide&slide_index=3`, `anchor=time&time=0:42`,\n * `asset_x?anchor=pm_node&node_id=…`), which an embed receives as written whatever kind of\n * place it names, or a typed page or sheet anchor (`{ type: 'page', page: 34 }`).\n */\n anchor?: unknown;\n meta?: Record<string, unknown>;\n}\n\nexport interface AthenaAssetCitationClickEvent {\n type: typeof ATHENA_ASSET_CITATION_CLICK_MESSAGE;\n version: 1;\n sourceAssetId?: string;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetCitationActionEvent {\n type: typeof ATHENA_ASSET_CITATION_ACTION_MESSAGE;\n version: 1;\n action: AthenaAssetCitationAction;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetEmbedReadyEvent {\n type: typeof ATHENA_ASSET_EMBED_READY_MESSAGE;\n version: 1;\n}\n\nexport interface AthenaAssetEmbedConfigEvent {\n type: typeof ATHENA_ASSET_EMBED_CONFIG_MESSAGE;\n version: 1;\n token?: string;\n citationBehavior: AthenaAssetCitationBehavior;\n citationActionBehavior?: AthenaAssetCitationBehavior;\n}\n\nexport function resolveAthenaAssetCitationBehavior({\n citationBehavior,\n hasCitationClickHandler,\n}: {\n citationBehavior?: AthenaAssetCitationBehavior;\n hasCitationClickHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationBehavior === \"host\" && !hasCitationClickHandler) return \"browser\";\n return citationBehavior ?? (hasCitationClickHandler ? \"host\" : \"browser\");\n}\n\nexport function resolveAthenaAssetCitationActionBehavior({\n citationActionBehavior,\n hasCitationActionHandler,\n}: {\n citationActionBehavior?: AthenaAssetCitationBehavior;\n hasCitationActionHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationActionBehavior === \"host\" && !hasCitationActionHandler) return \"browser\";\n return citationActionBehavior ?? (hasCitationActionHandler ? \"host\" : \"browser\");\n}\n\nexport function isAthenaAssetEmbedReadyEvent(value: unknown): value is AthenaAssetEmbedReadyEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_EMBED_READY_MESSAGE &&\n \"version\" in value &&\n value.version === 1\n );\n}\n\nexport function isAthenaAssetCitationClickEvent(value: unknown): value is AthenaAssetCitationClickEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_CLICK_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n\nexport function isAthenaAssetCitationActionEvent(value: unknown): value is AthenaAssetCitationActionEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_ACTION_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"action\" in value &&\n value.action === \"open-in-spaces\" &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n"],"names":[],"mappings":";;AAAO,MAAM,mCAAmC;AACzC,MAAM,oCAAoC;AAC1C,MAAM,sCAAsC;AAC5C,MAAM,uCAAuC;AA4C7C,SAAS,mCAAmC;AAAA,EACjD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,qBAAqB,UAAU,CAAC,wBAAyB,QAAO;AACpE,SAAO,qBAAqB,0BAA0B,SAAS;AACjE;AAEO,SAAS,yCAAyC;AAAA,EACvD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,2BAA2B,UAAU,CAAC,yBAA0B,QAAO;AAC3E,SAAO,2BAA2B,2BAA2B,SAAS;AACxE;AAEO,SAAS,6BAA6B,OAAqD;AAChG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,oCACf,aAAa,SACb,MAAM,YAAY;AAEtB;AAEO,SAAS,gCAAgC,OAAwD;AACtG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,uCACf,aAAa,SACb,MAAM,YAAY,KAClB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;AAEO,SAAS,iCAAiC,OAAyD;AACxG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,wCACf,aAAa,SACb,MAAM,YAAY,KAClB,YAAY,SACZ,MAAM,WAAW,oBACjB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC
|
|
1
|
+
{"version":3,"file":"asset-embed-messages.cjs","sources":["../../src/assets/asset-embed-messages.ts"],"sourcesContent":["export const ATHENA_ASSET_EMBED_READY_MESSAGE = \"athena:asset-embed-ready\" as const;\nexport const ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE = \"athena:asset-embed-content-ready\" as const;\nexport const ATHENA_ASSET_EMBED_CONFIG_MESSAGE = \"athena:asset-embed-config\" as const;\nexport const ATHENA_ASSET_CITATION_CLICK_MESSAGE = \"athena:asset-citation-click\" as const;\nexport const ATHENA_ASSET_CITATION_ACTION_MESSAGE = \"athena:asset-citation-action\" as const;\n\nexport type AthenaAssetCitationBehavior = \"browser\" | \"host\";\nexport type AthenaAssetCitationAction = \"open-in-spaces\";\n\nexport interface AthenaAssetCitationReference {\n id: string;\n /**\n * Where in the asset the citation points. Either the anchor's raw query string as Athena links,\n * citations and search results carry it (`anchor=slide&slide_index=3`, `anchor=time&time=0:42`,\n * `asset_x?anchor=pm_node&node_id=…`), which an embed receives as written whatever kind of\n * place it names, or a typed page or sheet anchor (`{ type: 'page', page: 34 }`).\n */\n anchor?: unknown;\n meta?: Record<string, unknown>;\n}\n\nexport interface AthenaAssetCitationClickEvent {\n type: typeof ATHENA_ASSET_CITATION_CLICK_MESSAGE;\n version: 1;\n sourceAssetId?: string;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetCitationActionEvent {\n type: typeof ATHENA_ASSET_CITATION_ACTION_MESSAGE;\n version: 1;\n action: AthenaAssetCitationAction;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetEmbedReadyEvent {\n type: typeof ATHENA_ASSET_EMBED_READY_MESSAGE;\n version: 1;\n}\n\nexport interface AthenaAssetEmbedConfigEvent {\n type: typeof ATHENA_ASSET_EMBED_CONFIG_MESSAGE;\n version: 1;\n token?: string;\n citationBehavior: AthenaAssetCitationBehavior;\n citationActionBehavior?: AthenaAssetCitationBehavior;\n}\n\nexport function resolveAthenaAssetCitationBehavior({\n citationBehavior,\n hasCitationClickHandler,\n}: {\n citationBehavior?: AthenaAssetCitationBehavior;\n hasCitationClickHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationBehavior === \"host\" && !hasCitationClickHandler) return \"browser\";\n return citationBehavior ?? (hasCitationClickHandler ? \"host\" : \"browser\");\n}\n\nexport function resolveAthenaAssetCitationActionBehavior({\n citationActionBehavior,\n hasCitationActionHandler,\n}: {\n citationActionBehavior?: AthenaAssetCitationBehavior;\n hasCitationActionHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationActionBehavior === \"host\" && !hasCitationActionHandler) return \"browser\";\n return citationActionBehavior ?? (hasCitationActionHandler ? \"host\" : \"browser\");\n}\n\nexport function isAthenaAssetEmbedReadyEvent(value: unknown): value is AthenaAssetEmbedReadyEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_EMBED_READY_MESSAGE &&\n \"version\" in value &&\n value.version === 1\n );\n}\n\nexport function isAthenaAssetCitationClickEvent(value: unknown): value is AthenaAssetCitationClickEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_CLICK_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n\nexport function isAthenaAssetCitationActionEvent(value: unknown): value is AthenaAssetCitationActionEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_ACTION_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"action\" in value &&\n value.action === \"open-in-spaces\" &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n\n/** Content has rendered; bootstrap and iframe load events do not prove an asset opened. */\nexport function isAthenaAssetEmbedContentReadyEvent(value: unknown): value is {\n type: typeof ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE;\n version: 1;\n assetId: string;\n} {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"assetId\" in value &&\n typeof value.assetId === \"string\" &&\n value.assetId.length > 0\n );\n}\n"],"names":[],"mappings":";;AAAO,MAAM,mCAAmC;AACzC,MAAM,2CAA2C;AACjD,MAAM,oCAAoC;AAC1C,MAAM,sCAAsC;AAC5C,MAAM,uCAAuC;AA4C7C,SAAS,mCAAmC;AAAA,EACjD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,qBAAqB,UAAU,CAAC,wBAAyB,QAAO;AACpE,SAAO,qBAAqB,0BAA0B,SAAS;AACjE;AAEO,SAAS,yCAAyC;AAAA,EACvD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,2BAA2B,UAAU,CAAC,yBAA0B,QAAO;AAC3E,SAAO,2BAA2B,2BAA2B,SAAS;AACxE;AAEO,SAAS,6BAA6B,OAAqD;AAChG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,oCACf,aAAa,SACb,MAAM,YAAY;AAEtB;AAEO,SAAS,gCAAgC,OAAwD;AACtG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,uCACf,aAAa,SACb,MAAM,YAAY,KAClB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;AAEO,SAAS,iCAAiC,OAAyD;AACxG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,wCACf,aAAa,SACb,MAAM,YAAY,KAClB,YAAY,SACZ,MAAM,WAAW,oBACjB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;AAGO,SAAS,oCAAoC,OAIlD;AACA,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,4CACf,aAAa,SACb,MAAM,YAAY,KAClB,aAAa,SACb,OAAO,MAAM,YAAY,YACzB,MAAM,QAAQ,SAAS;AAE3B;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const ATHENA_ASSET_EMBED_READY_MESSAGE: "athena:asset-embed-ready";
|
|
2
|
+
export declare const ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE: "athena:asset-embed-content-ready";
|
|
2
3
|
export declare const ATHENA_ASSET_EMBED_CONFIG_MESSAGE: "athena:asset-embed-config";
|
|
3
4
|
export declare const ATHENA_ASSET_CITATION_CLICK_MESSAGE: "athena:asset-citation-click";
|
|
4
5
|
export declare const ATHENA_ASSET_CITATION_ACTION_MESSAGE: "athena:asset-citation-action";
|
|
@@ -49,3 +50,9 @@ export declare function resolveAthenaAssetCitationActionBehavior({ citationActio
|
|
|
49
50
|
export declare function isAthenaAssetEmbedReadyEvent(value: unknown): value is AthenaAssetEmbedReadyEvent;
|
|
50
51
|
export declare function isAthenaAssetCitationClickEvent(value: unknown): value is AthenaAssetCitationClickEvent;
|
|
51
52
|
export declare function isAthenaAssetCitationActionEvent(value: unknown): value is AthenaAssetCitationActionEvent;
|
|
53
|
+
/** Content has rendered; bootstrap and iframe load events do not prove an asset opened. */
|
|
54
|
+
export declare function isAthenaAssetEmbedContentReadyEvent(value: unknown): value is {
|
|
55
|
+
type: typeof ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE;
|
|
56
|
+
version: 1;
|
|
57
|
+
assetId: string;
|
|
58
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const ATHENA_ASSET_EMBED_READY_MESSAGE = "athena:asset-embed-ready";
|
|
2
|
+
const ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE = "athena:asset-embed-content-ready";
|
|
2
3
|
const ATHENA_ASSET_EMBED_CONFIG_MESSAGE = "athena:asset-embed-config";
|
|
3
4
|
const ATHENA_ASSET_CITATION_CLICK_MESSAGE = "athena:asset-citation-click";
|
|
4
5
|
const ATHENA_ASSET_CITATION_ACTION_MESSAGE = "athena:asset-citation-action";
|
|
@@ -25,13 +26,18 @@ function isAthenaAssetCitationClickEvent(value) {
|
|
|
25
26
|
function isAthenaAssetCitationActionEvent(value) {
|
|
26
27
|
return typeof value === "object" && value !== null && "type" in value && value.type === ATHENA_ASSET_CITATION_ACTION_MESSAGE && "version" in value && value.version === 1 && "action" in value && value.action === "open-in-spaces" && "reference" in value && typeof value.reference === "object" && value.reference !== null && "id" in value.reference && typeof value.reference.id === "string";
|
|
27
28
|
}
|
|
29
|
+
function isAthenaAssetEmbedContentReadyEvent(value) {
|
|
30
|
+
return typeof value === "object" && value !== null && "type" in value && value.type === ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE && "version" in value && value.version === 1 && "assetId" in value && typeof value.assetId === "string" && value.assetId.length > 0;
|
|
31
|
+
}
|
|
28
32
|
export {
|
|
29
33
|
ATHENA_ASSET_CITATION_ACTION_MESSAGE,
|
|
30
34
|
ATHENA_ASSET_CITATION_CLICK_MESSAGE,
|
|
31
35
|
ATHENA_ASSET_EMBED_CONFIG_MESSAGE,
|
|
36
|
+
ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE,
|
|
32
37
|
ATHENA_ASSET_EMBED_READY_MESSAGE,
|
|
33
38
|
isAthenaAssetCitationActionEvent,
|
|
34
39
|
isAthenaAssetCitationClickEvent,
|
|
40
|
+
isAthenaAssetEmbedContentReadyEvent,
|
|
35
41
|
isAthenaAssetEmbedReadyEvent,
|
|
36
42
|
resolveAthenaAssetCitationActionBehavior,
|
|
37
43
|
resolveAthenaAssetCitationBehavior
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-embed-messages.js","sources":["../../src/assets/asset-embed-messages.ts"],"sourcesContent":["export const ATHENA_ASSET_EMBED_READY_MESSAGE = \"athena:asset-embed-ready\" as const;\nexport const ATHENA_ASSET_EMBED_CONFIG_MESSAGE = \"athena:asset-embed-config\" as const;\nexport const ATHENA_ASSET_CITATION_CLICK_MESSAGE = \"athena:asset-citation-click\" as const;\nexport const ATHENA_ASSET_CITATION_ACTION_MESSAGE = \"athena:asset-citation-action\" as const;\n\nexport type AthenaAssetCitationBehavior = \"browser\" | \"host\";\nexport type AthenaAssetCitationAction = \"open-in-spaces\";\n\nexport interface AthenaAssetCitationReference {\n id: string;\n /**\n * Where in the asset the citation points. Either the anchor's raw query string as Athena links,\n * citations and search results carry it (`anchor=slide&slide_index=3`, `anchor=time&time=0:42`,\n * `asset_x?anchor=pm_node&node_id=…`), which an embed receives as written whatever kind of\n * place it names, or a typed page or sheet anchor (`{ type: 'page', page: 34 }`).\n */\n anchor?: unknown;\n meta?: Record<string, unknown>;\n}\n\nexport interface AthenaAssetCitationClickEvent {\n type: typeof ATHENA_ASSET_CITATION_CLICK_MESSAGE;\n version: 1;\n sourceAssetId?: string;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetCitationActionEvent {\n type: typeof ATHENA_ASSET_CITATION_ACTION_MESSAGE;\n version: 1;\n action: AthenaAssetCitationAction;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetEmbedReadyEvent {\n type: typeof ATHENA_ASSET_EMBED_READY_MESSAGE;\n version: 1;\n}\n\nexport interface AthenaAssetEmbedConfigEvent {\n type: typeof ATHENA_ASSET_EMBED_CONFIG_MESSAGE;\n version: 1;\n token?: string;\n citationBehavior: AthenaAssetCitationBehavior;\n citationActionBehavior?: AthenaAssetCitationBehavior;\n}\n\nexport function resolveAthenaAssetCitationBehavior({\n citationBehavior,\n hasCitationClickHandler,\n}: {\n citationBehavior?: AthenaAssetCitationBehavior;\n hasCitationClickHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationBehavior === \"host\" && !hasCitationClickHandler) return \"browser\";\n return citationBehavior ?? (hasCitationClickHandler ? \"host\" : \"browser\");\n}\n\nexport function resolveAthenaAssetCitationActionBehavior({\n citationActionBehavior,\n hasCitationActionHandler,\n}: {\n citationActionBehavior?: AthenaAssetCitationBehavior;\n hasCitationActionHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationActionBehavior === \"host\" && !hasCitationActionHandler) return \"browser\";\n return citationActionBehavior ?? (hasCitationActionHandler ? \"host\" : \"browser\");\n}\n\nexport function isAthenaAssetEmbedReadyEvent(value: unknown): value is AthenaAssetEmbedReadyEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_EMBED_READY_MESSAGE &&\n \"version\" in value &&\n value.version === 1\n );\n}\n\nexport function isAthenaAssetCitationClickEvent(value: unknown): value is AthenaAssetCitationClickEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_CLICK_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n\nexport function isAthenaAssetCitationActionEvent(value: unknown): value is AthenaAssetCitationActionEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_ACTION_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"action\" in value &&\n value.action === \"open-in-spaces\" &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n"],"names":[],"mappings":"AAAO,MAAM,mCAAmC;AACzC,MAAM,oCAAoC;AAC1C,MAAM,sCAAsC;AAC5C,MAAM,uCAAuC;AA4C7C,SAAS,mCAAmC;AAAA,EACjD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,qBAAqB,UAAU,CAAC,wBAAyB,QAAO;AACpE,SAAO,qBAAqB,0BAA0B,SAAS;AACjE;AAEO,SAAS,yCAAyC;AAAA,EACvD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,2BAA2B,UAAU,CAAC,yBAA0B,QAAO;AAC3E,SAAO,2BAA2B,2BAA2B,SAAS;AACxE;AAEO,SAAS,6BAA6B,OAAqD;AAChG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,oCACf,aAAa,SACb,MAAM,YAAY;AAEtB;AAEO,SAAS,gCAAgC,OAAwD;AACtG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,uCACf,aAAa,SACb,MAAM,YAAY,KAClB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;AAEO,SAAS,iCAAiC,OAAyD;AACxG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,wCACf,aAAa,SACb,MAAM,YAAY,KAClB,YAAY,SACZ,MAAM,WAAW,oBACjB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;"}
|
|
1
|
+
{"version":3,"file":"asset-embed-messages.js","sources":["../../src/assets/asset-embed-messages.ts"],"sourcesContent":["export const ATHENA_ASSET_EMBED_READY_MESSAGE = \"athena:asset-embed-ready\" as const;\nexport const ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE = \"athena:asset-embed-content-ready\" as const;\nexport const ATHENA_ASSET_EMBED_CONFIG_MESSAGE = \"athena:asset-embed-config\" as const;\nexport const ATHENA_ASSET_CITATION_CLICK_MESSAGE = \"athena:asset-citation-click\" as const;\nexport const ATHENA_ASSET_CITATION_ACTION_MESSAGE = \"athena:asset-citation-action\" as const;\n\nexport type AthenaAssetCitationBehavior = \"browser\" | \"host\";\nexport type AthenaAssetCitationAction = \"open-in-spaces\";\n\nexport interface AthenaAssetCitationReference {\n id: string;\n /**\n * Where in the asset the citation points. Either the anchor's raw query string as Athena links,\n * citations and search results carry it (`anchor=slide&slide_index=3`, `anchor=time&time=0:42`,\n * `asset_x?anchor=pm_node&node_id=…`), which an embed receives as written whatever kind of\n * place it names, or a typed page or sheet anchor (`{ type: 'page', page: 34 }`).\n */\n anchor?: unknown;\n meta?: Record<string, unknown>;\n}\n\nexport interface AthenaAssetCitationClickEvent {\n type: typeof ATHENA_ASSET_CITATION_CLICK_MESSAGE;\n version: 1;\n sourceAssetId?: string;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetCitationActionEvent {\n type: typeof ATHENA_ASSET_CITATION_ACTION_MESSAGE;\n version: 1;\n action: AthenaAssetCitationAction;\n reference: AthenaAssetCitationReference;\n}\n\nexport interface AthenaAssetEmbedReadyEvent {\n type: typeof ATHENA_ASSET_EMBED_READY_MESSAGE;\n version: 1;\n}\n\nexport interface AthenaAssetEmbedConfigEvent {\n type: typeof ATHENA_ASSET_EMBED_CONFIG_MESSAGE;\n version: 1;\n token?: string;\n citationBehavior: AthenaAssetCitationBehavior;\n citationActionBehavior?: AthenaAssetCitationBehavior;\n}\n\nexport function resolveAthenaAssetCitationBehavior({\n citationBehavior,\n hasCitationClickHandler,\n}: {\n citationBehavior?: AthenaAssetCitationBehavior;\n hasCitationClickHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationBehavior === \"host\" && !hasCitationClickHandler) return \"browser\";\n return citationBehavior ?? (hasCitationClickHandler ? \"host\" : \"browser\");\n}\n\nexport function resolveAthenaAssetCitationActionBehavior({\n citationActionBehavior,\n hasCitationActionHandler,\n}: {\n citationActionBehavior?: AthenaAssetCitationBehavior;\n hasCitationActionHandler: boolean;\n}): AthenaAssetCitationBehavior {\n if (citationActionBehavior === \"host\" && !hasCitationActionHandler) return \"browser\";\n return citationActionBehavior ?? (hasCitationActionHandler ? \"host\" : \"browser\");\n}\n\nexport function isAthenaAssetEmbedReadyEvent(value: unknown): value is AthenaAssetEmbedReadyEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_EMBED_READY_MESSAGE &&\n \"version\" in value &&\n value.version === 1\n );\n}\n\nexport function isAthenaAssetCitationClickEvent(value: unknown): value is AthenaAssetCitationClickEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_CLICK_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n\nexport function isAthenaAssetCitationActionEvent(value: unknown): value is AthenaAssetCitationActionEvent {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_CITATION_ACTION_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"action\" in value &&\n value.action === \"open-in-spaces\" &&\n \"reference\" in value &&\n typeof value.reference === \"object\" &&\n value.reference !== null &&\n \"id\" in value.reference &&\n typeof value.reference.id === \"string\"\n );\n}\n\n/** Content has rendered; bootstrap and iframe load events do not prove an asset opened. */\nexport function isAthenaAssetEmbedContentReadyEvent(value: unknown): value is {\n type: typeof ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE;\n version: 1;\n assetId: string;\n} {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"type\" in value &&\n value.type === ATHENA_ASSET_EMBED_CONTENT_READY_MESSAGE &&\n \"version\" in value &&\n value.version === 1 &&\n \"assetId\" in value &&\n typeof value.assetId === \"string\" &&\n value.assetId.length > 0\n );\n}\n"],"names":[],"mappings":"AAAO,MAAM,mCAAmC;AACzC,MAAM,2CAA2C;AACjD,MAAM,oCAAoC;AAC1C,MAAM,sCAAsC;AAC5C,MAAM,uCAAuC;AA4C7C,SAAS,mCAAmC;AAAA,EACjD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,qBAAqB,UAAU,CAAC,wBAAyB,QAAO;AACpE,SAAO,qBAAqB,0BAA0B,SAAS;AACjE;AAEO,SAAS,yCAAyC;AAAA,EACvD;AAAA,EACA;AACF,GAGgC;AAC9B,MAAI,2BAA2B,UAAU,CAAC,yBAA0B,QAAO;AAC3E,SAAO,2BAA2B,2BAA2B,SAAS;AACxE;AAEO,SAAS,6BAA6B,OAAqD;AAChG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,oCACf,aAAa,SACb,MAAM,YAAY;AAEtB;AAEO,SAAS,gCAAgC,OAAwD;AACtG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,uCACf,aAAa,SACb,MAAM,YAAY,KAClB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;AAEO,SAAS,iCAAiC,OAAyD;AACxG,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,wCACf,aAAa,SACb,MAAM,YAAY,KAClB,YAAY,SACZ,MAAM,WAAW,oBACjB,eAAe,SACf,OAAO,MAAM,cAAc,YAC3B,MAAM,cAAc,QACpB,QAAQ,MAAM,aACd,OAAO,MAAM,UAAU,OAAO;AAElC;AAGO,SAAS,oCAAoC,OAIlD;AACA,SACE,OAAO,UAAU,YACjB,UAAU,QACV,UAAU,SACV,MAAM,SAAS,4CACf,aAAa,SACb,MAAM,YAAY,KAClB,aAAa,SACb,OAAO,MAAM,YAAY,YACzB,MAAM,QAAQ,SAAS;AAE3B;"}
|
package/dist/chat/AthenaChat.cjs
CHANGED
|
@@ -34,6 +34,7 @@ const dictationState = require("../dictation/dictation-state.cjs");
|
|
|
34
34
|
const useAthenaDictationEngine = require("../dictation/use-athena-dictation-engine.cjs");
|
|
35
35
|
const tiptapComposer = require("../chat-ui/composer/tiptap-composer.cjs");
|
|
36
36
|
const apiClient = require("../chat-ui/mentions/suggestions/data/api-client.cjs");
|
|
37
|
+
const useAccountWorkspaceId = require("../chat-ui/mentions/use-account-workspace-id.cjs");
|
|
37
38
|
const messageComponents = require("../chat-ui/messages/message-components.cjs");
|
|
38
39
|
const messageActionsConfig = require("../chat-ui/messages/message-actions-config.cjs");
|
|
39
40
|
const useAthenaRunLive = require("./use-athena-run-live.cjs");
|
|
@@ -41,6 +42,7 @@ const athenaChatWelcome = require("./athena-chat-welcome.cjs");
|
|
|
41
42
|
const athenaComposerControls = require("./athena-composer-controls.cjs");
|
|
42
43
|
const composerKeyboardHint = require("./composer-keyboard-hint.cjs");
|
|
43
44
|
const usePrefersReducedMotion = require("../lib/use-prefers-reduced-motion.cjs");
|
|
45
|
+
const AthenaAuthContext = require("../auth/AthenaAuthContext.cjs");
|
|
44
46
|
const react = require("@assistant-ui/react");
|
|
45
47
|
const lucideReact = require("lucide-react");
|
|
46
48
|
const react$1 = require("react");
|
|
@@ -148,29 +150,42 @@ const AthenaChat = ({
|
|
|
148
150
|
composer: composerSlots,
|
|
149
151
|
dictation = true
|
|
150
152
|
}) => {
|
|
151
|
-
var _a, _b, _c, _d, _e;
|
|
153
|
+
var _a, _b, _c, _d, _e, _f;
|
|
152
154
|
const athenaConfig = AthenaContext.useAthenaConfig();
|
|
155
|
+
const authState = react$1.useContext(AthenaAuthContext.AthenaAuthContext);
|
|
153
156
|
const statewireThreadId = react$1.useContext(threadIdContext.AthenaStatewireThreadIdContext);
|
|
154
157
|
const startNewSession = (_a = statewireThreadList.useAthenaStatewireThreadList()) == null ? void 0 : _a.newThread;
|
|
158
|
+
const mentionCredentials = react$1.useMemo(
|
|
159
|
+
() => {
|
|
160
|
+
var _a2;
|
|
161
|
+
return {
|
|
162
|
+
backendUrl: athenaConfig.backendUrl,
|
|
163
|
+
appUrl: athenaConfig.appUrl,
|
|
164
|
+
apiKey: athenaConfig.apiKey,
|
|
165
|
+
credentials: "include",
|
|
166
|
+
userId: (_a2 = authState == null ? void 0 : authState.user) == null ? void 0 : _a2.userId,
|
|
167
|
+
get accessToken() {
|
|
168
|
+
return athenaConfig.token ?? void 0;
|
|
169
|
+
},
|
|
170
|
+
getAccessToken: async () => {
|
|
171
|
+
var _a3;
|
|
172
|
+
return await ((_a3 = athenaConfig.getToken) == null ? void 0 : _a3.call(athenaConfig)) ?? void 0;
|
|
173
|
+
},
|
|
174
|
+
renewAccessToken: async () => {
|
|
175
|
+
var _a3;
|
|
176
|
+
return await ((_a3 = athenaConfig.getToken) == null ? void 0 : _a3.call(athenaConfig, { force: true })) ?? void 0;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
[athenaConfig, (_b = authState == null ? void 0 : authState.user) == null ? void 0 : _b.userId]
|
|
181
|
+
);
|
|
182
|
+
const accountWorkspaceId = useAccountWorkspaceId.useAccountWorkspaceId(mentionCredentials);
|
|
155
183
|
const mentionAuth = react$1.useMemo(
|
|
156
184
|
() => ({
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
apiKey: athenaConfig.apiKey,
|
|
160
|
-
credentials: "include",
|
|
161
|
-
get accessToken() {
|
|
162
|
-
return athenaConfig.token ?? void 0;
|
|
163
|
-
},
|
|
164
|
-
getAccessToken: async () => {
|
|
165
|
-
var _a2;
|
|
166
|
-
return await ((_a2 = athenaConfig.getToken) == null ? void 0 : _a2.call(athenaConfig)) ?? void 0;
|
|
167
|
-
},
|
|
168
|
-
renewAccessToken: async () => {
|
|
169
|
-
var _a2;
|
|
170
|
-
return await ((_a2 = athenaConfig.getToken) == null ? void 0 : _a2.call(athenaConfig, { force: true })) ?? void 0;
|
|
171
|
-
}
|
|
185
|
+
...mentionCredentials,
|
|
186
|
+
workspaceId: mentionCredentials.workspaceId ?? accountWorkspaceId
|
|
172
187
|
}),
|
|
173
|
-
[
|
|
188
|
+
[mentionCredentials, accountWorkspaceId]
|
|
174
189
|
);
|
|
175
190
|
const providerMentionTools = react$1.useMemo(() => {
|
|
176
191
|
const uniqueToolkitIds = Array.from(new Set(athenaConfig.enabledToolkits));
|
|
@@ -196,10 +211,10 @@ const AthenaChat = ({
|
|
|
196
211
|
}),
|
|
197
212
|
[toolUIs]
|
|
198
213
|
);
|
|
199
|
-
const textComponent = ((
|
|
200
|
-
const userTextComponent = ((
|
|
201
|
-
const reasoningComponent = (
|
|
202
|
-
const emptyComponent = ((
|
|
214
|
+
const textComponent = ((_c = components == null ? void 0 : components.messageParts) == null ? void 0 : _c.Text) ?? tiptapText.TiptapText;
|
|
215
|
+
const userTextComponent = ((_d = components == null ? void 0 : components.messageParts) == null ? void 0 : _d.Text) ?? messageComponents.UserMessageText;
|
|
216
|
+
const reasoningComponent = (_e = components == null ? void 0 : components.messageParts) == null ? void 0 : _e.Reasoning;
|
|
217
|
+
const emptyComponent = ((_f = components == null ? void 0 : components.messageParts) == null ? void 0 : _f.Empty) ?? AthenaAssistantMessageEmpty;
|
|
203
218
|
const actionBarComponent = (components == null ? void 0 : components.AssistantActionBar) ?? AthenaAssistantActionBar;
|
|
204
219
|
const avatarComponent = components == null ? void 0 : components.AssistantAvatar;
|
|
205
220
|
const defaultComponentsContextValue = react$1.useMemo(
|
|
@@ -233,7 +248,7 @@ const AthenaChat = ({
|
|
|
233
248
|
}),
|
|
234
249
|
[AssistantMessageComponent, UserMessageComponent]
|
|
235
250
|
);
|
|
236
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatErrorBoundary.AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
251
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatErrorBoundary.AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsxRuntime.jsx(apiClient.MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
237
252
|
chatThreadShell.ChatThreadShell,
|
|
238
253
|
{
|
|
239
254
|
overlay: /* @__PURE__ */ jsxRuntime.jsx(threadLoadingOverlay.ThreadLoadingOverlay, {}),
|
|
@@ -260,10 +275,10 @@ const AthenaChat = ({
|
|
|
260
275
|
/* @__PURE__ */ jsxRuntime.jsx(statewireBanners.StatewireErrorBanner, { onStartNewSession: startNewSession }),
|
|
261
276
|
/* @__PURE__ */ jsxRuntime.jsx(StatewireRunRefusalNotice.StatewireRunRefusalNotice, { onStartNewSession: startNewSession }),
|
|
262
277
|
/* @__PURE__ */ jsxRuntime.jsx(StatewireApprovalCard.StatewireApprovalCard, {}),
|
|
263
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
278
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatewireQueuedMessages.StatewireQueuedMessages, {}),
|
|
264
279
|
/* @__PURE__ */ jsxRuntime.jsx(AttachmentContext.AttachmentProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(QuoteContext.QuoteProvider, { children: [
|
|
265
280
|
/* @__PURE__ */ jsxRuntime.jsx(QuotePostMessageBridge, {}),
|
|
266
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
281
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
267
282
|
AthenaChatComposer,
|
|
268
283
|
{
|
|
269
284
|
tools,
|
|
@@ -271,11 +286,11 @@ const AthenaChat = ({
|
|
|
271
286
|
dictation,
|
|
272
287
|
welcomeSuggestionCount: welcomeSuggestions.length
|
|
273
288
|
}
|
|
274
|
-
)
|
|
289
|
+
)
|
|
275
290
|
] }) })
|
|
276
291
|
] })
|
|
277
292
|
}
|
|
278
|
-
) }) }, statewireThreadId ?? void 0) });
|
|
293
|
+
) }) }) }, statewireThreadId ?? void 0) });
|
|
279
294
|
};
|
|
280
295
|
const THREAD_VIEWPORT_ATTR = "data-aui-thread-viewport";
|
|
281
296
|
const useScrollToTop = () => {
|