@spteck/react-controls-v2 2.0.16 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aiAssistant/AIAssistant.d.ts.map +1 -1
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts +1 -0
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts.map +1 -1
- package/dist/hooks/useAIAssistant.d.ts +1 -0
- package/dist/hooks/useAIAssistant.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a2, _b, _c, _d, _e, _f;
|
|
5
5
|
import { E as ErrorType, L as LogLevel } from "./ILoggingProvider-CYYYCGLY.mjs";
|
|
6
|
-
import * as ReactJSXRuntime from "react/jsx-runtime";
|
|
7
|
-
import { jsx as jsx$2, Fragment, jsxs as jsxs$1 } from "react/jsx-runtime";
|
|
6
|
+
import * as ReactJSXRuntime from "react/jsx-runtime.js";
|
|
7
|
+
import { jsx as jsx$2, Fragment, jsxs as jsxs$1 } from "react/jsx-runtime.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import React__default, { createContext, useContext, useCallback, useState, useRef, useEffect, useMemo, useLayoutEffect, forwardRef } from "react";
|
|
10
10
|
import { format, toZonedTime, fromZonedTime, utcToZonedTime } from "date-fns-tz";
|
|
@@ -520,7 +520,8 @@ ${message.input}`;
|
|
|
520
520
|
method: "POST",
|
|
521
521
|
headers: {
|
|
522
522
|
"Content-Type": "application/json",
|
|
523
|
-
"Accept": "text/event-stream"
|
|
523
|
+
"Accept": "text/event-stream",
|
|
524
|
+
...config.requestHeaders && Object.keys(config.requestHeaders).length > 0 ? config.requestHeaders : {}
|
|
524
525
|
},
|
|
525
526
|
body: JSON.stringify(payload),
|
|
526
527
|
signal: controller.signal
|
|
@@ -26237,7 +26238,8 @@ const AIAssistant = (props) => {
|
|
|
26237
26238
|
const styles2 = useAIAssistantStyles();
|
|
26238
26239
|
const { sendMessage, cancelRequest } = useAIAssistant({
|
|
26239
26240
|
endpoint: openAIConfig == null ? void 0 : openAIConfig.endpoint,
|
|
26240
|
-
mcpServers: openAIConfig == null ? void 0 : openAIConfig.mcpServers
|
|
26241
|
+
mcpServers: openAIConfig == null ? void 0 : openAIConfig.mcpServers,
|
|
26242
|
+
requestHeaders: openAIConfig == null ? void 0 : openAIConfig.requestHeaders
|
|
26241
26243
|
});
|
|
26242
26244
|
const forceScrollToBottom = React.useCallback(() => {
|
|
26243
26245
|
if (chatListRef.current) {
|