@copilotkit/react-textarea 1.5.0 → 1.5.1-custom-tag-pre.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{chunk-PTPNOBEI.mjs → chunk-F6GMWOLE.mjs} +4 -3
  3. package/dist/chunk-F6GMWOLE.mjs.map +1 -0
  4. package/dist/{chunk-PZYM7K4Y.mjs → chunk-JPFU7ASD.mjs} +9 -9
  5. package/dist/{chunk-ZTYA6QOT.mjs → chunk-MGYT7RNL.mjs} +2 -2
  6. package/dist/{chunk-GUZIMGGZ.mjs → chunk-QFXR6DOA.mjs} +1 -1
  7. package/dist/chunk-QFXR6DOA.mjs.map +1 -0
  8. package/dist/{chunk-53RID4IZ.mjs → chunk-UGFNDNH3.mjs} +6 -6
  9. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +5 -5
  10. package/dist/components/copilot-textarea/copilot-textarea.js +3 -2
  11. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  12. package/dist/components/copilot-textarea/copilot-textarea.mjs +13 -13
  13. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +1 -1
  14. package/dist/components/index.js +3 -2
  15. package/dist/components/index.js.map +1 -1
  16. package/dist/components/index.mjs +13 -13
  17. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +3 -2
  18. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
  19. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +1 -1
  20. package/dist/index.js +3 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +19 -19
  23. package/dist/types/autosuggestions-config/autosuggestions-config.js.map +1 -1
  24. package/dist/types/autosuggestions-config/autosuggestions-config.mjs +2 -2
  25. package/dist/types/autosuggestions-config/index.js.map +1 -1
  26. package/dist/types/autosuggestions-config/index.mjs +2 -2
  27. package/dist/types/autosuggestions-config/suggestions-api-config.d.ts +1 -0
  28. package/dist/types/autosuggestions-config/suggestions-api-config.js.map +1 -1
  29. package/dist/types/autosuggestions-config/suggestions-api-config.mjs +1 -1
  30. package/dist/types/index.js.map +1 -1
  31. package/dist/types/index.mjs +3 -3
  32. package/package.json +4 -4
  33. package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +2 -2
  34. package/src/types/autosuggestions-config/suggestions-api-config.tsx +1 -0
  35. package/dist/chunk-GUZIMGGZ.mjs.map +0 -1
  36. package/dist/chunk-PTPNOBEI.mjs.map +0 -1
  37. /package/dist/{chunk-PZYM7K4Y.mjs.map → chunk-JPFU7ASD.mjs.map} +0 -0
  38. /package/dist/{chunk-ZTYA6QOT.mjs.map → chunk-MGYT7RNL.mjs.map} +0 -0
  39. /package/dist/{chunk-53RID4IZ.mjs.map → chunk-UGFNDNH3.mjs.map} +0 -0
@@ -1,19 +1,15 @@
1
1
  import "../chunk-MMVDU6DF.mjs";
2
2
  import {
3
3
  CopilotTextarea
4
- } from "../chunk-53RID4IZ.mjs";
4
+ } from "../chunk-UGFNDNH3.mjs";
5
5
  import "../chunk-RXV67GJN.mjs";
6
- import "../chunk-PTPNOBEI.mjs";
7
- import "../chunk-RUV6NBIF.mjs";
8
- import "../chunk-ZTYA6QOT.mjs";
9
- import "../chunk-EJGGLWWR.mjs";
10
- import "../chunk-MCNXIA4Q.mjs";
11
- import "../chunk-GUZIMGGZ.mjs";
6
+ import "../chunk-F6GMWOLE.mjs";
7
+ import "../chunk-KNQIEOFP.mjs";
12
8
  import {
13
9
  BaseCopilotTextarea
14
- } from "../chunk-PZYM7K4Y.mjs";
15
- import "../chunk-2C7O2EVM.mjs";
10
+ } from "../chunk-JPFU7ASD.mjs";
16
11
  import "../chunk-GQN2HYFJ.mjs";
12
+ import "../chunk-2C7O2EVM.mjs";
17
13
  import "../chunk-23Q6A46J.mjs";
