@copilotkit/react-textarea 1.55.1 → 1.55.2-next.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # ui
2
2
 
3
+ ## 1.55.2-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [22a7f98]
8
+ - @copilotkit/react-core@1.55.2-next.1
9
+ - @copilotkit/runtime-client-gql@1.55.2-next.1
10
+ - @copilotkit/shared@1.55.2-next.1
11
+
12
+ ## 1.55.2-next.0
13
+
14
+ ### Patch Changes
15
+
16
+ - @copilotkit/react-core@1.55.2-next.0
17
+ - @copilotkit/runtime-client-gql@1.55.2-next.0
18
+ - @copilotkit/shared@1.55.2-next.0
19
+
3
20
  ## 1.55.1
4
21
 
5
22
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -192,7 +192,7 @@ const withPartialHistory = (editor, shouldSave) => {
192
192
  const batch = undos[undos.length - 1];
193
193
  slate_history.HistoryEditor.withoutSaving(e, () => {
194
194
  slate.Editor.withoutNormalizing(e, () => {
195
- const inverseOps = batch.operations.map(slate.Operation.inverse).reverse();
195
+ const inverseOps = batch.operations.map(slate.Operation.inverse).toReversed();
196
196
  for (const op of inverseOps) e.apply(op);
197
197
  if (batch.selectionBefore) slate.Transforms.setSelection(e, batch.selectionBefore);
198
198
  });
@@ -1483,7 +1483,7 @@ const defaultSuggestionsMakeSystemPrompt = (textareaPurpose, contextString) => {
1483
1483
  return `You are a versatile writing assistant.
1484
1484
 
1485
1485
  The user is writing some text.
1486
- The purpose is: \"${textareaPurpose}\"
1486
+ The purpose is: "${textareaPurpose}"
1487
1487
 
1488
1488
  Your job is to guess what the user will write next AS BEST YOU CAN.
1489
1489
  Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
@@ -1541,7 +1541,7 @@ const defaultInsertionsMakeSystemPrompt = (textareaPurpose, contextString) => {
1541
1541
  return `You are a versatile writing assistant helping the user insert new text into their existing work.
1542
1542
 
1543
1543
  The user is writing some text.
1544
- The purpose is: \"${textareaPurpose}\"
1544
+ The purpose is: "${textareaPurpose}"
1545
1545
 
1546
1546
  The following external context is also provided. Use it to inform your suggestions when relevant!!!
1547
1547
  \`\`\`
@@ -1610,7 +1610,7 @@ const defaultEditingMakeSystemPrompt = (textareaPurpose, contextString) => {
1610
1610
  return `You are a versatile writing assistant helping the user edit a portion of their text.
1611
1611
 
1612
1612
  The user is writing some text.
1613
- The purpose is: \"${textareaPurpose}\"
1613
+ The purpose is: "${textareaPurpose}"
1614
1614
 
1615
1615
  The following external context is also provided. Use it when relevant.
1616
1616
  \`\`\`
@@ -1710,7 +1710,7 @@ const defaultAutosuggestionsConfig = {
1710
1710
  function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCategories, insertionApiConfig, editingApiConfig) {
1711
1711
  const runtimeClient = { generateCopilotResponse: (...args) => {} };
1712
1712
  const { getContextString, copilotApiConfig } = (0, _copilotkit_react_core.useCopilotContext)();
1713
- ({ ...copilotApiConfig.publicApiKey ? { [_copilotkit_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey } : {} });
1713
+ copilotApiConfig.publicApiKey && copilotApiConfig.publicApiKey;
1714
1714
  async function runtimeClientResponseToStringStream(responsePromise) {
1715
1715
  const messagesStream = runtimeClient.asStream(responsePromise);
1716
1716
  return new ReadableStream({ async start(controller) {