@copilotkit/react-textarea 1.3.7-fix-chat-interactions-rerenders.0 → 1.3.8-fix-memoize-chat-ui-context.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/CHANGELOG.md +15 -5
- package/dist/{chunk-PKEWYNJ2.mjs → chunk-2FAXLWPD.mjs} +4 -4
- package/dist/{chunk-D2SUDM2O.mjs → chunk-BG4GF6PP.mjs} +5 -5
- package/dist/chunk-BG4GF6PP.mjs.map +1 -0
- package/dist/{chunk-SDHH6DI6.mjs → chunk-GUZIMGGZ.mjs} +2 -1
- package/dist/chunk-GUZIMGGZ.mjs.map +1 -0
- package/dist/{chunk-2XDYLKPH.mjs → chunk-VPGMB7K3.mjs} +2 -2
- package/dist/chunk-VPGMB7K3.mjs.map +1 -0
- package/dist/{chunk-HL7EF7KA.mjs → chunk-ZTYA6QOT.mjs} +2 -2
- package/dist/components/copilot-textarea/copilot-textarea.js +6 -5
- package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +5 -5
- package/dist/components/index.js +6 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -5
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +4 -4
- 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/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/types/autosuggestions-config/autosuggestions-config.js +1 -0
- package/dist/types/autosuggestions-config/autosuggestions-config.js.map +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs +2 -2
- package/dist/types/autosuggestions-config/index.js +1 -0
- package/dist/types/autosuggestions-config/index.js.map +1 -1
- package/dist/types/autosuggestions-config/index.mjs +2 -2
- package/dist/types/autosuggestions-config/suggestions-api-config.js +1 -0
- package/dist/types/autosuggestions-config/suggestions-api-config.js.map +1 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +2 -2
- package/package.json +8 -8
- package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +9 -6
- package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +1 -1
- package/src/types/autosuggestions-config/suggestions-api-config.tsx +1 -0
- package/dist/chunk-2XDYLKPH.mjs.map +0 -1
- package/dist/chunk-D2SUDM2O.mjs.map +0 -1
- package/dist/chunk-SDHH6DI6.mjs.map +0 -1
- /package/dist/{chunk-PKEWYNJ2.mjs.map → chunk-2FAXLWPD.mjs.map} +0 -0
- /package/dist/{chunk-HL7EF7KA.mjs.map → chunk-ZTYA6QOT.mjs.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotTextarea
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-2FAXLWPD.mjs";
|
|
4
|
+
import "../../chunk-VPGMB7K3.mjs";
|
|
5
|
+
import "../../chunk-BG4GF6PP.mjs";
|
|
6
6
|
import "../../chunk-RUV6NBIF.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-ZTYA6QOT.mjs";
|
|
8
8
|
import "../../chunk-EJGGLWWR.mjs";
|
|
9
9
|
import "../../chunk-MCNXIA4Q.mjs";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-GUZIMGGZ.mjs";
|
|
11
11
|
import "../../chunk-J62KUPFZ.mjs";
|
|
12
12
|
import "../../chunk-2C7O2EVM.mjs";
|
|
13
13
|
import "../../chunk-GQN2HYFJ.mjs";
|
package/dist/components/index.js
CHANGED
|
@@ -1828,10 +1828,10 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
|
|
|
1828
1828
|
)
|
|
1829
1829
|
}),
|
|
1830
1830
|
...apiConfig.fewShotMessages,
|
|
1831
|
-
new import_runtime_client_gql.TextMessage({
|
|
1831
|
+
editorState2.textAfterCursor != "" ? new import_runtime_client_gql.TextMessage({
|
|
1832
1832
|
role: import_runtime_client_gql.Role.User,
|
|
1833
1833
|
content: editorState2.textAfterCursor
|
|
1834
|
-
}),
|
|
1834
|
+
}) : null,
|
|
1835
1835
|
new import_runtime_client_gql.TextMessage({
|
|
1836
1836
|
role: import_runtime_client_gql.Role.User,
|
|
1837
1837
|
content: `<TextAfterCursor>${editorState2.textAfterCursor}</TextAfterCursor>`
|
|
@@ -1840,7 +1840,7 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
|
|
|
1840
1840
|
role: import_runtime_client_gql.Role.User,
|
|
1841
1841
|
content: `<TextBeforeCursor>${editorState2.textBeforeCursor}</TextBeforeCursor>`
|
|
1842
1842
|
})
|
|
1843
|
-
];
|
|
1843
|
+
].filter(Boolean);
|
|
1844
1844
|
const runtimeClient = new import_runtime_client_gql.CopilotRuntimeClient({
|
|
1845
1845
|
url,
|
|
1846
1846
|
publicApiKey,
|
|
@@ -1872,7 +1872,7 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
|
|
|
1872
1872
|
if (abortSignal.aborted) {
|
|
1873
1873
|
break;
|
|
1874
1874
|
}
|
|
1875
|
-
if (message
|
|
1875
|
+
if (message.isTextMessage()) {
|
|
1876
1876
|
result += message.content;
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
@@ -1903,6 +1903,7 @@ The user will provide both the text before and after the cursor. You should use
|
|
|
1903
1903
|
<YourSuggestion>
|
|
1904
1904
|
|
|
1905
1905
|
If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
|
|
1906
|
+
Refrain from adding <YourSuggestion> tags when responding
|
|
1906
1907
|
|
|
1907
1908
|
The following external context is also provided. Use it to help you make better suggestions!!!
|
|
1908
1909
|
\`\`\`
|
|
@@ -2127,7 +2128,7 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
|
|
|
2127
2128
|
const messages = (0, import_runtime_client_gql5.convertGqlOutputToMessages)(value.generateCopilotResponse.messages);
|
|
2128
2129
|
let newContent = "";
|
|
2129
2130
|
for (const message of messages) {
|
|
2130
|
-
if (message
|
|
2131
|
+
if (message.isTextMessage()) {
|
|
2131
2132
|
newContent += message.content;
|
|
2132
2133
|
}
|
|
2133
2134
|
}
|