@osdk/react-components 0.33.0 → 0.34.0-main-d24cc61b1e7fde7722d8229ed2b6821f5ce1bf8a

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.
Files changed (145) hide show
  1. package/AGENTS.md +3 -0
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +14 -13
  4. package/build/browser/aip-agent-chat/AipAgentChat.js +113 -0
  5. package/build/browser/aip-agent-chat/AipAgentChat.js.map +1 -0
  6. package/build/browser/aip-agent-chat/AipAgentChat.module.css +231 -0
  7. package/build/browser/aip-agent-chat/AipAgentChat.module.css.js +29 -0
  8. package/build/browser/aip-agent-chat/AipAgentChatApi.js +2 -0
  9. package/build/browser/aip-agent-chat/AipAgentChatApi.js.map +1 -0
  10. package/build/browser/aip-agent-chat/BaseAipAgentChat.js +67 -0
  11. package/build/browser/aip-agent-chat/BaseAipAgentChat.js.map +1 -0
  12. package/build/browser/aip-agent-chat/components/AipAgentChatComposer.js +96 -0
  13. package/build/browser/aip-agent-chat/components/AipAgentChatComposer.js.map +1 -0
  14. package/build/browser/aip-agent-chat/components/AipAgentChatLoader.js +43 -0
  15. package/build/browser/aip-agent-chat/components/AipAgentChatLoader.js.map +1 -0
  16. package/build/browser/aip-agent-chat/components/AipAgentChatMessage.js +60 -0
  17. package/build/browser/aip-agent-chat/components/AipAgentChatMessage.js.map +1 -0
  18. package/build/browser/aip-agent-chat/components/AipAgentChatMessageList.js +60 -0
  19. package/build/browser/aip-agent-chat/components/AipAgentChatMessageList.js.map +1 -0
  20. package/build/browser/aip-agent-chat/components/AipAgentChatModelPicker.js +56 -0
  21. package/build/browser/aip-agent-chat/components/AipAgentChatModelPicker.js.map +1 -0
  22. package/build/browser/aip-agent-chat/hooks/useChatAutoScroll.js +61 -0
  23. package/build/browser/aip-agent-chat/hooks/useChatAutoScroll.js.map +1 -0
  24. package/build/browser/base-components/callout/Callout.js +65 -0
  25. package/build/browser/base-components/callout/Callout.js.map +1 -0
  26. package/build/browser/base-components/callout/Callout.module.css +59 -0
  27. package/build/browser/base-components/callout/Callout.module.css.js +15 -0
  28. package/build/browser/public/experimental/aip-agent-chat.js +22 -0
  29. package/build/browser/public/experimental/aip-agent-chat.js.map +1 -0
  30. package/build/browser/styles.css +402 -0
  31. package/build/browser/tokens/base-tokens/dark.css +10 -0
  32. package/build/browser/tokens/component-tokens/aip-agent-chat.css +56 -0
  33. package/build/browser/tokens/component-tokens/callout.css +40 -0
  34. package/build/browser/tokens.css +2 -0
  35. package/build/browser/util/UserAgent.js +1 -1
  36. package/build/browser/util/UserAgent.js.map +1 -1
  37. package/build/cjs/{chunk-N5NOB4G4.cjs → chunk-4SBWDLNA.cjs} +4 -4
  38. package/build/cjs/{chunk-N5NOB4G4.cjs.map → chunk-4SBWDLNA.cjs.map} +1 -1
  39. package/build/cjs/{chunk-PFGIO77A.cjs → chunk-5JPP5IKU.cjs} +4 -4
  40. package/build/cjs/{chunk-PFGIO77A.cjs.map → chunk-5JPP5IKU.cjs.map} +1 -1
  41. package/build/cjs/{chunk-56CFJTXV.cjs → chunk-73EYJP6Z.cjs} +6 -6
  42. package/build/cjs/{chunk-56CFJTXV.cjs.map → chunk-73EYJP6Z.cjs.map} +1 -1
  43. package/build/cjs/{chunk-XCZD54BD.cjs → chunk-ABKLMCWO.cjs} +4 -4
  44. package/build/cjs/{chunk-XCZD54BD.cjs.map → chunk-ABKLMCWO.cjs.map} +1 -1
  45. package/build/cjs/{chunk-QWFT3G4W.cjs → chunk-EOXGPHI7.cjs} +4 -4
  46. package/build/cjs/{chunk-QWFT3G4W.cjs.map → chunk-EOXGPHI7.cjs.map} +1 -1
  47. package/build/cjs/chunk-HM6F2PSA.cjs +11 -0
  48. package/build/cjs/{chunk-N7TOWLUY.cjs.map → chunk-HM6F2PSA.cjs.map} +1 -1
  49. package/build/cjs/chunk-ILBAVINW.cjs +11 -0
  50. package/build/cjs/{chunk-SUEZQS7M.cjs.map → chunk-ILBAVINW.cjs.map} +1 -1
  51. package/build/cjs/chunk-MSUA3D5M.cjs +11 -0
  52. package/build/cjs/{chunk-AEFCONAY.cjs.map → chunk-MSUA3D5M.cjs.map} +1 -1
  53. package/build/cjs/{chunk-4AGEVOFW.cjs → chunk-MV4WJDCS.cjs} +4 -4
  54. package/build/cjs/{chunk-4AGEVOFW.cjs.map → chunk-MV4WJDCS.cjs.map} +1 -1
  55. package/build/cjs/{chunk-LYAAHEAS.cjs → chunk-PSXAPQB3.cjs} +4 -4
  56. package/build/cjs/{chunk-LYAAHEAS.cjs.map → chunk-PSXAPQB3.cjs.map} +1 -1
  57. package/build/cjs/chunk-RCL5R3P4.cjs +11 -0
  58. package/build/cjs/{chunk-D6RQIMMX.cjs.map → chunk-RCL5R3P4.cjs.map} +1 -1
  59. package/build/cjs/{chunk-OTAWBR27.cjs → chunk-S7Z4MCUS.cjs} +4 -4
  60. package/build/cjs/{chunk-OTAWBR27.cjs.map → chunk-S7Z4MCUS.cjs.map} +1 -1
  61. package/build/cjs/{chunk-364UCCB2.cjs → chunk-WVRYCKJY.cjs} +3 -3
  62. package/build/cjs/chunk-WVRYCKJY.cjs.map +1 -0
  63. package/build/cjs/chunk-YNECVUTQ.cjs +11 -0
  64. package/build/cjs/{chunk-3MDT2TJK.cjs.map → chunk-YNECVUTQ.cjs.map} +1 -1
  65. package/build/cjs/public/experimental/action-form.cjs +4 -4
  66. package/build/cjs/public/experimental/aip-agent-chat.cjs +434 -0
  67. package/build/cjs/public/experimental/aip-agent-chat.cjs.map +1 -0
  68. package/build/cjs/public/experimental/aip-agent-chat.css +304 -0
  69. package/build/cjs/public/experimental/aip-agent-chat.css.map +1 -0
  70. package/build/cjs/public/experimental/aip-agent-chat.d.cts +202 -0
  71. package/build/cjs/public/experimental/cbac-picker.cjs +11 -11
  72. package/build/cjs/public/experimental/document-viewer.cjs +6 -6
  73. package/build/cjs/public/experimental/email-viewer.cjs +3 -3
  74. package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
  75. package/build/cjs/public/experimental/filter-list.cjs +15 -15
  76. package/build/cjs/public/experimental/image-viewer.cjs +3 -3
  77. package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
  78. package/build/cjs/public/experimental/object-table.cjs +8 -8
  79. package/build/cjs/public/experimental/pdf-viewer.cjs +7 -7
  80. package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
  81. package/build/cjs/public/experimental/video-viewer.cjs +3 -3
  82. package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
  83. package/build/cjs/public/experimental.cjs +74 -74
  84. package/build/esm/aip-agent-chat/AipAgentChat.js +113 -0
  85. package/build/esm/aip-agent-chat/AipAgentChat.js.map +1 -0
  86. package/build/esm/aip-agent-chat/AipAgentChat.module.css +231 -0
  87. package/build/esm/aip-agent-chat/AipAgentChatApi.js +2 -0
  88. package/build/esm/aip-agent-chat/AipAgentChatApi.js.map +1 -0
  89. package/build/esm/aip-agent-chat/BaseAipAgentChat.js +67 -0
  90. package/build/esm/aip-agent-chat/BaseAipAgentChat.js.map +1 -0
  91. package/build/esm/aip-agent-chat/components/AipAgentChatComposer.js +96 -0
  92. package/build/esm/aip-agent-chat/components/AipAgentChatComposer.js.map +1 -0
  93. package/build/esm/aip-agent-chat/components/AipAgentChatLoader.js +43 -0
  94. package/build/esm/aip-agent-chat/components/AipAgentChatLoader.js.map +1 -0
  95. package/build/esm/aip-agent-chat/components/AipAgentChatMessage.js +60 -0
  96. package/build/esm/aip-agent-chat/components/AipAgentChatMessage.js.map +1 -0
  97. package/build/esm/aip-agent-chat/components/AipAgentChatMessageList.js +60 -0
  98. package/build/esm/aip-agent-chat/components/AipAgentChatMessageList.js.map +1 -0
  99. package/build/esm/aip-agent-chat/components/AipAgentChatModelPicker.js +56 -0
  100. package/build/esm/aip-agent-chat/components/AipAgentChatModelPicker.js.map +1 -0
  101. package/build/esm/aip-agent-chat/hooks/useChatAutoScroll.js +61 -0
  102. package/build/esm/aip-agent-chat/hooks/useChatAutoScroll.js.map +1 -0
  103. package/build/esm/base-components/callout/Callout.js +65 -0
  104. package/build/esm/base-components/callout/Callout.js.map +1 -0
  105. package/build/esm/base-components/callout/Callout.module.css +59 -0
  106. package/build/esm/public/experimental/aip-agent-chat.js +22 -0
  107. package/build/esm/public/experimental/aip-agent-chat.js.map +1 -0
  108. package/build/esm/tokens/base-tokens/dark.css +10 -0
  109. package/build/esm/tokens/component-tokens/aip-agent-chat.css +56 -0
  110. package/build/esm/tokens/component-tokens/callout.css +40 -0
  111. package/build/esm/tokens.css +2 -0
  112. package/build/esm/util/UserAgent.js +1 -1
  113. package/build/esm/util/UserAgent.js.map +1 -1
  114. package/build/types/aip-agent-chat/AipAgentChat.d.ts +10 -0
  115. package/build/types/aip-agent-chat/AipAgentChat.d.ts.map +1 -0
  116. package/build/types/aip-agent-chat/AipAgentChatApi.d.ts +135 -0
  117. package/build/types/aip-agent-chat/AipAgentChatApi.d.ts.map +1 -0
  118. package/build/types/aip-agent-chat/BaseAipAgentChat.d.ts +55 -0
  119. package/build/types/aip-agent-chat/BaseAipAgentChat.d.ts.map +1 -0
  120. package/build/types/aip-agent-chat/components/AipAgentChatComposer.d.ts +19 -0
  121. package/build/types/aip-agent-chat/components/AipAgentChatComposer.d.ts.map +1 -0
  122. package/build/types/aip-agent-chat/components/AipAgentChatLoader.d.ts +9 -0
  123. package/build/types/aip-agent-chat/components/AipAgentChatLoader.d.ts.map +1 -0
  124. package/build/types/aip-agent-chat/components/AipAgentChatMessage.d.ts +12 -0
  125. package/build/types/aip-agent-chat/components/AipAgentChatMessage.d.ts.map +1 -0
  126. package/build/types/aip-agent-chat/components/AipAgentChatMessageList.d.ts +11 -0
  127. package/build/types/aip-agent-chat/components/AipAgentChatMessageList.d.ts.map +1 -0
  128. package/build/types/aip-agent-chat/components/AipAgentChatModelPicker.d.ts +16 -0
  129. package/build/types/aip-agent-chat/components/AipAgentChatModelPicker.d.ts.map +1 -0
  130. package/build/types/aip-agent-chat/hooks/useChatAutoScroll.d.ts +11 -0
  131. package/build/types/aip-agent-chat/hooks/useChatAutoScroll.d.ts.map +1 -0
  132. package/build/types/base-components/callout/Callout.d.ts +33 -0
  133. package/build/types/base-components/callout/Callout.d.ts.map +1 -0
  134. package/build/types/public/experimental/aip-agent-chat.d.ts +7 -0
  135. package/build/types/public/experimental/aip-agent-chat.d.ts.map +1 -0
  136. package/docs/AipAgentChat.md +207 -0
  137. package/docs/CSSVariables.md +52 -0
  138. package/docs/Welcome.md +1 -0
  139. package/package.json +24 -8
  140. package/build/cjs/chunk-364UCCB2.cjs.map +0 -1
  141. package/build/cjs/chunk-3MDT2TJK.cjs +0 -11
  142. package/build/cjs/chunk-AEFCONAY.cjs +0 -11
  143. package/build/cjs/chunk-D6RQIMMX.cjs +0 -11
  144. package/build/cjs/chunk-N7TOWLUY.cjs +0 -11
  145. package/build/cjs/chunk-SUEZQS7M.cjs +0 -11