18
14
  import "../chunk-AJ5OMEXM.mjs";
19
15
  import "../chunk-DRV2FOHZ.mjs";
@@ -35,16 +31,20 @@ import "../chunk-HDBI2WN5.mjs";
35
31
  import "../chunk-WGWQRALG.mjs";
36
32
  import "../chunk-VSVQZUPW.mjs";
37
33
  import "../chunk-I72DKFHD.mjs";
34
+ import "../chunk-ECR45NSD.mjs";
38
35
  import "../chunk-2QDCE7PD.mjs";
39
36
  import "../chunk-YLFAIYRY.mjs";
40
- import "../chunk-WJHSY5T6.mjs";
41
- import "../chunk-4CVSOOJY.mjs";
42
37
  import "../chunk-7L6GIHDM.mjs";
43
38
  import "../chunk-XW3ICO4S.mjs";
39
+ import "../chunk-RUV6NBIF.mjs";
40
+ import "../chunk-MGYT7RNL.mjs";
41
+ import "../chunk-EJGGLWWR.mjs";
42
+ import "../chunk-MCNXIA4Q.mjs";
43
+ import "../chunk-QFXR6DOA.mjs";
44
+ import "../chunk-WJHSY5T6.mjs";
45
+ import "../chunk-4CVSOOJY.mjs";
44
46
  import "../chunk-DFTV4TST.mjs";
45
47
  import "../chunk-T6MTDQZ7.mjs";
46
- import "../chunk-ECR45NSD.mjs";
47
- import "../chunk-KNQIEOFP.mjs";
48
48
  import "../chunk-MRXNTQOX.mjs";
