@copilotkit/react-textarea 1.3.7 → 1.3.8
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 +10 -0
- package/dist/{chunk-2WEVAO3P.mjs → chunk-2FAXLWPD.mjs} +3 -3
- package/dist/{chunk-XBU5TSXH.mjs → chunk-BG4GF6PP.mjs} +4 -4
- 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-HL7EF7KA.mjs → chunk-ZTYA6QOT.mjs} +2 -2
- package/dist/components/copilot-textarea/copilot-textarea.js +4 -3
- package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +4 -4
- package/dist/components/index.js +4 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +3 -3
- 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/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- 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 +7 -7
- package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +8 -5
- package/src/types/autosuggestions-config/suggestions-api-config.tsx +1 -0
- package/dist/chunk-SDHH6DI6.mjs.map +0 -1
- package/dist/chunk-XBU5TSXH.mjs.map +0 -1
- /package/dist/{chunk-2WEVAO3P.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-
|
|
3
|
+
} from "../../chunk-2FAXLWPD.mjs";
|
|
4
4
|
import "../../chunk-VPGMB7K3.mjs";
|
|
5
|
-
import "../../chunk-
|
|
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,
|
|
@@ -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
|
\`\`\`
|