@copilotkit/react-textarea 0.36.0-mme-push-to-talk.0 → 0.36.0-mme-pre.1

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 (27) hide show
  1. package/.turbo/turbo-build.log +62 -62
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-PQIOU3E5.mjs → chunk-2OWOTL6X.mjs} +2 -2
  4. package/dist/chunk-2OWOTL6X.mjs.map +1 -0
  5. package/dist/{chunk-QCPS6IYI.mjs → chunk-HE4GMS2P.mjs} +7 -3
  6. package/dist/chunk-HE4GMS2P.mjs.map +1 -0
  7. package/dist/components/copilot-textarea/copilot-textarea.d.ts +106 -0
  8. package/dist/components/copilot-textarea/copilot-textarea.js +6 -2
  9. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  10. package/dist/components/copilot-textarea/copilot-textarea.mjs +2 -2
  11. package/dist/components/index.js +6 -2
  12. package/dist/components/index.js.map +1 -1
  13. package/dist/components/index.mjs +2 -2
  14. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +6 -2
  15. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
  16. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +1 -1
  17. package/dist/index.js +6 -2
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +3 -3
  20. package/dist/types/base/base-copilot-textarea-props.d.ts +28 -21
  21. package/dist/types/base/base-copilot-textarea-props.js.map +1 -1
  22. package/package.json +6 -6
  23. package/src/components/copilot-textarea/copilot-textarea.tsx +105 -1
  24. package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +8 -1
  25. package/src/types/base/base-copilot-textarea-props.tsx +36 -21
  26. package/dist/chunk-PQIOU3E5.mjs.map +0 -1
  27. package/dist/chunk-QCPS6IYI.mjs.map +0 -1
@@ -2090,11 +2090,13 @@ function makeSemiFakeReactTextAreaEvent(currentText) {
2090
2090
  }
2091
2091
 
2092
2092
  // src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx
2093
+ var import_shared2 = require("@copilotkit/shared");
2093
2094
  var import_react_core6 = require("@copilotkit/react-core");
2094
2095
  var import_react14 = require("react");
2095
2096
  var import_react_core7 = require("@copilotkit/react-core");
2096
2097
  function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCategories, insertionApiConfig, editingApiConfig) {
2097
2098
  const { getContextString, copilotApiConfig } = (0, import_react14.useContext)(import_react_core6.CopilotContext);
2099
+ const headers = __spreadValues({}, copilotApiConfig.publicApiKey ? { [import_shared2.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey } : {});
2098
2100
  const insertionFunction = (0, import_react14.useCallback)(
2099
2101
  (editorState2, insertionPrompt, documents, abortSignal) => __async(this, null, function* () {
2100
2102
  const res = yield retry(() => __async(this, null, function* () {
@@ -2127,7 +2129,8 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
2127
2129
  messages
2128
2130
  }, insertionApiConfig.forwardedParams), {
2129
2131
  copilotConfig: copilotApiConfig,
2130
- signal: abortSignal
2132
+ signal: abortSignal,
2133
+ headers
2131
2134
  }));
2132
2135
  return stream.events;
2133
2136
  }));
@@ -2172,7 +2175,8 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
2172
2175
  messages
2173
2176
  }, editingApiConfig.forwardedParams), {
2174
2177
  copilotConfig: copilotApiConfig,
2175
- signal: abortSignal
2178
+ signal: abortSignal,
2179
+ headers
2176
2180
  }));
2177
2181
  return stream.events;
2178
2182
  }));