@copilotkit/react-textarea 1.51.4 → 1.51.5-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attw.json +3 -0
- package/CHANGELOG.md +18 -0
- package/dist/index.cjs +1918 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +10 -639
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +318 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +318 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1879 -61
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1900 -123
- package/dist/index.umd.js.map +1 -1
- package/package.json +18 -16
- package/src/components/copilot-textarea/copilot-textarea.tsx +1 -1
- package/tsdown.config.ts +60 -0
- package/vitest.config.mjs +11 -0
- package/dist/chunk-2C7O2EVM.mjs +0 -27
- package/dist/chunk-2C7O2EVM.mjs.map +0 -1
- package/dist/chunk-2X3CZVEP.mjs +0 -32
- package/dist/chunk-2X3CZVEP.mjs.map +0 -1
- package/dist/chunk-3WLGLZTY.mjs +0 -232
- package/dist/chunk-3WLGLZTY.mjs.map +0 -1
- package/dist/chunk-5UNJXFUO.mjs +0 -29
- package/dist/chunk-5UNJXFUO.mjs.map +0 -1
- package/dist/chunk-7GZWOXE4.mjs +0 -70
- package/dist/chunk-7GZWOXE4.mjs.map +0 -1
- package/dist/chunk-7V4ORVQX.mjs +0 -17
- package/dist/chunk-7V4ORVQX.mjs.map +0 -1
- package/dist/chunk-A6YGJFQI.mjs +0 -111
- package/dist/chunk-A6YGJFQI.mjs.map +0 -1
- package/dist/chunk-AHNPJMBR.mjs +0 -90
- package/dist/chunk-AHNPJMBR.mjs.map +0 -1
- package/dist/chunk-ARLBRSB7.mjs +0 -140
- package/dist/chunk-ARLBRSB7.mjs.map +0 -1
- package/dist/chunk-AZ7RF6ED.mjs +0 -120
- package/dist/chunk-AZ7RF6ED.mjs.map +0 -1
- package/dist/chunk-CFCMZVQ2.mjs +0 -136
- package/dist/chunk-CFCMZVQ2.mjs.map +0 -1
- package/dist/chunk-CMKGYQFX.mjs +0 -45
- package/dist/chunk-CMKGYQFX.mjs.map +0 -1
- package/dist/chunk-DE5K76I2.mjs +0 -1
- package/dist/chunk-DE5K76I2.mjs.map +0 -1
- package/dist/chunk-DZMQBOPG.mjs +0 -36
- package/dist/chunk-DZMQBOPG.mjs.map +0 -1
- package/dist/chunk-E7C63KQP.mjs +0 -64
- package/dist/chunk-E7C63KQP.mjs.map +0 -1
- package/dist/chunk-EGBZSVLK.mjs +0 -25
- package/dist/chunk-EGBZSVLK.mjs.map +0 -1
- package/dist/chunk-FTG7P3NP.mjs +0 -25
- package/dist/chunk-FTG7P3NP.mjs.map +0 -1
- package/dist/chunk-H4VKQGVU.mjs +0 -1
- package/dist/chunk-H4VKQGVU.mjs.map +0 -1
- package/dist/chunk-IBZTDP72.mjs +0 -56
- package/dist/chunk-IBZTDP72.mjs.map +0 -1
- package/dist/chunk-IU3WTXLQ.mjs +0 -1
- package/dist/chunk-IU3WTXLQ.mjs.map +0 -1
- package/dist/chunk-KNQIEOFP.mjs +0 -19
- package/dist/chunk-KNQIEOFP.mjs.map +0 -1
- package/dist/chunk-L7VVZH4Q.mjs +0 -1
- package/dist/chunk-L7VVZH4Q.mjs.map +0 -1
- package/dist/chunk-LYNGBKJR.mjs +0 -58
- package/dist/chunk-LYNGBKJR.mjs.map +0 -1
- package/dist/chunk-M7GTVHFB.mjs +0 -188
- package/dist/chunk-M7GTVHFB.mjs.map +0 -1
- package/dist/chunk-MCNXIA4Q.mjs +0 -75
- package/dist/chunk-MCNXIA4Q.mjs.map +0 -1
- package/dist/chunk-MMVDU6DF.mjs +0 -1
- package/dist/chunk-MMVDU6DF.mjs.map +0 -1
- package/dist/chunk-MQBPYOOZ.mjs +0 -97
- package/dist/chunk-MQBPYOOZ.mjs.map +0 -1
- package/dist/chunk-MQXYWOE2.mjs +0 -32
- package/dist/chunk-MQXYWOE2.mjs.map +0 -1
- package/dist/chunk-MRXNTQOX.mjs +0 -59
- package/dist/chunk-MRXNTQOX.mjs.map +0 -1
- package/dist/chunk-NFMCLTJU.mjs +0 -39
- package/dist/chunk-NFMCLTJU.mjs.map +0 -1
- package/dist/chunk-O4WCM57A.mjs +0 -30
- package/dist/chunk-O4WCM57A.mjs.map +0 -1
- package/dist/chunk-PDFIUPCS.mjs +0 -108
- package/dist/chunk-PDFIUPCS.mjs.map +0 -1
- package/dist/chunk-QFXR6DOA.mjs +0 -64
- package/dist/chunk-QFXR6DOA.mjs.map +0 -1
- package/dist/chunk-RUV6NBIF.mjs +0 -1
- package/dist/chunk-RUV6NBIF.mjs.map +0 -1
- package/dist/chunk-SWX3MRZ4.mjs +0 -278
- package/dist/chunk-SWX3MRZ4.mjs.map +0 -1
- package/dist/chunk-TGN3YVSO.mjs +0 -85
- package/dist/chunk-TGN3YVSO.mjs.map +0 -1
- package/dist/chunk-UB4Y22EF.mjs +0 -21
- package/dist/chunk-UB4Y22EF.mjs.map +0 -1
- package/dist/chunk-UIBUYQPG.mjs +0 -79
- package/dist/chunk-UIBUYQPG.mjs.map +0 -1
- package/dist/chunk-VBPZTMXB.mjs +0 -13
- package/dist/chunk-VBPZTMXB.mjs.map +0 -1
- package/dist/chunk-VH7INUR5.mjs +0 -82
- package/dist/chunk-VH7INUR5.mjs.map +0 -1
- package/dist/chunk-VVRGAA43.mjs +0 -59
- package/dist/chunk-VVRGAA43.mjs.map +0 -1
- package/dist/chunk-VYLLLBUP.mjs +0 -50
- package/dist/chunk-VYLLLBUP.mjs.map +0 -1
- package/dist/chunk-WADHCMPK.mjs +0 -1
- package/dist/chunk-WADHCMPK.mjs.map +0 -1
- package/dist/chunk-WJHSY5T6.mjs +0 -1
- package/dist/chunk-WJHSY5T6.mjs.map +0 -1
- package/dist/chunk-WXKPRNNO.mjs +0 -32
- package/dist/chunk-WXKPRNNO.mjs.map +0 -1
- package/dist/chunk-YINY56BI.mjs +0 -49
- package/dist/chunk-YINY56BI.mjs.map +0 -1
- package/dist/chunk-ZBP4SABT.mjs +0 -117
- package/dist/chunk-ZBP4SABT.mjs.map +0 -1
- package/dist/chunk-ZWI5KPQ5.mjs +0 -31
- package/dist/chunk-ZWI5KPQ5.mjs.map +0 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.css +0 -9
- package/dist/components/base-copilot-textarea/base-copilot-textarea.css.map +0 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.d.ts +0 -43
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js +0 -1849
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +0 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +0 -40
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs.map +0 -1
- package/dist/components/base-copilot-textarea/render-element.d.ts +0 -7
- package/dist/components/base-copilot-textarea/render-element.js +0 -75
- package/dist/components/base-copilot-textarea/render-element.js.map +0 -1
- package/dist/components/base-copilot-textarea/render-element.mjs +0 -8
- package/dist/components/base-copilot-textarea/render-element.mjs.map +0 -1
- package/dist/components/base-copilot-textarea/render-placeholder.d.ts +0 -7
- package/dist/components/base-copilot-textarea/render-placeholder.js +0 -72
- package/dist/components/base-copilot-textarea/render-placeholder.js.map +0 -1
- package/dist/components/base-copilot-textarea/render-placeholder.mjs +0 -8
- package/dist/components/base-copilot-textarea/render-placeholder.mjs.map +0 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.d.ts +0 -8
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js +0 -112
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js.map +0 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +0 -9
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs.map +0 -1
- package/dist/components/base-copilot-textarea/use-add-branding-css.d.ts +0 -3
- package/dist/components/base-copilot-textarea/use-add-branding-css.js +0 -83
- package/dist/components/base-copilot-textarea/use-add-branding-css.js.map +0 -1
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs +0 -8
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs.map +0 -1
- package/dist/components/copilot-textarea/copilot-textarea.css +0 -9
- package/dist/components/copilot-textarea/copilot-textarea.css.map +0 -1
- package/dist/components/copilot-textarea/copilot-textarea.d.ts +0 -171
- package/dist/components/copilot-textarea/copilot-textarea.js +0 -2356
- package/dist/components/copilot-textarea/copilot-textarea.js.map +0 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +0 -49
- package/dist/components/copilot-textarea/copilot-textarea.mjs.map +0 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.d.ts +0 -18
- package/dist/components/hovering-toolbar/hovering-editor-provider.js +0 -46
- package/dist/components/hovering-toolbar/hovering-editor-provider.js.map +0 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs +0 -10
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs.map +0 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.d.ts +0 -18
- package/dist/components/hovering-toolbar/hovering-toolbar-components.js +0 -158
- package/dist/components/hovering-toolbar/hovering-toolbar-components.js.map +0 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +0 -16
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs.map +0 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.d.ts +0 -12
- package/dist/components/hovering-toolbar/hovering-toolbar.js +0 -934
- package/dist/components/hovering-toolbar/hovering-toolbar.js.map +0 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs +0 -23
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.d.ts +0 -16
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js +0 -649
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +0 -18
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.d.ts +0 -13
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js +0 -672
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +0 -19
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.d.ts +0 -16
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js +0 -144
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs +0 -12
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.d.ts +0 -4
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js +0 -672
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +0 -20
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs.map +0 -1
- package/dist/components/index.css +0 -9
- package/dist/components/index.css.map +0 -1
- package/dist/components/index.d.ts +0 -15
- package/dist/components/index.js +0 -2360
- package/dist/components/index.js.map +0 -1
- package/dist/components/index.mjs +0 -53
- package/dist/components/index.mjs.map +0 -1
- package/dist/components/manual-ui/chip-with-icon.d.ts +0 -10
- package/dist/components/manual-ui/chip-with-icon.js +0 -49
- package/dist/components/manual-ui/chip-with-icon.js.map +0 -1
- package/dist/components/manual-ui/chip-with-icon.mjs +0 -26
- package/dist/components/manual-ui/chip-with-icon.mjs.map +0 -1
- package/dist/components/source-search-box/source-search-box.d.ts +0 -16
- package/dist/components/source-search-box/source-search-box.js +0 -263
- package/dist/components/source-search-box/source-search-box.js.map +0 -1
- package/dist/components/source-search-box/source-search-box.mjs +0 -13
- package/dist/components/source-search-box/source-search-box.mjs.map +0 -1
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.js +0 -120
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/button.mjs +0 -11
- package/dist/components/ui/button.mjs.map +0 -1
- package/dist/components/ui/command.d.ts +0 -53
- package/dist/components/ui/command.js +0 -323
- package/dist/components/ui/command.js.map +0 -1
- package/dist/components/ui/command.mjs +0 -26
- package/dist/components/ui/command.mjs.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -19
- package/dist/components/ui/dialog.js +0 -205
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/dialog.mjs +0 -21
- package/dist/components/ui/dialog.mjs.map +0 -1
- package/dist/components/ui/label.d.ts +0 -8
- package/dist/components/ui/label.js +0 -93
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/label.mjs +0 -9
- package/dist/components/ui/label.mjs.map +0 -1
- package/dist/context/index.d.ts +0 -2
- package/dist/context/index.js +0 -19
- package/dist/context/index.js.map +0 -1
- package/dist/context/index.mjs +0 -2
- package/dist/context/index.mjs.map +0 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.d.ts +0 -15
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js +0 -194
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js.map +0 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs +0 -11
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs.map +0 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.d.ts +0 -8
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.js +0 -194
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.js.map +0 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs +0 -9
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs.map +0 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.d.ts +0 -7
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js +0 -180
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +0 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +0 -10
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs.map +0 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.js +0 -19
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -2
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.d.ts +0 -22
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +0 -142
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +0 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +0 -9
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs.map +0 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.d.ts +0 -23
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +0 -248
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +0 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +0 -9
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs.map +0 -1
- package/dist/hooks/misc/use-autosize-textarea.d.ts +0 -5
- package/dist/hooks/misc/use-autosize-textarea.js +0 -37
- package/dist/hooks/misc/use-autosize-textarea.js.map +0 -1
- package/dist/hooks/misc/use-autosize-textarea.mjs +0 -8
- package/dist/hooks/misc/use-autosize-textarea.mjs.map +0 -1
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -2365
- package/dist/index.js.map +0 -1
- package/dist/lib/debouncer.d.ts +0 -11
- package/dist/lib/debouncer.js +0 -76
- package/dist/lib/debouncer.js.map +0 -1
- package/dist/lib/debouncer.mjs +0 -8
- package/dist/lib/debouncer.mjs.map +0 -1
- package/dist/lib/editor-to-text.d.ts +0 -7
- package/dist/lib/editor-to-text.js +0 -69
- package/dist/lib/editor-to-text.js.map +0 -1
- package/dist/lib/editor-to-text.mjs +0 -8
- package/dist/lib/editor-to-text.mjs.map +0 -1
- package/dist/lib/get-text-around-cursor.d.ts +0 -15
- package/dist/lib/get-text-around-cursor.js +0 -131
- package/dist/lib/get-text-around-cursor.js.map +0 -1
- package/dist/lib/get-text-around-cursor.mjs +0 -14
- package/dist/lib/get-text-around-cursor.mjs.map +0 -1
- package/dist/lib/retry.d.ts +0 -3
- package/dist/lib/retry.js +0 -43
- package/dist/lib/retry.js.map +0 -1
- package/dist/lib/retry.mjs +0 -8
- package/dist/lib/retry.mjs.map +0 -1
- package/dist/lib/slatejs-edits/add-autocompletions.d.ts +0 -8
- package/dist/lib/slatejs-edits/add-autocompletions.js +0 -51
- package/dist/lib/slatejs-edits/add-autocompletions.js.map +0 -1
- package/dist/lib/slatejs-edits/add-autocompletions.mjs +0 -8
- package/dist/lib/slatejs-edits/add-autocompletions.mjs.map +0 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.d.ts +0 -8
- package/dist/lib/slatejs-edits/clear-autocompletions.js +0 -49
- package/dist/lib/slatejs-edits/clear-autocompletions.js.map +0 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs +0 -8
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs.map +0 -1
- package/dist/lib/slatejs-edits/replace-text.d.ts +0 -5
- package/dist/lib/slatejs-edits/replace-text.js +0 -53
- package/dist/lib/slatejs-edits/replace-text.js.map +0 -1
- package/dist/lib/slatejs-edits/replace-text.mjs +0 -8
- package/dist/lib/slatejs-edits/replace-text.mjs.map +0 -1
- package/dist/lib/slatejs-edits/with-partial-history.d.ts +0 -8
- package/dist/lib/slatejs-edits/with-partial-history.js +0 -133
- package/dist/lib/slatejs-edits/with-partial-history.js.map +0 -1
- package/dist/lib/slatejs-edits/with-partial-history.mjs +0 -10
- package/dist/lib/slatejs-edits/with-partial-history.mjs.map +0 -1
- package/dist/lib/stream-promise-flatten.d.ts +0 -12
- package/dist/lib/stream-promise-flatten.js +0 -72
- package/dist/lib/stream-promise-flatten.js.map +0 -1
- package/dist/lib/stream-promise-flatten.mjs +0 -8
- package/dist/lib/stream-promise-flatten.mjs.map +0 -1
- package/dist/lib/utils.d.ts +0 -9
- package/dist/lib/utils.js +0 -94
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/utils.mjs +0 -16
- package/dist/lib/utils.mjs.map +0 -1
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.d.ts +0 -23
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.js +0 -19
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.js.map +0 -1
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs +0 -1
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs.map +0 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.d.ts +0 -20
- package/dist/types/autosuggestions-config/autosuggestions-config.js +0 -287
- package/dist/types/autosuggestions-config/autosuggestions-config.js.map +0 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs +0 -13
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs.map +0 -1
- package/dist/types/autosuggestions-config/editing-api-config.d.ts +0 -15
- package/dist/types/autosuggestions-config/editing-api-config.js +0 -108
- package/dist/types/autosuggestions-config/editing-api-config.js.map +0 -1
- package/dist/types/autosuggestions-config/editing-api-config.mjs +0 -12
- package/dist/types/autosuggestions-config/editing-api-config.mjs.map +0 -1
- package/dist/types/autosuggestions-config/index.d.ts +0 -10
- package/dist/types/autosuggestions-config/index.js +0 -287
- package/dist/types/autosuggestions-config/index.js.map +0 -1
- package/dist/types/autosuggestions-config/index.mjs +0 -14
- package/dist/types/autosuggestions-config/index.mjs.map +0 -1
- package/dist/types/autosuggestions-config/insertions-api-config.d.ts +0 -15
- package/dist/types/autosuggestions-config/insertions-api-config.js +0 -101
- package/dist/types/autosuggestions-config/insertions-api-config.js.map +0 -1
- package/dist/types/autosuggestions-config/insertions-api-config.mjs +0 -12
- package/dist/types/autosuggestions-config/insertions-api-config.mjs.map +0 -1
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.d.ts +0 -3
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.js +0 -19
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.js.map +0 -1
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs +0 -1
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs.map +0 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.d.ts +0 -15
- package/dist/types/autosuggestions-config/suggestions-api-config.js +0 -90
- package/dist/types/autosuggestions-config/suggestions-api-config.js.map +0 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs +0 -12
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs.map +0 -1
- package/dist/types/base/autosuggestion-state.d.ts +0 -8
- package/dist/types/base/autosuggestion-state.js +0 -19
- package/dist/types/base/autosuggestion-state.js.map +0 -1
- package/dist/types/base/autosuggestion-state.mjs +0 -1
- package/dist/types/base/autosuggestion-state.mjs.map +0 -1
- package/dist/types/base/autosuggestions-bare-function.d.ts +0 -19
- package/dist/types/base/autosuggestions-bare-function.js +0 -19
- package/dist/types/base/autosuggestions-bare-function.js.map +0 -1
- package/dist/types/base/autosuggestions-bare-function.mjs +0 -1
- package/dist/types/base/autosuggestions-bare-function.mjs.map +0 -1
- package/dist/types/base/base-autosuggestions-config.d.ts +0 -87
- package/dist/types/base/base-autosuggestions-config.js +0 -54
- package/dist/types/base/base-autosuggestions-config.js.map +0 -1
- package/dist/types/base/base-autosuggestions-config.mjs +0 -8
- package/dist/types/base/base-autosuggestions-config.mjs.map +0 -1
- package/dist/types/base/base-copilot-textarea-props.d.ts +0 -5
- package/dist/types/base/base-copilot-textarea-props.js +0 -19
- package/dist/types/base/base-copilot-textarea-props.js.map +0 -1
- package/dist/types/base/base-copilot-textarea-props.mjs +0 -1
- package/dist/types/base/base-copilot-textarea-props.mjs.map +0 -1
- package/dist/types/base/custom-editor.d.ts +0 -29
- package/dist/types/base/custom-editor.js +0 -19
- package/dist/types/base/custom-editor.js.map +0 -1
- package/dist/types/base/custom-editor.mjs +0 -1
- package/dist/types/base/custom-editor.mjs.map +0 -1
- package/dist/types/base/editor-autocomplete-state.d.ts +0 -10
- package/dist/types/base/editor-autocomplete-state.js +0 -40
- package/dist/types/base/editor-autocomplete-state.js.map +0 -1
- package/dist/types/base/editor-autocomplete-state.mjs +0 -9
- package/dist/types/base/editor-autocomplete-state.mjs.map +0 -1
- package/dist/types/base/index.d.ts +0 -54
- package/dist/types/base/index.js +0 -56
- package/dist/types/base/index.js.map +0 -1
- package/dist/types/base/index.mjs +0 -9
- package/dist/types/base/index.mjs.map +0 -1
- package/dist/types/html-copilot-textarea-element.d.ts +0 -7
- package/dist/types/html-copilot-textarea-element.js +0 -19
- package/dist/types/html-copilot-textarea-element.js.map +0 -1
- package/dist/types/html-copilot-textarea-element.mjs +0 -2
- package/dist/types/html-copilot-textarea-element.mjs.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.js +0 -289
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -19
- package/dist/types/index.mjs.map +0 -1
- package/jest.config.js +0 -5
- package/rollup.config.mjs +0 -64
- package/tsup.config.ts +0 -15
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/types/autosuggestions-config/insertions-api-config.tsx
|
|
21
|
-
var insertions_api_config_exports = {};
|
|
22
|
-
__export(insertions_api_config_exports, {
|
|
23
|
-
defaultInsertionsApiConfig: () => defaultInsertionsApiConfig,
|
|
24
|
-
defaultInsertionsFewShotMessages: () => defaultInsertionsFewShotMessages,
|
|
25
|
-
defaultInsertionsMakeSystemPrompt: () => defaultInsertionsMakeSystemPrompt
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(insertions_api_config_exports);
|
|
28
|
-
var import_runtime_client_gql = require("@copilotkit/runtime-client-gql");
|
|
29
|
-
var defaultInsertionsMakeSystemPrompt = (textareaPurpose, contextString) => {
|
|
30
|
-
return `You are a versatile writing assistant helping the user insert new text into their existing work.
|
|
31
|
-
|
|
32
|
-
The user is writing some text.
|
|
33
|
-
The purpose is: "${textareaPurpose}"
|
|
34
|
-
|
|
35
|
-
The following external context is also provided. Use it to inform your suggestions when relevant!!!
|
|
36
|
-
\`\`\`
|
|
37
|
-
${contextString}
|
|
38
|
-
\`\`\`
|
|
39
|
-
|
|
40
|
-
The user will provide you with a prompt for an INSERTION into the text they are writing.
|
|
41
|
-
Your job is to come up with an INSERTION into the text that the user would like to use, AS BEST YOU CAN.
|
|
42
|
-
Only insert a SHORT segment. Usually 1 sentence, or at most 1 paragraph.
|
|
43
|
-
|
|
44
|
-
Adjust yourself to the user's style and implied intent.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
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.
|
|
48
|
-
The conversation will be structured as follows:
|
|
49
|
-
<TextAfterCursor>
|
|
50
|
-
<TextBeforeCursor>
|
|
51
|
-
<InsertionPrompt>
|
|
52
|
-
|
|
53
|
-
<YourInsertionSuggestion>
|
|
54
|
-
`;
|
|
55
|
-
};
|
|
56
|
-
var defaultInsertionsFewShotMessages = [
|
|
57
|
-
new import_runtime_client_gql.TextMessage({
|
|
58
|
-
role: import_runtime_client_gql.Role.User,
|
|
59
|
-
content: "<TextAfterCursor>While I was there I also picked up some apples, oranges, and bananas.</TextAfterCursor>"
|
|
60
|
-
}),
|
|
61
|
-
new import_runtime_client_gql.TextMessage({
|
|
62
|
-
role: import_runtime_client_gql.Role.User,
|
|
63
|
-
content: "<TextBeforeCursor>This morning I woke up and went straight to the grocery store.</TextBeforeCursor>"
|
|
64
|
-
}),
|
|
65
|
-
new import_runtime_client_gql.TextMessage({
|
|
66
|
-
role: import_runtime_client_gql.Role.User,
|
|
67
|
-
content: "<InsertionPrompt>I bought a big watermelon</InsertionPrompt>"
|
|
68
|
-
}),
|
|
69
|
-
new import_runtime_client_gql.TextMessage({
|
|
70
|
-
role: import_runtime_client_gql.Role.Assistant,
|
|
71
|
-
content: "When I arrived I went straight to the produce section and picked out a big watermelon."
|
|
72
|
-
}),
|
|
73
|
-
new import_runtime_client_gql.TextMessage({
|
|
74
|
-
role: import_runtime_client_gql.Role.User,
|
|
75
|
-
content: "<TextAfterCursor>and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.</TextAfterCursor>"
|
|
76
|
-
}),
|
|
77
|
-
new import_runtime_client_gql.TextMessage({
|
|
78
|
-
role: import_runtime_client_gql.Role.User,
|
|
79
|
-
content: `<TextBeforeCursor>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;</TextBeforeCursor>`
|
|
80
|
-
}),
|
|
81
|
-
new import_runtime_client_gql.TextMessage({
|
|
82
|
-
role: import_runtime_client_gql.Role.User,
|
|
83
|
-
content: "<InsertionPrompt>add section about the optionholder's pro rata share</InsertionPrompt>"
|
|
84
|
-
}),
|
|
85
|
-
new import_runtime_client_gql.TextMessage({
|
|
86
|
-
role: import_runtime_client_gql.Role.Assistant,
|
|
87
|
-
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"; `
|
|
88
|
-
})
|
|
89
|
-
];
|
|
90
|
-
var defaultInsertionsApiConfig = {
|
|
91
|
-
makeSystemPrompt: defaultInsertionsMakeSystemPrompt,
|
|
92
|
-
fewShotMessages: defaultInsertionsFewShotMessages,
|
|
93
|
-
forwardedParams: void 0
|
|
94
|
-
};
|
|
95
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
96
|
-
0 && (module.exports = {
|
|
97
|
-
defaultInsertionsApiConfig,
|
|
98
|
-
defaultInsertionsFewShotMessages,
|
|
99
|
-
defaultInsertionsMakeSystemPrompt
|
|
100
|
-
});
|
|
101
|
-
//# sourceMappingURL=insertions-api-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/autosuggestions-config/insertions-api-config.tsx"],"sourcesContent":["import { Message, Role, TextMessage } from \"@copilotkit/runtime-client-gql\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\n\nexport interface InsertionsApiConfig {\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: Message[];\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 helping the user insert new text into their existing work.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe following external context is also provided. Use it to inform your suggestions when relevant!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n\nThe user will provide you with a prompt for an INSERTION into the text they are writing. \nYour job is to come up with an INSERTION into the text that the user would like to use, AS BEST YOU CAN.\nOnly insert a SHORT segment. Usually 1 sentence, or at most 1 paragraph.\n\nAdjust yourself to the user's style and implied intent.\n\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.\nThe conversation will be structured as follows:\n<TextAfterCursor>\n<TextBeforeCursor>\n<InsertionPrompt>\n\n<YourInsertionSuggestion>\n`;\n};\n\nexport const defaultInsertionsFewShotMessages: Message[] = [\n new TextMessage({\n role: Role.User,\n content:\n \"<TextAfterCursor>While I was there I also picked up some apples, oranges, and bananas.</TextAfterCursor>\",\n }),\n new TextMessage({\n role: Role.User,\n content:\n \"<TextBeforeCursor>This morning I woke up and went straight to the grocery store.</TextBeforeCursor>\",\n }),\n new TextMessage({\n role: Role.User,\n content: \"<InsertionPrompt>I bought a big watermelon</InsertionPrompt>\",\n }),\n new TextMessage({\n role: Role.Assistant,\n content:\n \"When I arrived I went straight to the produce section and picked out a big watermelon.\",\n }),\n new TextMessage({\n role: Role.User,\n content:\n \"<TextAfterCursor>and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.</TextAfterCursor>\",\n }),\n new TextMessage({\n role: Role.User,\n content:\n '<TextBeforeCursor>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;</TextBeforeCursor>',\n }),\n new TextMessage({\n role: Role.User,\n content:\n \"<InsertionPrompt>add section about the optionholder's pro rata share</InsertionPrompt>\",\n }),\n new TextMessage({\n role: 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAA2C;AASpC,IAAM,oCAAsD,CACjE,iBACA,kBACG;AACH,SAAO;AAAA;AAAA;AAAA,mBAGW;AAAA;AAAA;AAAA;AAAA,EAIlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBF;AAEO,IAAM,mCAA8C;AAAA,EACzD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SAAS;AAAA,EACX,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AACH;AAEO,IAAM,6BAAkD;AAAA,EAC7D,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defaultInsertionsApiConfig,
|
|
3
|
-
defaultInsertionsFewShotMessages,
|
|
4
|
-
defaultInsertionsMakeSystemPrompt
|
|
5
|
-
} from "../../chunk-MCNXIA4Q.mjs";
|
|
6
|
-
import "../../chunk-MRXNTQOX.mjs";
|
|
7
|
-
export {
|
|
8
|
-
defaultInsertionsApiConfig,
|
|
9
|
-
defaultInsertionsFewShotMessages,
|
|
10
|
-
defaultInsertionsMakeSystemPrompt
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=insertions-api-config.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/autosuggestions-config/subtypes/make-system-prompt.ts
|
|
17
|
-
var make_system_prompt_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(make_system_prompt_exports);
|
|
19
|
-
//# sourceMappingURL=make-system-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/types/autosuggestions-config/subtypes/make-system-prompt.ts"],"sourcesContent":["export type MakeSystemPrompt = (\n textareaPurpose: string,\n contextString: string,\n) => string;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=make-system-prompt.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Message } from '@copilotkit/runtime-client-gql';
|
|
2
|
-
import { MakeSystemPrompt } from './subtypes/make-system-prompt.js';
|
|
3
|
-
|
|
4
|
-
interface SuggestionsApiConfig {
|
|
5
|
-
makeSystemPrompt: MakeSystemPrompt;
|
|
6
|
-
fewShotMessages: Message[];
|
|
7
|
-
maxTokens?: number;
|
|
8
|
-
stop?: string[];
|
|
9
|
-
temperature?: number;
|
|
10
|
-
}
|
|
11
|
-
declare const defaultSuggestionsMakeSystemPrompt: MakeSystemPrompt;
|
|
12
|
-
declare const defaultSuggestionsFewShotMessages: Message[];
|
|
13
|
-
declare const defaultSuggestionsApiConfig: SuggestionsApiConfig;
|
|
14
|
-
|
|
15
|
-
export { SuggestionsApiConfig, defaultSuggestionsApiConfig, defaultSuggestionsFewShotMessages, defaultSuggestionsMakeSystemPrompt };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/types/autosuggestions-config/suggestions-api-config.tsx
|
|
21
|
-
var suggestions_api_config_exports = {};
|
|
22
|
-
__export(suggestions_api_config_exports, {
|
|
23
|
-
defaultSuggestionsApiConfig: () => defaultSuggestionsApiConfig,
|
|
24
|
-
defaultSuggestionsFewShotMessages: () => defaultSuggestionsFewShotMessages,
|
|
25
|
-
defaultSuggestionsMakeSystemPrompt: () => defaultSuggestionsMakeSystemPrompt
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(suggestions_api_config_exports);
|
|
28
|
-
var import_runtime_client_gql = require("@copilotkit/runtime-client-gql");
|
|
29
|
-
var defaultSuggestionsMakeSystemPrompt = (textareaPurpose, contextString) => {
|
|
30
|
-
return `You are a versatile writing assistant.
|
|
31
|
-
|
|
32
|
-
The user is writing some text.
|
|
33
|
-
The purpose is: "${textareaPurpose}"
|
|
34
|
-
|
|
35
|
-
Your job is to guess what the user will write next AS BEST YOU CAN.
|
|
36
|
-
Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
|
|
37
|
-
|
|
38
|
-
Adjust yourself to the user's style and implied intent.
|
|
39
|
-
|
|
40
|
-
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.
|
|
41
|
-
<TextAfterCursor>
|
|
42
|
-
<TextBeforeCursor>
|
|
43
|
-
<YourSuggestion>
|
|
44
|
-
|
|
45
|
-
If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
|
|
46
|
-
Refrain from adding <YourSuggestion> tags when responding
|
|
47
|
-
|
|
48
|
-
The following external context is also provided. Use it to help you make better suggestions!!!
|
|
49
|
-
\`\`\`
|
|
50
|
-
${contextString}
|
|
51
|
-
\`\`\`
|
|
52
|
-
`;
|
|
53
|
-
};
|
|
54
|
-
var defaultSuggestionsFewShotMessages = [
|
|
55
|
-
new import_runtime_client_gql.TextMessage({
|
|
56
|
-
role: import_runtime_client_gql.Role.User,
|
|
57
|
-
content: "<TextAfterCursor>While I was there I also picked up some apples, oranges, and bananas.</TextAfterCursor>"
|
|
58
|
-
}),
|
|
59
|
-
new import_runtime_client_gql.TextMessage({
|
|
60
|
-
role: import_runtime_client_gql.Role.User,
|
|
61
|
-
content: "This morning I woke up and went straight to the grocery store."
|
|
62
|
-
}),
|
|
63
|
-
new import_runtime_client_gql.TextMessage({
|
|
64
|
-
role: import_runtime_client_gql.Role.Assistant,
|
|
65
|
-
content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
|
|
66
|
-
}),
|
|
67
|
-
new import_runtime_client_gql.TextMessage({
|
|
68
|
-
role: import_runtime_client_gql.Role.User,
|
|
69
|
-
content: "<TextAfterCursor>and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.</TextAfterCursor>"
|
|
70
|
-
}),
|
|
71
|
-
new import_runtime_client_gql.TextMessage({
|
|
72
|
-
role: import_runtime_client_gql.Role.User,
|
|
73
|
-
content: `<TextBeforeCursor>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;</TextBeforeCursor>`
|
|
74
|
-
}),
|
|
75
|
-
new import_runtime_client_gql.TextMessage({
|
|
76
|
-
role: import_runtime_client_gql.Role.Assistant,
|
|
77
|
-
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"; `
|
|
78
|
-
})
|
|
79
|
-
];
|
|
80
|
-
var defaultSuggestionsApiConfig = {
|
|
81
|
-
makeSystemPrompt: defaultSuggestionsMakeSystemPrompt,
|
|
82
|
-
fewShotMessages: defaultSuggestionsFewShotMessages
|
|
83
|
-
};
|
|
84
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
-
0 && (module.exports = {
|
|
86
|
-
defaultSuggestionsApiConfig,
|
|
87
|
-
defaultSuggestionsFewShotMessages,
|
|
88
|
-
defaultSuggestionsMakeSystemPrompt
|
|
89
|
-
});
|
|
90
|
-
//# sourceMappingURL=suggestions-api-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/autosuggestions-config/suggestions-api-config.tsx"],"sourcesContent":["import { Message, Role, TextMessage } from \"@copilotkit/runtime-client-gql\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\n\nexport interface SuggestionsApiConfig {\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: Message[];\n maxTokens?: number;\n stop?: string[];\n temperature?: number;\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.\nRefrain from adding <YourSuggestion> tags when responding\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: Message[] = [\n new TextMessage({\n role: Role.User,\n content:\n \"<TextAfterCursor>While I was there I also picked up some apples, oranges, and bananas.</TextAfterCursor>\",\n }),\n new TextMessage({\n role: Role.User,\n content: \"This morning I woke up and went straight to the grocery store.\",\n }),\n new TextMessage({\n role: Role.Assistant,\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n }),\n new TextMessage({\n role: Role.User,\n content:\n \"<TextAfterCursor>and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.</TextAfterCursor>\",\n }),\n new TextMessage({\n role: Role.User,\n content:\n '<TextBeforeCursor>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;</TextBeforeCursor>',\n }),\n new TextMessage({\n role: 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};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAA2C;AAWpC,IAAM,qCAAuD,CAClE,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,EAiBlB;AAAA;AAAA;AAGF;AAEO,IAAM,oCAA+C;AAAA,EAC1D,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SAAS;AAAA,EACX,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AAAA,EACD,IAAI,sCAAY;AAAA,IACd,MAAM,+BAAK;AAAA,IACX,SACE;AAAA,EACJ,CAAC;AACH;AAEO,IAAM,8BAAoD;AAAA,EAC/D,kBAAkB;AAAA,EAClB,iBAAiB;AACnB;","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defaultSuggestionsApiConfig,
|
|
3
|
-
defaultSuggestionsFewShotMessages,
|
|
4
|
-
defaultSuggestionsMakeSystemPrompt
|
|
5
|
-
} from "../../chunk-QFXR6DOA.mjs";
|
|
6
|
-
import "../../chunk-MRXNTQOX.mjs";
|
|
7
|
-
export {
|
|
8
|
-
defaultSuggestionsApiConfig,
|
|
9
|
-
defaultSuggestionsFewShotMessages,
|
|
10
|
-
defaultSuggestionsMakeSystemPrompt
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=suggestions-api-config.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/base/autosuggestion-state.ts
|
|
17
|
-
var autosuggestion_state_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(autosuggestion_state_exports);
|
|
19
|
-
//# sourceMappingURL=autosuggestion-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/base/autosuggestion-state.ts"],"sourcesContent":["import { BasePoint } from \"slate\";\n\nexport interface AutosuggestionState {\n text: string;\n point: BasePoint;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=autosuggestion-state.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DocumentPointer } from '@copilotkit/react-core';
|
|
2
|
-
|
|
3
|
-
interface InsertionEditorState {
|
|
4
|
-
textBeforeCursor: string;
|
|
5
|
-
textAfterCursor: string;
|
|
6
|
-
}
|
|
7
|
-
interface EditingEditorState extends InsertionEditorState {
|
|
8
|
-
selectedText: string;
|
|
9
|
-
}
|
|
10
|
-
type AutosuggestionsBareFunction = (editorState: InsertionEditorState, abortSignal: AbortSignal) => Promise<string>;
|
|
11
|
-
type Generator_InsertionOrEditingSuggestion = (editorState: EditingEditorState, prompt: string, documents: DocumentPointer[], abortSignal: AbortSignal) => Promise<ReadableStream<string>>;
|
|
12
|
-
interface InsertionEditorApiConfig {
|
|
13
|
-
insertionOrEditingFunction: Generator_InsertionOrEditingSuggestion;
|
|
14
|
-
}
|
|
15
|
-
interface BaseCopilotTextareaApiConfig extends InsertionEditorApiConfig {
|
|
16
|
-
autosuggestionsFunction: AutosuggestionsBareFunction;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { AutosuggestionsBareFunction, BaseCopilotTextareaApiConfig, EditingEditorState, Generator_InsertionOrEditingSuggestion, InsertionEditorApiConfig, InsertionEditorState };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/base/autosuggestions-bare-function.ts
|
|
17
|
-
var autosuggestions_bare_function_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(autosuggestions_bare_function_exports);
|
|
19
|
-
//# sourceMappingURL=autosuggestions-bare-function.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/base/autosuggestions-bare-function.ts"],"sourcesContent":["import { DocumentPointer } from \"@copilotkit/react-core\";\n\nexport interface InsertionEditorState {\n textBeforeCursor: string;\n textAfterCursor: string;\n}\n\nexport interface EditingEditorState extends InsertionEditorState {\n selectedText: string;\n}\n\nexport type AutosuggestionsBareFunction = (\n editorState: InsertionEditorState,\n abortSignal: AbortSignal,\n) => Promise<string>;\n\nexport type Generator_InsertionOrEditingSuggestion = (\n editorState: EditingEditorState,\n prompt: string,\n documents: DocumentPointer[],\n abortSignal: AbortSignal,\n) => Promise<ReadableStream<string>>;\n\nexport interface InsertionEditorApiConfig {\n insertionOrEditingFunction: Generator_InsertionOrEditingSuggestion;\n}\n\nexport interface BaseCopilotTextareaApiConfig extends InsertionEditorApiConfig {\n autosuggestionsFunction: AutosuggestionsBareFunction;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=autosuggestions-bare-function.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { BaseCopilotTextareaApiConfig } from './autosuggestions-bare-function.js';
|
|
2
|
-
import '@copilotkit/react-core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @interface BaseAutosuggestionsConfig
|
|
6
|
-
*
|
|
7
|
-
* @property {string} textareaPurpose - The purpose of the textarea. This is used to guide the autosuggestions.
|
|
8
|
-
*
|
|
9
|
-
* @property {string[]} contextCategories - The categories of context to consider when providing autosuggestions.
|
|
10
|
-
*
|
|
11
|
-
* @property {number} debounceTime - The amount of time (in milliseconds) to wait before triggering autosuggestions after the user has stopped typing.
|
|
12
|
-
*
|
|
13
|
-
* @property {BaseCopilotTextareaApiConfig} apiConfig - The configuration for the API that provides the autosuggestions.
|
|
14
|
-
*
|
|
15
|
-
* @property {boolean} disableWhenEmpty - Whether to disable autosuggestions when the textarea is empty.
|
|
16
|
-
*
|
|
17
|
-
* @property {boolean} disabled - Whether to disable autosuggestions entirely.
|
|
18
|
-
*
|
|
19
|
-
* @property {boolean} temporarilyDisableWhenMovingCursorWithoutChangingText - Whether to temporarily disable autosuggestions when the user moves the cursor without changing the text.
|
|
20
|
-
*
|
|
21
|
-
* @property {boolean} temporarilyDisableNotTrustedEvents - Temporarily disable autosuggestions after change event from non-trusted sources (like text insertion from autocomplete plugins)
|
|
22
|
-
*
|
|
23
|
-
* @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldAcceptAutosuggestionOnKeyPress - A function that determines whether to accept the current autosuggestion based on a key press event. By default, the Tab key is used to accept the autosuggestion. Example code:
|
|
24
|
-
*
|
|
25
|
-
* ```typescript
|
|
26
|
-
* const defaultShouldAcceptAutosuggestionOnKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
27
|
-
* // if tab, accept the autosuggestion
|
|
28
|
-
* if (event.key === "Tab") {
|
|
29
|
-
* return true;
|
|
30
|
-
* }
|
|
31
|
-
* return false;
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @property {(event: React.TouchEvent<HTMLDivElement>) => boolean} shouldAcceptAutosuggestionOnTouch - A function that determines whether to accept the current autosuggestion based on a mobile touch event. By default, the touching the end of a suggestion will accept it. Example code:
|
|
36
|
-
*
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const shouldAcceptAutosuggestionOnTouch = (event: React.TouchEvent<HTMLDivElement>) => {
|
|
39
|
-
* // if tab, accept the autosuggestion
|
|
40
|
-
* if (event.type === "touchstart") {
|
|
41
|
-
* return true;
|
|
42
|
-
* }
|
|
43
|
-
* return false;
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldToggleHoveringEditorOnKeyPress - A function that determines whether to toggle the hovering editor based on a key press event. By default, the Command + K key combination is used to toggle the hovering editor. Example code:
|
|
48
|
-
*
|
|
49
|
-
* ```typescript
|
|
50
|
-
* const defaultShouldToggleHoveringEditorOnKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
51
|
-
* // if command-k, toggle the hovering editor
|
|
52
|
-
* if (event.key === "k" && event.metaKey) {
|
|
53
|
-
* return true;
|
|
54
|
-
* }
|
|
55
|
-
* return false;
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
interface BaseAutosuggestionsConfig {
|
|
60
|
-
textareaPurpose: string;
|
|
61
|
-
contextCategories: string[];
|
|
62
|
-
debounceTime: number;
|
|
63
|
-
apiConfig: BaseCopilotTextareaApiConfig;
|
|
64
|
-
disableWhenEmpty: boolean;
|
|
65
|
-
disabled: boolean;
|
|
66
|
-
temporarilyDisableWhenMovingCursorWithoutChangingText: boolean;
|
|
67
|
-
temporarilyDisableNotTrustedEvents: boolean;
|
|
68
|
-
shouldAcceptAutosuggestionOnKeyPress: (event: React.KeyboardEvent<HTMLDivElement>) => boolean;
|
|
69
|
-
shouldAcceptAutosuggestionOnTouch: (event: React.TouchEvent<HTMLDivElement>) => boolean;
|
|
70
|
-
shouldToggleHoveringEditorOnKeyPress: (event: React.KeyboardEvent<HTMLDivElement>, shortcut: string) => boolean;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Default configuration for the BaseAutosuggestions.
|
|
74
|
-
*
|
|
75
|
-
* @property {number} debounceTime - The amount of time to wait before triggering the autosuggestions API call.
|
|
76
|
-
* @property {string[]} contextCategories - The categories to use for context when making the autosuggestions API call.
|
|
77
|
-
* @property {boolean} disableWhenEmpty - Whether to disable the autosuggestions when the textarea is empty.
|
|
78
|
-
* @property {boolean} disabled - Whether to disable the autosuggestions feature entirely.
|
|
79
|
-
* @property {boolean} temporarilyDisableWhenMovingCursorWithoutChangingText - Whether to temporarily disable the autosuggestions when the cursor is moved without changing the text.
|
|
80
|
-
* @property {boolean} temporarilyDisableNotTrustedEvents - Temporarily disable the autosuggestions after change event from non-trusted sources (like text insertion from autocomplete plugins)
|
|
81
|
-
* @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldToggleHoveringEditorOnKeyPress - A function that determines whether to toggle the hovering editor based on a key press event.
|
|
82
|
-
* @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldAcceptAutosuggestionOnKeyPress - A function that determines whether to accept the autosuggestion based on a key press event.
|
|
83
|
-
* @property {() => boolean} defaultShouldAcceptAutosuggestionOnTouch - A function that determines whether to accept the autosuggestion based on a mobile touch event.
|
|
84
|
-
*/
|
|
85
|
-
declare const defaultBaseAutosuggestionsConfig: Omit<BaseAutosuggestionsConfig, "textareaPurpose" | "apiConfig">;
|
|
86
|
-
|
|
87
|
-
export { BaseAutosuggestionsConfig, defaultBaseAutosuggestionsConfig };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/types/base/base-autosuggestions-config.tsx
|
|
21
|
-
var base_autosuggestions_config_exports = {};
|
|
22
|
-
__export(base_autosuggestions_config_exports, {
|
|
23
|
-
defaultBaseAutosuggestionsConfig: () => defaultBaseAutosuggestionsConfig
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(base_autosuggestions_config_exports);
|
|
26
|
-
var import_react_core = require("@copilotkit/react-core");
|
|
27
|
-
var import_shared = require("@copilotkit/shared");
|
|
28
|
-
var defaultShouldToggleHoveringEditorOnKeyPress = (event, shortcut) => {
|
|
29
|
-
const isMetaKey = (0, import_shared.isMacOS)() ? event.metaKey : event.ctrlKey;
|
|
30
|
-
return event.key === shortcut && isMetaKey;
|
|
31
|
-
};
|
|
32
|
-
var defaultShouldAcceptAutosuggestionOnKeyPress = (event) => {
|
|
33
|
-
if (event.key === "Tab") {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
};
|
|
38
|
-
var defaultShouldAcceptAutosuggestionOnTouch = () => false;
|
|
39
|
-
var defaultBaseAutosuggestionsConfig = {
|
|
40
|
-
debounceTime: 250,
|
|
41
|
-
contextCategories: import_react_core.defaultCopilotContextCategories,
|
|
42
|
-
disableWhenEmpty: true,
|
|
43
|
-
disabled: false,
|
|
44
|
-
temporarilyDisableWhenMovingCursorWithoutChangingText: true,
|
|
45
|
-
temporarilyDisableNotTrustedEvents: true,
|
|
46
|
-
shouldToggleHoveringEditorOnKeyPress: defaultShouldToggleHoveringEditorOnKeyPress,
|
|
47
|
-
shouldAcceptAutosuggestionOnKeyPress: defaultShouldAcceptAutosuggestionOnKeyPress,
|
|
48
|
-
shouldAcceptAutosuggestionOnTouch: defaultShouldAcceptAutosuggestionOnTouch
|
|
49
|
-
};
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
defaultBaseAutosuggestionsConfig
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=base-autosuggestions-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/base/base-autosuggestions-config.tsx"],"sourcesContent":["import { BaseCopilotTextareaApiConfig } from \"./autosuggestions-bare-function\";\nimport { defaultCopilotContextCategories } from \"@copilotkit/react-core\";\nimport { isMacOS } from \"@copilotkit/shared\";\n\n/**\n * @interface BaseAutosuggestionsConfig\n *\n * @property {string} textareaPurpose - The purpose of the textarea. This is used to guide the autosuggestions.\n *\n * @property {string[]} contextCategories - The categories of context to consider when providing autosuggestions.\n *\n * @property {number} debounceTime - The amount of time (in milliseconds) to wait before triggering autosuggestions after the user has stopped typing.\n *\n * @property {BaseCopilotTextareaApiConfig} apiConfig - The configuration for the API that provides the autosuggestions.\n *\n * @property {boolean} disableWhenEmpty - Whether to disable autosuggestions when the textarea is empty.\n *\n * @property {boolean} disabled - Whether to disable autosuggestions entirely.\n *\n * @property {boolean} temporarilyDisableWhenMovingCursorWithoutChangingText - Whether to temporarily disable autosuggestions when the user moves the cursor without changing the text.\n *\n * @property {boolean} temporarilyDisableNotTrustedEvents - Temporarily disable autosuggestions after change event from non-trusted sources (like text insertion from autocomplete plugins)\n *\n * @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldAcceptAutosuggestionOnKeyPress - A function that determines whether to accept the current autosuggestion based on a key press event. By default, the Tab key is used to accept the autosuggestion. Example code:\n *\n * ```typescript\n * const defaultShouldAcceptAutosuggestionOnKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n * // if tab, accept the autosuggestion\n * if (event.key === \"Tab\") {\n * return true;\n * }\n * return false;\n * }\n * ```\n *\n * @property {(event: React.TouchEvent<HTMLDivElement>) => boolean} shouldAcceptAutosuggestionOnTouch - A function that determines whether to accept the current autosuggestion based on a mobile touch event. By default, the touching the end of a suggestion will accept it. Example code:\n *\n * ```typescript\n * const shouldAcceptAutosuggestionOnTouch = (event: React.TouchEvent<HTMLDivElement>) => {\n * // if tab, accept the autosuggestion\n * if (event.type === \"touchstart\") {\n * return true;\n * }\n * return false;\n * }\n * ```\n *\n * @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldToggleHoveringEditorOnKeyPress - A function that determines whether to toggle the hovering editor based on a key press event. By default, the Command + K key combination is used to toggle the hovering editor. Example code:\n *\n * ```typescript\n * const defaultShouldToggleHoveringEditorOnKeyPress = (event: React.KeyboardEvent<HTMLDivElement>) => {\n * // if command-k, toggle the hovering editor\n * if (event.key === \"k\" && event.metaKey) {\n * return true;\n * }\n * return false;\n * }\n * ```\n */\nexport interface BaseAutosuggestionsConfig {\n textareaPurpose: string;\n contextCategories: string[];\n debounceTime: number;\n apiConfig: BaseCopilotTextareaApiConfig;\n\n disableWhenEmpty: boolean;\n disabled: boolean;\n temporarilyDisableWhenMovingCursorWithoutChangingText: boolean;\n temporarilyDisableNotTrustedEvents: boolean;\n shouldAcceptAutosuggestionOnKeyPress: (\n event: React.KeyboardEvent<HTMLDivElement>,\n ) => boolean;\n shouldAcceptAutosuggestionOnTouch: (\n event: React.TouchEvent<HTMLDivElement>,\n ) => boolean;\n shouldToggleHoveringEditorOnKeyPress: (\n event: React.KeyboardEvent<HTMLDivElement>,\n shortcut: string,\n ) => boolean;\n}\n\n// by default, command-k toggles the hovering editor\nconst defaultShouldToggleHoveringEditorOnKeyPress = (\n event: React.KeyboardEvent<HTMLDivElement>,\n shortcut: string,\n) => {\n const isMetaKey = isMacOS() ? event.metaKey : event.ctrlKey;\n\n // if command-k, toggle the hovering editor\n return event.key === shortcut && isMetaKey;\n};\n\nconst defaultShouldAcceptAutosuggestionOnKeyPress = (\n event: React.KeyboardEvent<HTMLDivElement>,\n) => {\n // if tab, accept the autosuggestion\n if (event.key === \"Tab\") {\n return true;\n }\n return false;\n};\n\nconst defaultShouldAcceptAutosuggestionOnTouch = () => false;\n\n/**\n * Default configuration for the BaseAutosuggestions.\n *\n * @property {number} debounceTime - The amount of time to wait before triggering the autosuggestions API call.\n * @property {string[]} contextCategories - The categories to use for context when making the autosuggestions API call.\n * @property {boolean} disableWhenEmpty - Whether to disable the autosuggestions when the textarea is empty.\n * @property {boolean} disabled - Whether to disable the autosuggestions feature entirely.\n * @property {boolean} temporarilyDisableWhenMovingCursorWithoutChangingText - Whether to temporarily disable the autosuggestions when the cursor is moved without changing the text.\n * @property {boolean} temporarilyDisableNotTrustedEvents - Temporarily disable the autosuggestions after change event from non-trusted sources (like text insertion from autocomplete plugins)\n * @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldToggleHoveringEditorOnKeyPress - A function that determines whether to toggle the hovering editor based on a key press event.\n * @property {(event: React.KeyboardEvent<HTMLDivElement>) => boolean} shouldAcceptAutosuggestionOnKeyPress - A function that determines whether to accept the autosuggestion based on a key press event.\n * @property {() => boolean} defaultShouldAcceptAutosuggestionOnTouch - A function that determines whether to accept the autosuggestion based on a mobile touch event.\n */\n\nexport const defaultBaseAutosuggestionsConfig: Omit<\n BaseAutosuggestionsConfig,\n \"textareaPurpose\" | \"apiConfig\"\n> = {\n debounceTime: 250,\n contextCategories: defaultCopilotContextCategories,\n disableWhenEmpty: true,\n disabled: false,\n temporarilyDisableWhenMovingCursorWithoutChangingText: true,\n temporarilyDisableNotTrustedEvents: true,\n shouldToggleHoveringEditorOnKeyPress:\n defaultShouldToggleHoveringEditorOnKeyPress,\n shouldAcceptAutosuggestionOnKeyPress:\n defaultShouldAcceptAutosuggestionOnKeyPress,\n shouldAcceptAutosuggestionOnTouch: defaultShouldAcceptAutosuggestionOnTouch,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAgD;AAChD,oBAAwB;AAgFxB,IAAM,8CAA8C,CAClD,OACA,aACG;AACH,QAAM,gBAAY,uBAAQ,IAAI,MAAM,UAAU,MAAM;AAGpD,SAAO,MAAM,QAAQ,YAAY;AACnC;AAEA,IAAM,8CAA8C,CAClD,UACG;AAEH,MAAI,MAAM,QAAQ,OAAO;AACvB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,IAAM,2CAA2C,MAAM;AAgBhD,IAAM,mCAGT;AAAA,EACF,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,uDAAuD;AAAA,EACvD,oCAAoC;AAAA,EACpC,sCACE;AAAA,EACF,sCACE;AAAA,EACF,mCAAmC;AACrC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/base/base-copilot-textarea-props.tsx
|
|
17
|
-
var base_copilot_textarea_props_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(base_copilot_textarea_props_exports);
|
|
19
|
-
//# sourceMappingURL=base-copilot-textarea-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/base/base-copilot-textarea-props.tsx"],"sourcesContent":["import { TextareaHTMLAttributes } from \"react\";\nimport { BaseAutosuggestionsConfig } from \".\";\nimport { BaseCopilotTextareaApiConfig } from \"./autosuggestions-bare-function\";\n\n/**\n * `BaseCopilotTextareaProps` defines the properties for the `BaseCopilotTextarea` component.\n */\nexport interface BaseCopilotTextareaProps extends Omit<\n TextareaHTMLAttributes<HTMLDivElement>,\n \"onChange\"\n> {\n /**\n * Determines whether the CopilotKit branding should be disabled. Default is `false`.\n */\n disableBranding?: boolean;\n\n /**\n * Specifies the CSS styles to apply to the placeholder text.\n */\n placeholderStyle?: React.CSSProperties;\n\n /**\n * Specifies the CSS styles to apply to the suggestions list.\n */\n suggestionsStyle?: React.CSSProperties;\n\n /**\n * A class name to apply to the editor popover window.\n */\n hoverMenuClassname?: string;\n\n /**\n * The initial value of the textarea. Can be controlled via `onValueChange`.\n */\n value?: string;\n\n /**\n * Callback invoked when the value of the textarea changes.\n */\n onValueChange?: (value: string) => void;\n\n /**\n * Callback invoked when a `change` event is triggered on the textarea element.\n */\n onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n\n /**\n * The shortcut to use to open the editor popover window. Default is `\"Cmd-k\"`.\n */\n shortcut?: string;\n\n /**\n * Configuration settings for the autosuggestions feature.\n * Includes a mandatory `textareaPurpose` to guide the autosuggestions.\n */\n baseAutosuggestionsConfig: Partial<BaseAutosuggestionsConfig> & {\n textareaPurpose: string;\n apiConfig: BaseCopilotTextareaApiConfig;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=base-copilot-textarea-props.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|