@copilotkit/react-textarea 0.19.0-alpha.8 → 0.19.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 (287) hide show
  1. package/.turbo/turbo-build.log +298 -299
  2. package/CHANGELOG.md +39 -0
  3. package/dist/chunk-2NURR2DX.mjs +47 -0
  4. package/dist/chunk-2NURR2DX.mjs.map +1 -0
  5. package/dist/chunk-3TK2VELX.mjs +202 -0
  6. package/dist/chunk-3TK2VELX.mjs.map +1 -0
  7. package/dist/chunk-47JRPWI3.mjs +257 -0
  8. package/dist/chunk-47JRPWI3.mjs.map +1 -0
  9. package/dist/chunk-4S5ZJH3I.mjs +18 -0
  10. package/dist/chunk-4S5ZJH3I.mjs.map +1 -0
  11. package/dist/chunk-5EJ5XOGP.mjs +22 -0
  12. package/dist/chunk-5EJ5XOGP.mjs.map +1 -0
  13. package/dist/chunk-5FO6ISW4.mjs +3 -0
  14. package/dist/chunk-5FO6ISW4.mjs.map +1 -0
  15. package/dist/chunk-66BDXIX4.mjs +76 -0
  16. package/dist/chunk-66BDXIX4.mjs.map +1 -0
  17. package/dist/chunk-7QWJ3OV7.mjs +108 -0
  18. package/dist/chunk-7QWJ3OV7.mjs.map +1 -0
  19. package/dist/chunk-BBKDE7YT.mjs +19 -0
  20. package/dist/chunk-BBKDE7YT.mjs.map +1 -0
  21. package/dist/chunk-CSGFJU3L.mjs +65 -0
  22. package/dist/chunk-CSGFJU3L.mjs.map +1 -0
  23. package/dist/chunk-DE5K76I2.mjs +3 -0
  24. package/dist/chunk-DE5K76I2.mjs.map +1 -0
  25. package/dist/chunk-F3MHL6ZY.mjs +25 -0
  26. package/dist/chunk-F3MHL6ZY.mjs.map +1 -0
  27. package/dist/chunk-FN7GDKKG.mjs +29 -0
  28. package/dist/chunk-FN7GDKKG.mjs.map +1 -0
  29. package/dist/chunk-H4VKQGVU.mjs +3 -0
  30. package/dist/chunk-H4VKQGVU.mjs.map +1 -0
  31. package/dist/chunk-HRTFMM7P.mjs +82 -0
  32. package/dist/chunk-HRTFMM7P.mjs.map +1 -0
  33. package/dist/chunk-IU3WTXLQ.mjs +3 -0
  34. package/dist/chunk-IU3WTXLQ.mjs.map +1 -0
  35. package/dist/chunk-IXJ2HCOA.mjs +101 -0
  36. package/dist/chunk-IXJ2HCOA.mjs.map +1 -0
  37. package/dist/chunk-JAFCXEPU.mjs +10 -0
  38. package/dist/chunk-JAFCXEPU.mjs.map +1 -0
  39. package/dist/chunk-JHTAOLEW.mjs +63 -0
  40. package/dist/chunk-JHTAOLEW.mjs.map +1 -0
  41. package/dist/chunk-K2AVA67P.mjs +57 -0
  42. package/dist/chunk-K2AVA67P.mjs.map +1 -0
  43. package/dist/chunk-KCHYD3EB.mjs +107 -0
  44. package/dist/chunk-KCHYD3EB.mjs.map +1 -0
  45. package/dist/chunk-KGKLUWKW.mjs +47 -0
  46. package/dist/chunk-KGKLUWKW.mjs.map +1 -0
  47. package/dist/chunk-KIRROE2K.mjs +37 -0
  48. package/dist/chunk-KIRROE2K.mjs.map +1 -0
  49. package/dist/chunk-L6DZHWEL.mjs +76 -0
  50. package/dist/chunk-L6DZHWEL.mjs.map +1 -0
  51. package/dist/chunk-L7VVZH4Q.mjs +3 -0
  52. package/dist/chunk-L7VVZH4Q.mjs.map +1 -0
  53. package/dist/chunk-LNAIMEB2.mjs +34 -0
  54. package/dist/chunk-LNAIMEB2.mjs.map +1 -0
  55. package/dist/chunk-MMVDU6DF.mjs +3 -0
  56. package/dist/chunk-MMVDU6DF.mjs.map +1 -0
  57. package/dist/chunk-MPME5BW2.mjs +59 -0
  58. package/dist/chunk-MPME5BW2.mjs.map +1 -0
  59. package/dist/chunk-MRXNTQOX.mjs +55 -0
  60. package/dist/chunk-MRXNTQOX.mjs.map +1 -0
  61. package/dist/chunk-ND5PXTAW.mjs +17 -0
  62. package/dist/chunk-ND5PXTAW.mjs.map +1 -0
  63. package/dist/chunk-NKW5OU2S.mjs +33 -0
  64. package/dist/chunk-NKW5OU2S.mjs.map +1 -0
  65. package/dist/chunk-O5OWT5GE.mjs +114 -0
  66. package/dist/chunk-O5OWT5GE.mjs.map +1 -0
  67. package/dist/chunk-OD7ZMOVE.mjs +45 -0
  68. package/dist/chunk-OD7ZMOVE.mjs.map +1 -0
  69. package/dist/chunk-OELUUJZY.mjs +16 -0
  70. package/dist/chunk-OELUUJZY.mjs.map +1 -0
  71. package/dist/chunk-OXPXFYUG.mjs +111 -0
  72. package/dist/chunk-OXPXFYUG.mjs.map +1 -0
  73. package/dist/chunk-QNJ6MXJ2.mjs +21 -0
  74. package/dist/chunk-QNJ6MXJ2.mjs.map +1 -0
  75. package/dist/chunk-RDHPSSHJ.mjs +44 -0
  76. package/dist/chunk-RDHPSSHJ.mjs.map +1 -0
  77. package/dist/chunk-RQHOUUXQ.mjs +29 -0
  78. package/dist/chunk-RQHOUUXQ.mjs.map +1 -0
  79. package/dist/chunk-S6JUGJK2.mjs +13 -0
  80. package/dist/chunk-S6JUGJK2.mjs.map +1 -0
  81. package/dist/chunk-UHD44NC5.mjs +101 -0
  82. package/dist/chunk-UHD44NC5.mjs.map +1 -0
  83. package/dist/chunk-WADHCMPK.mjs +3 -0
  84. package/dist/chunk-WADHCMPK.mjs.map +1 -0
  85. package/dist/chunk-WJHSY5T6.mjs +3 -0
  86. package/dist/chunk-WJHSY5T6.mjs.map +1 -0
  87. package/dist/chunk-WJYQWL4I.mjs +27 -0
  88. package/dist/chunk-WJYQWL4I.mjs.map +1 -0
  89. package/dist/chunk-XA7M72ZO.mjs +106 -0
  90. package/dist/chunk-XA7M72ZO.mjs.map +1 -0
  91. package/dist/chunk-XHUMROEY.mjs +91 -0
  92. package/dist/chunk-XHUMROEY.mjs.map +1 -0
  93. package/dist/chunk-YQU7WG7T.mjs +83 -0
  94. package/dist/chunk-YQU7WG7T.mjs.map +1 -0
  95. package/dist/chunk-YTOPHPSG.mjs +45 -0
  96. package/dist/chunk-YTOPHPSG.mjs.map +1 -0
  97. package/dist/chunk-YW3REYX6.mjs +23 -0
  98. package/dist/chunk-YW3REYX6.mjs.map +1 -0
  99. package/dist/components/base-copilot-textarea/base-copilot-textarea.d.ts +13 -0
  100. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +34 -1910
  101. package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs.map +1 -1
  102. package/dist/components/base-copilot-textarea/render-element.d.ts +6 -0
  103. package/dist/components/base-copilot-textarea/render-element.mjs +3 -52
  104. package/dist/components/base-copilot-textarea/render-element.mjs.map +1 -1
  105. package/dist/components/base-copilot-textarea/render-placeholder.d.ts +6 -0
  106. package/dist/components/base-copilot-textarea/render-placeholder.mjs +3 -46
  107. package/dist/components/base-copilot-textarea/render-placeholder.mjs.map +1 -1
  108. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.d.ts +6 -0
  109. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +4 -86
  110. package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs.map +1 -1
  111. package/dist/components/base-copilot-textarea/use-add-branding-css.d.ts +3 -0
  112. package/dist/components/base-copilot-textarea/use-add-branding-css.mjs +3 -57
  113. package/dist/components/base-copilot-textarea/use-add-branding-css.mjs.map +1 -1
  114. package/dist/components/copilot-textarea/copilot-textarea.d.ts +19 -0
  115. package/dist/components/copilot-textarea/copilot-textarea.mjs +46 -2378
  116. package/dist/components/copilot-textarea/copilot-textarea.mjs.map +1 -1
  117. package/dist/components/hovering-toolbar/hovering-editor-provider.d.ts +13 -0
  118. package/dist/components/hovering-toolbar/hovering-editor-provider.mjs +3 -22
  119. package/dist/components/hovering-toolbar/hovering-editor-provider.mjs.map +1 -1
  120. package/dist/components/hovering-toolbar/hovering-toolbar-components.d.ts +18 -0
  121. package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +3 -125
  122. package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs.map +1 -1
  123. package/dist/components/hovering-toolbar/hovering-toolbar.d.ts +9 -0
  124. package/dist/components/hovering-toolbar/hovering-toolbar.mjs +17 -1055
  125. package/dist/components/hovering-toolbar/hovering-toolbar.mjs.map +1 -1
  126. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.d.ts +26 -0
  127. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +11 -761
  128. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs.map +1 -1
  129. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.d.ts +13 -0
  130. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +12 -774
  131. package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs.map +1 -1
  132. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.d.ts +3 -0
  133. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +13 -774
  134. package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs.map +1 -1
  135. package/dist/components/index.d.ts +14 -0
  136. package/dist/components/index.mjs +47 -2379
  137. package/dist/components/index.mjs.map +1 -1
  138. package/dist/components/manual-ui/chip-with-icon.d.ts +10 -0
  139. package/dist/components/manual-ui/chip-with-icon.mjs +6 -5
  140. package/dist/components/manual-ui/chip-with-icon.mjs.map +1 -1
  141. package/dist/components/source-search-box/source-search-box.d.ts +14 -0
  142. package/dist/components/source-search-box/source-search-box.mjs +6 -356
  143. package/dist/components/source-search-box/source-search-box.mjs.map +1 -1
  144. package/dist/components/ui/button.d.ts +14 -0
  145. package/dist/components/ui/button.mjs +4 -88
  146. package/dist/components/ui/button.mjs.map +1 -1
  147. package/dist/components/ui/card.d.ts +10 -0
  148. package/dist/components/ui/card.mjs +7 -53
  149. package/dist/components/ui/card.mjs.map +1 -1
  150. package/dist/components/ui/command.d.ts +48 -0
  151. package/dist/components/ui/command.mjs +5 -266
  152. package/dist/components/ui/command.mjs.map +1 -1
  153. package/dist/components/ui/dialog.d.ts +18 -0
  154. package/dist/components/ui/dialog.mjs +4 -164
  155. package/dist/components/ui/dialog.mjs.map +1 -1
  156. package/dist/components/ui/label.d.ts +8 -0
  157. package/dist/components/ui/label.mjs +4 -63
  158. package/dist/components/ui/label.mjs.map +1 -1
  159. package/dist/components/ui/separator.d.ts +6 -0
  160. package/dist/components/ui/separator.mjs +8 -50
  161. package/dist/components/ui/separator.mjs.map +1 -1
  162. package/dist/components/ui/textarea.d.ts +7 -0
  163. package/dist/components/ui/textarea.mjs +7 -48
  164. package/dist/components/ui/textarea.mjs.map +1 -1
  165. package/dist/context/index.d.ts +1 -0
  166. package/dist/context/index.mjs +2 -0
  167. package/dist/context/index.mjs.map +1 -1
  168. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.d.ts +13 -0
  169. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs +6 -168
  170. package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs.map +1 -1
  171. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.d.ts +8 -0
  172. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs +4 -168
  173. package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs.map +1 -1
  174. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.d.ts +7 -0
  175. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +5 -155
  176. package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs.map +1 -1
  177. package/dist/hooks/index.d.ts +1 -0
  178. package/dist/hooks/index.mjs +2 -0
  179. package/dist/hooks/index.mjs.map +1 -1
  180. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.d.ts +21 -0
  181. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +14 -145
  182. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs.map +1 -1
  183. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.d.ts +22 -0
  184. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +14 -199
  185. package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs.map +1 -1
  186. package/dist/hooks/misc/use-autosize-textarea.d.ts +5 -0
  187. package/dist/hooks/misc/use-autosize-textarea.mjs +3 -15
  188. package/dist/hooks/misc/use-autosize-textarea.mjs.map +1 -1
  189. package/dist/index.css +4 -18
  190. package/dist/index.css.map +1 -1
  191. package/dist/index.d.ts +16 -0
  192. package/dist/index.mjs +49 -2382
  193. package/dist/index.mjs.map +1 -1
  194. package/dist/lib/debouncer.d.ts +11 -0
  195. package/dist/lib/debouncer.mjs +3 -51
  196. package/dist/lib/debouncer.mjs.map +1 -1
  197. package/dist/lib/editor-to-text.d.ts +7 -0
  198. package/dist/lib/editor-to-text.mjs +3 -43
  199. package/dist/lib/editor-to-text.mjs.map +1 -1
  200. package/dist/lib/get-text-around-cursor.d.ts +15 -0
  201. package/dist/lib/get-text-around-cursor.mjs +3 -109
  202. package/dist/lib/get-text-around-cursor.mjs.map +1 -1
  203. package/dist/lib/retry.d.ts +3 -0
  204. package/dist/lib/retry.mjs +3 -17
  205. package/dist/lib/retry.mjs.map +1 -1
  206. package/dist/lib/slatejs-edits/add-autocompletions.d.ts +8 -0
  207. package/dist/lib/slatejs-edits/add-autocompletions.mjs +3 -25
  208. package/dist/lib/slatejs-edits/add-autocompletions.mjs.map +1 -1
  209. package/dist/lib/slatejs-edits/clear-autocompletions.d.ts +8 -0
  210. package/dist/lib/slatejs-edits/clear-autocompletions.mjs +3 -23
  211. package/dist/lib/slatejs-edits/clear-autocompletions.mjs.map +1 -1
  212. package/dist/lib/slatejs-edits/replace-text.d.ts +5 -0
  213. package/dist/lib/slatejs-edits/replace-text.mjs +3 -27
  214. package/dist/lib/slatejs-edits/replace-text.mjs.map +1 -1
  215. package/dist/lib/slatejs-edits/with-partial-history.d.ts +10 -0
  216. package/dist/lib/slatejs-edits/with-partial-history.mjs +3 -106
  217. package/dist/lib/slatejs-edits/with-partial-history.mjs.map +1 -1
  218. package/dist/lib/stream-promise-flatten.d.ts +3 -0
  219. package/dist/lib/stream-promise-flatten.mjs +3 -47
  220. package/dist/lib/stream-promise-flatten.mjs.map +1 -1
  221. package/dist/lib/utils.d.ts +10 -0
  222. package/dist/lib/utils.mjs +3 -71
  223. package/dist/lib/utils.mjs.map +1 -1
  224. package/dist/lib/utils.test.d.ts +1 -0
  225. package/dist/lib/utils.test.mjs +1 -0
  226. package/dist/lib/utils.test.mjs.map +1 -1
  227. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.d.ts +22 -0
  228. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs +2 -0
  229. package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs.map +1 -1
  230. package/dist/types/autosuggestions-config/autosuggestions-config.d.ts +19 -0
  231. package/dist/types/autosuggestions-config/autosuggestions-config.mjs +8 -253
  232. package/dist/types/autosuggestions-config/autosuggestions-config.mjs.map +1 -1
  233. package/dist/types/autosuggestions-config/editing-api-config.d.ts +15 -0
  234. package/dist/types/autosuggestions-config/editing-api-config.mjs +3 -83
  235. package/dist/types/autosuggestions-config/editing-api-config.mjs.map +1 -1
  236. package/dist/types/autosuggestions-config/index.d.ts +11 -0
  237. package/dist/types/autosuggestions-config/index.mjs +10 -309
  238. package/dist/types/autosuggestions-config/index.mjs.map +1 -1
  239. package/dist/types/autosuggestions-config/insertions-api-config.d.ts +15 -0
  240. package/dist/types/autosuggestions-config/insertions-api-config.mjs +3 -77
  241. package/dist/types/autosuggestions-config/insertions-api-config.mjs.map +1 -1
  242. package/dist/types/autosuggestions-config/subtypes/chatlike-api-endpoint.d.ts +27 -0
  243. package/dist/types/autosuggestions-config/subtypes/chatlike-api-endpoint.mjs +3 -77
  244. package/dist/types/autosuggestions-config/subtypes/chatlike-api-endpoint.mjs.map +1 -1
  245. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.d.ts +3 -0
  246. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs +2 -0
  247. package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs.map +1 -1
  248. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.d.ts +7 -0
  249. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.mjs +2 -0
  250. package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.mjs.map +1 -1
  251. package/dist/types/autosuggestions-config/suggestions-api-config.d.ts +15 -0
  252. package/dist/types/autosuggestions-config/suggestions-api-config.mjs +3 -64
  253. package/dist/types/autosuggestions-config/suggestions-api-config.mjs.map +1 -1
  254. package/dist/types/base/autosuggestion-state.d.ts +8 -0
  255. package/dist/types/base/autosuggestion-state.mjs +2 -0
  256. package/dist/types/base/autosuggestion-state.mjs.map +1 -1
  257. package/dist/types/base/autosuggestions-bare-function.d.ts +17 -0
  258. package/dist/types/base/autosuggestions-bare-function.mjs +2 -0
  259. package/dist/types/base/autosuggestions-bare-function.mjs.map +1 -1
  260. package/dist/types/base/base-autosuggestions-config.d.ts +15 -0
  261. package/dist/types/base/base-autosuggestions-config.mjs +3 -11
  262. package/dist/types/base/base-autosuggestions-config.mjs.map +1 -1
  263. package/dist/types/base/base-copilot-textarea-props.d.ts +40 -0
  264. package/dist/types/base/base-copilot-textarea-props.mjs +2 -0
  265. package/dist/types/base/base-copilot-textarea-props.mjs.map +1 -1
  266. package/dist/types/base/custom-editor.d.ts +29 -0
  267. package/dist/types/base/custom-editor.mjs +2 -0
  268. package/dist/types/base/custom-editor.mjs.map +1 -1
  269. package/dist/types/base/editor-autocomplete-state.d.ts +10 -0
  270. package/dist/types/base/editor-autocomplete-state.mjs +4 -17
  271. package/dist/types/base/editor-autocomplete-state.mjs.map +1 -1
  272. package/dist/types/base/index.d.ts +4 -0
  273. package/dist/types/base/index.mjs +4 -11
  274. package/dist/types/base/index.mjs.map +1 -1
  275. package/dist/types/html-copilot-textarea-element.d.ts +7 -0
  276. package/dist/types/html-copilot-textarea-element.mjs +2 -0
  277. package/dist/types/html-copilot-textarea-element.mjs.map +1 -1
  278. package/dist/types/index.d.ts +14 -0
  279. package/dist/types/index.mjs +12 -310
  280. package/dist/types/index.mjs.map +1 -1
  281. package/package.json +4 -4
  282. package/src/components/base-copilot-textarea/base-copilot-textarea.tsx +4 -1
  283. package/src/components/hovering-toolbar/hovering-toolbar.tsx +2 -0
  284. package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx +26 -152
  285. package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.tsx +2 -0
  286. package/src/components/source-search-box/source-search-box.tsx +13 -17
  287. package/src/types/base/base-autosuggestions-config.tsx +2 -0
