@copilotkit/react-textarea 1.4.1-pre.5 → 1.4.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/{chunk-DS52LMD2.mjs → chunk-53RID4IZ.mjs} +3 -3
  3. package/dist/{chunk-BG4GF6PP.mjs → chunk-PTPNOBEI.mjs} +2 -9
  4. package/dist/chunk-PTPNOBEI.mjs.map +1 -0
  5. package/dist/{chunk-VPGMB7K3.mjs → chunk-RXV67GJN.mjs} +4 -17
  6. package/dist/chunk-RXV67GJN.mjs.map +1 -0
  7. package/dist/components/copilot-textarea/copilot-textarea.js +4 -22
  8. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  9. package/dist/components/copilot-textarea/copilot-textarea.mjs +3 -3
  10. package/dist/components/index.js +4 -22
  11. package/dist/components/index.js.map +1 -1
  12. package/dist/components/index.mjs +3 -3
  13. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +1 -7
  14. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
  15. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +1 -1
  16. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +3 -15
  17. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
  18. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +1 -1
  19. package/dist/index.js +4 -22
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +3 -3
  22. package/package.json +7 -7
  23. package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +1 -8
  24. package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +2 -16
  25. package/dist/chunk-BG4GF6PP.mjs.map +0 -1
  26. package/dist/chunk-VPGMB7K3.mjs.map +0 -1
  27. /package/dist/{chunk-DS52LMD2.mjs.map → chunk-53RID4IZ.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -4,9 +4,9 @@ import "./chunk-WADHCMPK.mjs";
4
4
  import "./chunk-MMVDU6DF.mjs";
5
5
  import {
6
6
  CopilotTextarea
7
- } from "./chunk-DS52LMD2.mjs";
8
- import "./chunk-VPGMB7K3.mjs";
9
- import "./chunk-BG4GF6PP.mjs";
7
+ } from "./chunk-53RID4IZ.mjs";
8
+ import "./chunk-RXV67GJN.mjs";
9
+ import "./chunk-PTPNOBEI.mjs";
10
10
  import "./chunk-RUV6NBIF.mjs";
11
11
  import {
12
12
  defaultAutosuggestionsConfig
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.4.1-pre.5",
12
+ "version": "1.4.1",
13
13
  "sideEffects": [
14
14
  "**/*.css"
15
15
  ],
@@ -43,9 +43,9 @@
43
43
  "ts-jest": "^29.1.1",
44
44
  "tsup": "^6.7.0",
45
45
  "typescript": "^5.2.3",
46
- "eslint-config-custom": "1.4.1-pre.5",
47
- "tailwind-config": "1.4.1-pre.5",
48
- "tsconfig": "1.4.1-pre.5"
46
+ "eslint-config-custom": "1.4.1",
47
+ "tailwind-config": "1.4.1",
48
+ "tsconfig": "1.4.1"
49
49
  },
50
50
  "dependencies": {
51
51
  "@emotion/css": "^11.11.2",
@@ -67,9 +67,9 @@
67
67
  "slate-history": "^0.93.0",
68
68
  "slate-react": "^0.98.1",
69
69
  "tailwind-merge": "^1.13.2",
70
- "@copilotkit/react-core": "1.4.1-pre.5",
71
- "@copilotkit/runtime-client-gql": "1.4.1-pre.5",
72
- "@copilotkit/shared": "1.4.1-pre.5"
70
+ "@copilotkit/react-core": "1.4.1",
71
+ "@copilotkit/runtime-client-gql": "1.4.1",
72
+ "@copilotkit/shared": "1.4.1"
73
73
  },