49
49
  export {
50
50
  BaseCopilotTextarea,
@@ -82,7 +82,7 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
82
82
  const { getContextString, copilotApiConfig, runtimeClient } = (0, import_react_core.useCopilotContext)();
83
83
  const { chatApiEndpoint: url, publicApiKey, credentials, properties } = copilotApiConfig;
84
84
  const headers = __spreadValues(__spreadValues({}, copilotApiConfig.headers), publicApiKey ? { [import_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
85
- const { maxTokens, stop } = apiConfig;
85
+ const { maxTokens, stop, temperature = 0 } = apiConfig;
86
86
  return (0, import_react.useCallback)(
87
87
  (editorState, abortSignal) => __async(this, null, function* () {
88
88
  const res = yield retry(() => __async(this, null, function* () {
@@ -121,7 +121,8 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
121
121
  },
122
122
  forwardedParameters: {
123
123
  maxTokens,
124
- stop
124
+ stop,
125
+ temperature
125
126
  }
126
127
  },
127
128
  properties,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx","../../../src/lib/retry.tsx"],"sourcesContent":["import { COPILOT_CLOUD_PUBLIC_API_KEY_HEADER } from \"@copilotkit/shared\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport { useCallback } from \"react\";\nimport { AutosuggestionsBareFunction } from \"../../types\";\nimport { retry } from \"../../lib/retry\";\nimport { InsertionEditorState } from \"../../types/base/autosuggestions-bare-function\";\nimport { SuggestionsApiConfig } from \"../../types/autosuggestions-config/suggestions-api-config\";\nimport {\n CopilotRuntimeClient,\n Message,\n Role,\n TextMessage,\n convertGqlOutputToMessages,\n convertMessagesToGqlInput,\n filterAgentStateMessages,\n CopilotRequestType,\n} from \"@copilotkit/runtime-client-gql\";\n\n/**\n * Returns a memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n * The function takes in the text before and after the cursor, and an abort signal.\n * It sends a POST request to the API endpoint with the messages array containing the system message, few shot messages, and user messages.\n * The function returns the suggestion from the API response.\n *\n * @param textareaPurpose - The purpose of the textarea. This is included in the system message.\n * @param apiEndpoint - The API endpoint to send the autosuggestion request to.\n * @param makeSystemMessage - A function that takes in a context string and returns a system message to include in the autosuggestion request.\n * @param fewShotMessages - An array of few shot messages to include in the autosuggestion request.\n * @param contextCategories - The categories of context strings we want to include. By default, we include the (default) \"global\" context category.\n * @returns A memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n */\nexport function useMakeStandardAutosuggestionFunction(\n textareaPurpose: string,\n contextCategories: string[],\n apiConfig: SuggestionsApiConfig,\n): AutosuggestionsBareFunction {\n const { getContextString, copilotApiConfig, runtimeClient } = useCopilotContext();\n const { chatApiEndpoint: url, publicApiKey, credentials, properties } = copilotApiConfig;\n const headers = {\n ...copilotApiConfig.headers,\n ...(publicApiKey ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {}),\n };\n const { maxTokens, stop } = apiConfig;\n\n return useCallback(\n async (editorState: InsertionEditorState, abortSignal: AbortSignal) => {\n const res = await retry(async () => {\n // @ts-expect-error -- Passing null is forbidden, but we're filtering it later\n const messages: Message[] = [\n new TextMessage({\n role: Role.System,\n content: apiConfig.makeSystemPrompt(\n textareaPurpose,\n getContextString([], contextCategories),\n ),\n }),\n ...apiConfig.fewShotMessages,\n editorState.textAfterCursor != \"\"\n ? new TextMessage({\n role: Role.User,\n content: editorState.textAfterCursor,\n })\n : null,\n new TextMessage({\n role: Role.User,\n content: `<TextAfterCursor>${editorState.textAfterCursor}</TextAfterCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextBeforeCursor>${editorState.textBeforeCursor}</TextBeforeCursor>`,\n }),\n ].filter(Boolean);\n\n const response = await runtimeClient\n .generateCopilotResponse({\n data: {\n frontend: {\n actions: [],\n url: window.location.href,\n },\n messages: convertMessagesToGqlInput(filterAgentStateMessages(messages)),\n metadata: {\n requestType: CopilotRequestType.TextareaCompletion,\n },\n forwardedParameters: {\n maxTokens,\n stop,\n },\n },\n properties,\n signal: abortSignal,\n })\n .toPromise();\n\n let result = \"\";\n for (const message of convertGqlOutputToMessages(\n response.data?.generateCopilotResponse?.messages ?? [],\n )) {\n if (abortSignal.aborted) {\n break;\n }\n if (message.isTextMessage()) {\n result += message.content;\n }\n }\n\n return result;\n });\n\n return res;\n },\n [apiConfig, getContextString, contextCategories, textareaPurpose],\n );\n}\n","export function retry<T>(\n fn: () => Promise<T>,\n retriesLeft: number = 2,\n interval: number = 200,\n backoff: number = 1.5,\n): Promise<T> {\n return new Promise((resolve, reject) => {\n fn()\n .then(resolve)\n .catch((error) => {\n if (retriesLeft === 1) {\n reject(error);\n return;\n }\n\n setTimeout(() => {\n retry(fn, retriesLeft - 1, interval * back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AK;AAAA,YACX,SAAS,YAAY;AAAA,UACvB,CAAC,IACD;AAAA,UACJ,IAAI,sCAAY;AAAA,YACd,MAAM,+BAAK;AAAA,YACX,SAAS,oBAAoB,YAAY;AAAA,UAC3C,CAAC;AAAA,UACD,IAAI,sCAAY;AAAA,YACd,MAAM,+BAAK;AAAA,YACX,SAAS,qBAAqB,YAAY;AAAA,UAC5C,CAAC;AAAA,QACH,EAAE,OAAO,OAAO;AAEhB,cAAM,WAAW,MAAM,cACpB,wBAAwB;AAAA,UACvB,MAAM;AAAA,YACJ,UAAU;AAAA,cACR,SAAS,CAAC;AAAA,cACV,KAAK,OAAO,SAAS;AAAA,YACvB;AAAA,YACA,cAAU,yDAA0B,oDAAyB,QAAQ,CAAC;AAAA,YACtE,UAAU;AAAA,cACR,aAAa,6CAAmB;AAAA,YAClC;AAAA,YACA,qBAAqB;AAAA,cACnB;AAAA,cACA;AAAA,YACF;AAAA,UACF;AAAA,UACA;AAAA,UACA,QAAQ;AAAA,QACV,CAAC,EACA,UAAU;AAEb,YAAI,SAAS;AACb,mBAAW,eAAW;AAAA,WACpB,0BAAS,SAAT,mBAAe,4BAAf,mBAAwC,aAAxC,YAAoD,CAAC;AAAA,QACvD,GAAG;AACD,cAAI,YAAY,SAAS;AACvB;AAAA,UACF;AACA,cAAI,QAAQ,cAAc,GAAG;AAC3B,sBAAU,QAAQ;AAAA,UACpB;AAAA,QACF;AAEA,eAAO;AAAA,MACT,EAAC;AAED,aAAO;AAAA,IACT;AAAA,IACA,CAAC,WAAW,kBAAkB,mBAAmB,eAAe;AAAA,EAClE;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx","../../../src/lib/retry.tsx"],"sourcesContent":["import { COPILOT_CLOUD_PUBLIC_API_KEY_HEADER } from \"@copilotkit/shared\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport { useCallback } from \"react\";\nimport { AutosuggestionsBareFunction } from \"../../types\";\nimport { retry } from \"../../lib/retry\";\nimport { InsertionEditorState } from \"../../types/base/autosuggestions-bare-function\";\nimport { SuggestionsApiConfig } from \"../../types/autosuggestions-config/suggestions-api-config\";\nimport {\n Message,\n Role,\n TextMessage,\n convertGqlOutputToMessages,\n convertMessagesToGqlInput,\n filterAgentStateMessages,\n CopilotRequestType,\n} from \"@copilotkit/runtime-client-gql\";\n\n/**\n * Returns a memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n * The function takes in the text before and after the cursor, and an abort signal.\n * It sends a POST request to the API endpoint with the messages array containing the system message, few shot messages, and user messages.\n * The function returns the suggestion from the API response.\n *\n * @param textareaPurpose - The purpose of the textarea. This is included in the system message.\n * @param apiEndpoint - The API endpoint to send the autosuggestion request to.\n * @param makeSystemMessage - A function that takes in a context string and returns a system message to include in the autosuggestion request.\n * @param fewShotMessages - An array of few shot messages to include in the autosuggestion request.\n * @param contextCategories - The categories of context strings we want to include. By default, we include the (default) \"global\" context category.\n * @returns A memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n */\nexport function useMakeStandardAutosuggestionFunction(\n textareaPurpose: string,\n contextCategories: string[],\n apiConfig: SuggestionsApiConfig,\n): AutosuggestionsBareFunction {\n const { getContextString, copilotApiConfig, runtimeClient } = useCopilotContext();\n const { chatApiEndpoint: url, publicApiKey, credentials, properties } = copilotApiConfig;\n const headers = {\n ...copilotApiConfig.headers,\n ...(publicApiKey ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {}),\n };\n const { maxTokens, stop, temperature = 0 } = apiConfig;\n\n return useCallback(\n async (editorState: InsertionEditorState, abortSignal: AbortSignal) => {\n const res = await retry(async () => {\n // @ts-expect-error -- Passing null is forbidden, but we're filtering it later\n const messages: Message[] = [\n new TextMessage({\n role: Role.System,\n content: apiConfig.makeSystemPrompt(\n textareaPurpose,\n getContextString([], contextCategories),\n ),\n }),\n ...apiConfig.fewShotMessages,\n editorState.textAfterCursor != \"\"\n ? new TextMessage({\n role: Role.User,\n content: editorState.textAfterCursor,\n })\n : null,\n new TextMessage({\n role: Role.User,\n content: `<TextAfterCursor>${editorState.textAfterCursor}</TextAfterCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextBeforeCursor>${editorState.textBeforeCursor}</TextBeforeCursor>`,\n }),\n ].filter(Boolean);\n\n const response = await runtimeClient\n .generateCopilotResponse({\n data: {\n frontend: {\n actions: [],\n url: window.location.href,\n },\n messages: convertMessagesToGqlInput(filterAgentStateMessages(messages)),\n metadata: {\n requestType: CopilotRequestType.TextareaCompletion,\n },\n forwardedParameters: {\n maxTokens,\n stop,\n temperature,\n },\n },\n properties,\n signal: abortSignal,\n })\n .toPromise();\n\n let result = \"\";\n for (const message of convertGqlOutputToMessages(\n response.data?.generateCopilotResponse?.messages ?? [],\n )) {\n if (abortSignal.aborted) {\n break;\n }\n if (message.isTextMessage()) {\n result += message.content;\n }\n }\n\n return result;\n });\n\n return res;\n },\n [apiConfig, getContextString, contextCategories, textareaPurpose],\n );\n}\n","export function retry<T>(\n fn: () => Promise<T>,\n retriesLeft: number = 2,\n interval: number = 200,\n backoff: number = 1.5,\n): Promise<T> {\n return new Promise((resolve, reject) => {\n fn()\n .then(resolve)\n .catch((error) => {\n if (retriesLeft === 1) {\n reject(error);\n return;\n }\n\n setTimeout(() => {\n retry(fn, retriesLeft - 1, interval * backoff, backoff)\n .then(resolve)\n .catch(reject);\n }, interval);\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAoD;AACpD,wBAAkC;AAClC,mBAA4B;;;ACFrB,SAAS,MACd,IACA,cAAsB,GACtB,WAAmB,KACnB,UAAkB,KACN;AACZ,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,OAAG,EACA,KAAK,OAAO,EACZ,MAAM,CAAC,UAAU;AAChB,UAAI,gBA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R,SAAS,CAAC;AAAA,cACV,KAAK,OAAO,SAAS;AAAA,YACvB;AAAA,YACA,cAAU,yDAA0B,oDAAyB,QAAQ,CAAC;AAAA,YACtE,UAAU;AAAA,cACR,aAAa,6CAAmB;AAAA,YAClC;AAAA,YACA,qBAAqB;AAAA,cACnB;AAAA,cACA;AAAA,cACA;AAAA,YACF;AAAA,UACF;AAAA,UACA;AAAA,UACA,QAAQ;AAAA,QACV,CAAC,EACA,UAAU;AAEb,YAAI,SAAS;AACb,mBAAW,eAAW;AAAA,WACpB,0BAAS,SAAT,mBAAe,4BAAf,mBAAwC,aAAxC,YAAoD,CAAC;AAAA,QACvD,GAAG;AACD,cAAI,YAAY,SAAS;AACvB;AAAA,UACF;AACA,cAAI,QAAQ,cAAc,GAAG;AAC3B,sBAAU,QAAQ;AAAA,UACpB;AAAA,QACF;AAEA,eAAO;AAAA,MACT,EAAC;AAED,aAAO;AAAA,IACT;AAAA,IACA,CAAC,WAAW,kBAAkB,mBAAmB,eAAe;AAAA,EAClE;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMakeStandardAutosuggestionFunction
3
- } from "../../chunk-PTPNOBEI.mjs";
3
+ } from "../../chunk-F6GMWOLE.mjs";
4
4
  import "../../chunk-KNQIEOFP.mjs";
5
5
  import "../../chunk-MRXNTQOX.mjs";
6
6
  export {
package/dist/index.js CHANGED
@@ -1824,7 +1824,7 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
1824
1824
  const { getContextString, copilotApiConfig, runtimeClient } = (0, import_react_core3.useCopilotContext)();
1825
1825
  const { chatApiEndpoint: url, publicApiKey, credentials, properties } = copilotApiConfig;
1826
1826
  const headers = __spreadValues(__spreadValues({}, copilotApiConfig.headers), publicApiKey ? { [import_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
1827
- const { maxTokens, stop } = apiConfig;
1827
+ const { maxTokens, stop, temperature = 0 } = apiConfig;
1828
1828
  return (0, import_react13.useCallback)(
1829
1829
  (editorState2, abortSignal) => __async(this, null, function* () {
1830
1830
  const res = yield retry(() => __async(this, null, function* () {
@@ -1863,7 +1863,8 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
1863
1863
  },
1864
1864
  forwardedParameters: {
1865
1865
  maxTokens,
1866
- stop
1866
+ stop,
1867
+ temperature
1867
1868
  }
1868
1869
  },
1869
1870
  properties,