@copilotkit/react-textarea 1.55.2-next.0 → 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 +9 -0
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/context/index.ts +0 -1
- package/src/hooks/index.ts +0 -1
- package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +3 -5
- package/src/lib/slatejs-edits/with-partial-history.ts +3 -1
- package/src/types/autosuggestions-config/editing-api-config.tsx +1 -1
- package/src/types/autosuggestions-config/insertions-api-config.tsx +1 -1
- package/src/types/autosuggestions-config/suggestions-api-config.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
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
|
+
|
|
3
12
|
## 1.55.2-next.0
|
|
4
13
|
|
|
5
14
|
### 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).
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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) {
|