@@ -0,0 +1,19 @@
1
+ import { BaseAutosuggestionsConfig } from '../base/base-autosuggestions-config.js';
2
+ import { SuggestionsApiConfig } from './suggestions-api-config.js';
3
+ import { InsertionsApiConfig } from './insertions-api-config.js';
4
+ import { EditingApiConfig } from './editing-api-config.js';
5
+ import '../base/autosuggestions-bare-function.js';
6
+ import './subtypes/minimal-chat-gpt-message.js';
7
+ import './subtypes/make-system-prompt.js';
8
+
9
+ interface AutosuggestionsConfig extends Omit<BaseAutosuggestionsConfig, "apiConfig"> {
10
+ externalContextCategories: string[] | undefined;
11
+ chatApiConfigs: {
12
+ suggestionsApiConfig: SuggestionsApiConfig;
13
+ insertionApiConfig: InsertionsApiConfig;
14
+ editingApiConfig: EditingApiConfig;
15
+ };
16
+ }
17
+ declare const defaultAutosuggestionsConfig: Omit<AutosuggestionsConfig, "textareaPurpose" | "apiEndpoint">;
18
+
19
+ export { AutosuggestionsConfig, defaultAutosuggestionsConfig };
@@ -1,254 +1,9 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
-
21
- // src/types/base/base-autosuggestions-config.tsx
22
- var defaultBaseAutosuggestionsConfig = {
23
- debounceTime: 250,
24
- acceptAutosuggestionKey: "Tab",
25
- disableWhenEmpty: true,
26
- disabled: false,
27
- temporarilyDisableWhenMovingCursorWithoutChangingText: true
28
- };
29
-
30
- // src/types/autosuggestions-config/suggestions-api-config.tsx
31
- var defaultSuggestionsMakeSystemPrompt = (textareaPurpose, contextString) => {
32
- return `You are a versatile writing assistant.
33
-
34
- The user is writing some text.
35
- The purpose is: "${textareaPurpose}"
36
-
37
- Your job is to guess what the user will write next AS BEST YOU CAN.
38
- Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
39
-
40
- Adjust yourself to the user's style and implied intent.
41
-
42
- The user will provide both the text before and after the cursor. You should use this to infer what the user is likely to write next.
43
- <TextAfterCursor>
44
- <TextBeforeCursor>
45
- <YourSuggestion>
46
-
47
- If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
48
-
49
- The following external context is also provided. Use it to help you make better suggestions!!!
50
- \`\`\`
51
- ${contextString}
52
- \`\`\`
53
- `;
54
- };
55
- var defaultSuggestionsFewShotMessages = [
56
- {
57
- role: "user",
58
- name: "TextAfterCursor",
59
- content: "While I was there I also picked up some apples, oranges, and bananas."
60
- },
61
- {
62
- role: "user",
63
- content: "This morning I woke up and went straight to the grocery store."
64
- },
65
- {
66
- role: "assistant",
67
- content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
68
- },
69
- {
70
- role: "user",
71
- name: "TextAfterCursor",
72
- content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
73
- },
74
- {
75
- role: "user",
76
- name: "TextBeforeCursor",
77
- content: `The Optionholder, in the Optionholder's capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an "Equityholder" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an "Equityholder" thereunder;`
78
- },
79
- {
80
- role: "assistant",
81
- content: ` (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder's "Pro Rata Share"; `
82
- }
83
- ];
84
- var defaultSuggestionsApiConfig = {
85
- makeSystemPrompt: defaultSuggestionsMakeSystemPrompt,
86
- fewShotMessages: defaultSuggestionsFewShotMessages,
87
- forwardedParams: void 0
88
- };
89
-
90
- // src/types/autosuggestions-config/insertions-api-config.tsx
91
- var defaultInsertionsMakeSystemPrompt = (textareaPurpose, contextString) => {
92
- return `You are a versatile writing assistant.
93
-
94
- The user is writing some text.
95
- The purpose is: "${textareaPurpose}"
96
-
97
- The user also provides you with a prompt for INSERTIONS into the text they are writing.
98
- Your job is to come up with an INSERTION into the text that the user would like AS BEST YOU CAN.
99
- Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
100
-
101
- Adjust yourself to the user's style and implied intent.
102
-
103
- The user will provide the text before and after the cursor, as well as the insertion prompt. You should use this to infer the best relevant insertion.
104
- <TextAfterCursor>
105
- <TextBeforeCursor>
106
- <InsertionPrompt>
107
- <YourSuggestion>
108
-
109
- If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
110
-
111
- The following external context is also provided. Use it to help you make better suggestions!!!
112
- \`\`\`
113
- ${contextString}
114
- \`\`\`
115
- `;
116
- };
117
- var defaultInsertionsFewShotMessages = [
118
- {
119
- role: "user",
120
- name: "TextAfterCursor",
121
- content: "While I was there I also picked up some apples, oranges, and bananas."
122
- },
123
- {
124
- role: "user",
125
- name: "TextBeforeCursor",
126
- content: "This morning I woke up and went straight to the grocery store."
127
- },
128
- {
129
- role: "user",
130
- name: "InsertionPrompt",
131
- content: "I bought a big watermelon"
132
- },
133
- {
134
- role: "assistant",
135
- content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
136
- },
137
- {
138
- role: "user",
139
- name: "TextAfterCursor",
140
- content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
141
- },
142
- {
143
- role: "user",
144
- name: "TextBeforeCursor",
145
- content: `The Optionholder, in the Optionholder's capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an "Equityholder" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an "Equityholder" thereunder;`
146
- },
147
- {
148
- role: "user",
149
- name: "InsertionPrompt",
150
- content: "add section about the optionholder's pro rata share"
151
- },
152
- {
153
- role: "assistant",
154
- content: ` (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder's "Pro Rata Share"; `
155
- }
156
- ];
157
- var defaultInsertionsApiConfig = {
158
- makeSystemPrompt: defaultInsertionsMakeSystemPrompt,
159
- fewShotMessages: defaultInsertionsFewShotMessages,
160
- forwardedParams: void 0
161
- };
162
-
163
- // src/types/autosuggestions-config/editing-api-config.tsx
164
- var defaultEditingMakeSystemPrompt = (textareaPurpose, contextString) => {
165
- return `You are a versatile writing assistant.
166
-
167
- The user is writing some text.
168
- The purpose is: "${textareaPurpose}"
169
-
170
- The user also provides you with a prompt for EDITING some text they are writing.
171
- Your job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.
172
-
173
- Adjust yourself to the user's style and implied intent.
174
-
175
- The user will provide the following information; use this to infer the best relevant EDIT:
176
- <TextBeforeCursor>
177
- <TextToEdit>
178
- <TextAfterCursor>
179
- <EditingPrompt>
180
-
181
- <YourEditSuggestion>
182
-
183
- If we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.
184
-
185
- The following external context is also provided. Use it to help you make better suggestions!!!
186
- \`\`\`
187
- ${contextString}
188
- \`\`\`
189
- `;
190
- };
191
- var defaultEditingFewShotMessages = [
192
- {
193
- role: "user",
194
- name: "TextBeforeCursor",
195
- content: "This morning I woke up and went straight to the grocery store. "
196
- },
197
- {
198
- role: "user",
199
- name: "TextToEdit",
200
- content: "While I was there I also picked up some apples, oranges, and bananas. "
201
- },
202
- {
203
- role: "user",
204
- name: "TextAfterCursor",
205
- content: "The grocery store was having a sale on fruit, so I decided to stock up."
206
- },
207
- {
208
- role: "user",
209
- name: "EditingPrompt",
210
- content: "I bought a big watermelon"
211
- },
212
- {
213
- role: "assistant",
214
- content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
215
- },
216
- {
217
- role: "user",
218
- name: "TextAfterCursor",
219
- content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
220
- },
221
- {
222
- role: "user",
223
- name: "TextBeforeCursor",
224
- content: `The Optionholder, in the Optionholder's capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an "Equityholder" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an "Equityholder" thereunder;`
225
- },
226
- {
227
- role: "user",
228
- name: "InsertionPrompt",
229
- content: "add section about the optionholder's pro rata share"
230
- },
231
- {
232
- role: "assistant",
233
- content: ` (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder's "Pro Rata Share"; `
234
- }
235
- ];
236
- var defaultEditingApiConfig = {
237
- makeSystemPrompt: defaultEditingMakeSystemPrompt,
238
- fewShotMessages: defaultEditingFewShotMessages,
239
- forwardedParams: void 0
240
- };
241
-
242
- // src/types/autosuggestions-config/autosuggestions-config.tsx
243
- var defaultAutosuggestionsConfig = __spreadProps(__spreadValues({}, defaultBaseAutosuggestionsConfig), {
244
- externalContextCategories: void 0,
245
- chatApiConfigs: {
246
- suggestionsApiConfig: defaultSuggestionsApiConfig,
247
- insertionApiConfig: defaultInsertionsApiConfig,
248
- editingApiConfig: defaultEditingApiConfig
249
- }
250
- });
251
- export {
252
- defaultAutosuggestionsConfig
253
- };
1
+ export { defaultAutosuggestionsConfig } from '../../chunk-BBKDE7YT.mjs';
2
+ import '../../chunk-HRTFMM7P.mjs';
3
+ import '../../chunk-66BDXIX4.mjs';
4
+ import '../../chunk-JHTAOLEW.mjs';
5
+ import '../../chunk-WJHSY5T6.mjs';
6
+ import '../../chunk-S6JUGJK2.mjs';
7
+ import '../../chunk-MRXNTQOX.mjs';
8
+ //# sourceMappingURL=out.js.map
254
9
  //# sourceMappingURL=autosuggestions-config.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/base/base-autosuggestions-config.tsx","../../../src/types/autosuggestions-config/suggestions-api-config.tsx","../../../src/types/autosuggestions-config/insertions-api-config.tsx","../../../src/types/autosuggestions-config/editing-api-config.tsx","../../../src/types/autosuggestions-config/autosuggestions-config.tsx"],"sourcesContent":["import { BaseCopilotTextareaApiConfig } from \"./autosuggestions-bare-function\";\n\nexport interface BaseAutosuggestionsConfig {\n textareaPurpose: string;\n debounceTime: number;\n acceptAutosuggestionKey: string;\n disableWhenEmpty: boolean;\n disabled: boolean;\n temporarilyDisableWhenMovingCursorWithoutChangingText: boolean;\n apiConfig: BaseCopilotTextareaApiConfig;\n}\n\nexport const defaultBaseAutosuggestionsConfig: Omit<\n BaseAutosuggestionsConfig,\n \"textareaPurpose\" | \"apiConfig\"\n> = {\n debounceTime: 250,\n acceptAutosuggestionKey: \"Tab\",\n disableWhenEmpty: true,\n disabled: false,\n temporarilyDisableWhenMovingCursorWithoutChangingText: true,\n};\n","import { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\n\nexport interface SuggestionsApiConfig {\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultSuggestionsMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nYour job is to guess what the user will write next AS BEST YOU CAN.\nOnly guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide both the text before and after the cursor. You should use this to infer what the user is likely to write next.\n<TextAfterCursor>\n<TextBeforeCursor>\n<YourSuggestion>\n\nIf we need to add a whitespace character to the suggested text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultSuggestionsFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas.\",\n },\n {\n role: \"user\",\n content: \"This morning I woke up and went straight to the grocery store.\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultSuggestionsApiConfig: SuggestionsApiConfig = {\n makeSystemPrompt: defaultSuggestionsMakeSystemPrompt,\n fewShotMessages: defaultSuggestionsFewShotMessages,\n forwardedParams: undefined,\n};\n","import { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\n\nexport interface InsertionsApiConfig {\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultInsertionsMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe user also provides you with a prompt for INSERTIONS into the text they are writing. \nYour job is to come up with an INSERTION into the text that the user would like AS BEST YOU CAN.\nOnly guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide the text before and after the cursor, as well as the insertion prompt. You should use this to infer the best relevant insertion.\n<TextAfterCursor>\n<TextBeforeCursor>\n<InsertionPrompt>\n<YourSuggestion>\n\nIf we need to add a whitespace character to the suggested text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultInsertionsFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: \"This morning I woke up and went straight to the grocery store.\",\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"I bought a big watermelon\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"add section about the optionholder's pro rata share\",\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultInsertionsApiConfig: InsertionsApiConfig = {\n makeSystemPrompt: defaultInsertionsMakeSystemPrompt,\n fewShotMessages: defaultInsertionsFewShotMessages,\n forwardedParams: undefined,\n};\n","import { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\n\nexport interface EditingApiConfig {\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultEditingMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe user also provides you with a prompt for EDITING some text they are writing. \nYour job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide the following information; use this to infer the best relevant EDIT:\n<TextBeforeCursor>\n<TextToEdit>\n<TextAfterCursor>\n<EditingPrompt>\n\n<YourEditSuggestion>\n\nIf we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultEditingFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: \"This morning I woke up and went straight to the grocery store. \",\n },\n {\n role: \"user\",\n name: \"TextToEdit\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"The grocery store was having a sale on fruit, so I decided to stock up.\",\n },\n {\n role: \"user\",\n name: \"EditingPrompt\",\n content: \"I bought a big watermelon\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"add section about the optionholder's pro rata share\",\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultEditingApiConfig: EditingApiConfig = {\n makeSystemPrompt: defaultEditingMakeSystemPrompt,\n fewShotMessages: defaultEditingFewShotMessages,\n forwardedParams: undefined,\n};\n","import {\n BaseAutosuggestionsConfig,\n defaultBaseAutosuggestionsConfig,\n} from \"../base\";\nimport {\n SuggestionsApiConfig,\n defaultSuggestionsApiConfig,\n} from \"./suggestions-api-config\";\nimport {\n InsertionsApiConfig,\n defaultInsertionsApiConfig,\n} from \"./insertions-api-config\";\nimport { ChatlikeApiEndpoint } from \".\";\nimport {\n EditingApiConfig,\n defaultEditingApiConfig,\n} from \"./editing-api-config\";\n\n// Like the base autosuggestions config, with 2 additional fields:\n// 1. externalContextCategories: string[] | undefined;\n// 2. instead of apiConfigs, we have chatApiConfigs: a higher-level abstraction that uses a ChatGPT-like API endpoint.\nexport interface AutosuggestionsConfig\n extends Omit<BaseAutosuggestionsConfig, \"apiConfig\"> {\n externalContextCategories: string[] | undefined;\n chatApiConfigs: {\n suggestionsApiConfig: SuggestionsApiConfig;\n insertionApiConfig: InsertionsApiConfig;\n editingApiConfig: EditingApiConfig;\n };\n}\n\nexport const defaultAutosuggestionsConfig: Omit<\n AutosuggestionsConfig,\n \"textareaPurpose\" | \"apiEndpoint\"\n> = {\n ...defaultBaseAutosuggestionsConfig,\n externalContextCategories: undefined,\n chatApiConfigs: {\n suggestionsApiConfig: defaultSuggestionsApiConfig,\n insertionApiConfig: defaultInsertionsApiConfig,\n editingApiConfig: defaultEditingApiConfig,\n },\n};\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { MakeSystemPrompt } from './subtypes/make-system-prompt.js';
