@copilotkit/react-textarea 1.78.0 → 1.79.1-canary.1792034358
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/index.cjs +1 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -6
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +7 -7
- package/src/hooks/make-autosuggestions-function/__tests__/use-make-standard-autosuggestions-function.headers.test.tsx +71 -0
- package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +5 -17
- package/vitest.config.mjs +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1433,11 +1433,7 @@ function retry(fn, retriesLeft = 2, interval = 200, backoff = 1.5) {
|
|
|
1433
1433
|
*/
|
|
1434
1434
|
function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategories, apiConfig) {
|
|
1435
1435
|
const { getContextString, copilotApiConfig } = (0, _copilotkit_react_core.useCopilotContext)();
|
|
1436
|
-
const { chatApiEndpoint: url,
|
|
1437
|
-
({
|
|
1438
|
-
...copilotApiConfig.headers,
|
|
1439
|
-
...publicApiKey ? { [_copilotkit_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {}
|
|
1440
|
-
});
|
|
1436
|
+
const { chatApiEndpoint: url, credentials, properties } = copilotApiConfig;
|
|
1441
1437
|
const { maxTokens, stop, temperature = 0 } = apiConfig;
|
|
1442
1438
|
return (0, react.useCallback)(async (editorState, abortSignal) => {
|
|
1443
1439
|
return await retry(async () => {
|