@@ -0,0 +1,96 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ /*
3
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ import { Input } from "@base-ui/react/input";
19
+ import classNames from "classnames";
20
+ import * as React from "react";
21
+ import { ActionButton } from "../../base-components/action-button/ActionButton.js";
22
+ import styles from "../AipAgentChat.module.css.js";
23
+ /**
24
+ * Textarea + send/stop button. Enter sends; Shift+Enter inserts a newline.
25
+ * The button toggles to "Stop" while a stream is in flight (when an
26
+ * `onStop` callback is provided).
27
+ */
28
+ export function AipAgentChatComposer({
29
+ isInFlight,
30
+ onSendMessage,
31
+ onStop,
32
+ placeholder,
33
+ className,
34
+ footerLeft
35
+ }) {
36
+ const [draft, setDraft] = React.useState("");
37
+ const canSend = !isInFlight && draft.trim().length > 0;
38
+ const handleSend = React.useCallback(() => {
39
+ const trimmed = draft.trim();
40
+ if (trimmed.length === 0) {
41
+ return;
42
+ }
43
+ // Absorb sync throws and unhandled rejections; chat-level errors are
44
+ // surfaced via `onError` on the upstream useChat hook.
45
+ try {
46
+ const result = onSendMessage(trimmed);
47
+ if (result instanceof Promise) {
48
+ result.catch(noop);
49
+ }
50
+ } catch {
51
+ // swallow sync throws
52
+ }
53
+ setDraft("");
54
+ }, [draft, onSendMessage]);
55
+ const handleKeyDown = React.useCallback(event => {
56
+ if (event.key === "Enter" && !event.shiftKey) {
57
+ event.preventDefault();
58
+ if (!isInFlight) {
59
+ handleSend();
60
+ }
61
+ }
62
+ }, [handleSend, isInFlight]);
63
+
64
+ // Attach the keydown handler in the `render` prop so it can be typed against
65
+ // the actual rendered <textarea> element rather than base-ui's HTMLInputElement.
66
+ const renderTextarea = React.useCallback(props => /*#__PURE__*/React.createElement("textarea", _extends({}, props, {
67
+ onKeyDown: handleKeyDown,
68
+ rows: 3
69
+ })), [handleKeyDown]);
70
+ return /*#__PURE__*/React.createElement("div", {
71
+ className: classNames(styles.composer, className)
72
+ }, /*#__PURE__*/React.createElement("div", {
73
+ className: styles.inputWrapper
74
+ }, /*#__PURE__*/React.createElement(Input, {
75
+ "aria-label": "Message input",
76
+ className: styles.textarea,
77
+ onValueChange: setDraft,
78
+ placeholder: placeholder,
79
+ value: draft,
80
+ render: renderTextarea
81
+ }), /*#__PURE__*/React.createElement("div", {
82
+ className: styles.inputActions
83
+ }, isInFlight && onStop != null ? /*#__PURE__*/React.createElement(ActionButton, {
84
+ onClick: onStop,
85
+ type: "button"
86
+ }, "Stop") : /*#__PURE__*/React.createElement(ActionButton, {
87
+ disabled: !canSend,
88
+ onClick: handleSend,
89
+ type: "button",
90
+ variant: "primary"
91
+ }, "Send"))), footerLeft != null && /*#__PURE__*/React.createElement("div", {
92
+ className: styles.composerFooterLeft
93
+ }, footerLeft));
94
+ }
95
+ function noop() {}
96
+ //# sourceMappingURL=AipAgentChatComposer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AipAgentChatComposer.js","names":["Input","classNames","React","ActionButton","styles","AipAgentChatComposer","isInFlight","onSendMessage","onStop","placeholder","className","footerLeft","draft","setDraft","useState","canSend","trim","length","handleSend","useCallback","trimmed","result","Promise","catch","noop","handleKeyDown","event","key","shiftKey","preventDefault","renderTextarea","props","createElement","_extends","onKeyDown","rows","composer","inputWrapper","textarea","onValueChange","value","render","inputActions","onClick","type","disabled","variant","composerFooterLeft"],"sources":["AipAgentChatComposer.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Input } from \"@base-ui/react/input\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport { ActionButton } from \"../../base-components/action-button/ActionButton.js\";\nimport styles from \"../AipAgentChat.module.css\";\n\nexport interface AipAgentChatComposerProps {\n isInFlight: boolean;\n onSendMessage: (text: string) => void;\n onStop?: () => void;\n placeholder?: string;\n className?: string;\n /**\n * Optional content rendered to the left of the send button (e.g. the\n * model picker passed in by the OSDK wrapper).\n */\n footerLeft?: React.ReactNode;\n}\n\n/**\n * Textarea + send/stop button. Enter sends; Shift+Enter inserts a newline.\n * The button toggles to \"Stop\" while a stream is in flight (when an\n * `onStop` callback is provided).\n */\nexport function AipAgentChatComposer({\n isInFlight,\n onSendMessage,\n onStop,\n placeholder,\n className,\n footerLeft,\n}: AipAgentChatComposerProps): React.ReactElement {\n const [draft, setDraft] = React.useState(\"\");\n\n const canSend = !isInFlight && draft.trim().length > 0;\n\n const handleSend = React.useCallback(() => {\n const trimmed = draft.trim();\n if (trimmed.length === 0) {\n return;\n }\n // Absorb sync throws and unhandled rejections; chat-level errors are\n // surfaced via `onError` on the upstream useChat hook.\n try {\n const result = onSendMessage(trimmed) as void | Promise<void>;\n if (result instanceof Promise) {\n result.catch(noop);\n }\n } catch {\n // swallow sync throws\n }\n setDraft(\"\");\n }, [draft, onSendMessage]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n if (!isInFlight) {\n handleSend();\n }\n }\n },\n [handleSend, isInFlight],\n );\n\n // Attach the keydown handler in the `render` prop so it can be typed against\n // the actual rendered <textarea> element rather than base-ui's HTMLInputElement.\n const renderTextarea = React.useCallback(\n (props: React.ComponentPropsWithRef<\"textarea\">) => (\n <textarea {...props} onKeyDown={handleKeyDown} rows={3} />\n ),\n [handleKeyDown],\n );\n\n return (\n <div className={classNames(styles.composer, className)}>\n <div className={styles.inputWrapper}>\n <Input\n aria-label=\"Message input\"\n className={styles.textarea}\n onValueChange={setDraft}\n placeholder={placeholder}\n value={draft}\n render={renderTextarea}\n />\n <div className={styles.inputActions}>\n {isInFlight && onStop != null\n ? (\n <ActionButton onClick={onStop} type=\"button\">\n Stop\n </ActionButton>\n )\n : (\n <ActionButton\n disabled={!canSend}\n onClick={handleSend}\n type=\"button\"\n variant=\"primary\"\n >\n Send\n </ActionButton>\n )}\n </div>\n </div>\n {footerLeft != null && (\n <div className={styles.composerFooterLeft}>{footerLeft}</div>\n )}\n </div>\n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AA8B,aAAA;IAAKtB,SAAS,EAAEN,MAAM,CAAC2C;EAAmB,GAAEpC,UAAgB,CAE3D,CAAC;AAEV;AAEA,SAASa,IAAIA,CAAA,EAAS,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import classNames from "classnames";
18
+ import * as React from "react";
19
+ import styles from "../AipAgentChat.module.css.js";
20
+ /**
21
+ * Three-dot bouncing animation rendered while the agent is responding.
22
+ */
23
+ export function AipAgentChatLoader({
24
+ className,
25
+ label = "Assistant is responding"
26
+ }) {
27
+ return /*#__PURE__*/React.createElement("div", {
28
+ "aria-label": label,
29
+ "aria-live": "polite",
30
+ className: classNames(styles.loader, className),
31
+ role: "status"
32
+ }, /*#__PURE__*/React.createElement("span", {
33
+ "aria-hidden": "true",
34
+ className: styles.loaderDot
35
+ }), /*#__PURE__*/React.createElement("span", {
36
+ "aria-hidden": "true",
37
+ className: styles.loaderDot
38
+ }), /*#__PURE__*/React.createElement("span", {
39
+ "aria-hidden": "true",
40
+ className: styles.loaderDot
41
+ }));
42
+ }
43
+ //# sourceMappingURL=AipAgentChatLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AipAgentChatLoader.js","names":["classNames","React","styles","AipAgentChatLoader","className","label","createElement","loader","role","loaderDot"],"sources":["AipAgentChatLoader.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"../AipAgentChat.module.css\";\n\nexport interface AipAgentChatLoaderProps {\n className?: string;\n label?: string;\n}\n\n/**\n * Three-dot bouncing animation rendered while the agent is responding.\n */\nexport function AipAgentChatLoader(\n { className, label = \"Assistant is responding\" }: AipAgentChatLoaderProps,\n): React.ReactElement {\n return (\n <div\n aria-label={label}\n aria-live=\"polite\"\n className={classNames(styles.loader, className)}\n role=\"status\"\n >\n <span aria-hidden=\"true\" className={styles.loaderDot} />\n <span aria-hidden=\"true\" className={styles.loaderDot} />\n <span aria-hidden=\"true\" className={styles.loaderDot} />\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,4BAA4B;AAO/C;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChC;EAAEC,SAAS;EAAEC,KAAK,GAAG;AAAmD,CAAC,EACrD;EACpB,oBACEJ,KAAA,CAAAK,aAAA;IACE,cAAYD,KAAM;IAClB,aAAU,QAAQ;IAClBD,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACK,MAAM,EAAEH,SAAS,CAAE;IAChDI,IAAI,EAAC;EAAQ,gBAEbP,KAAA,CAAAK,aAAA;IAAM,eAAY,MAAM;IAACF,SAAS,EAAEF,MAAM,CAACO;EAAU,CAAE,CAAC,eACxDR,KAAA,CAAAK,aAAA;IAAM,eAAY,MAAM;IAACF,SAAS,EAAEF,MAAM,CAACO;EAAU,CAAE,CAAC,eACxDR,KAAA,CAAAK,aAAA;IAAM,eAAY,MAAM;IAACF,SAAS,EAAEF,MAAM,CAACO;EAAU,CAAE,CACpD,CAAC;AAEV","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { getUIMessageText } from "@osdk/aip-core";
18
+ import classNames from "classnames";
19
+ import * as React from "react";
20
+ import styles from "../AipAgentChat.module.css.js";
21
+ /**
22
+ * Default rendering for a single chat message bubble. User messages are
23
+ * right-aligned with a primary background; assistant messages are
24
+ * left-aligned with a secondary background; system messages render
25
+ * centered in muted style.
26
+ */
27
+ export function AipAgentChatMessage({
28
+ message
29
+ }) {
30
+ const text = getUIMessageText(message);
31
+ const role = message.role;
32
+ const styling = ROLE_STYLING[role];
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ "aria-label": styling.label,
35
+ className: classNames(styles.message, styling.container),
36
+ role: "group"
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: classNames(styles.bubble, styling.bubble)
39
+ }, text.length > 0 ? text : /*#__PURE__*/React.createElement("span", {
40
+ className: styles.streamingPlaceholder
41
+ }, "\u2026")));
42
+ }
43
+ const ROLE_STYLING = {
44
+ user: {
45
+ container: styles.userMessage,
46
+ bubble: styles.userBubble,
47
+ label: "User message"
48
+ },
49
+ assistant: {
50
+ container: styles.assistantMessage,
51
+ bubble: styles.assistantBubble,
52
+ label: "Assistant message"
53
+ },
54
+ system: {
55
+ container: styles.systemMessage,
56
+ bubble: styles.systemBubble,
57
+ label: "System message"
58
+ }
59
+ };
60
+ //# sourceMappingURL=AipAgentChatMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AipAgentChatMessage.js","names":["getUIMessageText","classNames","React","styles","AipAgentChatMessage","message","text","role","styling","ROLE_STYLING","createElement","label","className","container","bubble","length","streamingPlaceholder","user","userMessage","userBubble","assistant","assistantMessage","assistantBubble","system","systemMessage","systemBubble"],"sources":["AipAgentChatMessage.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getUIMessageText, type UIMessage } from \"@osdk/aip-core\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"../AipAgentChat.module.css\";\n\nexport interface AipAgentChatMessageProps {\n message: UIMessage;\n}\n\n/**\n * Default rendering for a single chat message bubble. User messages are\n * right-aligned with a primary background; assistant messages are\n * left-aligned with a secondary background; system messages render\n * centered in muted style.\n */\nexport function AipAgentChatMessage(\n { message }: AipAgentChatMessageProps,\n): React.ReactElement {\n const text = getUIMessageText(message);\n const role = message.role;\n const styling = ROLE_STYLING[role];\n\n return (\n <div\n aria-label={styling.label}\n className={classNames(styles.message, styling.container)}\n role=\"group\"\n >\n <div className={classNames(styles.bubble, styling.bubble)}>\n {text.length > 0\n ? text\n : <span className={styles.streamingPlaceholder}>…</span>}\n </div>\n </div>\n );\n}\n\ninterface RoleStyling {\n container: string;\n bubble: string;\n label: string;\n}\n\nconst ROLE_STYLING: Record<UIMessage[\"role\"], RoleStyling> = {\n user: {\n container: styles.userMessage,\n bubble: styles.userBubble,\n label: \"User message\",\n },\n assistant: {\n container: styles.assistantMessage,\n bubble: styles.assistantBubble,\n label: \"Assistant message\",\n },\n system: {\n container: styles.systemMessage,\n bubble: styles.systemBubble,\n label: \"System message\",\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAwB,gBAAgB;AACjE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,4BAA4B;AAM/C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CACjC;EAAEC;AAAkC,CAAC,EACjB;EACpB,MAAMC,IAAI,GAAGN,gBAAgB,CAACK,OAAO,CAAC;EACtC,MAAME,IAAI,GAAGF,OAAO,CAACE,IAAI;EACzB,MAAMC,OAAO,GAAGC,YAAY,CAACF,IAAI,CAAC;EAElC,oBACEL,KAAA,CAAAQ,aAAA;IACE,cAAYF,OAAO,CAACG,KAAM;IAC1BC,SAAS,EAAEX,UAAU,CAACE,MAAM,CAACE,OAAO,EAAEG,OAAO,CAACK,SAAS,CAAE;IACzDN,IAAI,EAAC;EAAO,gBAEZL,KAAA,CAAAQ,aAAA;IAAKE,SAAS,EAAEX,UAAU,CAACE,MAAM,CAACW,MAAM,EAAEN,OAAO,CAACM,MAAM;EAAE,GACvDR,IAAI,CAACS,MAAM,GAAG,CAAC,GACZT,IAAI,gBACJJ,KAAA,CAAAQ,aAAA;IAAME,SAAS,EAAET,MAAM,CAACa;EAAqB,GAAC,QAAO,CACtD,CACF,CAAC;AAEV;AAQA,MAAMP,YAAoD,GAAG;EAC3DQ,IAAI,EAAE;IACJJ,SAAS,EAAEV,MAAM,CAACe,WAAW;IAC7BJ,MAAM,EAAEX,MAAM,CAACgB,UAAU;IACzBR,KAAK,EAAE;EACT,CAAC;EACDS,SAAS,EAAE;IACTP,SAAS,EAAEV,MAAM,CAACkB,gBAAgB;IAClCP,MAAM,EAAEX,MAAM,CAACmB,eAAe;IAC9BX,KAAK,EAAE;EACT,CAAC;EACDY,MAAM,EAAE;IACNV,SAAS,EAAEV,MAAM,CAACqB,aAAa;IAC/BV,MAAM,EAAEX,MAAM,CAACsB,YAAY;IAC3Bd,KAAK,EAAE;EACT;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { Chat } from "@blueprintjs/icons";
18
+ import { getUIMessageText } from "@osdk/aip-core";
19
+ import classNames from "classnames";
20
+ import * as React from "react";
21
+ import styles from "../AipAgentChat.module.css.js";
22
+ import { useChatAutoScroll } from "../hooks/useChatAutoScroll.js";
23
+ import { AipAgentChatLoader } from "./AipAgentChatLoader.js";
24
+ import { AipAgentChatMessage } from "./AipAgentChatMessage.js";
25
+ const DEFAULT_EMPTY_STATE = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Chat, {
26
+ className: styles.emptyIcon,
27
+ size: 64
28
+ }), /*#__PURE__*/React.createElement("div", {
29
+ className: styles.emptyTitle
30
+ }, "Start a conversation"), /*#__PURE__*/React.createElement("div", null, "Type a message below to chat with the assistant."));
31
+ export function AipAgentChatMessageList({
32
+ messages,
33
+ isStreaming,
34
+ enableAutoScroll,
35
+ className,
36
+ renderEmptyState,
37
+ renderMessage
38
+ }) {
39
+ const lastMessage = messages.at(-1);
40
+ const lastMessageTextLength = lastMessage != null ? getUIMessageText(lastMessage).length : 0;
41
+ const scrollSignal = `${messages.length}:${lastMessageTextLength}`;
42
+ const setContainerRef = useChatAutoScroll(scrollSignal, enableAutoScroll);
43
+ const isEmpty = messages.length === 0 && !isStreaming;
44
+ const showLoader = isStreaming && lastMessage?.role !== "assistant";
45
+ return /*#__PURE__*/React.createElement("div", {
46
+ "aria-live": isEmpty ? undefined : "polite",
47
+ className: classNames(styles.messageList, isEmpty && styles.empty, className),
48
+ ref: setContainerRef,
49
+ role: isEmpty ? undefined : "log"
50
+ }, isEmpty ? renderEmptyState != null ? renderEmptyState() : DEFAULT_EMPTY_STATE : /*#__PURE__*/React.createElement(React.Fragment, null, messages.map(message => /*#__PURE__*/React.createElement(React.Fragment, {
51
+ key: message.id
52
+ }, renderMessage != null ? renderMessage(message) : /*#__PURE__*/React.createElement(AipAgentChatMessage, {
53
+ message: message
54
+ }))), showLoader && /*#__PURE__*/React.createElement("div", {
55
+ className: classNames(styles.message, styles.assistantMessage)
56
+ }, /*#__PURE__*/React.createElement("div", {
57
+ className: classNames(styles.bubble, styles.assistantBubble)
58
+ }, /*#__PURE__*/React.createElement(AipAgentChatLoader, null)))));
59
+ }
60
+ //# sourceMappingURL=AipAgentChatMessageList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AipAgentChatMessageList.js","names":["Chat","getUIMessageText","classNames","React","styles","useChatAutoScroll","AipAgentChatLoader","AipAgentChatMessage","DEFAULT_EMPTY_STATE","createElement","Fragment","className","emptyIcon","size","emptyTitle","AipAgentChatMessageList","messages","isStreaming","enableAutoScroll","renderEmptyState","renderMessage","lastMessage","at","lastMessageTextLength","length","scrollSignal","setContainerRef","isEmpty","showLoader","role","undefined","messageList","empty","ref","map","message","key","id","assistantMessage","bubble","assistantBubble"],"sources":["AipAgentChatMessageList.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Chat } from \"@blueprintjs/icons\";\nimport { getUIMessageText, type UIMessage } from \"@osdk/aip-core\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"../AipAgentChat.module.css\";\nimport { useChatAutoScroll } from \"../hooks/useChatAutoScroll.js\";\nimport { AipAgentChatLoader } from \"./AipAgentChatLoader.js\";\nimport { AipAgentChatMessage } from \"./AipAgentChatMessage.js\";\n\nexport interface AipAgentChatMessageListProps {\n messages: ReadonlyArray<UIMessage>;\n isStreaming: boolean;\n enableAutoScroll: boolean;\n className?: string;\n renderEmptyState?: () => React.ReactNode;\n renderMessage?: (message: UIMessage) => React.ReactNode;\n}\n\nconst DEFAULT_EMPTY_STATE: React.ReactNode = (\n <>\n <Chat className={styles.emptyIcon} size={64} />\n <div className={styles.emptyTitle}>Start a conversation</div>\n <div>Type a message below to chat with the assistant.</div>\n </>\n);\n\nexport function AipAgentChatMessageList({\n messages,\n isStreaming,\n enableAutoScroll,\n className,\n renderEmptyState,\n renderMessage,\n}: AipAgentChatMessageListProps): React.ReactElement {\n const lastMessage = messages.at(-1);\n const lastMessageTextLength = lastMessage != null\n ? getUIMessageText(lastMessage).length\n : 0;\n const scrollSignal = `${messages.length}:${lastMessageTextLength}`;\n\n const setContainerRef = useChatAutoScroll<HTMLDivElement>(\n scrollSignal,\n enableAutoScroll,\n );\n\n const isEmpty = messages.length === 0 && !isStreaming;\n const showLoader = isStreaming && lastMessage?.role !== \"assistant\";\n\n return (\n <div\n aria-live={isEmpty ? undefined : \"polite\"}\n className={classNames(\n styles.messageList,\n isEmpty && styles.empty,\n className,\n )}\n ref={setContainerRef}\n role={isEmpty ? undefined : \"log\"}\n >\n {isEmpty\n ? (renderEmptyState != null ? renderEmptyState() : DEFAULT_EMPTY_STATE)\n : (\n <>\n {messages.map(message => (\n <React.Fragment key={message.id}>\n {renderMessage != null\n ? renderMessage(message)\n : <AipAgentChatMessage message={message} />}\n </React.Fragment>\n ))}\n {showLoader && (\n <div\n className={classNames(styles.message, styles.assistantMessage)}\n >\n <div\n className={classNames(styles.bubble, styles.assistantBubble)}\n >\n <AipAgentChatLoader />\n </div>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,oBAAoB;AACzC,SAASC,gBAAgB,QAAwB,gBAAgB;AACjE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,4BAA4B;AAC/C,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,mBAAmB,QAAQ,0BAA0B;AAW9D,MAAMC,mBAAoC,gBACxCL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,qBACEP,KAAA,CAAAM,aAAA,CAACT,IAAI;EAACW,SAAS,EAAEP,MAAM,CAACQ,SAAU;EAACC,IAAI,EAAE;AAAG,CAAE,CAAC,eAC/CV,KAAA,CAAAM,aAAA;EAAKE,SAAS,EAAEP,MAAM,CAACU;AAAW,GAAC,sBAAyB,CAAC,eAC7DX,KAAA,CAAAM,aAAA,cAAK,kDAAqD,CAC1D,CACH;AAED,OAAO,SAASM,uBAAuBA,CAAC;EACtCC,QAAQ;EACRC,WAAW;EACXC,gBAAgB;EAChBP,SAAS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B,KAAA,CAAAM,aAAA;IACEE,SAAS,EAAET,UAAU,CAACE,MAAM,CAAC+B,OAAO,EAAE/B,MAAM,CAACkC,gBAAgB;EAAE,gBAE/DnC,KAAA,CAAAM,aAAA;IACEE,SAAS,EAAET,UAAU,CAACE,MAAM,CAACmC,MAAM,EAAEnC,MAAM,CAACoC,eAAe;EAAE,gBAE7DrC,KAAA,CAAAM,aAAA,CAACH,kBAAkB,MAAE,CAClB,CACF,CAEP,CAEH,CAAC;AAEV","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import classNames from "classnames";
18
+ import * as React from "react";
19
+ import styles from "../AipAgentChat.module.css.js";
20
+ /**
21
+ * Native-select model picker rendered in the composer footer when the
22
+ * OSDK wrapper is given an `availableModels` list. Operates on Foundry
23
+ * LMS model API names. Renders a read-only label when exactly one model
24
+ * is available so the active model stays visible without offering a
25
+ * dropdown the user can't act on; renders nothing when the list is empty.
26
+ */
27
+ export function AipAgentChatModelPicker({
28
+ models,
29
+ activeModel,
30
+ onModelChange,
31
+ disabled,
32
+ className
33
+ }) {
34
+ const handleChange = React.useCallback(event => {
35
+ onModelChange(event.target.value);
36
+ }, [onModelChange]);
37
+ if (models.length === 0) {
38
+ return null;
39
+ }
40
+ if (models.length === 1) {
41
+ return /*#__PURE__*/React.createElement("span", {
42
+ className: classNames(styles.modelPickerLabel, className)
43
+ }, "Model: ", activeModel);
44
+ }
45
+ return /*#__PURE__*/React.createElement("select", {
46
+ "aria-label": "Active model",
47
+ className: classNames(styles.modelPicker, className),
48
+ disabled: disabled,
49
+ onChange: handleChange,
50
+ value: activeModel
51
+ }, models.map(modelName => /*#__PURE__*/React.createElement("option", {
52
+ key: modelName,
53
+ value: modelName
54
+ }, modelName)));
55
+ }
56
+ //# sourceMappingURL=AipAgentChatModelPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AipAgentChatModelPicker.js","names":["classNames","React","styles","AipAgentChatModelPicker","models","activeModel","onModelChange","disabled","className","handleChange","useCallback","event","target","value","length","createElement","modelPickerLabel","modelPicker","onChange","map","modelName","key"],"sources":["AipAgentChatModelPicker.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"../AipAgentChat.module.css\";\n\nexport interface AipAgentChatModelPickerProps {\n models: ReadonlyArray<string>;\n activeModel: string;\n onModelChange: (model: string) => void;\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * Native-select model picker rendered in the composer footer when the\n * OSDK wrapper is given an `availableModels` list. Operates on Foundry\n * LMS model API names. Renders a read-only label when exactly one model\n * is available so the active model stays visible without offering a\n * dropdown the user can't act on; renders nothing when the list is empty.\n */\nexport function AipAgentChatModelPicker({\n models,\n activeModel,\n onModelChange,\n disabled,\n className,\n}: AipAgentChatModelPickerProps): React.ReactElement | null {\n const handleChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n onModelChange(event.target.value);\n },\n [onModelChange],\n );\n\n if (models.length === 0) {\n return null;\n }\n\n if (models.length === 1) {\n return (\n <span className={classNames(styles.modelPickerLabel, className)}>\n Model: {activeModel}\n </span>\n );\n }\n\n return (\n <select\n aria-label=\"Active model\"\n className={classNames(styles.modelPicker, className)}\n disabled={disabled}\n onChange={handleChange}\n value={activeModel}\n >\n {models.map(modelName => (\n <option key={modelName} value={modelName}>\n {modelName}\n </option>\n ))}\n </select>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,4BAA4B;AAU/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAAC;EACtCC,MAAM;EACNC,WAAW;EACXC,aAAa;EACbC,QAAQ;EACRC;AAC4B,CAAC,EAA6B;EAC1D,MAAMC,YAAY,GAAGR,KAAK,CAACS,WAAW,CACnCC,KAA2C,IAAK;IAC/CL,aAAa,CAACK,KAAK,CAACC,MAAM,CAACC,KAAK,CAAC;EACnC,CAAC,EACD,CAACP,aAAa,CAChB,CAAC;EAED,IAAIF,MAAM,CAACU,MAAM,KAAK,CAAC,EAAE;IACvB,OAAO,IAAI;EACb;EAEA,IAAIV,MAAM,CAACU,MAAM,KAAK,CAAC,EAAE;IACvB,oBACEb,KAAA,CAAAc,aAAA;MAAMP,SAAS,EAAER,UAAU,CAACE,MAAM,CAACc,gBAAgB,EAAER,SAAS;IAAE,GAAC,SACxD,EAACH,WACJ,CAAC;EAEX;EAEA,oBACEJ,KAAA,CAAAc,aAAA;IACE,cAAW,cAAc;IACzBP,SAAS,EAAER,UAAU,CAACE,MAAM,CAACe,WAAW,EAAET,SAAS,CAAE;IACrDD,QAAQ,EAAEA,QAAS;IACnBW,QAAQ,EAAET,YAAa;IACvBI,KAAK,EAAER;EAAY,GAElBD,MAAM,CAACe,GAAG,CAACC,SAAS,iBACnBnB,KAAA,CAAAc,aAAA;IAAQM,GAAG,EAAED,SAAU;IAACP,KAAK,EAAEO;EAAU,GACtCA,SACK,CACT,CACK,CAAC;AAEb","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import * as React from "react";
18
+
19
+ /**
20
+ * Keeps a scrollable container pinned to its bottom whenever `signal` changes
21
+ * (typically a string encoding the messages array length and streaming token
22
+ * count).
23
+ *
24
+ * Disengages temporarily once the user scrolls up — pinning resumes when the
25
+ * user scrolls back near the bottom. Returns a callback ref to attach to the
26
+ * scrollable element; the listener follows the element across re-mounts.
27
+ */
28
+ export function useChatAutoScroll(signal, enabled) {
29
+ const elRef = React.useRef(null);
30
+ const cleanupRef = React.useRef(null);
31
+ const isPinnedRef = React.useRef(true);
32
+ const setRef = React.useCallback(el => {
33
+ cleanupRef.current?.();
34
+ cleanupRef.current = null;
35
+ elRef.current = el;
36
+ if (el == null) {
37
+ return;
38
+ }
39
+ const onScroll = () => {
40
+ const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
41
+ isPinnedRef.current = distanceFromBottom <= NEAR_BOTTOM_THRESHOLD_PX;
42
+ };
43
+ el.addEventListener("scroll", onScroll, {
44
+ passive: true
45
+ });
46
+ cleanupRef.current = () => el.removeEventListener("scroll", onScroll);
47
+ }, []);
48
+ React.useEffect(() => {
49
+ if (!enabled) {
50
+ return;
51
+ }
52
+ const el = elRef.current;
53
+ if (el == null || !isPinnedRef.current) {
54
+ return;
55
+ }
56
+ el.scrollTop = el.scrollHeight;
57
+ }, [signal, enabled]);
58
+ return setRef;
59
+ }
60
+ const NEAR_BOTTOM_THRESHOLD_PX = 32;
61
+ //# sourceMappingURL=useChatAutoScroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatAutoScroll.js","names":["React","useChatAutoScroll","signal","enabled","elRef","useRef","cleanupRef","isPinnedRef","setRef","useCallback","el","current","onScroll","distanceFromBottom","scrollHeight","scrollTop","clientHeight","NEAR_BOTTOM_THRESHOLD_PX","addEventListener","passive","removeEventListener","useEffect"],"sources":["useChatAutoScroll.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from \"react\";\n\n/**\n * Keeps a scrollable container pinned to its bottom whenever `signal` changes\n * (typically a string encoding the messages array length and streaming token\n * count).\n *\n * Disengages temporarily once the user scrolls up — pinning resumes when the\n * user scrolls back near the bottom. Returns a callback ref to attach to the\n * scrollable element; the listener follows the element across re-mounts.\n */\nexport function useChatAutoScroll<T extends HTMLElement>(\n signal: string,\n enabled: boolean,\n): React.RefCallback<T> {\n const elRef = React.useRef<T | null>(null);\n const cleanupRef = React.useRef<(() => void) | null>(null);\n const isPinnedRef = React.useRef<boolean>(true);\n\n const setRef = React.useCallback<React.RefCallback<T>>((el) => {\n cleanupRef.current?.();\n cleanupRef.current = null;\n elRef.current = el;\n if (el == null) {\n return;\n }\n const onScroll = () => {\n const distanceFromBottom = el.scrollHeight - el.scrollTop\n - el.clientHeight;\n isPinnedRef.current = distanceFromBottom <= NEAR_BOTTOM_THRESHOLD_PX;\n };\n el.addEventListener(\"scroll\", onScroll, { passive: true });\n cleanupRef.current = () => el.removeEventListener(\"scroll\", onScroll);\n }, []);\n\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n const el = elRef.current;\n if (el == null || !isPinnedRef.current) {\n return;\n }\n el.scrollTop = el.scrollHeight;\n }, [signal, enabled]);\n\n return setRef;\n}\n\nconst NEAR_BOTTOM_THRESHOLD_PX = 32;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAC/BC,MAAc,EACdC,OAAgB,EACM;EACtB,MAAMC,KAAK,GAAGJ,KAAK,CAACK,MAAM,CAAW,IAAI,CAAC;EAC1C,MAAMC,UAAU,GAAGN,KAAK,CAACK,MAAM,CAAsB,IAAI,CAAC;EAC1D,MAAME,WAAW,GAAGP,KAAK,CAACK,MAAM,CAAU,IAAI,CAAC;EAE/C,MAAMG,MAAM,GAAGR,KAAK,CAACS,WAAW,CAAwBC,EAAE,IAAK;IAC7DJ,UAAU,CAACK,OAAO,GAAG,CAAC;IACtBL,UAAU,CAACK,OAAO,GAAG,IAAI;IACzBP,KAAK,CAACO,OAAO,GAAGD,EAAE;IAClB,IAAIA,EAAE,IAAI,IAAI,EAAE;MACd;IACF;IACA,MAAME,QAAQ,GAAGA,CAAA,KAAM;MACrB,MAAMC,kBAAkB,GAAGH,EAAE,CAACI,YAAY,GAAGJ,EAAE,CAACK,SAAS,GACrDL,EAAE,CAACM,YAAY;MACnBT,WAAW,CAACI,OAAO,GAAGE,kBAAkB,IAAII,wBAAwB;IACtE,CAAC;IACDP,EAAE,CAACQ,gBAAgB,CAAC,QAAQ,EAAEN,QAAQ,EAAE;MAAEO,OAAO,EAAE;IAAK,CAAC,CAAC;IAC1Db,UAAU,CAACK,OAAO,GAAG,MAAMD,EAAE,CAACU,mBAAmB,CAAC,QAAQ,EAAER,QAAQ,CAAC;EACvE,CAAC,EAAE,EAAE,CAAC;EAENZ,KAAK,CAACqB,SAAS,CAAC,MAAM;IACpB,IAAI,CAAClB,OAAO,EAAE;MACZ;IACF;IACA,MAAMO,EAAE,GAAGN,KAAK,CAACO,OAAO;IACxB,IAAID,EAAE,IAAI,IAAI,IAAI,CAACH,WAAW,CAACI,OAAO,EAAE;MACtC;IACF;IACAD,EAAE,CAACK,SAAS,GAAGL,EAAE,CAACI,YAAY;EAChC,CAAC,EAAE,CAACZ,MAAM,EAAEC,OAAO,CAAC,CAAC;EAErB,OAAOK,MAAM;AACf;AAEA,MAAMS,wBAAwB,GAAG,EAAE","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { Error as ErrorIcon, InfoSign, Tick, WarningSign } from "@blueprintjs/icons";
18
+ import classNames from "classnames";
19
+ import * as React from "react";
20
+ import styles from "./Callout.module.css.js";
21
+ const DEFAULT_ICONS = {
22
+ error: ErrorIcon,
23
+ warning: WarningSign,
24
+ success: Tick,
25
+ info: InfoSign
26
+ };
27
+ const INTENT_STYLES = {
28
+ error: styles.error,
29
+ warning: styles.warning,
30
+ success: styles.success,
31
+ info: styles.info
32
+ };
33
+
34
+ /**
35
+ * A styled alert banner supporting four intent levels with an icon,
36
+ * title, message body, and action slot.
37
+ */
38
+ export const Callout = /*#__PURE__*/React.memo(function ({
39
+ intent,
40
+ title,
41
+ children,
42
+ actions,
43
+ icon,
44
+ className
45
+ }) {
46
+ const IconComponent = icon ?? DEFAULT_ICONS[intent];
47
+ return /*#__PURE__*/React.createElement("div", {
48
+ "aria-live": "polite",
49
+ className: classNames(styles.callout, INTENT_STYLES[intent], className),
50
+ role: "alert"
51
+ }, IconComponent != null && /*#__PURE__*/React.createElement("span", {
52
+ className: styles.icon
53
+ }, /*#__PURE__*/React.createElement(IconComponent, {
54
+ size: 16
55
+ })), /*#__PURE__*/React.createElement("div", {
56
+ className: styles.body
57
+ }, title != null && /*#__PURE__*/React.createElement("div", {
58
+ className: styles.title
59
+ }, title), children != null && /*#__PURE__*/React.createElement("div", {
60
+ className: styles.message
61
+ }, children)), actions != null && /*#__PURE__*/React.createElement("div", {
62
+ className: styles.actions
63
+ }, actions));
64
+ });
65
+ //# sourceMappingURL=Callout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callout.js","names":["Error","ErrorIcon","InfoSign","Tick","WarningSign","classNames","React","styles","DEFAULT_ICONS","error","warning","success","info","INTENT_STYLES","Callout","memo","intent","title","children","actions","icon","className","IconComponent","createElement","callout","role","size","body","message"],"sources":["Callout.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Error as ErrorIcon,\n InfoSign,\n Tick,\n WarningSign,\n} from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"./Callout.module.css\";\n\nexport type CalloutIntent = \"error\" | \"warning\" | \"success\" | \"info\";\n\nexport interface CalloutProps {\n /**\n * Visual intent that determines background, border, and text color.\n */\n intent: CalloutIntent;\n\n /**\n * Optional bold heading displayed above the message content.\n */\n title?: string;\n\n /**\n * Message content rendered inside the callout body.\n */\n children?: React.ReactNode;\n\n /**\n * Optional slot for action buttons (e.g. dismiss, retry) rendered\n * on the trailing edge.\n */\n actions?: React.ReactNode;\n\n /**\n * Override the default intent icon.\n */\n icon?: React.ComponentType<{ size?: number }>;\n\n className?: string;\n}\n\nconst DEFAULT_ICONS: Record<\n CalloutIntent,\n React.ComponentType<{ size?: number }>\n> = {\n error: ErrorIcon,\n warning: WarningSign,\n success: Tick,\n info: InfoSign,\n};\n\nconst INTENT_STYLES: Record<CalloutIntent, string> = {\n error: styles.error,\n warning: styles.warning,\n success: styles.success,\n info: styles.info,\n};\n\n/**\n * A styled alert banner supporting four intent levels with an icon,\n * title, message body, and action slot.\n */\nexport const Callout: React.NamedExoticComponent<CalloutProps> = React.memo(\n function Callout({\n intent,\n title,\n children,\n actions,\n icon,\n className,\n }) {\n const IconComponent = icon ?? DEFAULT_ICONS[intent];\n\n return (\n <div\n aria-live=\"polite\"\n className={classNames(\n styles.callout,\n INTENT_STYLES[intent],\n className,\n )}\n role=\"alert\"\n >\n {IconComponent != null && (\n <span className={styles.icon}>\n <IconComponent size={16} />\n </span>\n )}\n <div className={styles.body}>\n {title != null && <div className={styles.title}>{title}</div>}\n {children != null && <div className={styles.message}>{children}</div>}\n </div>\n {actions != null && <div className={styles.actions}>{actions}</div>}\n </div>\n );\n },\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,KAAK,IAAIC,SAAS,EAClBC,QAAQ,EACRC,IAAI,EACJC,WAAW,QACN,oBAAoB;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KAAA,CAAAiB,aAAA;IAAKF,SAAS,EAAEd,MAAM,CAACqB;EAAQ,GAAEV,QAAc,CACjE,CAAC,EACLC,OAAO,IAAI,IAAI,iBAAIb,KAAA,CAAAiB,aAAA;IAAKF,SAAS,EAAEd,MAAM,CAACY;EAAQ,GAAEA,OAAa,CAC/D,CAAC;AAEV,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,59 @@
1
+ .callout {
2
+ align-items: flex-start;
3
+ border-radius: var(--osdk-callout-border-radius);
4
+ display: flex;
5
+ gap: var(--osdk-callout-gap);
6
+ padding: var(--osdk-callout-padding);
7
+ }
8
+
9
+ .error {
10
+ background: var(--osdk-callout-error-background);
11
+ color: var(--osdk-callout-error-color);
12
+ }
13
+
14
+ .warning {
15
+ background: var(--osdk-callout-warning-background);
16
+ color: var(--osdk-callout-warning-color);
17
+ }
18
+
19
+ .success {
20
+ background: var(--osdk-callout-success-background);
21
+ color: var(--osdk-callout-success-color);
22
+ }
23
+
24
+ .info {
25
+ background: var(--osdk-callout-info-background);
26
+ color: var(--osdk-callout-info-color);
27
+ }
28
+
29
+ .icon {
30
+ flex: 0 0 auto;
31
+ line-height: 0;
32
+ padding-top: 1px;
33
+ }
34
+
35
+ .body {
36
+ display: flex;
37
+ flex: 1 1 auto;
38
+ flex-direction: column;
39
+ gap: calc(var(--osdk-surface-spacing) * 1);
40
+ min-width: 0;
41
+ }
42
+
43
+ .title {
44
+ font-size: var(--osdk-callout-title-font-size);
45
+ font-weight: var(--osdk-callout-title-font-weight);
46
+ }
47
+
48
+ .message {
49
+ font-size: var(--osdk-callout-message-font-size);
50
+ word-break: break-word;
51
+ }
52
+
53
+ .actions {
54
+ align-items: center;
55
+ align-self: stretch;
56
+ display: flex;
57
+ flex: 0 0 auto;
58
+ justify-content: center;
59
+ }
@@ -0,0 +1,15 @@
1
+ // CSS Module proxy for Callout.module.css
2
+ const styles = {
3
+ "callout": "Callout-module__callout___PEHatWiu",
4
+ "error": "Callout-module__error___gdkTnMMF",
5
+ "warning": "Callout-module__warning___FCzE3yLY",
6
+ "success": "Callout-module__success___BrxxC--L",
7
+ "info": "Callout-module__info___RndUloNR",
8
+ "icon": "Callout-module__icon___aWpGkLJ4",
9
+ "body": "Callout-module__body___rXKoZz90",
10
+ "title": "Callout-module__title___gHJqYqpp",
11
+ "message": "Callout-module__message___UDTJQlUj",
12
+ "actions": "Callout-module__actions___K1dq8rp3"
13
+ };
14
+
15
+ export default styles;
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ // TODO: Add osdk metrics
18
+ // This component uses platformClient, maybe we want to add userAgent header to the platformClient instead
19
+ export { AipAgentChat } from "../../aip-agent-chat/AipAgentChat.js";
20
+ export { BaseAipAgentChat } from "../../aip-agent-chat/BaseAipAgentChat.js";
21
+ export { getUIMessageText } from "@osdk/aip-core";
22
+ //# sourceMappingURL=aip-agent-chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aip-agent-chat.js","names":["AipAgentChat","BaseAipAgentChat","getUIMessageText"],"sources":["aip-agent-chat.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// TODO: Add osdk metrics\n// This component uses platformClient, maybe we want to add userAgent header to the platformClient instead\nexport { AipAgentChat } from \"../../aip-agent-chat/AipAgentChat.js\";\n\nexport type { AipAgentChatProps } from \"../../aip-agent-chat/AipAgentChatApi.js\";\n\nexport { BaseAipAgentChat } from \"../../aip-agent-chat/BaseAipAgentChat.js\";\nexport type { BaseAipAgentChatProps } from \"../../aip-agent-chat/BaseAipAgentChat.js\";\n\nexport type { UIMessage, UIMessageRole } from \"@osdk/aip-core\";\nexport { getUIMessageText } from \"@osdk/aip-core\";\n\nexport type { ChatStatus } from \"@osdk/react/experimental/aip\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAASA,YAAY,QAAQ,sCAAsC;AAInE,SAASC,gBAAgB,QAAQ,0CAA0C;AAI3E,SAASC,gBAAgB,QAAQ,gBAAgB","ignoreList":[]}