@copilotkit/react-textarea 0.35.0-mme-cloud.4 → 0.35.0-mme-cloud.6
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/.turbo/turbo-build.log +32 -32
- package/CHANGELOG.md +48 -14
- package/dist/{chunk-HWM2CVKO.mjs → chunk-PQIOU3E5.mjs} +2 -2
- package/dist/{chunk-RT4UTBH3.mjs → chunk-SJ2TM5GA.mjs} +6 -2
- package/dist/chunk-SJ2TM5GA.mjs.map +1 -0
- package/dist/components/copilot-textarea/copilot-textarea.js +5 -1
- package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +2 -2
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +5 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/package.json +6 -6
- package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +6 -1
- package/dist/chunk-RT4UTBH3.mjs.map +0 -1
- /package/dist/{chunk-HWM2CVKO.mjs.map → chunk-PQIOU3E5.mjs.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotTextarea
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-PQIOU3E5.mjs";
|
|
4
|
+
import "../../chunk-SJ2TM5GA.mjs";
|
|
5
5
|
import "../../chunk-QCPS6IYI.mjs";
|
|
6
6
|
import "../../chunk-RUV6NBIF.mjs";
|
|
7
7
|
import "../../chunk-DKE57EAC.mjs";
|
package/dist/components/index.js
CHANGED
|
@@ -1789,6 +1789,7 @@ function makeSemiFakeReactTextAreaEvent(currentText) {
|
|
|
1789
1789
|
var import_react15 = __toESM(require("react"));
|
|
1790
1790
|
|
|
1791
1791
|
// src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx
|
|
1792
|
+
var import_shared = require("@copilotkit/shared");
|
|
1792
1793
|
var import_react_core3 = require("@copilotkit/react-core");
|
|
1793
1794
|
var import_react13 = require("react");
|
|
1794
1795
|
|
|
@@ -1811,6 +1812,8 @@ function retry(fn, retriesLeft = 2, interval = 200, backoff = 1.5) {
|
|
|
1811
1812
|
var import_react_core4 = require("@copilotkit/react-core");
|
|
1812
1813
|
function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategories, apiConfig) {
|
|
1813
1814
|
const { getContextString, copilotApiConfig } = (0, import_react13.useContext)(import_react_core3.CopilotContext);
|
|
1815
|
+
const publicApiKey = copilotApiConfig.publicApiKey;
|
|
1816
|
+
const headers = __spreadValues({}, publicApiKey ? { [import_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
|
|
1814
1817
|
return (0, import_react13.useCallback)(
|
|
1815
1818
|
(editorState2, abortSignal) => __async(this, null, function* () {
|
|
1816
1819
|
const res = yield retry(() => __async(this, null, function* () {
|
|
@@ -1838,7 +1841,8 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
|
|
|
1838
1841
|
messages
|
|
1839
1842
|
}, apiConfig.forwardedParams), {
|
|
1840
1843
|
copilotConfig: copilotApiConfig,
|
|
1841
|
-
signal: abortSignal
|
|
1844
|
+
signal: abortSignal,
|
|
1845
|
+
headers
|
|
1842
1846
|
}));
|
|
1843
1847
|
if (!response.events) {
|
|
1844
1848
|
throw new Error("Failed to fetch chat completion");
|