@copilotkit/react-textarea 1.1.1 → 1.1.3-feat-runtime-remote-actions.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 (100) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +32 -37
  3. package/dist/{chunk-UUL4NSW5.mjs → chunk-4AMCUMC7.mjs} +2 -2
  4. package/dist/{chunk-MUAPKB7X.mjs → chunk-56BKL3TQ.mjs} +8 -6
  5. package/dist/chunk-56BKL3TQ.mjs.map +1 -0
  6. package/dist/{chunk-3EU4PCFB.mjs → chunk-FCHGQ37A.mjs} +6 -5
  7. package/dist/chunk-FCHGQ37A.mjs.map +1 -0
  8. package/dist/{chunk-2RGJ6YD6.mjs → chunk-I3SPIGAI.mjs} +2 -2
  9. package/dist/{chunk-QQLDM3AI.mjs → chunk-I72DKFHD.mjs} +9 -3
  10. package/dist/chunk-I72DKFHD.mjs.map +1 -0
  11. package/dist/{chunk-T2HQH23F.mjs → chunk-ISBHSCUV.mjs} +4 -4
  12. package/dist/chunk-ISBHSCUV.mjs.map +1 -0
  13. package/dist/{chunk-OLYQNYUN.mjs → chunk-J62KUPFZ.mjs} +3 -3
  14. package/dist/chunk-QJNFNPWH.mjs +85 -0
  15. package/dist/chunk-QJNFNPWH.mjs.map +1 -0
  16. package/dist/{chunk-UNLOFAW7.mjs → chunk-UGEKMSRR.mjs} +5 -5
  17. package/dist/chunk-UGEKMSRR.mjs.map +1 -0
  18. package/dist/{chunk-Q5KJBZUF.mjs → chunk-VSVQZUPW.mjs} +2 -2
  19. package/dist/{chunk-5G7N3XVC.mjs → chunk-WGWQRALG.mjs} +2 -2
  20. package/dist/components/base-copilot-textarea/base-copilot-textarea.d.ts +1 -1
  21. package/dist/components/base-copilot-textarea/base-copilot-textarea.js +66 -70
  22. package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
  23. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +8 -8
  24. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.d.ts +3 -1
  25. package/dist/components/copilot-textarea/copilot-textarea.d.ts +45 -7
  26. package/dist/components/copilot-textarea/copilot-textarea.js +74 -75
  27. package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
  28. package/dist/components/copilot-textarea/copilot-textarea.mjs +11 -11
  29. package/dist/components/hovering-toolbar/hovering-editor-provider.d.ts +2 -1
  30. package/dist/components/hovering-toolbar/hovering-toolbar.d.ts +2 -1
  31. package/dist/components/hovering-toolbar/hovering-toolbar.js +4 -4
  32. package/dist/components/hovering-toolbar/hovering-toolbar.js.map +1 -1
  33. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +6 -6
  34. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.d.ts +2 -1
  35. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js +4 -4
  36. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +1 -1
  37. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +4 -4
  38. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.d.ts +2 -1
  39. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js +4 -4
  40. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +1 -1
  41. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +5 -5
  42. package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.d.ts +3 -2
  43. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.d.ts +1 -0
  44. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js +4 -4
  45. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +1 -1
  46. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +5 -5
  47. package/dist/components/index.d.ts +5 -5
  48. package/dist/components/index.js +74 -75
  49. package/dist/components/index.js.map +1 -1
  50. package/dist/components/index.mjs +11 -11
  51. package/dist/components/manual-ui/chip-with-icon.d.ts +3 -1
  52. package/dist/components/source-search-box/source-search-box.d.ts +3 -2
  53. package/dist/components/source-search-box/source-search-box.mjs +3 -3
  54. package/dist/components/ui/command.d.ts +20 -15
  55. package/dist/components/ui/command.js +8 -2
  56. package/dist/components/ui/command.js.map +1 -1
  57. package/dist/components/ui/command.mjs +2 -2
  58. package/dist/components/ui/dialog.d.ts +3 -2
  59. package/dist/components/ui/dialog.js +8 -2
  60. package/dist/components/ui/dialog.js.map +1 -1
  61. package/dist/components/ui/dialog.mjs +1 -1
  62. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js +62 -66
  63. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
  64. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +1 -1
  65. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +3 -2
  66. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
  67. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +1 -1
  68. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +5 -3
  69. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
  70. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +1 -1
  71. package/dist/index.css +0 -5
  72. package/dist/index.css.map +1 -1
  73. package/dist/index.d.ts +1 -1
  74. package/dist/index.js +74 -75
  75. package/dist/index.js.map +1 -1
  76. package/dist/index.mjs +12 -12
  77. package/dist/lib/slatejs-edits/with-partial-history.d.ts +2 -4
  78. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.d.ts +1 -1
  79. package/dist/types/base/base-copilot-textarea-props.d.ts +4 -51
  80. package/dist/types/base/index.d.ts +52 -3
  81. package/dist/types/index.d.ts +1 -1
  82. package/package.json +8 -8
  83. package/src/components/copilot-textarea/copilot-textarea.tsx +44 -6
  84. package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx +3 -4
  85. package/src/components/ui/dialog.tsx +9 -2
  86. package/src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts +63 -67
  87. package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +4 -3
  88. package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +5 -4
  89. package/dist/chunk-3EU4PCFB.mjs.map +0 -1
  90. package/dist/chunk-FMQG2ZM3.mjs +0 -89
  91. package/dist/chunk-FMQG2ZM3.mjs.map +0 -1
  92. package/dist/chunk-MUAPKB7X.mjs.map +0 -1
  93. package/dist/chunk-QQLDM3AI.mjs.map +0 -1
  94. package/dist/chunk-T2HQH23F.mjs.map +0 -1
  95. package/dist/chunk-UNLOFAW7.mjs.map +0 -1
  96. /package/dist/{chunk-UUL4NSW5.mjs.map → chunk-4AMCUMC7.mjs.map} +0 -0
  97. /package/dist/{chunk-2RGJ6YD6.mjs.map → chunk-I3SPIGAI.mjs.map} +0 -0
  98. /package/dist/{chunk-OLYQNYUN.mjs.map → chunk-J62KUPFZ.mjs.map} +0 -0
  99. /package/dist/{chunk-Q5KJBZUF.mjs.map → chunk-VSVQZUPW.mjs.map} +0 -0
  100. /package/dist/{chunk-5G7N3XVC.mjs.map → chunk-WGWQRALG.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMakeStandardAutosuggestionFunction
3
- } from "../../chunk-3EU4PCFB.mjs";
3
+ } from "../../chunk-FCHGQ37A.mjs";
4
4
  import "../../chunk-KNQIEOFP.mjs";
5
5
  import "../../chunk-MRXNTQOX.mjs";
