@copilotkit/react-ui 0.6.0 → 0.7.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 (71) hide show
  1. package/.turbo/turbo-build.log +187 -206
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{chunk-OXVWERJ3.mjs → chunk-46XC7ODX.mjs} +2 -2
  4. package/dist/{chunk-LWCPZL5R.mjs → chunk-4HK6C362.mjs} +2 -2
  5. package/dist/chunk-7NSRDJ5C.mjs +3 -0
  6. package/dist/{chunk-LBR74SDK.mjs → chunk-BB6IP63P.mjs} +2 -2
  7. package/dist/{chunk-NQOAC4FX.mjs → chunk-E2YBQYWM.mjs} +3 -3
  8. package/dist/{chunk-D5X3GP4X.mjs → chunk-E5BOIXYO.mjs} +2 -2
  9. package/dist/{chunk-UFPPHGR2.mjs → chunk-QEXWZWJL.mjs} +3 -3
  10. package/dist/{chunk-YFUU7ZSS.mjs → chunk-SF56HSZW.mjs} +2 -2
  11. package/dist/chunk-U6NJWGTV.mjs +3 -0
  12. package/dist/{chunk-LED2SG5O.mjs → chunk-VQNV2DHJ.mjs} +2 -2
  13. package/dist/{chunk-M5HEMJBX.mjs → chunk-VSNDSL6W.mjs} +2 -2
  14. package/dist/{chunk-YYTSYGAK.mjs → chunk-XZFO2YEG.mjs} +4 -4
  15. package/dist/components/chat-components/chat-list.mjs +5 -5
  16. package/dist/components/chat-components/chat-message-actions.mjs +2 -2
  17. package/dist/components/chat-components/chat-message.mjs +4 -4
  18. package/dist/components/chat-components/chat-panel.mjs +3 -3
  19. package/dist/components/chat-components/clear-history.mjs +1 -1
  20. package/dist/components/chat-components/copilot-chat.mjs +10 -10
  21. package/dist/components/chat-components/default-empty-screen.mjs +2 -2
  22. package/dist/components/chat-components/prompt-form.mjs +2 -2
  23. package/dist/components/chat-components/theme-toggle.mjs +1 -1
  24. package/dist/components/chat-components/ui/codeblock.mjs +2 -2
  25. package/dist/components/index.d.ts +0 -4
  26. package/dist/components/index.mjs +13 -16
  27. package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs +12 -12
  28. package/dist/components/sidebar/copilot-sidebar.mjs +11 -11
  29. package/dist/index.d.ts +0 -4
  30. package/dist/index.mjs +14 -17
  31. package/dist/types/index.d.ts +1 -3
  32. package/dist/types/index.mjs +1 -3
  33. package/package.json +4 -5
  34. package/src/components/index.ts +0 -3
  35. package/src/types/index.ts +1 -10
  36. package/dist/chunk-3PTUDEHX.mjs +0 -67
  37. package/dist/chunk-3PTUDEHX.mjs.map +0 -1
  38. package/dist/chunk-CNTO7ZIR.mjs +0 -25
  39. package/dist/chunk-CNTO7ZIR.mjs.map +0 -1
  40. package/dist/chunk-E2RQC2ZD.mjs +0 -68
  41. package/dist/chunk-E2RQC2ZD.mjs.map +0 -1
  42. package/dist/chunk-FZRTAML3.mjs +0 -3
  43. package/dist/chunk-YPBKY4KY.mjs +0 -3
  44. package/dist/components/copilot-textarea/copilot-textarea.d.ts +0 -12
  45. package/dist/components/copilot-textarea/copilot-textarea.mjs +0 -6
  46. package/dist/components/copilot-textarea/copilot-textarea.mjs.map +0 -1
  47. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.d.ts +0 -22
  48. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +0 -4
  49. package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs.map +0 -1
  50. package/dist/types/autosuggestions-config.d.ts +0 -18
  51. package/dist/types/autosuggestions-config.mjs +0 -4
  52. package/dist/types/autosuggestions-config.mjs.map +0 -1
  53. package/dist/types/minimal-chatgpt-message.d.ts +0 -7
  54. package/dist/types/minimal-chatgpt-message.mjs +0 -3
  55. package/dist/types/minimal-chatgpt-message.mjs.map +0 -1
  56. package/src/components/copilot-textarea/copilot-textarea.tsx +0 -40
  57. package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +0 -100
  58. package/src/types/autosuggestions-config.tsx +0 -94
  59. package/src/types/minimal-chatgpt-message.tsx +0 -5
  60. /package/dist/{chunk-OXVWERJ3.mjs.map → chunk-46XC7ODX.mjs.map} +0 -0
  61. /package/dist/{chunk-LWCPZL5R.mjs.map → chunk-4HK6C362.mjs.map} +0 -0
  62. /package/dist/{chunk-FZRTAML3.mjs.map → chunk-7NSRDJ5C.mjs.map} +0 -0
  63. /package/dist/{chunk-LBR74SDK.mjs.map → chunk-BB6IP63P.mjs.map} +0 -0
  64. /package/dist/{chunk-NQOAC4FX.mjs.map → chunk-E2YBQYWM.mjs.map} +0 -0
  65. /package/dist/{chunk-D5X3GP4X.mjs.map → chunk-E5BOIXYO.mjs.map} +0 -0
  66. /package/dist/{chunk-UFPPHGR2.mjs.map → chunk-QEXWZWJL.mjs.map} +0 -0
  67. /package/dist/{chunk-YFUU7ZSS.mjs.map → chunk-SF56HSZW.mjs.map} +0 -0
  68. /package/dist/{chunk-YPBKY4KY.mjs.map → chunk-U6NJWGTV.mjs.map} +0 -0
  69. /package/dist/{chunk-LED2SG5O.mjs.map → chunk-VQNV2DHJ.mjs.map} +0 -0
  70. /package/dist/{chunk-M5HEMJBX.mjs.map → chunk-VSNDSL6W.mjs.map} +0 -0
  71. /package/dist/{chunk-YYTSYGAK.mjs.map → chunk-XZFO2YEG.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { ExternalLink } from './chunk-KXJV37FS.mjs';
2
- import { IconArrowRight } from './chunk-KR7MH7XO.mjs';
3
2
  import { Button } from './chunk-V6QYUEJR.mjs';
3
+ import { IconArrowRight } from './chunk-KR7MH7XO.mjs';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
6
6
  var exampleMessages = [
@@ -71,4 +71,4 @@ var DefaultEmptyScreen = (props) => {
71
71
 
72
72
  export { DefaultEmptyScreen };
73
73
  //# sourceMappingURL=out.js.map
74
- //# sourceMappingURL=chunk-M5HEMJBX.mjs.map
74
+ //# sourceMappingURL=chunk-VSNDSL6W.mjs.map
@@ -1,7 +1,7 @@
1
+ import { DefaultEmptyScreen } from './chunk-VSNDSL6W.mjs';
2
+ import { ChatList } from './chunk-BB6IP63P.mjs';
3
+ import { ChatPanel } from './chunk-E2YBQYWM.mjs';
1
4
  import { ChatScrollAnchor } from './chunk-RSONJDLO.mjs';
2
- import { DefaultEmptyScreen } from './chunk-M5HEMJBX.mjs';
3
- import { ChatList } from './chunk-LBR74SDK.mjs';
4
- import { ChatPanel } from './chunk-NQOAC4FX.mjs';
5
5
  import { useCopilotChat } from '@copilotkit/react-core';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
7
7
 
@@ -50,4 +50,4 @@ function CopilotChat({
50
50
 
51
51
  export { CopilotChat };
52
52
  //# sourceMappingURL=out.js.map
53
- //# sourceMappingURL=chunk-YYTSYGAK.mjs.map
53
+ //# sourceMappingURL=chunk-XZFO2YEG.mjs.map
@@ -1,11 +1,11 @@
1
- export { ChatList } from '../../chunk-LBR74SDK.mjs';
1
+ export { ChatList } from '../../chunk-BB6IP63P.mjs';
2
2
  import '../../chunk-DOMJCSI6.mjs';
3
- import '../../chunk-UFPPHGR2.mjs';
4
- import '../../chunk-LED2SG5O.mjs';
3
+ import '../../chunk-QEXWZWJL.mjs';
4
+ import '../../chunk-VQNV2DHJ.mjs';
5
5
  import '../../chunk-6LRNF2VU.mjs';
6
- import '../../chunk-D5X3GP4X.mjs';
7
- import '../../chunk-KR7MH7XO.mjs';
6
+ import '../../chunk-E5BOIXYO.mjs';
8
7
  import '../../chunk-V6QYUEJR.mjs';
8
+ import '../../chunk-KR7MH7XO.mjs';
9
9
  import '../../chunk-6LAC5RA2.mjs';
10
10
  import '../../chunk-TVTG3V4F.mjs';
11
11
  import '../../chunk-MRXNTQOX.mjs';
@@ -1,6 +1,6 @@
1
- export { ChatMessageActions } from '../../chunk-D5X3GP4X.mjs';
2
- import '../../chunk-KR7MH7XO.mjs';
1
+ export { ChatMessageActions } from '../../chunk-E5BOIXYO.mjs';
3
2
  import '../../chunk-V6QYUEJR.mjs';
3
+ import '../../chunk-KR7MH7XO.mjs';
4
4
  import '../../chunk-6LAC5RA2.mjs';
5
5
  import '../../chunk-TVTG3V4F.mjs';
6
6
  import '../../chunk-MRXNTQOX.mjs';
@@ -1,9 +1,9 @@
1
- export { ChatMessage } from '../../chunk-UFPPHGR2.mjs';
2
- import '../../chunk-LED2SG5O.mjs';
1
+ export { ChatMessage } from '../../chunk-QEXWZWJL.mjs';
2
+ import '../../chunk-VQNV2DHJ.mjs';
3
3
  import '../../chunk-6LRNF2VU.mjs';
4
- import '../../chunk-D5X3GP4X.mjs';
5
- import '../../chunk-KR7MH7XO.mjs';
4
+ import '../../chunk-E5BOIXYO.mjs';
6
5
  import '../../chunk-V6QYUEJR.mjs';
6
+ import '../../chunk-KR7MH7XO.mjs';
7
7
  import '../../chunk-6LAC5RA2.mjs';
8
8
  import '../../chunk-TVTG3V4F.mjs';
9
9
  import '../../chunk-MRXNTQOX.mjs';
@@ -1,8 +1,8 @@
1
- export { ChatPanel } from '../../chunk-NQOAC4FX.mjs';
2
- import '../../chunk-LWCPZL5R.mjs';
1
+ export { ChatPanel } from '../../chunk-E2YBQYWM.mjs';
2
+ import '../../chunk-4HK6C362.mjs';
3
3
  import '../../chunk-BS6RR2DJ.mjs';
4
- import '../../chunk-KR7MH7XO.mjs';
5
4
  import '../../chunk-V6QYUEJR.mjs';
5
+ import '../../chunk-KR7MH7XO.mjs';
6
6
  import '../../chunk-BIPCPNHG.mjs';
7
7
  import '../../chunk-TVTG3V4F.mjs';
8
8
  import '../../chunk-MRXNTQOX.mjs';
@@ -1,6 +1,6 @@
1
1
  import { AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction } from '../../chunk-I2AB5FK4.mjs';
2
- import { IconSpinner } from '../../chunk-KR7MH7XO.mjs';
3
2
  import { Button } from '../../chunk-V6QYUEJR.mjs';
3
+ import { IconSpinner } from '../../chunk-KR7MH7XO.mjs';
4
4
  import '../../chunk-TVTG3V4F.mjs';
5
5
  import { __async } from '../../chunk-MRXNTQOX.mjs';
6
6
  import * as React from 'react';
@@ -1,18 +1,18 @@
1
- export { CopilotChat } from '../../chunk-YYTSYGAK.mjs';
2
- import '../../chunk-RSONJDLO.mjs';
3
- import '../../chunk-M5HEMJBX.mjs';
1
+ export { CopilotChat } from '../../chunk-XZFO2YEG.mjs';
2
+ import '../../chunk-VSNDSL6W.mjs';
4
3
  import '../../chunk-KXJV37FS.mjs';
5
- import '../../chunk-LBR74SDK.mjs';
4
+ import '../../chunk-BB6IP63P.mjs';
6
5
  import '../../chunk-DOMJCSI6.mjs';
7
- import '../../chunk-UFPPHGR2.mjs';
8
- import '../../chunk-LED2SG5O.mjs';
6
+ import '../../chunk-QEXWZWJL.mjs';
7
+ import '../../chunk-VQNV2DHJ.mjs';
9
8
  import '../../chunk-6LRNF2VU.mjs';
10
- import '../../chunk-D5X3GP4X.mjs';
11
- import '../../chunk-NQOAC4FX.mjs';
12
- import '../../chunk-LWCPZL5R.mjs';
9
+ import '../../chunk-E5BOIXYO.mjs';
10
+ import '../../chunk-E2YBQYWM.mjs';
11
+ import '../../chunk-4HK6C362.mjs';
13
12
  import '../../chunk-BS6RR2DJ.mjs';
14
- import '../../chunk-KR7MH7XO.mjs';
13
+ import '../../chunk-RSONJDLO.mjs';
15
14
  import '../../chunk-V6QYUEJR.mjs';
15
+ import '../../chunk-KR7MH7XO.mjs';
16
16
  import '../../chunk-N7KB3Z57.mjs';
17
17
  import '../../chunk-6LAC5RA2.mjs';
18
18
  import '../../chunk-BIPCPNHG.mjs';
@@ -1,7 +1,7 @@
1
- export { DefaultEmptyScreen } from '../../chunk-M5HEMJBX.mjs';
1
+ export { DefaultEmptyScreen } from '../../chunk-VSNDSL6W.mjs';
2
2
  import '../../chunk-KXJV37FS.mjs';
3
- import '../../chunk-KR7MH7XO.mjs';
4
3
  import '../../chunk-V6QYUEJR.mjs';
4
+ import '../../chunk-KR7MH7XO.mjs';
5
5
  import '../../chunk-TVTG3V4F.mjs';
6
6
  import '../../chunk-MRXNTQOX.mjs';
7
7
  //# sourceMappingURL=out.js.map
@@ -1,7 +1,7 @@
1
- export { PromptForm } from '../../chunk-LWCPZL5R.mjs';
1
+ export { PromptForm } from '../../chunk-4HK6C362.mjs';
2
2
  import '../../chunk-BS6RR2DJ.mjs';
3
- import '../../chunk-KR7MH7XO.mjs';
4
3
  import '../../chunk-V6QYUEJR.mjs';
4
+ import '../../chunk-KR7MH7XO.mjs';
5
5
  import '../../chunk-BIPCPNHG.mjs';
6
6
  import '../../chunk-TVTG3V4F.mjs';
7
7
  import '../../chunk-MRXNTQOX.mjs';
@@ -1,5 +1,5 @@
1
- import { IconMoon, IconSun } from '../../chunk-KR7MH7XO.mjs';
2
1
  import { Button } from '../../chunk-V6QYUEJR.mjs';
2
+ import { IconMoon, IconSun } from '../../chunk-KR7MH7XO.mjs';
3
3
  import '../../chunk-TVTG3V4F.mjs';
4
4
  import '../../chunk-MRXNTQOX.mjs';
5
5
  import * as React from 'react';
@@ -1,6 +1,6 @@
1
- export { CodeBlock, generateRandomString, programmingLanguages } from '../../../chunk-LED2SG5O.mjs';
2
- import '../../../chunk-KR7MH7XO.mjs';
1
+ export { CodeBlock, generateRandomString, programmingLanguages } from '../../../chunk-VQNV2DHJ.mjs';
3
2
  import '../../../chunk-V6QYUEJR.mjs';
3
+ import '../../../chunk-KR7MH7XO.mjs';
4
4
  import '../../../chunk-6LAC5RA2.mjs';
5
5
  import '../../../chunk-TVTG3V4F.mjs';
6
6
  import '../../../chunk-MRXNTQOX.mjs';
@@ -3,11 +3,7 @@ export { Tooltip, TooltipProvider } from './chat-components/ui/tooltip.js';
3
3
  export { CopilotSidebarUIProvider } from './sidebar/copilot-sidebar-ui-provider.js';
4
4
  export { CopilotSidebar } from './sidebar/copilot-sidebar.js';
5
5
  export { CopilotSidebarContext, CopilotSidebarContextType } from './sidebar/sidebar-context.js';
6
- export { CopilotTextarea, CopilotTextareaProps } from './copilot-textarea/copilot-textarea.js';
7
6
  import 'react';
8
7
  import './chat-components/default-empty-screen.js';
9
8
  import '@copilotkit/react-core';
10
9
  import '@radix-ui/react-tooltip';
11
- import '../types/autosuggestions-config.js';
12
- import '@copilotkit/react-textarea';
13
- import '../types/minimal-chatgpt-message.js';
@@ -1,25 +1,22 @@
1
- import '../chunk-FZRTAML3.mjs';
2
- export { CopilotSidebarUIProvider } from '../chunk-OXVWERJ3.mjs';
3
- export { CopilotSidebar } from '../chunk-YFUU7ZSS.mjs';
1
+ import '../chunk-U6NJWGTV.mjs';
2
+ export { CopilotSidebarUIProvider } from '../chunk-46XC7ODX.mjs';
3
+ export { CopilotSidebar } from '../chunk-SF56HSZW.mjs';
4
4
  export { CopilotSidebarContext } from '../chunk-MC6KTH4X.mjs';
5
- export { CopilotTextarea } from '../chunk-CNTO7ZIR.mjs';
6
- import '../chunk-3PTUDEHX.mjs';
7
- export { CopilotChat } from '../chunk-YYTSYGAK.mjs';
8
- import '../chunk-RSONJDLO.mjs';
9
- import '../chunk-M5HEMJBX.mjs';
5
+ export { CopilotChat } from '../chunk-XZFO2YEG.mjs';
6
+ import '../chunk-VSNDSL6W.mjs';
10
7
  import '../chunk-KXJV37FS.mjs';
11
- import '../chunk-E2RQC2ZD.mjs';
12
- import '../chunk-LBR74SDK.mjs';
8
+ import '../chunk-BB6IP63P.mjs';
13
9
  import '../chunk-DOMJCSI6.mjs';
14
- import '../chunk-UFPPHGR2.mjs';
15
- import '../chunk-LED2SG5O.mjs';
10
+ import '../chunk-QEXWZWJL.mjs';
11
+ import '../chunk-VQNV2DHJ.mjs';
16
12
  import '../chunk-6LRNF2VU.mjs';
17
- import '../chunk-D5X3GP4X.mjs';
18
- import '../chunk-NQOAC4FX.mjs';
19
- import '../chunk-LWCPZL5R.mjs';
13
+ import '../chunk-E5BOIXYO.mjs';
14
+ import '../chunk-E2YBQYWM.mjs';
15
+ import '../chunk-4HK6C362.mjs';
20
16
  export { Tooltip, TooltipProvider } from '../chunk-BS6RR2DJ.mjs';
21
- import '../chunk-KR7MH7XO.mjs';
17
+ import '../chunk-RSONJDLO.mjs';
22
18
  import '../chunk-V6QYUEJR.mjs';
19
+ import '../chunk-KR7MH7XO.mjs';
23
20
  import '../chunk-N7KB3Z57.mjs';
24
21
  import '../chunk-6LAC5RA2.mjs';
25
22
  import '../chunk-BIPCPNHG.mjs';
@@ -1,21 +1,21 @@
1
- export { CopilotSidebarUIProvider } from '../../chunk-OXVWERJ3.mjs';
2
- import '../../chunk-YFUU7ZSS.mjs';
1
+ export { CopilotSidebarUIProvider } from '../../chunk-46XC7ODX.mjs';
2
+ import '../../chunk-SF56HSZW.mjs';
3
3
  import '../../chunk-MC6KTH4X.mjs';
4
- import '../../chunk-YYTSYGAK.mjs';
5
- import '../../chunk-RSONJDLO.mjs';
6
- import '../../chunk-M5HEMJBX.mjs';
4
+ import '../../chunk-XZFO2YEG.mjs';
5
+ import '../../chunk-VSNDSL6W.mjs';
7
6
  import '../../chunk-KXJV37FS.mjs';
8
- import '../../chunk-LBR74SDK.mjs';
7
+ import '../../chunk-BB6IP63P.mjs';
9
8
  import '../../chunk-DOMJCSI6.mjs';
10
- import '../../chunk-UFPPHGR2.mjs';
11
- import '../../chunk-LED2SG5O.mjs';
9
+ import '../../chunk-QEXWZWJL.mjs';
10
+ import '../../chunk-VQNV2DHJ.mjs';
12
11
  import '../../chunk-6LRNF2VU.mjs';
13
- import '../../chunk-D5X3GP4X.mjs';
14
- import '../../chunk-NQOAC4FX.mjs';
15
- import '../../chunk-LWCPZL5R.mjs';
12
+ import '../../chunk-E5BOIXYO.mjs';
13
+ import '../../chunk-E2YBQYWM.mjs';
14
+ import '../../chunk-4HK6C362.mjs';
16
15
  import '../../chunk-BS6RR2DJ.mjs';
17
- import '../../chunk-KR7MH7XO.mjs';
16
+ import '../../chunk-RSONJDLO.mjs';
18
17
  import '../../chunk-V6QYUEJR.mjs';
18
+ import '../../chunk-KR7MH7XO.mjs';
19
19
  import '../../chunk-N7KB3Z57.mjs';
20
20
  import '../../chunk-6LAC5RA2.mjs';
21
21
  import '../../chunk-BIPCPNHG.mjs';
@@ -1,19 +1,19 @@
1
- export { CopilotSidebar } from '../../chunk-YFUU7ZSS.mjs';
2
- import '../../chunk-YYTSYGAK.mjs';
3
- import '../../chunk-RSONJDLO.mjs';
4
- import '../../chunk-M5HEMJBX.mjs';
1
+ export { CopilotSidebar } from '../../chunk-SF56HSZW.mjs';
2
+ import '../../chunk-XZFO2YEG.mjs';
3
+ import '../../chunk-VSNDSL6W.mjs';
5
4
  import '../../chunk-KXJV37FS.mjs';
6
- import '../../chunk-LBR74SDK.mjs';
5
+ import '../../chunk-BB6IP63P.mjs';
7
6
  import '../../chunk-DOMJCSI6.mjs';
8
- import '../../chunk-UFPPHGR2.mjs';
9
- import '../../chunk-LED2SG5O.mjs';
7
+ import '../../chunk-QEXWZWJL.mjs';
8
+ import '../../chunk-VQNV2DHJ.mjs';
10
9
  import '../../chunk-6LRNF2VU.mjs';
11
- import '../../chunk-D5X3GP4X.mjs';
12
- import '../../chunk-NQOAC4FX.mjs';
13
- import '../../chunk-LWCPZL5R.mjs';
10
+ import '../../chunk-E5BOIXYO.mjs';
11
+ import '../../chunk-E2YBQYWM.mjs';
12
+ import '../../chunk-4HK6C362.mjs';
14
13
  import '../../chunk-BS6RR2DJ.mjs';
15
- import '../../chunk-KR7MH7XO.mjs';
14
+ import '../../chunk-RSONJDLO.mjs';
16
15
  import '../../chunk-V6QYUEJR.mjs';
16
+ import '../../chunk-KR7MH7XO.mjs';
17
17
  import '../../chunk-N7KB3Z57.mjs';
18
18
  import '../../chunk-6LAC5RA2.mjs';
19
19
  import '../../chunk-BIPCPNHG.mjs';
package/dist/index.d.ts CHANGED
@@ -3,11 +3,7 @@ export { Tooltip, TooltipProvider } from './components/chat-components/ui/toolti
3
3
  export { CopilotSidebarUIProvider } from './components/sidebar/copilot-sidebar-ui-provider.js';
4
4
  export { CopilotSidebar } from './components/sidebar/copilot-sidebar.js';
5
5
  export { CopilotSidebarContext, CopilotSidebarContextType } from './components/sidebar/sidebar-context.js';
6
- export { CopilotTextarea, CopilotTextareaProps } from './components/copilot-textarea/copilot-textarea.js';
7
- export { MinimalChatGPTMessage } from './types/minimal-chatgpt-message.js';
8
- export { AutosuggestionsConfig, MakeSystemPrompt, defaultAutosuggestionsConfig, defaultFewShotMessages, defaultMakeSystemPrompt } from './types/autosuggestions-config.js';
9
6
  import 'react';
10
7
  import './components/chat-components/default-empty-screen.js';
11
8
  import '@copilotkit/react-core';
12
9
  import '@radix-ui/react-tooltip';
13
- import '@copilotkit/react-textarea';
package/dist/index.mjs CHANGED
@@ -1,26 +1,23 @@
1
- import './chunk-YPBKY4KY.mjs';
2
- import './chunk-FZRTAML3.mjs';
3
- export { CopilotSidebarUIProvider } from './chunk-OXVWERJ3.mjs';
4
- export { CopilotSidebar } from './chunk-YFUU7ZSS.mjs';
1
+ import './chunk-7NSRDJ5C.mjs';
2
+ import './chunk-U6NJWGTV.mjs';
3
+ export { CopilotSidebarUIProvider } from './chunk-46XC7ODX.mjs';
4
+ export { CopilotSidebar } from './chunk-SF56HSZW.mjs';
5
5
  export { CopilotSidebarContext } from './chunk-MC6KTH4X.mjs';
6
- export { CopilotTextarea } from './chunk-CNTO7ZIR.mjs';
7
- import './chunk-3PTUDEHX.mjs';
8
- export { CopilotChat } from './chunk-YYTSYGAK.mjs';
9
- import './chunk-RSONJDLO.mjs';
10
- import './chunk-M5HEMJBX.mjs';
6
+ export { CopilotChat } from './chunk-XZFO2YEG.mjs';
7
+ import './chunk-VSNDSL6W.mjs';
11
8
  import './chunk-KXJV37FS.mjs';
12
- export { defaultAutosuggestionsConfig, defaultFewShotMessages, defaultMakeSystemPrompt } from './chunk-E2RQC2ZD.mjs';
13
- import './chunk-LBR74SDK.mjs';
9
+ import './chunk-BB6IP63P.mjs';
14
10
  import './chunk-DOMJCSI6.mjs';
15
- import './chunk-UFPPHGR2.mjs';
16
- import './chunk-LED2SG5O.mjs';
11
+ import './chunk-QEXWZWJL.mjs';
12
+ import './chunk-VQNV2DHJ.mjs';
17
13
  import './chunk-6LRNF2VU.mjs';
18
- import './chunk-D5X3GP4X.mjs';
19
- import './chunk-NQOAC4FX.mjs';
20
- import './chunk-LWCPZL5R.mjs';
14
+ import './chunk-E5BOIXYO.mjs';
15
+ import './chunk-E2YBQYWM.mjs';
16
+ import './chunk-4HK6C362.mjs';
21
17
  export { Tooltip, TooltipProvider } from './chunk-BS6RR2DJ.mjs';
22
- import './chunk-KR7MH7XO.mjs';
18
+ import './chunk-RSONJDLO.mjs';
23
19
  import './chunk-V6QYUEJR.mjs';
20
+ import './chunk-KR7MH7XO.mjs';
24
21
  import './chunk-IU3WTXLQ.mjs';
25
22
  import './chunk-H4VKQGVU.mjs';
26
23
  import './chunk-N7KB3Z57.mjs';
@@ -1,3 +1 @@
1
- export { MinimalChatGPTMessage } from './minimal-chatgpt-message.js';
2
- export { AutosuggestionsConfig, MakeSystemPrompt, defaultAutosuggestionsConfig, defaultFewShotMessages, defaultMakeSystemPrompt } from './autosuggestions-config.js';
3
- import '@copilotkit/react-textarea';
1
+
@@ -1,5 +1,3 @@
1
- import '../chunk-YPBKY4KY.mjs';
2
- export { defaultAutosuggestionsConfig, defaultFewShotMessages, defaultMakeSystemPrompt } from '../chunk-E2RQC2ZD.mjs';
3
- import '../chunk-MRXNTQOX.mjs';
1
+ import '../chunk-7NSRDJ5C.mjs';
4
2
  //# sourceMappingURL=out.js.map
5
3
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.6.0",
7
+ "version": "0.7.0",
8
8
  "sideEffects": [
9
9
  "**/*.css"
10
10
  ],
@@ -28,8 +28,8 @@
28
28
  "tsup": "^6.1.3",
29
29
  "typescript": "^4.9.4",
30
30
  "eslint-config-custom": "0.2.0",
31
- "tsconfig": "0.3.0",
32
- "tailwind-config": "0.1.0"
31
+ "tailwind-config": "0.1.0",
32
+ "tsconfig": "0.3.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "@heroicons/react": "^2.0.18",
@@ -56,8 +56,7 @@
56
56
  "remark-gfm": "^3.0.1",
57
57
  "remark-math": "^5.1.1",
58
58
  "tailwind-merge": "^1.13.2",
59
- "@copilotkit/react-core": "0.6.0",
60
- "@copilotkit/react-textarea": "0.6.0"
59
+ "@copilotkit/react-core": "0.6.0"
61
60
  },
62
61
  "scripts": {
63
62
  "build": "tsup --treeshake",
@@ -5,6 +5,3 @@ export { CopilotSidebarUIProvider } from "./sidebar/copilot-sidebar-ui-provider"
5
5
  export { CopilotSidebar } from "./sidebar/copilot-sidebar";
6
6
  export { CopilotSidebarContext } from "./sidebar/sidebar-context";
7
7
  export type { CopilotSidebarContextType } from "./sidebar/sidebar-context";
8
-
9
- export { CopilotTextarea } from "./copilot-textarea/copilot-textarea";
10
- export type { CopilotTextareaProps } from "./copilot-textarea/copilot-textarea";
@@ -1,10 +1 @@
1
- export type { MinimalChatGPTMessage } from "./minimal-chatgpt-message";
2
- export type {
3
- MakeSystemPrompt,
4
- AutosuggestionsConfig,
5
- } from "./autosuggestions-config";
6
- export {
7
- defaultAutosuggestionsConfig,
8
- defaultMakeSystemPrompt,
9
- defaultFewShotMessages,
10
- } from "./autosuggestions-config";
1
+ export {};
@@ -1,67 +0,0 @@
1
- import { __async, __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
2
- import { CopilotContext } from '@copilotkit/react-core';
3
- import { useContext, useCallback } from 'react';
4
-
5
- function useMakeStandardAutosuggestionFunction(purposePrompt, apiEndpoint, makeSystemPrompt, fewShotMessages, contextCategories, forwardedProps) {
6
- const { getContextString } = useContext(CopilotContext);
7
- return useCallback(
8
- (beforeText, afterText, abortSignal) => __async(this, null, function* () {
9
- const res = yield retry(() => __async(this, null, function* () {
10
- return yield fetch(apiEndpoint, {
11
- method: "POST",
12
- body: JSON.stringify(__spreadProps(__spreadValues({}, forwardedProps), {
13
- messages: [
14
- {
15
- role: "system",
16
- content: makeSystemPrompt(
17
- purposePrompt,
18
- getContextString(contextCategories)
19
- )
20
- },
21
- ...fewShotMessages,
22
- {
23
- role: "user",
24
- name: "TextAfterCursor",
25
- content: afterText
26
- },
27
- {
28
- role: "user",
29
- name: "TextBeforeCursor",
30
- content: beforeText
31
- }
32
- ]
33
- })),
34
- signal: abortSignal
35
- });
36
- }));
37
- const json = yield res.json();
38
- const suggestion = json.choices[0].message.content;
39
- return suggestion;
40
- }),
41
- [
42
- apiEndpoint,
43
- makeSystemPrompt,
44
- fewShotMessages,
45
- getContextString,
46
- contextCategories,
47
- purposePrompt
48
- ]
49
- );
50
- }
51
- function retry(fn, retriesLeft = 2, interval = 200, backoff = 1.5) {
52
- return new Promise((resolve, reject) => {
53
- fn().then(resolve).catch((error) => {
54
- if (retriesLeft === 1) {
55
- reject(error);
56
- return;
57
- }
58
- setTimeout(() => {
59
- retry(fn, retriesLeft - 1, interval * backoff, backoff).then(resolve).catch(reject);
60
- }, interval);
61
- });
62
- });
63
- }
64
-
65
- export { useMakeStandardAutosuggestionFunction };
66
- //# sourceMappingURL=out.js.map
67
- //# sourceMappingURL=chunk-3PTUDEHX.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx"],"names":[],"mappings":";;;;;;;AAAA,SAAS,sBAAsB;AAC/B,SAAS,aAAa,kBAAkB;AAkBjC,SAAS,sCACd,eACA,aACA,kBACA,iBACA,mBACA,gBAC6B;AAC7B,QAAM,EAAE,iBAAiB,IAAI,WAAW,cAAc;AAEtD,SAAO;AAAA,IACL,CAAO,YAAoB,WAAmB,gBAA6B;AACzE,YAAM,MAAM,MAAM,MAAM,MAAY;AAClC,eAAO,MAAM,MAAM,aAAa;AAAA,UAC9B,QAAQ;AAAA,UACR,MAAM,KAAK,UAAU,iCAChB,iBADgB;AAAA,YAEnB,UAAU;AAAA,cACR;AAAA,gBACE,MAAM;AAAA,gBACN,SAAS;AAAA,kBACP;AAAA,kBACA,iBAAiB,iBAAiB;AAAA,gBACpC;AAAA,cACF;AAAA,cACA,GAAG;AAAA,cACH;AAAA,gBACE,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,cACA;AAAA,gBACE,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,YACF;AAAA,UACF,EAAC;AAAA,UACD,QAAQ;AAAA,QACV,CAAC;AAAA,MACH,EAAC;AAED,YAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,YAAM,aAAa,KAAK,QAAQ,GAAG,QAAQ;AAE3C,aAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,MACP,IACA,cAAsB,GACtB,WAAmB,KACnB,UAAkB,KACN;AACZ,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,OAAG,EACA,KAAK,OAAO,EACZ,MAAM,CAAC,UAAU;AAChB,UAAI,gBAAgB,GAAG;AACrB,eAAO,KAAK;AACZ;AAAA,MACF;AAEA,iBAAW,MAAM;AACf,cAAM,IAAI,cAAc,GAAG,WAAW,SAAS,OAAO,EACnD,KAAK,OAAO,EACZ,MAAM,MAAM;AAAA,MACjB,GAAG,QAAQ;AAAA,IACb,CAAC;AAAA,EACL,CAAC;AACH","sourcesContent":["import { CopilotContext } from \"@copilotkit/react-core\";\nimport { useCallback, useContext } from \"react\";\nimport { MakeSystemPrompt } from \"../../types\";\nimport { MinimalChatGPTMessage } from \"../../types/minimal-chatgpt-message\";\nimport { AutosuggestionsBareFunction } from \"@copilotkit/react-textarea\";\n\n/**\n * Returns a memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n * The function takes in the text before and after the cursor, and an abort signal.\n * It sends a POST request to the API endpoint with the messages array containing the system message, few shot messages, and user messages.\n * The function returns the suggestion from the API response.\n *\n * @param purposePrompt - The purpose of the textarea. This is included in the system message.\n * @param apiEndpoint - The API endpoint to send the autosuggestion request to.\n * @param makeSystemMessage - A function that takes in a context string and returns a system message to include in the autosuggestion request.\n * @param fewShotMessages - An array of few shot messages to include in the autosuggestion request.\n * @param contextCategories - The categories of context strings we want to include. By default, we include the (default) \"global\" context category.\n * @returns A memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.\n */\nexport function useMakeStandardAutosuggestionFunction(\n purposePrompt: string,\n apiEndpoint: string,\n makeSystemPrompt: MakeSystemPrompt,\n fewShotMessages: MinimalChatGPTMessage[],\n contextCategories: string[] | undefined,\n forwardedProps?: { [key: string]: any }\n): AutosuggestionsBareFunction {\n const { getContextString } = useContext(CopilotContext);\n\n return useCallback(\n async (beforeText: string, afterText: string, abortSignal: AbortSignal) => {\n const res = await retry(async () => {\n return await fetch(apiEndpoint, {\n method: \"POST\",\n body: JSON.stringify({\n ...forwardedProps,\n messages: [\n {\n role: \"system\",\n content: makeSystemPrompt(\n purposePrompt,\n getContextString(contextCategories)\n ),\n },\n ...fewShotMessages,\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content: afterText,\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: beforeText,\n },\n ],\n }),\n signal: abortSignal,\n });\n });\n\n const json = await res.json();\n const suggestion = json.choices[0].message.content;\n\n return suggestion;\n },\n [\n apiEndpoint,\n makeSystemPrompt,\n fewShotMessages,\n getContextString,\n contextCategories,\n purposePrompt,\n ]\n );\n}\n\nfunction retry<T>(\n fn: () => Promise<T>,\n retriesLeft: number = 2,\n interval: number = 200,\n backoff: number = 1.5\n): Promise<T> {\n return new Promise((resolve, reject) => {\n fn()\n .then(resolve)\n .catch((error) => {\n if (retriesLeft === 1) {\n reject(error);\n return;\n }\n\n setTimeout(() => {\n retry(fn, retriesLeft - 1, interval * backoff, backoff)\n .then(resolve)\n .catch(reject);\n }, interval);\n });\n });\n}\n"]}
@@ -1,25 +0,0 @@
1
- import { useMakeStandardAutosuggestionFunction } from './chunk-3PTUDEHX.mjs';
2
- import { defaultAutosuggestionsConfig } from './chunk-E2RQC2ZD.mjs';
3
- import { __spreadValues, __spreadProps } from './chunk-MRXNTQOX.mjs';
4
- import { BaseCopilotTextarea } from '@copilotkit/react-textarea';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- function CopilotTextarea(props) {
8
- const autosuggestionsConfig = __spreadValues(__spreadValues({}, defaultAutosuggestionsConfig), props.autosuggestionsConfig);
9
- const autosuggestionsFunction = useMakeStandardAutosuggestionFunction(
10
- autosuggestionsConfig.purposePrompt,
11
- autosuggestionsConfig.apiEndpoint,
12
- autosuggestionsConfig.makeSystemPrompt,
13
- autosuggestionsConfig.fewShotMessages,
14
- autosuggestionsConfig.externalContextCategories,
15
- autosuggestionsConfig.forwardedParams
16
- );
17
- return /* @__PURE__ */ jsx(BaseCopilotTextarea, __spreadProps(__spreadValues({}, props), {
18
- autosuggestionsConfig,
19
- autosuggestionsFunction
20
- }));
21
- }
22
-
23
- export { CopilotTextarea };
24
- //# sourceMappingURL=out.js.map
25
- //# sourceMappingURL=chunk-CNTO7ZIR.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/copilot-textarea/copilot-textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAMA;AAAA,EACE;AAAA,OAEK;AAwBH;AAhBG,SAAS,gBAAgB,OAA0C;AACxE,QAAM,wBAA+C,kCAChD,+BACA,MAAM;AAGX,QAAM,0BAA0B;AAAA,IAC9B,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,EACxB;AAEA,SACE,oBAAC,sDACK,QADL;AAAA,IAEC;AAAA,IACA;AAAA,IACF;AAEJ","sourcesContent":["// This example is for an Editor with `ReactEditor` and `HistoryEditor`\nimport { useMakeStandardAutosuggestionFunction } from \"../../hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function\";\nimport {\n AutosuggestionsConfig,\n defaultAutosuggestionsConfig,\n} from \"../../types/autosuggestions-config\";\nimport {\n BaseCopilotTextarea,\n BaseCopilotTextareaProps,\n} from \"@copilotkit/react-textarea\";\n\nexport interface CopilotTextareaProps extends BaseCopilotTextareaProps {\n autosuggestionsConfig: Partial<AutosuggestionsConfig> & {\n purposePrompt: string;\n };\n}\n\nexport function CopilotTextarea(props: CopilotTextareaProps): JSX.Element {\n const autosuggestionsConfig: AutosuggestionsConfig = {\n ...defaultAutosuggestionsConfig,\n ...props.autosuggestionsConfig,\n };\n\n const autosuggestionsFunction = useMakeStandardAutosuggestionFunction(\n autosuggestionsConfig.purposePrompt,\n autosuggestionsConfig.apiEndpoint,\n autosuggestionsConfig.makeSystemPrompt,\n autosuggestionsConfig.fewShotMessages,\n autosuggestionsConfig.externalContextCategories,\n autosuggestionsConfig.forwardedParams\n );\n\n return (\n <BaseCopilotTextarea\n {...props}\n autosuggestionsConfig={autosuggestionsConfig}\n autosuggestionsFunction={autosuggestionsFunction}\n />\n );\n}\n"]}
@@ -1,68 +0,0 @@
1
- import { __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
2
- import { defaultBaseAutosuggestionsConfig } from '@copilotkit/react-textarea';
3
-
4
- var defaultMakeSystemPrompt = (purposePrompt, contextString) => {
5
- return `You are a versatile writing assistant.
6
-
7
- The user is writing some text.
8
- The purpose is: "${purposePrompt}"
9
-
10
- Your job is to guess what the user will write next AS BEST YOU CAN.
11
- Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
12
-
13
- Adjust yourself to the user's style and implied intent.
14
-
15
- 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.
16
- <TextAfterCursor>
17
- <TextBeforeCursor>
18
- <YourSuggestion>
19
-
20
- If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
21
-
22
- The following external context is also provided. Use it to help you make better suggestions!!!
23
- \`\`\`
24
- ${contextString}
25
- \`\`\`
26
- `;
27
- };
28
- var defaultFewShotMessages = [
29
- {
30
- role: "user",
31
- name: "TextAfterCursor",
32
- content: "While I was there I also picked up some apples, oranges, and bananas."
33
- },
34
- {
35
- role: "user",
36
- name: "TextBeforeCursor",
37
- content: "This morning I woke up and went straight to the grocery store."
38
- },
39
- {
40
- role: "assistant",
41
- content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
42
- },
43
- {
44
- role: "user",
45
- name: "TextAfterCursor",
46
- content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
47
- },
48
- {
49
- role: "user",
50
- name: "TextBeforeCursor",
51
- 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;`
52
- },
53
- {
54
- role: "assistant",
55
- 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"; `
56
- }
57
- ];
58
- var defaultAutosuggestionsConfig = __spreadProps(__spreadValues({}, defaultBaseAutosuggestionsConfig), {
59
- apiEndpoint: "api/autosuggestions",
60
- makeSystemPrompt: defaultMakeSystemPrompt,
61
- fewShotMessages: defaultFewShotMessages,
62
- externalContextCategories: void 0,
63
- forwardedParams: void 0
64
- });
65
-
66
- export { defaultAutosuggestionsConfig, defaultFewShotMessages, defaultMakeSystemPrompt };
67
- //# sourceMappingURL=out.js.map
68
- //# sourceMappingURL=chunk-E2RQC2ZD.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/types/autosuggestions-config.tsx"],"names":[],"mappings":";;;;;;AAAA;AAAA,EAEE;AAAA,OACK;AAgBA,IAAM,0BAA4C,CACvD,eACA,kBACG;AACH,SAAO;AAAA;AAAA;AAAA,mBAGW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBlB;AAAA;AAAA;AAGF;AAEO,IAAM,yBAAkD;AAAA,EAC7D;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,SACE;AAAA,EACJ;AACF;AACO,IAAM,+BAGT,iCACC,mCADD;AAAA,EAGF,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,2BAA2B;AAAA,EAC3B,iBAAiB;AACnB","sourcesContent":["import {\n BaseAutosuggestionsConfig,\n defaultBaseAutosuggestionsConfig,\n} from \"@copilotkit/react-textarea\";\nimport { MinimalChatGPTMessage } from \"./minimal-chatgpt-message\";\n\nexport type MakeSystemPrompt = (\n purposePrompt: string,\n contextString: string\n) => string;\n\nexport interface AutosuggestionsConfig extends BaseAutosuggestionsConfig {\n apiEndpoint: string;\n externalContextCategories: string[] | undefined;\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultMakeSystemPrompt: MakeSystemPrompt = (\n purposePrompt,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${purposePrompt}\\\"\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 defaultFewShotMessages: 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: \"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];\nexport const defaultAutosuggestionsConfig: Omit<\n AutosuggestionsConfig,\n \"purposePrompt\"\n> = {\n ...defaultBaseAutosuggestionsConfig,\n\n apiEndpoint: \"api/autosuggestions\",\n makeSystemPrompt: defaultMakeSystemPrompt,\n fewShotMessages: defaultFewShotMessages,\n externalContextCategories: undefined,\n forwardedParams: undefined,\n};\n"]}
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=chunk-FZRTAML3.mjs.map
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=chunk-YPBKY4KY.mjs.map
@@ -1,12 +0,0 @@
1
- import { AutosuggestionsConfig } from '../../types/autosuggestions-config.js';
2
- import { BaseCopilotTextareaProps } from '@copilotkit/react-textarea';
3
- import '../../types/minimal-chatgpt-message.js';
4
-
5
- interface CopilotTextareaProps extends BaseCopilotTextareaProps {
6
- autosuggestionsConfig: Partial<AutosuggestionsConfig> & {
7
- purposePrompt: string;
8
- };
9
- }
10
- declare function CopilotTextarea(props: CopilotTextareaProps): JSX.Element;
11
-
12
- export { CopilotTextarea, CopilotTextareaProps };