2
+ import { MinimalChatGPTMessage } from './subtypes/minimal-chat-gpt-message.js';
3
+
4
+ interface EditingApiConfig {
5
+ makeSystemPrompt: MakeSystemPrompt;
6
+ fewShotMessages: MinimalChatGPTMessage[];
7
+ forwardedParams: {
8
+ [key: string]: any;
9
+ } | undefined;
10
+ }
11
+ declare const defaultEditingMakeSystemPrompt: MakeSystemPrompt;
12
+ declare const defaultEditingFewShotMessages: MinimalChatGPTMessage[];
13
+ declare const defaultEditingApiConfig: EditingApiConfig;
14
+
15
+ export { EditingApiConfig, defaultEditingApiConfig, defaultEditingFewShotMessages, defaultEditingMakeSystemPrompt };
@@ -1,84 +1,4 @@
1
- // src/types/autosuggestions-config/editing-api-config.tsx
2
- var defaultEditingMakeSystemPrompt = (textareaPurpose, contextString) => {
3
- return `You are a versatile writing assistant.
4
-
5
- The user is writing some text.
6
- The purpose is: "${textareaPurpose}"
7
-
8
- The user also provides you with a prompt for EDITING some text they are writing.
9
- Your job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.
10
-
11
- Adjust yourself to the user's style and implied intent.
12
-
13
- The user will provide the following information; use this to infer the best relevant EDIT:
14
- <TextBeforeCursor>
15
- <TextToEdit>
16
- <TextAfterCursor>
17
- <EditingPrompt>
18
-
19
- <YourEditSuggestion>
20
-
21
- If we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.
22
-
23
- The following external context is also provided. Use it to help you make better suggestions!!!
24
- \`\`\`
25
- ${contextString}
26
- \`\`\`
27
- `;
28
- };
29
- var defaultEditingFewShotMessages = [
30
- {
31
- role: "user",
32
- name: "TextBeforeCursor",
33
- content: "This morning I woke up and went straight to the grocery store. "
34
- },
35
- {
36
- role: "user",
37
- name: "TextToEdit",
38
- content: "While I was there I also picked up some apples, oranges, and bananas. "
39
- },
40
- {
41
- role: "user",
42
- name: "TextAfterCursor",
43
- content: "The grocery store was having a sale on fruit, so I decided to stock up."
44
- },
45
- {
46
- role: "user",
47
- name: "EditingPrompt",
48
- content: "I bought a big watermelon"
49
- },
50
- {
51
- role: "assistant",
52
- content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
53
- },
54
- {
55
- role: "user",
56
- name: "TextAfterCursor",
57
- content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
58
- },
59
- {
60
- role: "user",
61
- name: "TextBeforeCursor",
62
- content: `The Optionholder, in the Optionholder's capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an "Equityholder" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an "Equityholder" thereunder;`
63
- },
64
- {
65
- role: "user",
66
- name: "InsertionPrompt",
67
- content: "add section about the optionholder's pro rata share"
68
- },
69
- {
70
- role: "assistant",
71
- content: ` (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder's "Pro Rata Share"; `
72
- }
73
- ];
74
- var defaultEditingApiConfig = {
75
- makeSystemPrompt: defaultEditingMakeSystemPrompt,
76
- fewShotMessages: defaultEditingFewShotMessages,
77
- forwardedParams: void 0
78
- };
79
- export {
80
- defaultEditingApiConfig,
81
- defaultEditingFewShotMessages,
82
- defaultEditingMakeSystemPrompt
83
- };
1
+ export { defaultEditingApiConfig, defaultEditingFewShotMessages, defaultEditingMakeSystemPrompt } from '../../chunk-HRTFMM7P.mjs';
2
+ import '../../chunk-MRXNTQOX.mjs';
3
+ //# sourceMappingURL=out.js.map
84
4
  //# sourceMappingURL=editing-api-config.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/autosuggestions-config/editing-api-config.tsx"],"sourcesContent":["import { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\n\nexport interface EditingApiConfig {\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultEditingMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe user also provides you with a prompt for EDITING some text they are writing. \nYour job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide the following information; use this to infer the best relevant EDIT:\n<TextBeforeCursor>\n<TextToEdit>\n<TextAfterCursor>\n<EditingPrompt>\n\n<YourEditSuggestion>\n\nIf we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultEditingFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: \"This morning I woke up and went straight to the grocery store. \",\n },\n {\n role: \"user\",\n name: \"TextToEdit\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"The grocery store was having a sale on fruit, so I decided to stock up.\",\n },\n {\n role: \"user\",\n name: \"EditingPrompt\",\n content: \"I bought a big watermelon\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"add section about the optionholder's pro rata share\",\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultEditingApiConfig: EditingApiConfig = {\n makeSystemPrompt: defaultEditingMakeSystemPrompt,\n fewShotMessages: defaultEditingFewShotMessages,\n forwardedParams: undefined,\n};\n"],"mappings":";AASO,IAAM,iCAAmD,CAC9D,iBACA,kBACG;AACH,SAAO;AAAA;AAAA;AAAA,mBAGW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBlB;AAAA;AAAA;AAGF;AAEO,IAAM,gCAAyD;AAAA,EACpE;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AACF;AAEO,IAAM,0BAA4C;AAAA,EACvD,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;","names":[]}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export { AutosuggestionsConfig, defaultAutosuggestionsConfig } from './autosuggestions-config.js';
2
+ export { MinimalChatGPTMessage } from './subtypes/minimal-chat-gpt-message.js';
3
+ export { MakeSystemPrompt } from './subtypes/make-system-prompt.js';
4
+ export { ChatlikeApiEndpoint, ChatlikeApiEndpointImpl } from './subtypes/chatlike-api-endpoint.js';
5
+ export { AutosuggestionsConfigUserSpecified, InsertionsApiConfigUserSpecified, SuggestionsApiConfigUserSpecified } from './autosuggestions-config-user-specified.js';
6
+ import '../base/base-autosuggestions-config.js';
7
+ import '../base/autosuggestions-bare-function.js';
8
+ import './suggestions-api-config.js';
9
+ import './insertions-api-config.js';
10
+ import './editing-api-config.js';
11
+ import '@copilotkit/react-core';