6
6
  export {
@@ -79,7 +79,7 @@ function retry(fn, retriesLeft = 2, interval = 200, backoff = 1.5) {
79
79
 
80
80
  // src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx
81
81
  function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCategories, insertionApiConfig, editingApiConfig) {
82
- const { getContextString, copilotApiConfig } = (0, import_react.useContext)(import_react_core.CopilotContext);
82
+ const { getContextString, copilotApiConfig } = (0, import_react_core.useCopilotContext)();
83
83
  const headers = __spreadValues({}, copilotApiConfig.publicApiKey ? { [import_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey } : {});
84
84
  const runtimeClient = new import_runtime_client_gql.CopilotRuntimeClient({
85
85
  url: copilotApiConfig.chatApiEndpoint,
@@ -148,7 +148,8 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
148
148
  runtimeClient.generateCopilotResponse({
149
149
  data: {
150
150
  frontend: {
151
- actions: []
151
+ actions: [],
152
+ url: window.location.href
152
153
  },
153
154
  messages: (0, import_runtime_client_gql.convertMessagesToGqlInput)(messages),
154
155
  metadata: {
@@ -203,7 +204,8 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
203
204
  runtimeClient2.generateCopilotResponse({
204
205
  data: {
205
206
  frontend: {
206
- actions: []
207
+ actions: [],
208
+ url: window.location.href
207
209
  },
208
210
  messages: (0, import_runtime_client_gql.convertMessagesToGqlInput)(messages),
209
211
  metadata: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx","../../../src/lib/retry.tsx"],"sourcesContent":["import { COPILOT_CLOUD_PUBLIC_API_KEY_HEADER } from \"@copilotkit/shared\";\nimport { CopilotContext } from \"@copilotkit/react-core\";\nimport { useCallback, useContext } from \"react\";\nimport {\n CopilotRuntimeClient,\n Message,\n Role,\n TextMessage,\n convertGqlOutputToMessages,\n convertMessagesToGqlInput,\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\";\nimport { randomId } from \"@copilotkit/shared\";\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 } = useContext(CopilotContext);\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 instanceof TextMessage) {\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 },\n messages: convertMessagesToGqlInput(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 },\n messages: convertMessagesToGqlInput(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","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;AA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UAAI,YAAY,iBAAiB,IAAI;AACnC,eAAO,MAAM,kBAAkB,aAAa,iBAAiB,WAAW,WAAW;AAAA,MACrF,OAAO;AACL,eAAO,MAAM,gBAAgB,aAAa,iBAAiB,WAAW,WAAW;AAAA,MACnF;AAAA,IACF;AAAA,IACA,CAAC,mBAAmB,eAAe;AAAA,EACrC;AAEA,SAAO;AACT;","names":["runtimeClient"]}
1
+ {"version":3,"sources":["../../../src/hooks/make-autosuggestions-function/use-make-standard-insertion-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 {\n CopilotRuntimeClient,\n Message,\n Role,\n TextMessage,\n convertGqlOutputToMessages,\n convertMessagesToGqlInput,\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 instanceof TextMessage) {\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(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(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","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;AAC5B,gCAQO;;;ACXA,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,gBAAgB,GAAG;AACrB,eAAO,KAAK;AACZ;AAAA,MACF;AAEA,iBAAW,MAAM;AACf,cAAM,IAAI,cAAc,GAAG,WAAW,SAAS,OAAO,EACnD,KAAK,OAAO,EACZ,MAAM,MAAM;AAAA,MACjB,GAAG,QAAQ;AAAA,IACb,CAAC;AAAA,EACL,CAAC;AACH;;;ADYO,SAAS,0CACd,iBACA,mBACA,oBACA,kBACwC;AACxC,QAAM,EAAE,kBAAkB,iBAAiB,QAAI,qCAAkB;AACjE,QAAM,UAAU,mBACV,iBAAiB,eACjB,EAAE,CAAC,iDAAmC,GAAG,iBAAiB,aAAa,IACvE,CAA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;AAAA,UAC7B,CAAC;AAAA,QACH;AAEA,cAAMA,iBAAgB,IAAI,+CAAqB;AAAA,UAC7C,KAAK,iBAAiB;AAAA,UACtB,cAAc,iBAAiB;AAAA,UAC/B;AAAA,UACA,aAAa,iBAAiB;AAAA,QAChC,CAAC;AAED,eAAO;AAAA,UACLA,eAAc,wBAAwB;AAAA,YACpC,MAAM;AAAA,cACJ,UAAU;AAAA,gBACR,SAAS,CAAC;AAAA,gBACV,KAAK,OAAO,SAAS;AAAA,cACvB;AAAA,cACA,cAAU,qDAA0B,QAAQ;AAAA,cAC5C,UAAU;AAAA,gBACR,aAAa,6CAAmB;AAAA,cAClC;AAAA,YACF;AAAA,YACA,YAAY,iBAAiB;AAAA,YAC7B,QAAQ;AAAA,UACV,CAAC;AAAA,QACH;AAAA,MACF,EAAC;AAED,aAAO;AAAA,IACT;AAAA,IACA,CAAC,kBAAkB,kBAAkB,mBAAmB,eAAe;AAAA,EACzE;AAEA,QAAM,iCAA6B;AAAA,IACjC,CACE,aACA,iBACA,WACA,gBACG;AACH,UAAI,YAAY,iBAAiB,IAAI;AACnC,eAAO,MAAM,kBAAkB,aAAa,iBAAiB,WAAW,WAAW;AAAA,MACrF,OAAO;AACL,eAAO,MAAM,gBAAgB,aAAa,iBAAiB,WAAW,WAAW;AAAA,MACnF;AAAA,IACF;AAAA,IACA,CAAC,mBAAmB,eAAe;AAAA,EACrC;AAEA,SAAO;AACT;","names":["runtimeClient"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useMakeStandardInsertionOrEditingFunction
3
- } from "../../chunk-MUAPKB7X.mjs";
3
+ } from "../../chunk-56BKL3TQ.mjs";
4
4
  import "../../chunk-KNQIEOFP.mjs";
5
5
  import "../../chunk-MRXNTQOX.mjs";
6
6
  export {
package/dist/index.css CHANGED
@@ -220,11 +220,6 @@
220
220
  .copilot-kit-textarea-css-scope .gap-4 {
221
221
  gap: 1rem;
222
222
  }
223
- .copilot-kit-textarea-css-scope .space-y-1 > :not([hidden]) ~ :not([hidden]) {
224
- --tw-space-y-reverse: 0;
225
- margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
226
- margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
227
- }
228
223
  .copilot-kit-textarea-css-scope .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
229
224
  --tw-space-y-reverse: 0;
230
225
  margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/styles.css","../src/components/base-copilot-textarea/base-copilot-textarea.css"],"sourcesContent":["@import url(\"material-icons/iconfont/material-icons.css\");\n\n.copilot-kit-textarea-css-scope .sr-only{\n\n position: absolute;\n\n width: 1px;\n\n height: 1px;\n\n padding: 0;\n\n margin: -1px;\n\n overflow: hidden;\n\n clip: rect(0, 0, 0, 0);\n\n white-space: nowrap;\n\n border-width: 0\n}\n\n.copilot-kit-textarea-css-scope .fixed{\n\n position: fixed\n}\n\n.copilot-kit-textarea-css-scope .\\!absolute{\n\n position: absolute !important\n}\n\n.copilot-kit-textarea-css-scope .absolute{\n\n position: absolute\n}\n\n.copilot-kit-textarea-css-scope .relative{\n\n position: relative\n}\n\n.copilot-kit-textarea-css-scope .inset-0{\n\n inset: 0px\n}\n\n.copilot-kit-textarea-css-scope .left-\\[-10000px\\]{\n\n left: -10000px\n}\n\n.copilot-kit-textarea-css-scope .left-\\[50\\%\\]{\n\n left: 50%\n}\n\n.copilot-kit-textarea-css-scope .right-2{\n\n right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .right-4{\n\n right: 1rem\n}\n\n.copilot-kit-textarea-css-scope .top-4{\n\n top: 1rem\n}\n\n.copilot-kit-textarea-css-scope .top-\\[-10000px\\]{\n\n top: -10000px\n}\n\n.copilot-kit-textarea-css-scope .top-\\[50\\%\\]{\n\n top: 50%\n}\n\n.copilot-kit-textarea-css-scope .z-10{\n\n z-index: 10\n}\n\n.copilot-kit-textarea-css-scope .z-50{\n\n z-index: 50\n}\n\n.copilot-kit-textarea-css-scope .\\!-m-px{\n\n margin: -1px !important\n}\n\n.copilot-kit-textarea-css-scope .-mx-1{\n\n margin-left: -0.25rem;\n\n margin-right: -0.25rem\n}\n\n.copilot-kit-textarea-css-scope .ml-2{\n\n margin-left: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .ml-auto{\n\n margin-left: auto\n}\n\n.copilot-kit-textarea-css-scope .mr-2{\n\n margin-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .mt-2{\n\n margin-top: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .mt-4{\n\n margin-top: 1rem\n}\n\n.copilot-kit-textarea-css-scope .mt-\\[-6px\\]{\n\n margin-top: -6px\n}\n\n.copilot-kit-textarea-css-scope .block{\n\n display: block\n}\n\n.copilot-kit-textarea-css-scope .inline-block{\n\n display: inline-block\n}\n\n.copilot-kit-textarea-css-scope .inline{\n\n display: inline\n}\n\n.copilot-kit-textarea-css-scope .flex{\n\n display: flex\n}\n\n.copilot-kit-textarea-css-scope .inline-flex{\n\n display: inline-flex\n}\n\n.copilot-kit-textarea-css-scope .grid{\n\n display: grid\n}\n\n.copilot-kit-textarea-css-scope .hidden{\n\n display: none\n}\n\n.copilot-kit-textarea-css-scope .\\!h-px{\n\n height: 1px !important\n}\n\n.copilot-kit-textarea-css-scope .h-10{\n\n height: 2.5rem\n}\n\n.copilot-kit-textarea-css-scope .h-11{\n\n height: 2.75rem\n}\n\n.copilot-kit-textarea-css-scope .h-4{\n\n height: 1rem\n}\n\n.copilot-kit-textarea-css-scope .h-8{\n\n height: 2rem\n}\n\n.copilot-kit-textarea-css-scope .h-9{\n\n height: 2.25rem\n}\n\n.copilot-kit-textarea-css-scope .h-auto{\n\n height: auto\n}\n\n.copilot-kit-textarea-css-scope .h-full{\n\n height: 100%\n}\n\n.copilot-kit-textarea-css-scope .h-px{\n\n height: 1px\n}\n\n.copilot-kit-textarea-css-scope .max-h-\\[300px\\]{\n\n max-height: 300px\n}\n\n.copilot-kit-textarea-css-scope .\\!w-px{\n\n width: 1px !important\n}\n\n.copilot-kit-textarea-css-scope .w-10{\n\n width: 2.5rem\n}\n\n.copilot-kit-textarea-css-scope .w-4{\n\n width: 1rem\n}\n\n.copilot-kit-textarea-css-scope .w-8{\n\n width: 2rem\n}\n\n.copilot-kit-textarea-css-scope .w-full{\n\n width: 100%\n}\n\n.copilot-kit-textarea-css-scope .max-w-lg{\n\n max-width: 32rem\n}\n\n.copilot-kit-textarea-css-scope .shrink-0{\n\n flex-shrink: 0\n}\n\n.copilot-kit-textarea-css-scope .translate-x-\\[-50\\%\\]{\n\n --tw-translate-x: -50%;\n\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.copilot-kit-textarea-css-scope .translate-y-\\[-50\\%\\]{\n\n --tw-translate-y: -50%;\n\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes spin{\n\n to{\n\n transform: rotate(360deg)\n }\n}\n\n.copilot-kit-textarea-css-scope .animate-spin{\n\n animation: spin 1s linear infinite\n}\n\n.copilot-kit-textarea-css-scope .cursor-default{\n\n cursor: default\n}\n\n.copilot-kit-textarea-css-scope .select-none{\n\n -webkit-user-select: none;\n\n -moz-user-select: none;\n\n user-select: none\n}\n\n.copilot-kit-textarea-css-scope .resize-none{\n\n resize: none\n}\n\n.copilot-kit-textarea-css-scope .resize-y{\n\n resize: vertical\n}\n\n.copilot-kit-textarea-css-scope .flex-row{\n\n flex-direction: row\n}\n\n.copilot-kit-textarea-css-scope .flex-col{\n\n flex-direction: column\n}\n\n.copilot-kit-textarea-css-scope .flex-col-reverse{\n\n flex-direction: column-reverse\n}\n\n.copilot-kit-textarea-css-scope .flex-wrap{\n\n flex-wrap: wrap\n}\n\n.copilot-kit-textarea-css-scope .items-start{\n\n align-items: flex-start\n}\n\n.copilot-kit-textarea-css-scope .items-end{\n\n align-items: flex-end\n}\n\n.copilot-kit-textarea-css-scope .items-center{\n\n align-items: center\n}\n\n.copilot-kit-textarea-css-scope .justify-start{\n\n justify-content: flex-start\n}\n\n.copilot-kit-textarea-css-scope .justify-center{\n\n justify-content: center\n}\n\n.copilot-kit-textarea-css-scope .justify-between{\n\n justify-content: space-between\n}\n\n.copilot-kit-textarea-css-scope .gap-1{\n\n gap: 0.25rem\n}\n\n.copilot-kit-textarea-css-scope .gap-2{\n\n gap: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .gap-4{\n\n gap: 1rem\n}\n\n.copilot-kit-textarea-css-scope .space-y-1 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-y-reverse: 0;\n\n margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));\n\n margin-bottom: calc(0.25rem * var(--tw-space-y-reverse))\n}\n\n.copilot-kit-textarea-css-scope .space-y-1\\.5 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-y-reverse: 0;\n\n margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));\n\n margin-bottom: calc(0.375rem * var(--tw-space-y-reverse))\n}\n\n.copilot-kit-textarea-css-scope .space-y-4 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-y-reverse: 0;\n\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n\n margin-bottom: calc(1rem * var(--tw-space-y-reverse))\n}\n\n.copilot-kit-textarea-css-scope .\\!overflow-hidden{\n\n overflow: hidden !important\n}\n\n.copilot-kit-textarea-css-scope .overflow-hidden{\n\n overflow: hidden\n}\n\n.copilot-kit-textarea-css-scope .overflow-visible{\n\n overflow: visible\n}\n\n.copilot-kit-textarea-css-scope .overflow-y-auto{\n\n overflow-y: auto\n}\n\n.copilot-kit-textarea-css-scope .overflow-x-hidden{\n\n overflow-x: hidden\n}\n\n.copilot-kit-textarea-css-scope .\\!whitespace-nowrap{\n\n white-space: nowrap !important\n}\n\n.copilot-kit-textarea-css-scope .rounded-full{\n\n border-radius: 9999px\n}\n\n.copilot-kit-textarea-css-scope .rounded-lg{\n\n border-radius: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .rounded-md{\n\n border-radius: 0.375rem\n}\n\n.copilot-kit-textarea-css-scope .rounded-sm{\n\n border-radius: 0.125rem\n}\n\n.copilot-kit-textarea-css-scope .rounded-t-lg{\n\n border-top-left-radius: 0.5rem;\n\n border-top-right-radius: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\!border-0{\n\n border-width: 0px !important\n}\n\n.copilot-kit-textarea-css-scope .border{\n\n border-width: 1px\n}\n\n.copilot-kit-textarea-css-scope .border-4{\n\n border-width: 4px\n}\n\n.copilot-kit-textarea-css-scope .border-b{\n\n border-bottom-width: 1px\n}\n\n.copilot-kit-textarea-css-scope .border-solid{\n\n border-style: solid\n}\n\n.copilot-kit-textarea-css-scope .border-current{\n\n border-color: currentColor\n}\n\n.copilot-kit-textarea-css-scope .border-gray-300{\n\n --tw-border-opacity: 1;\n\n border-color: rgb(209 213 219 / var(--tw-border-opacity))\n}\n\n.copilot-kit-textarea-css-scope .border-r-transparent{\n\n border-right-color: transparent\n}\n\n.copilot-kit-textarea-css-scope .bg-blue-500{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(59 130 246 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-green-50{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(240 253 244 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-green-700{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(21 128 61 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-slate-100{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(241 245 249 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-slate-200{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(226 232 240 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-transparent{\n\n background-color: transparent\n}\n\n.copilot-kit-textarea-css-scope .bg-white{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(255 255 255 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .\\!p-0{\n\n padding: 0px !important\n}\n\n.copilot-kit-textarea-css-scope .p-0{\n\n padding: 0px\n}\n\n.copilot-kit-textarea-css-scope .p-1{\n\n padding: 0.25rem\n}\n\n.copilot-kit-textarea-css-scope .p-2{\n\n padding: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .p-4{\n\n padding: 1rem\n}\n\n.copilot-kit-textarea-css-scope .p-6{\n\n padding: 1.5rem\n}\n\n.copilot-kit-textarea-css-scope .px-3{\n\n padding-left: 0.75rem;\n\n padding-right: 0.75rem\n}\n\n.copilot-kit-textarea-css-scope .px-4{\n\n padding-left: 1rem;\n\n padding-right: 1rem\n}\n\n.copilot-kit-textarea-css-scope .px-8{\n\n padding-left: 2rem;\n\n padding-right: 2rem\n}\n\n.copilot-kit-textarea-css-scope .py-1{\n\n padding-top: 0.25rem;\n\n padding-bottom: 0.25rem\n}\n\n.copilot-kit-textarea-css-scope .py-2{\n\n padding-top: 0.5rem;\n\n padding-bottom: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .py-3{\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem\n}\n\n.copilot-kit-textarea-css-scope .py-6{\n\n padding-top: 1.5rem;\n\n padding-bottom: 1.5rem\n}\n\n.copilot-kit-textarea-css-scope .pb-2{\n\n padding-bottom: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .pr-\\[3rem\\]{\n\n padding-right: 3rem\n}\n\n.copilot-kit-textarea-css-scope .text-center{\n\n text-align: center\n}\n\n.copilot-kit-textarea-css-scope .align-\\[-0\\.125em\\]{\n\n vertical-align: -0.125em\n}\n\n.copilot-kit-textarea-css-scope .text-base{\n\n font-size: 1rem;\n\n line-height: 1.5rem\n}\n\n.copilot-kit-textarea-css-scope .text-lg{\n\n font-size: 1.125rem;\n\n line-height: 1.75rem\n}\n\n.copilot-kit-textarea-css-scope .text-sm{\n\n font-size: 0.875rem;\n\n line-height: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .text-xs{\n\n font-size: 0.75rem;\n\n line-height: 1rem\n}\n\n.copilot-kit-textarea-css-scope .font-medium{\n\n font-weight: 500\n}\n\n.copilot-kit-textarea-css-scope .font-semibold{\n\n font-weight: 600\n}\n\n.copilot-kit-textarea-css-scope .italic{\n\n font-style: italic\n}\n\n.copilot-kit-textarea-css-scope .leading-none{\n\n line-height: 1\n}\n\n.copilot-kit-textarea-css-scope .tracking-tight{\n\n letter-spacing: -0.025em\n}\n\n.copilot-kit-textarea-css-scope .tracking-widest{\n\n letter-spacing: 0.1em\n}\n\n.copilot-kit-textarea-css-scope .text-white{\n\n --tw-text-opacity: 1;\n\n color: rgb(255 255 255 / var(--tw-text-opacity))\n}\n\n.copilot-kit-textarea-css-scope .underline-offset-4{\n\n text-underline-offset: 4px\n}\n\n.copilot-kit-textarea-css-scope .opacity-0{\n\n opacity: 0\n}\n\n.copilot-kit-textarea-css-scope .opacity-50{\n\n opacity: 0.5\n}\n\n.copilot-kit-textarea-css-scope .opacity-70{\n\n opacity: 0.7\n}\n\n.copilot-kit-textarea-css-scope .shadow-lg{\n\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.copilot-kit-textarea-css-scope .shadow-md{\n\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.copilot-kit-textarea-css-scope .outline-none{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px\n}\n\n.copilot-kit-textarea-css-scope .outline{\n\n outline-style: solid\n}\n\n.copilot-kit-textarea-css-scope .blur{\n\n --tw-blur: blur(8px);\n\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.copilot-kit-textarea-css-scope .filter{\n\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.copilot-kit-textarea-css-scope .backdrop-blur-sm{\n\n --tw-backdrop-blur: blur(4px);\n\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)\n}\n\n.copilot-kit-textarea-css-scope .transition-colors{\n\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-duration: 150ms\n}\n\n.copilot-kit-textarea-css-scope .transition-opacity{\n\n transition-property: opacity;\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-duration: 150ms\n}\n\n.copilot-kit-textarea-css-scope .duration-200{\n\n transition-duration: 200ms\n}\n\n.copilot-kit-textarea-css-scope .duration-700{\n\n transition-duration: 700ms\n}\n\n.copilot-kit-textarea-css-scope .\\!\\[clip\\:rect\\(0\\2c 0\\2c 0\\2c 0\\)\\]{\n\n clip: rect(0,0,0,0) !important\n}\n\n.copilot-kit-textarea-css-scope .hover\\:text-gray-200:hover{\n\n --tw-text-opacity: 1;\n\n color: rgb(229 231 235 / var(--tw-text-opacity))\n}\n\n.copilot-kit-textarea-css-scope .hover\\:underline:hover{\n\n text-decoration-line: underline\n}\n\n.copilot-kit-textarea-css-scope .hover\\:opacity-100:hover{\n\n opacity: 1\n}\n\n.copilot-kit-textarea-css-scope .focus\\:outline-none:focus{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px\n}\n\n.copilot-kit-textarea-css-scope .focus\\:ring-0:focus{\n\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)\n}\n\n.copilot-kit-textarea-css-scope .focus\\:ring-2:focus{\n\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)\n}\n\n.copilot-kit-textarea-css-scope .focus\\:ring-offset-2:focus{\n\n --tw-ring-offset-width: 2px\n}\n\n.copilot-kit-textarea-css-scope .focus-visible\\:outline-none:focus-visible{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px\n}\n\n.copilot-kit-textarea-css-scope .focus-visible\\:ring-2:focus-visible{\n\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)\n}\n\n.copilot-kit-textarea-css-scope .focus-visible\\:ring-offset-2:focus-visible{\n\n --tw-ring-offset-width: 2px\n}\n\n.copilot-kit-textarea-css-scope .disabled\\:pointer-events-none:disabled{\n\n pointer-events: none\n}\n\n.copilot-kit-textarea-css-scope .disabled\\:cursor-not-allowed:disabled{\n\n cursor: not-allowed\n}\n\n.copilot-kit-textarea-css-scope .disabled\\:opacity-50:disabled{\n\n opacity: 0.5\n}\n\n.copilot-kit-textarea-css-scope .peer:disabled ~ .peer-disabled\\:cursor-not-allowed{\n\n cursor: not-allowed\n}\n\n.copilot-kit-textarea-css-scope .peer:disabled ~ .peer-disabled\\:opacity-70{\n\n opacity: 0.7\n}\n\n.copilot-kit-textarea-css-scope .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{\n\n pointer-events: none\n}\n\n.copilot-kit-textarea-css-scope .data-\\[disabled\\]\\:opacity-50[data-disabled]{\n\n opacity: 0.5\n}\n\n@media (prefers-reduced-motion: reduce){\n\n @keyframes spin{\n\n to{\n\n transform: rotate(360deg)\n }\n }\n\n .copilot-kit-textarea-css-scope .motion-reduce\\:animate-\\[spin_1\\.5s_linear_infinite\\]{\n\n animation: spin 1.5s linear infinite\n }\n}\n\n@media (min-width: 640px){\n\n .copilot-kit-textarea-css-scope .sm\\:flex-row{\n\n flex-direction: row\n }\n\n .copilot-kit-textarea-css-scope .sm\\:justify-end{\n\n justify-content: flex-end\n }\n\n .copilot-kit-textarea-css-scope .sm\\:space-x-2 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-x-reverse: 0;\n\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))\n }\n\n .copilot-kit-textarea-css-scope .sm\\:rounded-lg{\n\n border-radius: 0.5rem\n }\n\n .copilot-kit-textarea-css-scope .sm\\:text-left{\n\n text-align: left\n }\n}\n\n@media (min-width: 768px){\n\n .copilot-kit-textarea-css-scope .md\\:w-full{\n\n width: 100%\n }\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{\n\n padding-left: 0.5rem;\n\n padding-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{\n\n padding-top: 0.375rem;\n\n padding-bottom: 0.375rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{\n\n font-size: 0.75rem;\n\n line-height: 1rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{\n\n font-weight: 500\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden]) ~[cmdk-group]{\n\n padding-top: 0px\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{\n\n padding-left: 0.5rem;\n\n padding-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{\n\n height: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{\n\n width: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{\n\n height: 3rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{\n\n padding-left: 0.5rem;\n\n padding-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{\n\n height: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{\n\n width: 1.25rem\n}\n",".copilot-kit-textarea-css-scope .copilot-textarea.with-branding::after {\n content: ''; /* Initially empty because we overrdie this CSS dynamically and we want to avoid flashing */\n position: absolute;\n}\n \n \n.copilot-kit-textarea-css-scope .copilot-textarea.no-branding::after {\n content: '';\n}"],"mappings":";;;AAEA;AAEI;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAA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css\");\n\n.copilot-kit-textarea-css-scope .sr-only{\n\n position: absolute;\n\n width: 1px;\n\n height: 1px;\n\n padding: 0;\n\n margin: -1px;\n\n overflow: hidden;\n\n clip: rect(0, 0, 0, 0);\n\n white-space: nowrap;\n\n border-width: 0\n}\n\n.copilot-kit-textarea-css-scope .fixed{\n\n position: fixed\n}\n\n.copilot-kit-textarea-css-scope .\\!absolute{\n\n position: absolute !important\n}\n\n.copilot-kit-textarea-css-scope .absolute{\n\n position: absolute\n}\n\n.copilot-kit-textarea-css-scope .relative{\n\n position: relative\n}\n\n.copilot-kit-textarea-css-scope .inset-0{\n\n inset: 0px\n}\n\n.copilot-kit-textarea-css-scope .left-\\[-10000px\\]{\n\n left: -10000px\n}\n\n.copilot-kit-textarea-css-scope .left-\\[50\\%\\]{\n\n left: 50%\n}\n\n.copilot-kit-textarea-css-scope .right-2{\n\n right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .right-4{\n\n right: 1rem\n}\n\n.copilot-kit-textarea-css-scope .top-4{\n\n top: 1rem\n}\n\n.copilot-kit-textarea-css-scope .top-\\[-10000px\\]{\n\n top: -10000px\n}\n\n.copilot-kit-textarea-css-scope .top-\\[50\\%\\]{\n\n top: 50%\n}\n\n.copilot-kit-textarea-css-scope .z-10{\n\n z-index: 10\n}\n\n.copilot-kit-textarea-css-scope .z-50{\n\n z-index: 50\n}\n\n.copilot-kit-textarea-css-scope .\\!-m-px{\n\n margin: -1px !important\n}\n\n.copilot-kit-textarea-css-scope .-mx-1{\n\n margin-left: -0.25rem;\n\n margin-right: -0.25rem\n}\n\n.copilot-kit-textarea-css-scope .ml-2{\n\n margin-left: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .ml-auto{\n\n margin-left: auto\n}\n\n.copilot-kit-textarea-css-scope .mr-2{\n\n margin-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .mt-2{\n\n margin-top: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .mt-4{\n\n margin-top: 1rem\n}\n\n.copilot-kit-textarea-css-scope .mt-\\[-6px\\]{\n\n margin-top: -6px\n}\n\n.copilot-kit-textarea-css-scope .block{\n\n display: block\n}\n\n.copilot-kit-textarea-css-scope .inline-block{\n\n display: inline-block\n}\n\n.copilot-kit-textarea-css-scope .inline{\n\n display: inline\n}\n\n.copilot-kit-textarea-css-scope .flex{\n\n display: flex\n}\n\n.copilot-kit-textarea-css-scope .inline-flex{\n\n display: inline-flex\n}\n\n.copilot-kit-textarea-css-scope .grid{\n\n display: grid\n}\n\n.copilot-kit-textarea-css-scope .hidden{\n\n display: none\n}\n\n.copilot-kit-textarea-css-scope .\\!h-px{\n\n height: 1px !important\n}\n\n.copilot-kit-textarea-css-scope .h-10{\n\n height: 2.5rem\n}\n\n.copilot-kit-textarea-css-scope .h-11{\n\n height: 2.75rem\n}\n\n.copilot-kit-textarea-css-scope .h-4{\n\n height: 1rem\n}\n\n.copilot-kit-textarea-css-scope .h-8{\n\n height: 2rem\n}\n\n.copilot-kit-textarea-css-scope .h-9{\n\n height: 2.25rem\n}\n\n.copilot-kit-textarea-css-scope .h-auto{\n\n height: auto\n}\n\n.copilot-kit-textarea-css-scope .h-full{\n\n height: 100%\n}\n\n.copilot-kit-textarea-css-scope .h-px{\n\n height: 1px\n}\n\n.copilot-kit-textarea-css-scope .max-h-\\[300px\\]{\n\n max-height: 300px\n}\n\n.copilot-kit-textarea-css-scope .\\!w-px{\n\n width: 1px !important\n}\n\n.copilot-kit-textarea-css-scope .w-10{\n\n width: 2.5rem\n}\n\n.copilot-kit-textarea-css-scope .w-4{\n\n width: 1rem\n}\n\n.copilot-kit-textarea-css-scope .w-8{\n\n width: 2rem\n}\n\n.copilot-kit-textarea-css-scope .w-full{\n\n width: 100%\n}\n\n.copilot-kit-textarea-css-scope .max-w-lg{\n\n max-width: 32rem\n}\n\n.copilot-kit-textarea-css-scope .shrink-0{\n\n flex-shrink: 0\n}\n\n.copilot-kit-textarea-css-scope .translate-x-\\[-50\\%\\]{\n\n --tw-translate-x: -50%;\n\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.copilot-kit-textarea-css-scope .translate-y-\\[-50\\%\\]{\n\n --tw-translate-y: -50%;\n\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes spin{\n\n to{\n\n transform: rotate(360deg)\n }\n}\n\n.copilot-kit-textarea-css-scope .animate-spin{\n\n animation: spin 1s linear infinite\n}\n\n.copilot-kit-textarea-css-scope .cursor-default{\n\n cursor: default\n}\n\n.copilot-kit-textarea-css-scope .select-none{\n\n -webkit-user-select: none;\n\n -moz-user-select: none;\n\n user-select: none\n}\n\n.copilot-kit-textarea-css-scope .resize-none{\n\n resize: none\n}\n\n.copilot-kit-textarea-css-scope .resize-y{\n\n resize: vertical\n}\n\n.copilot-kit-textarea-css-scope .flex-row{\n\n flex-direction: row\n}\n\n.copilot-kit-textarea-css-scope .flex-col{\n\n flex-direction: column\n}\n\n.copilot-kit-textarea-css-scope .flex-col-reverse{\n\n flex-direction: column-reverse\n}\n\n.copilot-kit-textarea-css-scope .flex-wrap{\n\n flex-wrap: wrap\n}\n\n.copilot-kit-textarea-css-scope .items-start{\n\n align-items: flex-start\n}\n\n.copilot-kit-textarea-css-scope .items-end{\n\n align-items: flex-end\n}\n\n.copilot-kit-textarea-css-scope .items-center{\n\n align-items: center\n}\n\n.copilot-kit-textarea-css-scope .justify-start{\n\n justify-content: flex-start\n}\n\n.copilot-kit-textarea-css-scope .justify-center{\n\n justify-content: center\n}\n\n.copilot-kit-textarea-css-scope .justify-between{\n\n justify-content: space-between\n}\n\n.copilot-kit-textarea-css-scope .gap-1{\n\n gap: 0.25rem\n}\n\n.copilot-kit-textarea-css-scope .gap-2{\n\n gap: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .gap-4{\n\n gap: 1rem\n}\n\n.copilot-kit-textarea-css-scope .space-y-1\\.5 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-y-reverse: 0;\n\n margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));\n\n margin-bottom: calc(0.375rem * var(--tw-space-y-reverse))\n}\n\n.copilot-kit-textarea-css-scope .space-y-4 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-y-reverse: 0;\n\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n\n margin-bottom: calc(1rem * var(--tw-space-y-reverse))\n}\n\n.copilot-kit-textarea-css-scope .\\!overflow-hidden{\n\n overflow: hidden !important\n}\n\n.copilot-kit-textarea-css-scope .overflow-hidden{\n\n overflow: hidden\n}\n\n.copilot-kit-textarea-css-scope .overflow-visible{\n\n overflow: visible\n}\n\n.copilot-kit-textarea-css-scope .overflow-y-auto{\n\n overflow-y: auto\n}\n\n.copilot-kit-textarea-css-scope .overflow-x-hidden{\n\n overflow-x: hidden\n}\n\n.copilot-kit-textarea-css-scope .\\!whitespace-nowrap{\n\n white-space: nowrap !important\n}\n\n.copilot-kit-textarea-css-scope .rounded-full{\n\n border-radius: 9999px\n}\n\n.copilot-kit-textarea-css-scope .rounded-lg{\n\n border-radius: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .rounded-md{\n\n border-radius: 0.375rem\n}\n\n.copilot-kit-textarea-css-scope .rounded-sm{\n\n border-radius: 0.125rem\n}\n\n.copilot-kit-textarea-css-scope .rounded-t-lg{\n\n border-top-left-radius: 0.5rem;\n\n border-top-right-radius: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\!border-0{\n\n border-width: 0px !important\n}\n\n.copilot-kit-textarea-css-scope .border{\n\n border-width: 1px\n}\n\n.copilot-kit-textarea-css-scope .border-4{\n\n border-width: 4px\n}\n\n.copilot-kit-textarea-css-scope .border-b{\n\n border-bottom-width: 1px\n}\n\n.copilot-kit-textarea-css-scope .border-solid{\n\n border-style: solid\n}\n\n.copilot-kit-textarea-css-scope .border-current{\n\n border-color: currentColor\n}\n\n.copilot-kit-textarea-css-scope .border-gray-300{\n\n --tw-border-opacity: 1;\n\n border-color: rgb(209 213 219 / var(--tw-border-opacity))\n}\n\n.copilot-kit-textarea-css-scope .border-r-transparent{\n\n border-right-color: transparent\n}\n\n.copilot-kit-textarea-css-scope .bg-blue-500{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(59 130 246 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-green-50{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(240 253 244 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-green-700{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(21 128 61 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-slate-100{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(241 245 249 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-slate-200{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(226 232 240 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .bg-transparent{\n\n background-color: transparent\n}\n\n.copilot-kit-textarea-css-scope .bg-white{\n\n --tw-bg-opacity: 1;\n\n background-color: rgb(255 255 255 / var(--tw-bg-opacity))\n}\n\n.copilot-kit-textarea-css-scope .\\!p-0{\n\n padding: 0px !important\n}\n\n.copilot-kit-textarea-css-scope .p-0{\n\n padding: 0px\n}\n\n.copilot-kit-textarea-css-scope .p-1{\n\n padding: 0.25rem\n}\n\n.copilot-kit-textarea-css-scope .p-2{\n\n padding: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .p-4{\n\n padding: 1rem\n}\n\n.copilot-kit-textarea-css-scope .p-6{\n\n padding: 1.5rem\n}\n\n.copilot-kit-textarea-css-scope .px-3{\n\n padding-left: 0.75rem;\n\n padding-right: 0.75rem\n}\n\n.copilot-kit-textarea-css-scope .px-4{\n\n padding-left: 1rem;\n\n padding-right: 1rem\n}\n\n.copilot-kit-textarea-css-scope .px-8{\n\n padding-left: 2rem;\n\n padding-right: 2rem\n}\n\n.copilot-kit-textarea-css-scope .py-1{\n\n padding-top: 0.25rem;\n\n padding-bottom: 0.25rem\n}\n\n.copilot-kit-textarea-css-scope .py-2{\n\n padding-top: 0.5rem;\n\n padding-bottom: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .py-3{\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem\n}\n\n.copilot-kit-textarea-css-scope .py-6{\n\n padding-top: 1.5rem;\n\n padding-bottom: 1.5rem\n}\n\n.copilot-kit-textarea-css-scope .pb-2{\n\n padding-bottom: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .pr-\\[3rem\\]{\n\n padding-right: 3rem\n}\n\n.copilot-kit-textarea-css-scope .text-center{\n\n text-align: center\n}\n\n.copilot-kit-textarea-css-scope .align-\\[-0\\.125em\\]{\n\n vertical-align: -0.125em\n}\n\n.copilot-kit-textarea-css-scope .text-base{\n\n font-size: 1rem;\n\n line-height: 1.5rem\n}\n\n.copilot-kit-textarea-css-scope .text-lg{\n\n font-size: 1.125rem;\n\n line-height: 1.75rem\n}\n\n.copilot-kit-textarea-css-scope .text-sm{\n\n font-size: 0.875rem;\n\n line-height: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .text-xs{\n\n font-size: 0.75rem;\n\n line-height: 1rem\n}\n\n.copilot-kit-textarea-css-scope .font-medium{\n\n font-weight: 500\n}\n\n.copilot-kit-textarea-css-scope .font-semibold{\n\n font-weight: 600\n}\n\n.copilot-kit-textarea-css-scope .italic{\n\n font-style: italic\n}\n\n.copilot-kit-textarea-css-scope .leading-none{\n\n line-height: 1\n}\n\n.copilot-kit-textarea-css-scope .tracking-tight{\n\n letter-spacing: -0.025em\n}\n\n.copilot-kit-textarea-css-scope .tracking-widest{\n\n letter-spacing: 0.1em\n}\n\n.copilot-kit-textarea-css-scope .text-white{\n\n --tw-text-opacity: 1;\n\n color: rgb(255 255 255 / var(--tw-text-opacity))\n}\n\n.copilot-kit-textarea-css-scope .underline-offset-4{\n\n text-underline-offset: 4px\n}\n\n.copilot-kit-textarea-css-scope .opacity-0{\n\n opacity: 0\n}\n\n.copilot-kit-textarea-css-scope .opacity-50{\n\n opacity: 0.5\n}\n\n.copilot-kit-textarea-css-scope .opacity-70{\n\n opacity: 0.7\n}\n\n.copilot-kit-textarea-css-scope .shadow-lg{\n\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.copilot-kit-textarea-css-scope .shadow-md{\n\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.copilot-kit-textarea-css-scope .outline-none{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px\n}\n\n.copilot-kit-textarea-css-scope .outline{\n\n outline-style: solid\n}\n\n.copilot-kit-textarea-css-scope .blur{\n\n --tw-blur: blur(8px);\n\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.copilot-kit-textarea-css-scope .filter{\n\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.copilot-kit-textarea-css-scope .backdrop-blur-sm{\n\n --tw-backdrop-blur: blur(4px);\n\n -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)\n}\n\n.copilot-kit-textarea-css-scope .transition-colors{\n\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-duration: 150ms\n}\n\n.copilot-kit-textarea-css-scope .transition-opacity{\n\n transition-property: opacity;\n\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n\n transition-duration: 150ms\n}\n\n.copilot-kit-textarea-css-scope .duration-200{\n\n transition-duration: 200ms\n}\n\n.copilot-kit-textarea-css-scope .duration-700{\n\n transition-duration: 700ms\n}\n\n.copilot-kit-textarea-css-scope .\\!\\[clip\\:rect\\(0\\2c 0\\2c 0\\2c 0\\)\\]{\n\n clip: rect(0,0,0,0) !important\n}\n\n.copilot-kit-textarea-css-scope .hover\\:text-gray-200:hover{\n\n --tw-text-opacity: 1;\n\n color: rgb(229 231 235 / var(--tw-text-opacity))\n}\n\n.copilot-kit-textarea-css-scope .hover\\:underline:hover{\n\n text-decoration-line: underline\n}\n\n.copilot-kit-textarea-css-scope .hover\\:opacity-100:hover{\n\n opacity: 1\n}\n\n.copilot-kit-textarea-css-scope .focus\\:outline-none:focus{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px\n}\n\n.copilot-kit-textarea-css-scope .focus\\:ring-0:focus{\n\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)\n}\n\n.copilot-kit-textarea-css-scope .focus\\:ring-2:focus{\n\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)\n}\n\n.copilot-kit-textarea-css-scope .focus\\:ring-offset-2:focus{\n\n --tw-ring-offset-width: 2px\n}\n\n.copilot-kit-textarea-css-scope .focus-visible\\:outline-none:focus-visible{\n\n outline: 2px solid transparent;\n\n outline-offset: 2px\n}\n\n.copilot-kit-textarea-css-scope .focus-visible\\:ring-2:focus-visible{\n\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)\n}\n\n.copilot-kit-textarea-css-scope .focus-visible\\:ring-offset-2:focus-visible{\n\n --tw-ring-offset-width: 2px\n}\n\n.copilot-kit-textarea-css-scope .disabled\\:pointer-events-none:disabled{\n\n pointer-events: none\n}\n\n.copilot-kit-textarea-css-scope .disabled\\:cursor-not-allowed:disabled{\n\n cursor: not-allowed\n}\n\n.copilot-kit-textarea-css-scope .disabled\\:opacity-50:disabled{\n\n opacity: 0.5\n}\n\n.copilot-kit-textarea-css-scope .peer:disabled ~ .peer-disabled\\:cursor-not-allowed{\n\n cursor: not-allowed\n}\n\n.copilot-kit-textarea-css-scope .peer:disabled ~ .peer-disabled\\:opacity-70{\n\n opacity: 0.7\n}\n\n.copilot-kit-textarea-css-scope .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{\n\n pointer-events: none\n}\n\n.copilot-kit-textarea-css-scope .data-\\[disabled\\]\\:opacity-50[data-disabled]{\n\n opacity: 0.5\n}\n\n@media (prefers-reduced-motion: reduce){\n\n @keyframes spin{\n\n to{\n\n transform: rotate(360deg)\n }\n }\n\n .copilot-kit-textarea-css-scope .motion-reduce\\:animate-\\[spin_1\\.5s_linear_infinite\\]{\n\n animation: spin 1.5s linear infinite\n }\n}\n\n@media (min-width: 640px){\n\n .copilot-kit-textarea-css-scope .sm\\:flex-row{\n\n flex-direction: row\n }\n\n .copilot-kit-textarea-css-scope .sm\\:justify-end{\n\n justify-content: flex-end\n }\n\n .copilot-kit-textarea-css-scope .sm\\:space-x-2 > :not([hidden]) ~ :not([hidden]){\n\n --tw-space-x-reverse: 0;\n\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))\n }\n\n .copilot-kit-textarea-css-scope .sm\\:rounded-lg{\n\n border-radius: 0.5rem\n }\n\n .copilot-kit-textarea-css-scope .sm\\:text-left{\n\n text-align: left\n }\n}\n\n@media (min-width: 768px){\n\n .copilot-kit-textarea-css-scope .md\\:w-full{\n\n width: 100%\n }\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{\n\n padding-left: 0.5rem;\n\n padding-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{\n\n padding-top: 0.375rem;\n\n padding-bottom: 0.375rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{\n\n font-size: 0.75rem;\n\n line-height: 1rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{\n\n font-weight: 500\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden]) ~[cmdk-group]{\n\n padding-top: 0px\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{\n\n padding-left: 0.5rem;\n\n padding-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{\n\n height: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{\n\n width: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{\n\n height: 3rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{\n\n padding-left: 0.5rem;\n\n padding-right: 0.5rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{\n\n padding-top: 0.75rem;\n\n padding-bottom: 0.75rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{\n\n height: 1.25rem\n}\n\n.copilot-kit-textarea-css-scope .\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{\n\n width: 1.25rem\n}\n",".copilot-kit-textarea-css-scope .copilot-textarea.with-branding::after {\n content: ''; /* Initially empty because we overrdie this CSS dynamically and we want to avoid flashing */\n position: absolute;\n}\n \n \n.copilot-kit-textarea-css-scope .copilot-textarea.no-branding::after {\n content: '';\n}"],"mappings":";;;AAEA;AAEI;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAAA;AAIQ;AAAA;AAAA;AAIR;AAEI;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AEI;AAAA;AAIQ;AAAA;AAAA;AAIR;AAEI;AAAA;AAAA;AAIR;AAEI;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAEA;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAAA;AAIR;AAEI;AAEI;AAAA;AAAA;AAIR;AAEI;AAEA;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAEA;AAAA;AAGJ;AAEI;AAAA;AAGJ;AAEI;AAAA;;;AC5gCJ;AACI;AACA;AAAA;AAIJ;AACI;AAAA;","names":[]}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { BaseCopilotTextarea } from './components/base-copilot-textarea/base-cop
2
2
  export { CopilotTextarea, CopilotTextareaProps } from './components/copilot-textarea/copilot-textarea.js';
3
3
  export { BaseAutosuggestionsConfig, defaultBaseAutosuggestionsConfig } from './types/base/base-autosuggestions-config.js';
4
4
  export { AutosuggestionsBareFunction } from './types/base/autosuggestions-bare-function.js';
5
- export { BaseCopilotTextareaProps } from './types/base/base-copilot-textarea-props.js';
5
+ export { BaseCopilotTextareaProps } from './types/base/index.js';
6
6
  export { HTMLCopilotTextAreaElement } from './types/html-copilot-textarea-element.js';
7
7
  export { AutosuggestionsConfig, defaultAutosuggestionsConfig } from './types/autosuggestions-config/autosuggestions-config.js';
8
8
  export { MakeSystemPrompt } from './types/autosuggestions-config/subtypes/make-system-prompt.js';
package/dist/index.js CHANGED
@@ -522,78 +522,74 @@ function replaceEditorText(editor, newText) {
522
522
 
523
523
  // src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts
524
524
  function usePopulateCopilotTextareaRef(editor, ref) {
525
- import_react3.default.useImperativeHandle(
526
- ref,
527
- () => {
528
- class Combined {
529
- constructor(customMethods2, editorHtmlElement2) {
530
- this.customMethods = customMethods2;
531
- this.editorHtmlElement = editorHtmlElement2;
532
- }
533
- get(target, propKey) {
534
- if (this.isKeyOfCustomMethods(propKey)) {
535
- const value = this.customMethods[propKey];
536
- if (typeof value === "function") {
537
- return value.bind(this.customMethods);
538
- }
539
- return value;
540
- } else if (this.isKeyOfHTMLElement(propKey)) {
541
- const value = this.editorHtmlElement[propKey];
542
- if (typeof value === "function") {
543
- return value.bind(this.editorHtmlElement);
544
- }
545
- return value;
525
+ import_react3.default.useImperativeHandle(ref, () => {
526
+ class Combined {
527
+ constructor(customMethods2, editorHtmlElement2) {
528
+ this.customMethods = customMethods2;
529
+ this.editorHtmlElement = editorHtmlElement2;
530
+ }
531
+ get(target, propKey) {
532
+ if (this.isKeyOfCustomMethods(propKey)) {
533
+ const value = this.customMethods[propKey];
534
+ if (typeof value === "function") {
535
+ return value.bind(this.customMethods);
546
536
  }
547
- }
548
- set(target, propKey, value) {
549
- if (this.isKeyOfCustomMethods(propKey)) {
550
- this.customMethods[propKey] = value;
551
- } else if (this.isKeyOfHTMLElement(propKey)) {
552
- this.editorHtmlElement[propKey] = value;
553
- } else {
554
- target[propKey] = value;
537
+ return value;
538
+ } else if (this.isKeyOfHTMLElement(propKey)) {
539
+ const value = this.editorHtmlElement[propKey];
540
+ if (typeof value === "function") {
541
+ return value.bind(this.editorHtmlElement);
555
542
  }
556
- return true;
557
- }
558
- isKeyOfCustomMethods(key) {
559
- return key in this.customMethods;
560
- }
561
- isKeyOfHTMLElement(key) {
562
- return key in this.editorHtmlElement;
543
+ return value;
563
544
  }
564
545
  }
565
- const handler = {
566
- get(target, propKey) {
567
- return target.get(target, propKey);
568
- },
569
- set(target, propKey, value) {
570
- return target.set(target, propKey, value);
571
- }
572
- };
573
- class CustomMethods {
574
- constructor(editor2) {
575
- this.editor = editor2;
576
- }
577
- focus() {
578
- import_slate_react2.ReactEditor.focus(this.editor);
579
- }
580
- blur() {
581
- import_slate_react2.ReactEditor.blur(this.editor);
582
- }
583
- get value() {
584
- return getFullEditorTextWithNewlines(this.editor);
585
- }
586
- set value(value) {
587
- replaceEditorText(this.editor, value);
546
+ set(target, propKey, value) {
547
+ if (this.isKeyOfCustomMethods(propKey)) {
548
+ this.customMethods[propKey] = value;
549
+ } else if (this.isKeyOfHTMLElement(propKey)) {
550
+ this.editorHtmlElement[propKey] = value;
551
+ } else {
552
+ target[propKey] = value;
588
553
  }
554
+ return true;
589
555
  }
590
- const editorHtmlElement = import_slate_react2.ReactEditor.toDOMNode(editor, editor);
591
- const customMethods = new CustomMethods(editor);
592
- const combined = new Combined(customMethods, editorHtmlElement);
593
- return new Proxy(combined, handler);
594
- },
595
- [editor]
596
- );
556
+ isKeyOfCustomMethods(key) {
557
+ return key in this.customMethods;
558
+ }
559
+ isKeyOfHTMLElement(key) {
560
+ return key in this.editorHtmlElement;
561
+ }
562
+ }
563
+ const handler = {
564
+ get(target, propKey) {
565
+ return target.get(target, propKey);
566
+ },
567
+ set(target, propKey, value) {
568
+ return target.set(target, propKey, value);
569
+ }
570
+ };
571
+ class CustomMethods {
572
+ constructor(editor2) {
573
+ this.editor = editor2;
574
+ }
575
+ focus() {
576
+ import_slate_react2.ReactEditor.focus(this.editor);
577
+ }
578
+ blur() {
579
+ import_slate_react2.ReactEditor.blur(this.editor);
580
+ }
581
+ get value() {
582
+ return getFullEditorTextWithNewlines(this.editor);
583
+ }
584
+ set value(value) {
585
+ replaceEditorText(this.editor, value);
586
+ }
587
+ }
588
+ const editorHtmlElement = import_slate_react2.ReactEditor.toDOMNode(editor, editor);
589
+ const customMethods = new CustomMethods(editor);
590
+ const combined = new Combined(customMethods, editorHtmlElement);
591
+ return new Proxy(combined, handler);
592
+ }, [editor]);
597
593
  }
598
594
 
599
595
  // src/lib/slatejs-edits/add-autocompletions.ts
@@ -846,6 +842,9 @@ function Logo({
846
842
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", style: { width, height }, children });
847
843
  }
848
844
 
845
+ // src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx
846
+ var import_react_core2 = require("@copilotkit/react-core");
847
+
849
848
  // src/components/ui/button.tsx
850
849
  var React3 = __toESM(require("react"));
851
850
  var import_react_slot = require("@radix-ui/react-slot");
@@ -926,9 +925,6 @@ function streamPromiseFlatten(promise) {
926
925
  });
927
926
  }
928
927
 
929
- // src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx
930
- var import_react_core2 = require("@copilotkit/react-core");
931
-
932
928
  // src/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.tsx
933
929
  var import_Chip = __toESM(require("@mui/material/Chip/Chip.js"));
934
930
  var import_Avatar = __toESM(require("@mui/material/Avatar/Avatar.js"));
@@ -993,7 +989,7 @@ var HoveringInsertionPromptBoxCore = ({
993
989
  insertionOrEditingFunction,
994
990
  contextCategories
995
991
  }) => {
996
- const { getDocumentsContext } = (0, import_react7.useContext)(import_react_core2.CopilotContext);
992
+ const { getDocumentsContext } = (0, import_react_core2.useCopilotContext)();
997
993
  const [editSuggestion, setEditSuggestion] = (0, import_react7.useState)("");
998
994
  const [suggestionIsLoading, setSuggestionIsLoading] = (0, import_react7.useState)(false);
999
995
  const [adjustmentPrompt, setAdjustmentPrompt] = (0, import_react7.useState)("");
@@ -1818,7 +1814,7 @@ function retry(fn, retriesLeft = 2, interval = 200, backoff = 1.5) {
1818
1814
  // src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx
1819
1815
  var import_runtime_client_gql = require("@copilotkit/runtime-client-gql");
1820
1816
  function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategories, apiConfig) {
1821
- const { getContextString, copilotApiConfig } = (0, import_react13.useContext)(import_react_core3.CopilotContext);
1817
+ const { getContextString, copilotApiConfig } = (0, import_react_core3.useCopilotContext)();
1822
1818
  const { chatApiEndpoint: url, publicApiKey, credentials, properties } = copilotApiConfig;
1823
1819
  const headers = __spreadValues(__spreadValues({}, copilotApiConfig.headers), publicApiKey ? { [import_shared.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
1824
1820
  const { maxTokens, stop } = apiConfig;
@@ -1857,7 +1853,8 @@ function useMakeStandardAutosuggestionFunction(textareaPurpose, contextCategorie
1857
1853
  const response = yield runtimeClient.generateCopilotResponse({
1858
1854
  data: {
1859
1855
  frontend: {
1860
- actions: []
1856
+ actions: [],
1857
+ url: window.location.href
1861
1858
  },
1862
1859
  messages: (0, import_runtime_client_gql.convertMessagesToGqlInput)(messages),
1863
1860
  metadata: {
@@ -2110,7 +2107,7 @@ var import_react_core5 = require("@copilotkit/react-core");
2110
2107
  var import_react14 = require("react");
2111
2108
  var import_runtime_client_gql5 = require("@copilotkit/runtime-client-gql");
2112
2109
  function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCategories, insertionApiConfig, editingApiConfig) {
2113
- const { getContextString, copilotApiConfig } = (0, import_react14.useContext)(import_react_core5.CopilotContext);
2110
+ const { getContextString, copilotApiConfig } = (0, import_react_core5.useCopilotContext)();
2114
2111
  const headers = __spreadValues({}, copilotApiConfig.publicApiKey ? { [import_shared2.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey } : {});
2115
2112
  const runtimeClient = new import_runtime_client_gql5.CopilotRuntimeClient({
2116
2113
  url: copilotApiConfig.chatApiEndpoint,
@@ -2179,7 +2176,8 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
2179
2176
  runtimeClient.generateCopilotResponse({
2180
2177
  data: {
2181
2178
  frontend: {
2182
- actions: []
2179
+ actions: [],
2180
+ url: window.location.href
2183
2181
  },
2184
2182
  messages: (0, import_runtime_client_gql5.convertMessagesToGqlInput)(messages),
2185
2183
  metadata: {
@@ -2234,7 +2232,8 @@ function useMakeStandardInsertionOrEditingFunction(textareaPurpose, contextCateg
2234
2232
  runtimeClient2.generateCopilotResponse({
2235
2233
  data: {
2236
2234
  frontend: {
2237
- actions: []
2235
+ actions: [],
2236
+ url: window.location.href
2238
2237
  },
2239
2238
  messages: (0, import_runtime_client_gql5.convertMessagesToGqlInput)(messages),
2240
2239
  metadata: {