74
74
  "keywords": [
75
75
  "copilotkit",
@@ -34,7 +34,7 @@ export function useMakeStandardAutosuggestionFunction(
34
34
  contextCategories: string[],
35
35
  apiConfig: SuggestionsApiConfig,
36
36
  ): AutosuggestionsBareFunction {
37
- const { getContextString, copilotApiConfig } = useCopilotContext();
37
+ const { getContextString, copilotApiConfig, runtimeClient } = useCopilotContext();
38
38
  const { chatApiEndpoint: url, publicApiKey, credentials, properties } = copilotApiConfig;
39
39
  const headers = {
40
40
  ...copilotApiConfig.headers,
@@ -71,13 +71,6 @@ export function useMakeStandardAutosuggestionFunction(
71
71
  }),
72
72
  ].filter(Boolean);
73
73
 
74
- const runtimeClient = new CopilotRuntimeClient({
75
- url,
76
- publicApiKey,
77
- headers,
78
- credentials,
79
- });
80
-
81
74
  const response = await runtimeClient
82
75
  .generateCopilotResponse({
83
76
  data: {
@@ -39,24 +39,17 @@ export function useMakeStandardInsertionOrEditingFunction(
39
39
  insertionApiConfig: InsertionsApiConfig,
40
40
  editingApiConfig: EditingApiConfig,
41
41
  ): Generator_InsertionOrEditingSuggestion {
42
- const { getContextString, copilotApiConfig } = useCopilotContext();
42
+ const { getContextString, copilotApiConfig, runtimeClient } = useCopilotContext();
43
43
  const headers = {
44
44
  ...(copilotApiConfig.publicApiKey
45
45
  ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey }
46
46
  : {}),
47
47
  };
48
48
 
49
- const runtimeClient = new CopilotRuntimeClient({
50
- url: copilotApiConfig.chatApiEndpoint,
51
- publicApiKey: copilotApiConfig.publicApiKey,
52
- headers,
53
- credentials: copilotApiConfig.credentials,
54
- });
55
-
56
49
  async function runtimeClientResponseToStringStream(
57
50
  responsePromise: ReturnType<typeof runtimeClient.generateCopilotResponse>,
58
51
  ) {
59
- const messagesStream = await CopilotRuntimeClient.asStream(responsePromise);
52
+ const messagesStream = runtimeClient.asStream(responsePromise);
60
53
 
61
54
  return new ReadableStream({
62
55
  async start(controller) {
@@ -178,13 +171,6 @@ export function useMakeStandardInsertionOrEditingFunction(
178
171
  }),
179
172
  ];
180
173
 
181
- const runtimeClient = new CopilotRuntimeClient({
182
- url: copilotApiConfig.chatApiEndpoint,
183
- publicApiKey: copilotApiConfig.publicApiKey,
184
- headers,
185
- credentials: copilotApiConfig.credentials,
186
- });
187
-
188
174
  return runtimeClientResponseToStringStream(
189
175
  runtimeClient.generateCopilotResponse({
190
176
  data: {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.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 } = 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 runtimeClient = new CopilotRuntimeClient({\n url,\n publicApiKey,\n headers,\n credentials,\n });\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"],"mappings":";;;;;;;;;AAAA,SAAS,2CAA2C;AACpD,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAK5B;AAAA,EACE;AAAA,EAEA;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,CAAC;AAAA,YACtE,UAAU;AAAA,cACR,aAAa,mBAAmB;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,WAAW;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 +0,0 @@
1
- {"version":3,"sources":["../src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx"],"sourcesContent":["import { COPILOT_CLOUD_PUBLIC_API_KEY_HEADER } from \"@copilotkit/shared\";\nimport { useCopilotContext } from \"@copilotkit/react-core\";\nimport { useCallback } from \"react\";\nimport {\n CopilotRuntimeClient,\n Message,\n Role,\n TextMessage,\n convertGqlOutputToMessages,\n convertMessagesToGqlInput,\n filterAgentStateMessages,\n CopilotRequestType,\n} from \"@copilotkit/runtime-client-gql\";\nimport { retry } from \"../../lib/retry\";\nimport {\n EditingEditorState,\n Generator_InsertionOrEditingSuggestion,\n} from \"../../types/base/autosuggestions-bare-function\";\nimport { InsertionsApiConfig } from \"../../types/autosuggestions-config/insertions-api-config\";\nimport { EditingApiConfig } from \"../../types/autosuggestions-config/editing-api-config\";\nimport { DocumentPointer } from \"@copilotkit/react-core\";\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 useMakeStandardInsertionOrEditingFunction(\n textareaPurpose: string,\n contextCategories: string[],\n insertionApiConfig: InsertionsApiConfig,\n editingApiConfig: EditingApiConfig,\n): Generator_InsertionOrEditingSuggestion {\n const { getContextString, copilotApiConfig } = useCopilotContext();\n const headers = {\n ...(copilotApiConfig.publicApiKey\n ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey }\n : {}),\n };\n\n const runtimeClient = new CopilotRuntimeClient({\n url: copilotApiConfig.chatApiEndpoint,\n publicApiKey: copilotApiConfig.publicApiKey,\n headers,\n credentials: copilotApiConfig.credentials,\n });\n\n async function runtimeClientResponseToStringStream(\n responsePromise: ReturnType<typeof runtimeClient.generateCopilotResponse>,\n ) {\n const messagesStream = await CopilotRuntimeClient.asStream(responsePromise);\n\n return new ReadableStream({\n async start(controller) {\n const reader = messagesStream.getReader();\n let sentContent = \"\";\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n const messages = convertGqlOutputToMessages(value.generateCopilotResponse.messages);\n\n let newContent = \"\";\n\n for (const message of messages) {\n if (message.isTextMessage()) {\n newContent += message.content;\n }\n }\n if (newContent) {\n const contentToSend = newContent.slice(sentContent.length);\n controller.enqueue(contentToSend);\n sentContent += contentToSend;\n }\n }\n controller.close();\n },\n });\n }\n\n const insertionFunction = useCallback(\n async (\n editorState: EditingEditorState,\n insertionPrompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n ) => {\n const res = await retry(async () => {\n const messages: Message[] = [\n new TextMessage({\n role: Role.System,\n content: insertionApiConfig.makeSystemPrompt(\n textareaPurpose,\n getContextString(documents, contextCategories),\n ),\n }),\n ...insertionApiConfig.fewShotMessages,\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 new TextMessage({\n role: Role.User,\n content: `<InsertionPrompt>${insertionPrompt}</InsertionPrompt>`,\n }),\n ];\n\n return runtimeClientResponseToStringStream(\n runtimeClient.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 },\n properties: copilotApiConfig.properties,\n signal: abortSignal,\n }),\n );\n });\n\n return res;\n },\n [insertionApiConfig, getContextString, contextCategories, textareaPurpose],\n );\n\n const editingFunction = useCallback(\n async (\n editorState: EditingEditorState,\n editingPrompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n ) => {\n const res = await retry(async () => {\n const messages: Message[] = [\n new TextMessage({\n role: Role.System,\n content: editingApiConfig.makeSystemPrompt(\n textareaPurpose,\n getContextString(documents, contextCategories),\n ),\n }),\n ...editingApiConfig.fewShotMessages,\n new TextMessage({\n role: Role.User,\n content: `<TextBeforeCursor>${editorState.textBeforeCursor}</TextBeforeCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextToEdit>${editorState.selectedText}</TextToEdit>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<TextAfterCursor>${editorState.textAfterCursor}</TextAfterCursor>`,\n }),\n new TextMessage({\n role: Role.User,\n content: `<EditingPrompt>${editingPrompt}</EditingPrompt>`,\n }),\n ];\n\n const runtimeClient = new CopilotRuntimeClient({\n url: copilotApiConfig.chatApiEndpoint,\n publicApiKey: copilotApiConfig.publicApiKey,\n headers,\n credentials: copilotApiConfig.credentials,\n });\n\n return runtimeClientResponseToStringStream(\n runtimeClient.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 },\n properties: copilotApiConfig.properties,\n signal: abortSignal,\n }),\n );\n });\n\n return res;\n },\n [editingApiConfig, getContextString, contextCategories, textareaPurpose],\n );\n\n const insertionOrEditingFunction = useCallback(\n async (\n editorState: EditingEditorState,\n insertionPrompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n ) => {\n if (editorState.selectedText === \"\") {\n return await insertionFunction(editorState, insertionPrompt, documents, abortSignal);\n } else {\n return await editingFunction(editorState, insertionPrompt, documents, abortSignal);\n }\n },\n [insertionFunction, editingFunction],\n );\n\n return insertionOrEditingFunction;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,2CAA2C;AACpD,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAuBA,SAAS,0CACd,iBACA,mBACA,oBACA,kBACwC;AACxC,QAAM,EAAE,kBAAkB,iBAAiB,IAAI,kBAAkB;AACjE,QAAM,UAAU,mBACV,iBAAiB,eACjB,EAAE,CAAC,mCAAmC,GAAG,iBAAiB,aAAa,IACvE,CAAC;AAGP,QAAM,gBAAgB,IAAI,qBAAqB;AAAA,IAC7C,KAAK,iBAAiB;AAAA,IACtB,cAAc,iBAAiB;AAAA,IAC/B;AAAA,IACA,aAAa,iBAAiB;AAAA,EAChC,CAAC;AAED,WAAe,oCACb,iBACA;AAAA;AACA,YAAM,iBAAiB,MAAM,qBAAqB,SAAS,eAAe;AAE1E,aAAO,IAAI,eAAe;AAAA,QAClB,MAAM,YAAY;AAAA;AACtB,kBAAM,SAAS,eAAe,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