@copilotkit/react-textarea 0.35.0-multi-feature-usecopilotreadable.4 → 0.35.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/.turbo/turbo-build.log +428 -428
- package/CHANGELOG.md +92 -8
- package/dist/{chunk-3B3LGEDJ.mjs → chunk-COQISBP2.mjs} +2 -2
- package/dist/{chunk-FWZ23PN7.mjs → chunk-DMLXXOXD.mjs} +2 -2
- package/dist/{chunk-VPEH6V7T.mjs → chunk-FMQG2ZM3.mjs} +1 -1
- package/dist/chunk-FMQG2ZM3.mjs.map +1 -0
- package/dist/{chunk-Y5LVLSUK.mjs → chunk-OGLVRSCO.mjs} +7 -7
- package/dist/{chunk-HXEH4QQL.mjs → chunk-PQIOU3E5.mjs} +5 -5
- package/dist/{chunk-RT4UTBH3.mjs → chunk-SJ2TM5GA.mjs} +6 -2
- package/dist/chunk-SJ2TM5GA.mjs.map +1 -0
- package/dist/{chunk-QFG55HEW.mjs → chunk-XU5Z5BWV.mjs} +20 -20
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +16 -16
- 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 +23 -23
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs +5 -5
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +3 -3
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +4 -4
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +4 -4
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +23 -23
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +1 -1
- 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 +27 -27
- package/package.json +6 -6
- package/src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts +4 -1
- 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-VPEH6V7T.mjs.map +0 -1
- /package/dist/{chunk-3B3LGEDJ.mjs.map → chunk-COQISBP2.mjs.map} +0 -0
- /package/dist/{chunk-FWZ23PN7.mjs.map → chunk-DMLXXOXD.mjs.map} +0 -0
- /package/dist/{chunk-Y5LVLSUK.mjs.map → chunk-OGLVRSCO.mjs.map} +0 -0
- /package/dist/{chunk-HXEH4QQL.mjs.map → chunk-PQIOU3E5.mjs.map} +0 -0
- /package/dist/{chunk-QFG55HEW.mjs.map → chunk-XU5Z5BWV.mjs.map} +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCopilotTextarea
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XU5Z5BWV.mjs";
|
|
4
|
+
import "../../chunk-DRV2FOHZ.mjs";
|
|
5
|
+
import "../../chunk-4NHVQZ67.mjs";
|
|
6
|
+
import "../../chunk-FMQG2ZM3.mjs";
|
|
4
7
|
import "../../chunk-2C7O2EVM.mjs";
|
|
5
8
|
import "../../chunk-GQN2HYFJ.mjs";
|
|
9
|
+
import "../../chunk-5UNJXFUO.mjs";
|
|
10
|
+
import "../../chunk-QKS2IOUH.mjs";
|
|
11
|
+
import "../../chunk-JJLQVT7S.mjs";
|
|
12
|
+
import "../../chunk-LQ2OWQU7.mjs";
|
|
6
13
|
import "../../chunk-7LSRNPNI.mjs";
|
|
7
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-DMLXXOXD.mjs";
|
|
8
15
|
import "../../chunk-L7VVZH4Q.mjs";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-COQISBP2.mjs";
|
|
17
|
+
import "../../chunk-OGLVRSCO.mjs";
|
|
11
18
|
import "../../chunk-YNXNMCDX.mjs";
|
|
19
|
+
import "../../chunk-3PQ7GSFE.mjs";
|
|
20
|
+
import "../../chunk-WFTAAA7R.mjs";
|
|
12
21
|
import "../../chunk-YFK5BFEI.mjs";
|
|
13
22
|
import "../../chunk-LYB4B6MK.mjs";
|
|
14
23
|
import "../../chunk-CF5GISTC.mjs";
|
|
15
24
|
import "../../chunk-4OZR65UB.mjs";
|
|
16
25
|
import "../../chunk-FFSICDS5.mjs";
|
|
17
26
|
import "../../chunk-4HBKWUCT.mjs";
|
|
18
|
-
import "../../chunk-WFTAAA7R.mjs";
|
|
19
|
-
import "../../chunk-3PQ7GSFE.mjs";
|
|
20
|
-
import "../../chunk-224UKA7C.mjs";
|
|
21
|
-
import "../../chunk-XW3ICO4S.mjs";
|
|
22
|
-
import "../../chunk-LQ2OWQU7.mjs";
|
|
23
27
|
import "../../chunk-2QDCE7PD.mjs";
|
|
28
|
+
import "../../chunk-7SUZ6CXM.mjs";
|
|
24
29
|
import "../../chunk-WJHSY5T6.mjs";
|
|
25
30
|
import "../../chunk-LCDTIJSD.mjs";
|
|
26
|
-
import "../../chunk-
|
|
27
|
-
import "../../chunk-
|
|
28
|
-
import "../../chunk-7SUZ6CXM.mjs";
|
|
29
|
-
import "../../chunk-DRV2FOHZ.mjs";
|
|
30
|
-
import "../../chunk-4NHVQZ67.mjs";
|
|
31
|
-
import "../../chunk-VPEH6V7T.mjs";
|
|
32
|
-
import "../../chunk-5UNJXFUO.mjs";
|
|
31
|
+
import "../../chunk-224UKA7C.mjs";
|
|
32
|
+
import "../../chunk-XW3ICO4S.mjs";
|
|
33
33
|
import "../../chunk-DFTV4TST.mjs";
|
|
34
34
|
import "../../chunk-T6MTDQZ7.mjs";
|
|
35
35
|
import "../../chunk-ECR45NSD.mjs";
|
|
@@ -85,6 +85,7 @@ module.exports = __toCommonJS(copilot_textarea_exports);
|
|
|
85
85
|
var import_react15 = __toESM(require("react"));
|
|
86
86
|
|
|
87
87
|
// src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx
|
|
88
|
+
var import_shared = require("@copilotkit/shared");
|
|
88
89
|
var import_react_core = require("@copilotkit/react-core");
|
|
89
90
|
var import_react = require("react");
|
|
90
91
|
|
|
@@ -107,6 +108,8 @@ function retry(fn, retriesLeft = 2, interval = 200, backoff = 1.5) {
|
|
|
107
108
|
var import_react_core2 = require("@copilotkit/react-core");
|
|
108
109
|
function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategories, apiConfig) {
|
|
109
110
|
const { getContextString, copilotApiConfig } = (0, import_react.useContext)(import_react_core.CopilotContext);
|
|
111
|
+
const publicApiKey = copilotApiConfig.publicApiKey;
|
|
112
|
+
const headers = __spreadValues({}, publicApiKey ? { [import_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
|
|
110
113
|
return (0, import_react.useCallback)(
|
|
111
114
|
(editorState2, abortSignal) => __async(this, null, function* () {
|
|
112
115
|
const res = yield retry(() => __async(this, null, function* () {
|
|
@@ -134,7 +137,8 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
|
|
|
134
137
|
messages
|
|
135
138
|
}, apiConfig.forwardedParams), {
|
|
136
139
|
copilotConfig: copilotApiConfig,
|
|
137
|
-
signal: abortSignal
|
|
140
|
+
signal: abortSignal,
|
|
141
|
+
headers
|
|
138
142
|
}));
|
|
139
143
|
if (!response.events) {
|
|
140
144
|
throw new Error("Failed to fetch chat completion");
|