@copilotkit/react-textarea 0.19.0-alpha.2 → 0.19.0-alpha.4
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/.turbo/turbo-build.log +292 -288
- package/CHANGELOG.md +17 -0
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +1870 -33
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/render-element.mjs +52 -3
- package/dist/components/base-copilot-textarea/render-element.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/render-placeholder.mjs +46 -3
- package/dist/components/base-copilot-textarea/render-placeholder.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +86 -4
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs +57 -3
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +2339 -43
- package/dist/components/copilot-textarea/copilot-textarea.mjs.map +1 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs +22 -3
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +125 -3
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs +1015 -16
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/{mode-suggestion-appearing.d.ts → hovering-insertion-prompt-box-core.d.ts} +5 -13
- package/dist/{chunk-ITZHK3YV.mjs → components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs} +488 -243
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs.map +1 -0
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +734 -11
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +734 -12
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs.map +1 -1
- package/dist/components/index.mjs +2340 -44
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/manual-ui/chip-with-icon.mjs +5 -6
- package/dist/components/manual-ui/chip-with-icon.mjs.map +1 -1
- package/dist/components/source-search-box/source-search-box.mjs +323 -9
- package/dist/components/source-search-box/source-search-box.mjs.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.mjs +88 -4
- package/dist/components/ui/button.mjs.map +1 -1
- package/dist/components/ui/card.mjs +53 -7
- package/dist/components/ui/card.mjs.map +1 -1
- package/dist/components/ui/command.mjs +266 -5
- package/dist/components/ui/command.mjs.map +1 -1
- package/dist/components/ui/dialog.mjs +164 -4
- package/dist/components/ui/dialog.mjs.map +1 -1
- package/dist/components/ui/label.mjs +63 -4
- package/dist/components/ui/label.mjs.map +1 -1
- package/dist/components/ui/separator.mjs +50 -8
- package/dist/components/ui/separator.mjs.map +1 -1
- package/dist/components/ui/textarea.mjs +48 -7
- package/dist/components/ui/textarea.mjs.map +1 -1
- package/dist/context/index.mjs +0 -2
- package/dist/context/index.mjs.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs +168 -6
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs +168 -4
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +155 -5
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs.map +1 -1
- package/dist/hooks/index.mjs +0 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +90 -4
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +143 -4
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs.map +1 -1
- package/dist/hooks/misc/use-autosize-textarea.mjs +15 -3
- package/dist/hooks/misc/use-autosize-textarea.mjs.map +1 -1
- package/dist/index.css +3 -27
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +2343 -48
- package/dist/index.mjs.map +1 -1
- package/dist/lib/debouncer.mjs +51 -3
- package/dist/lib/debouncer.mjs.map +1 -1
- package/dist/lib/editor-to-text.mjs +43 -3
- package/dist/lib/editor-to-text.mjs.map +1 -1
- package/dist/lib/get-text-around-cursor.mjs +109 -3
- package/dist/lib/get-text-around-cursor.mjs.map +1 -1
- package/dist/lib/retry.mjs +17 -3
- package/dist/lib/retry.mjs.map +1 -1
- package/dist/lib/slatejs-edits/add-autocompletions.mjs +25 -3
- package/dist/lib/slatejs-edits/add-autocompletions.mjs.map +1 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs +23 -3
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs.map +1 -1
- package/dist/lib/slatejs-edits/replace-text.mjs +27 -3
- package/dist/lib/slatejs-edits/replace-text.mjs.map +1 -1
- package/dist/lib/slatejs-edits/with-partial-history.mjs +106 -3
- package/dist/lib/slatejs-edits/with-partial-history.mjs.map +1 -1
- package/dist/lib/stream-promise-flatten.d.ts +3 -0
- package/dist/lib/stream-promise-flatten.mjs +48 -0
- package/dist/lib/stream-promise-flatten.mjs.map +1 -0
- package/dist/lib/utils.mjs +71 -3
- package/dist/lib/utils.mjs.map +1 -1
- package/dist/lib/utils.test.mjs +0 -1
- package/dist/lib/utils.test.mjs.map +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs +0 -2
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.mjs.map +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs +312 -9
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs.map +1 -1
- package/dist/types/autosuggestions-config/editing-api-config.mjs +155 -4
- package/dist/types/autosuggestions-config/editing-api-config.mjs.map +1 -1
- package/dist/types/autosuggestions-config/index.mjs +313 -10
- package/dist/types/autosuggestions-config/index.mjs.map +1 -1
- package/dist/types/autosuggestions-config/insertions-api-config.mjs +149 -4
- package/dist/types/autosuggestions-config/insertions-api-config.mjs.map +1 -1
- package/dist/types/autosuggestions-config/subtypes/chatlike-api-endpoint.mjs +71 -3
- package/dist/types/autosuggestions-config/subtypes/chatlike-api-endpoint.mjs.map +1 -1
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs +0 -2
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.mjs.map +1 -1
- package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.mjs +0 -2
- package/dist/types/autosuggestions-config/subtypes/minimal-chat-gpt-message.mjs.map +1 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs +137 -4
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs.map +1 -1
- package/dist/types/base/autosuggestion-state.mjs +0 -2
- package/dist/types/base/autosuggestion-state.mjs.map +1 -1
- package/dist/types/base/autosuggestions-bare-function.mjs +0 -2
- package/dist/types/base/autosuggestions-bare-function.mjs.map +1 -1
- package/dist/types/base/base-autosuggestions-config.mjs +11 -3
- package/dist/types/base/base-autosuggestions-config.mjs.map +1 -1
- package/dist/types/base/base-copilot-textarea-props.mjs +0 -2
- package/dist/types/base/base-copilot-textarea-props.mjs.map +1 -1
- package/dist/types/base/custom-editor.mjs +0 -2
- package/dist/types/base/custom-editor.mjs.map +1 -1
- package/dist/types/base/editor-autocomplete-state.mjs +17 -4
- package/dist/types/base/editor-autocomplete-state.mjs.map +1 -1
- package/dist/types/base/index.mjs +11 -4
- package/dist/types/base/index.mjs.map +1 -1
- package/dist/types/html-copilot-textarea-element.mjs +0 -2
- package/dist/types/html-copilot-textarea-element.mjs.map +1 -1
- package/dist/types/index.mjs +314 -12
- package/dist/types/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/hovering-toolbar/text-insertion-prompt-box/{mode-suggestion-appearing.tsx → hovering-insertion-prompt-box-core.tsx} +59 -65
- package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.tsx +9 -52
- package/src/components/source-search-box/source-search-box.tsx +7 -10
- package/src/components/ui/command.tsx +1 -1
- package/src/lib/stream-promise-flatten.ts +25 -0
- package/dist/chunk-2NURR2DX.mjs +0 -47
- package/dist/chunk-2NURR2DX.mjs.map +0 -1
- package/dist/chunk-3YJ63D5D.mjs +0 -106
- package/dist/chunk-3YJ63D5D.mjs.map +0 -1
- package/dist/chunk-4S5ZJH3I.mjs +0 -18
- package/dist/chunk-4S5ZJH3I.mjs.map +0 -1
- package/dist/chunk-55EGOC5T.mjs +0 -87
- package/dist/chunk-55EGOC5T.mjs.map +0 -1
- package/dist/chunk-5ARCOTW3.mjs +0 -34
- package/dist/chunk-5ARCOTW3.mjs.map +0 -1
- package/dist/chunk-5EJ5XOGP.mjs +0 -22
- package/dist/chunk-5EJ5XOGP.mjs.map +0 -1
- package/dist/chunk-5FO6ISW4.mjs +0 -3
- package/dist/chunk-5FO6ISW4.mjs.map +0 -1
- package/dist/chunk-7SMDOAG2.mjs +0 -201
- package/dist/chunk-7SMDOAG2.mjs.map +0 -1
- package/dist/chunk-A2RRLD23.mjs +0 -69
- package/dist/chunk-A2RRLD23.mjs.map +0 -1
- package/dist/chunk-CDB7HFCY.mjs +0 -65
- package/dist/chunk-CDB7HFCY.mjs.map +0 -1
- package/dist/chunk-CSGFJU3L.mjs +0 -65
- package/dist/chunk-CSGFJU3L.mjs.map +0 -1
- package/dist/chunk-D7SEV5PR.mjs +0 -12
- package/dist/chunk-D7SEV5PR.mjs.map +0 -1
- package/dist/chunk-DE5K76I2.mjs +0 -3
- package/dist/chunk-DE5K76I2.mjs.map +0 -1
- package/dist/chunk-F3MHL6ZY.mjs +0 -25
- package/dist/chunk-F3MHL6ZY.mjs.map +0 -1
- package/dist/chunk-H4VKQGVU.mjs +0 -3
- package/dist/chunk-H4VKQGVU.mjs.map +0 -1
- package/dist/chunk-HAFHLU4N.mjs +0 -55
- package/dist/chunk-HAFHLU4N.mjs.map +0 -1
- package/dist/chunk-ITZHK3YV.mjs.map +0 -1
- package/dist/chunk-IU3WTXLQ.mjs +0 -3
- package/dist/chunk-IU3WTXLQ.mjs.map +0 -1
- package/dist/chunk-IXJ2HCOA.mjs +0 -101
- package/dist/chunk-IXJ2HCOA.mjs.map +0 -1
- package/dist/chunk-JAFCXEPU.mjs +0 -10
- package/dist/chunk-JAFCXEPU.mjs.map +0 -1
- package/dist/chunk-KCHYD3EB.mjs +0 -107
- package/dist/chunk-KCHYD3EB.mjs.map +0 -1
- package/dist/chunk-KGKLUWKW.mjs +0 -47
- package/dist/chunk-KGKLUWKW.mjs.map +0 -1
- package/dist/chunk-L7VVZH4Q.mjs +0 -3
- package/dist/chunk-L7VVZH4Q.mjs.map +0 -1
- package/dist/chunk-LNAIMEB2.mjs +0 -34
- package/dist/chunk-LNAIMEB2.mjs.map +0 -1
- package/dist/chunk-MMVDU6DF.mjs +0 -3
- package/dist/chunk-MMVDU6DF.mjs.map +0 -1
- package/dist/chunk-MPME5BW2.mjs +0 -59
- package/dist/chunk-MPME5BW2.mjs.map +0 -1
- package/dist/chunk-MRXNTQOX.mjs +0 -55
- package/dist/chunk-MRXNTQOX.mjs.map +0 -1
- package/dist/chunk-ND5PXTAW.mjs +0 -17
- package/dist/chunk-ND5PXTAW.mjs.map +0 -1
- package/dist/chunk-NKW5OU2S.mjs +0 -33
- package/dist/chunk-NKW5OU2S.mjs.map +0 -1
- package/dist/chunk-O5OWT5GE.mjs +0 -114
- package/dist/chunk-O5OWT5GE.mjs.map +0 -1
- package/dist/chunk-OD7ZMOVE.mjs +0 -45
- package/dist/chunk-OD7ZMOVE.mjs.map +0 -1
- package/dist/chunk-OELUUJZY.mjs +0 -16
- package/dist/chunk-OELUUJZY.mjs.map +0 -1
- package/dist/chunk-OM5WQQOU.mjs +0 -47
- package/dist/chunk-OM5WQQOU.mjs.map +0 -1
- package/dist/chunk-PF3XRNDB.mjs +0 -44
- package/dist/chunk-PF3XRNDB.mjs.map +0 -1
- package/dist/chunk-QL2GYGG5.mjs +0 -19
- package/dist/chunk-QL2GYGG5.mjs.map +0 -1
- package/dist/chunk-RPDVSCLO.mjs +0 -107
- package/dist/chunk-RPDVSCLO.mjs.map +0 -1
- package/dist/chunk-RQHOUUXQ.mjs +0 -29
- package/dist/chunk-RQHOUUXQ.mjs.map +0 -1
- package/dist/chunk-UHD44NC5.mjs +0 -101
- package/dist/chunk-UHD44NC5.mjs.map +0 -1
- package/dist/chunk-VBIJPE3H.mjs +0 -108
- package/dist/chunk-VBIJPE3H.mjs.map +0 -1
- package/dist/chunk-WADHCMPK.mjs +0 -3
- package/dist/chunk-WADHCMPK.mjs.map +0 -1
- package/dist/chunk-WJHSY5T6.mjs +0 -3
- package/dist/chunk-WJHSY5T6.mjs.map +0 -1
- package/dist/chunk-WJYQWL4I.mjs +0 -27
- package/dist/chunk-WJYQWL4I.mjs.map +0 -1
- package/dist/chunk-XDT7BF3V.mjs +0 -81
- package/dist/chunk-XDT7BF3V.mjs.map +0 -1
- package/dist/chunk-XHUMROEY.mjs +0 -91
- package/dist/chunk-XHUMROEY.mjs.map +0 -1
- package/dist/chunk-YQU7WG7T.mjs +0 -83
- package/dist/chunk-YQU7WG7T.mjs.map +0 -1
- package/dist/chunk-YTOPHPSG.mjs +0 -45
- package/dist/chunk-YTOPHPSG.mjs.map +0 -1
- package/dist/chunk-YW3REYX6.mjs +0 -23
- package/dist/chunk-YW3REYX6.mjs.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/mode-pre-suggestion.d.ts +0 -16
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/mode-pre-suggestion.mjs +0 -5
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/mode-pre-suggestion.mjs.map +0 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/mode-suggestion-appearing.mjs +0 -10
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/mode-suggestion-appearing.mjs.map +0 -1
- package/src/components/hovering-toolbar/text-insertion-prompt-box/mode-pre-suggestion.tsx +0 -83
|
@@ -1,10 +1,313 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// src/types/base/base-autosuggestions-config.tsx
|
|
42
|
+
var defaultBaseAutosuggestionsConfig = {
|
|
43
|
+
debounceTime: 250,
|
|
44
|
+
acceptAutosuggestionKey: "Tab",
|
|
45
|
+
disableWhenEmpty: true,
|
|
46
|
+
disabled: false,
|
|
47
|
+
temporarilyDisableWhenMovingCursorWithoutChangingText: true
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/types/autosuggestions-config/subtypes/chatlike-api-endpoint.tsx
|
|
51
|
+
var ChatlikeApiEndpoint = class {
|
|
52
|
+
constructor(run) {
|
|
53
|
+
this.run = run;
|
|
54
|
+
}
|
|
55
|
+
static standardOpenAIEndpoint(apiEndpoint) {
|
|
56
|
+
return new ChatlikeApiEndpoint(
|
|
57
|
+
(abortSignal, messages, forwardedProps) => __async(this, null, function* () {
|
|
58
|
+
const res = yield fetch(apiEndpoint, {
|
|
59
|
+
method: "POST",
|
|
60
|
+
body: JSON.stringify(__spreadProps(__spreadValues({}, forwardedProps), {
|
|
61
|
+
messages
|
|
62
|
+
})),
|
|
63
|
+
signal: abortSignal
|
|
64
|
+
});
|
|
65
|
+
const bodySteram = res.body;
|
|
66
|
+
if (!bodySteram) {
|
|
67
|
+
throw new Error("The response body is empty.");
|
|
68
|
+
}
|
|
69
|
+
const stringStream = bodySteram.pipeThrough(new TextDecoderStream());
|
|
70
|
+
return stringStream;
|
|
71
|
+
})
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
static custom(run) {
|
|
75
|
+
return new ChatlikeApiEndpoint(run);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/types/autosuggestions-config/suggestions-api-config.tsx
|
|
80
|
+
var defaultSuggestionsMakeSystemPrompt = (textareaPurpose, contextString) => {
|
|
81
|
+
return `You are a versatile writing assistant.
|
|
82
|
+
|
|
83
|
+
The user is writing some text.
|
|
84
|
+
The purpose is: "${textareaPurpose}"
|
|
85
|
+
|
|
86
|
+
Your job is to guess what the user will write next AS BEST YOU CAN.
|
|
87
|
+
Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
|
|
88
|
+
|
|
89
|
+
Adjust yourself to the user's style and implied intent.
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
<TextAfterCursor>
|
|
93
|
+
<TextBeforeCursor>
|
|
94
|
+
<YourSuggestion>
|
|
95
|
+
|
|
96
|
+
If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
|
|
97
|
+
|
|
98
|
+
The following external context is also provided. Use it to help you make better suggestions!!!
|
|
99
|
+
\`\`\`
|
|
100
|
+
${contextString}
|
|
101
|
+
\`\`\`
|
|
102
|
+
`;
|
|
103
|
+
};
|
|
104
|
+
var defaultSuggestionsFewShotMessages = [
|
|
105
|
+
{
|
|
106
|
+
role: "user",
|
|
107
|
+
name: "TextAfterCursor",
|
|
108
|
+
content: "While I was there I also picked up some apples, oranges, and bananas."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
role: "user",
|
|
112
|
+
name: "TextBeforeCursor",
|
|
113
|
+
content: "This morning I woke up and went straight to the grocery store."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
role: "assistant",
|
|
117
|
+
content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
role: "user",
|
|
121
|
+
name: "TextAfterCursor",
|
|
122
|
+
content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
role: "user",
|
|
126
|
+
name: "TextBeforeCursor",
|
|
127
|
+
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;`
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
role: "assistant",
|
|
131
|
+
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"; `
|
|
132
|
+
}
|
|
133
|
+
];
|
|
134
|
+
var defaultSuggestionsApiConfig = {
|
|
135
|
+
apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(
|
|
136
|
+
"/api/copilotkit_chatlike"
|
|
137
|
+
),
|
|
138
|
+
makeSystemPrompt: defaultSuggestionsMakeSystemPrompt,
|
|
139
|
+
fewShotMessages: defaultSuggestionsFewShotMessages,
|
|
140
|
+
forwardedParams: void 0
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// src/types/autosuggestions-config/insertions-api-config.tsx
|
|
144
|
+
var defaultInsertionsMakeSystemPrompt = (textareaPurpose, contextString) => {
|
|
145
|
+
return `You are a versatile writing assistant.
|
|
146
|
+
|
|
147
|
+
The user is writing some text.
|
|
148
|
+
The purpose is: "${textareaPurpose}"
|
|
149
|
+
|
|
150
|
+
The user also provides you with a prompt for INSERTIONS into the text they are writing.
|
|
151
|
+
Your job is to come up with an INSERTION into the text that the user would like AS BEST YOU CAN.
|
|
152
|
+
Only guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.
|
|
153
|
+
|
|
154
|
+
Adjust yourself to the user's style and implied intent.
|
|
155
|
+
|
|
156
|
+
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.
|
|
157
|
+
<TextAfterCursor>
|
|
158
|
+
<TextBeforeCursor>
|
|
159
|
+
<InsertionPrompt>
|
|
160
|
+
<YourSuggestion>
|
|
161
|
+
|
|
162
|
+
If we need to add a whitespace character to the suggested text, make sure to explicitly add it in.
|
|
163
|
+
|
|
164
|
+
The following external context is also provided. Use it to help you make better suggestions!!!
|
|
165
|
+
\`\`\`
|
|
166
|
+
${contextString}
|
|
167
|
+
\`\`\`
|
|
168
|
+
`;
|
|
169
|
+
};
|
|
170
|
+
var defaultInsertionsFewShotMessages = [
|
|
171
|
+
{
|
|
172
|
+
role: "user",
|
|
173
|
+
name: "TextAfterCursor",
|
|
174
|
+
content: "While I was there I also picked up some apples, oranges, and bananas."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
role: "user",
|
|
178
|
+
name: "TextBeforeCursor",
|
|
179
|
+
content: "This morning I woke up and went straight to the grocery store."
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
role: "user",
|
|
183
|
+
name: "InsertionPrompt",
|
|
184
|
+
content: "I bought a big watermelon"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
role: "assistant",
|
|
188
|
+
content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
role: "user",
|
|
192
|
+
name: "TextAfterCursor",
|
|
193
|
+
content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
role: "user",
|
|
197
|
+
name: "TextBeforeCursor",
|
|
198
|
+
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;`
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
role: "user",
|
|
202
|
+
name: "InsertionPrompt",
|
|
203
|
+
content: "add section about the optionholder's pro rata share"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
role: "assistant",
|
|
207
|
+
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"; `
|
|
208
|
+
}
|
|
209
|
+
];
|
|
210
|
+
var defaultInsertionsApiConfig = {
|
|
211
|
+
apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(
|
|
212
|
+
"/api/copilotkit_chatlike"
|
|
213
|
+
),
|
|
214
|
+
makeSystemPrompt: defaultInsertionsMakeSystemPrompt,
|
|
215
|
+
fewShotMessages: defaultInsertionsFewShotMessages,
|
|
216
|
+
forwardedParams: void 0
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// src/types/autosuggestions-config/editing-api-config.tsx
|
|
220
|
+
var defaultEditingMakeSystemPrompt = (textareaPurpose, contextString) => {
|
|
221
|
+
return `You are a versatile writing assistant.
|
|
222
|
+
|
|
223
|
+
The user is writing some text.
|
|
224
|
+
The purpose is: "${textareaPurpose}"
|
|
225
|
+
|
|
226
|
+
The user also provides you with a prompt for EDITING some text they are writing.
|
|
227
|
+
Your job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.
|
|
228
|
+
|
|
229
|
+
Adjust yourself to the user's style and implied intent.
|
|
230
|
+
|
|
231
|
+
The user will provide the following information; use this to infer the best relevant EDIT:
|
|
232
|
+
<TextBeforeCursor>
|
|
233
|
+
<TextToEdit>
|
|
234
|
+
<TextAfterCursor>
|
|
235
|
+
<EditingPrompt>
|
|
236
|
+
|
|
237
|
+
<YourEditSuggestion>
|
|
238
|
+
|
|
239
|
+
If we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.
|
|
240
|
+
|
|
241
|
+
The following external context is also provided. Use it to help you make better suggestions!!!
|
|
242
|
+
\`\`\`
|
|
243
|
+
${contextString}
|
|
244
|
+
\`\`\`
|
|
245
|
+
`;
|
|
246
|
+
};
|
|
247
|
+
var defaultEditingFewShotMessages = [
|
|
248
|
+
{
|
|
249
|
+
role: "user",
|
|
250
|
+
name: "TextBeforeCursor",
|
|
251
|
+
content: "This morning I woke up and went straight to the grocery store. "
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
role: "user",
|
|
255
|
+
name: "TextToEdit",
|
|
256
|
+
content: "While I was there I also picked up some apples, oranges, and bananas. "
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
role: "user",
|
|
260
|
+
name: "TextAfterCursor",
|
|
261
|
+
content: "The grocery store was having a sale on fruit, so I decided to stock up."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
role: "user",
|
|
265
|
+
name: "EditingPrompt",
|
|
266
|
+
content: "I bought a big watermelon"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
role: "assistant",
|
|
270
|
+
content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
role: "user",
|
|
274
|
+
name: "TextAfterCursor",
|
|
275
|
+
content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
role: "user",
|
|
279
|
+
name: "TextBeforeCursor",
|
|
280
|
+
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;`
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
role: "user",
|
|
284
|
+
name: "InsertionPrompt",
|
|
285
|
+
content: "add section about the optionholder's pro rata share"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
role: "assistant",
|
|
289
|
+
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"; `
|
|
290
|
+
}
|
|
291
|
+
];
|
|
292
|
+
var defaultEditingApiConfig = {
|
|
293
|
+
apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(
|
|
294
|
+
"/api/copilotkit_chatlike"
|
|
295
|
+
),
|
|
296
|
+
makeSystemPrompt: defaultEditingMakeSystemPrompt,
|
|
297
|
+
fewShotMessages: defaultEditingFewShotMessages,
|
|
298
|
+
forwardedParams: void 0
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// src/types/autosuggestions-config/autosuggestions-config.tsx
|
|
302
|
+
var defaultAutosuggestionsConfig = __spreadProps(__spreadValues({}, defaultBaseAutosuggestionsConfig), {
|
|
303
|
+
externalContextCategories: void 0,
|
|
304
|
+
chatApiConfigs: {
|
|
305
|
+
suggestionsApiConfig: defaultSuggestionsApiConfig,
|
|
306
|
+
insertionApiConfig: defaultInsertionsApiConfig,
|
|
307
|
+
editingApiConfig: defaultEditingApiConfig
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
export {
|
|
311
|
+
defaultAutosuggestionsConfig
|
|
312
|
+
};
|
|
10
313
|
//# sourceMappingURL=autosuggestions-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["../../../src/types/base/base-autosuggestions-config.tsx","../../../src/types/autosuggestions-config/subtypes/chatlike-api-endpoint.tsx","../../../src/types/autosuggestions-config/suggestions-api-config.tsx","../../../src/types/autosuggestions-config/insertions-api-config.tsx","../../../src/types/autosuggestions-config/editing-api-config.tsx","../../../src/types/autosuggestions-config/autosuggestions-config.tsx"],"sourcesContent":["import { BaseCopilotTextareaApiConfig } from \"./autosuggestions-bare-function\";\n\nexport interface BaseAutosuggestionsConfig {\n textareaPurpose: string;\n debounceTime: number;\n acceptAutosuggestionKey: string;\n disableWhenEmpty: boolean;\n disabled: boolean;\n temporarilyDisableWhenMovingCursorWithoutChangingText: boolean;\n apiConfig: BaseCopilotTextareaApiConfig;\n}\n\nexport const defaultBaseAutosuggestionsConfig: Omit<\n BaseAutosuggestionsConfig,\n \"textareaPurpose\" | \"apiConfig\"\n> = {\n debounceTime: 250,\n acceptAutosuggestionKey: \"Tab\",\n disableWhenEmpty: true,\n disabled: false,\n temporarilyDisableWhenMovingCursorWithoutChangingText: true,\n};\n","import { MinimalChatGPTMessage } from \"./minimal-chat-gpt-message\";\n\nexport type ChatlikeApiEndpointImpl = (\n abortSignal: AbortSignal,\n messages: MinimalChatGPTMessage[],\n forwardedProps?: { [key: string]: any }\n) => Promise<string>;\n\nexport type StreamingChatlikeApiEndpointImpl = (\n abortSignal: AbortSignal,\n messages: MinimalChatGPTMessage[],\n forwardedProps?: { [key: string]: any }\n) => Promise<ReadableStream<string>>;\n\nexport class ChatlikeApiEndpoint {\n public run: StreamingChatlikeApiEndpointImpl;\n\n constructor(run: StreamingChatlikeApiEndpointImpl) {\n this.run = run;\n }\n\n /**\n * Creates a new instance of ChatlikeApiEndpoint with the provided API endpoint.\n * @param apiEndpoint The URL of the OpenAI-compatible API endpoint.\n * @returns A new instance of ChatlikeApiEndpoint.\n */\n static standardOpenAIEndpoint(apiEndpoint: string): ChatlikeApiEndpoint {\n return new ChatlikeApiEndpoint(\n async (\n abortSignal: AbortSignal,\n messages: MinimalChatGPTMessage[],\n forwardedProps?: { [key: string]: any }\n ) => {\n const res = await fetch(apiEndpoint, {\n method: \"POST\",\n body: JSON.stringify({\n ...forwardedProps,\n messages: messages,\n }),\n signal: abortSignal,\n });\n\n const bodySteram: ReadableStream<Uint8Array> | null = res.body;\n if (!bodySteram) {\n throw new Error(\"The response body is empty.\");\n }\n\n // map the stream to a stream of strings\n const stringStream = bodySteram.pipeThrough(new TextDecoderStream());\n\n return stringStream;\n }\n );\n }\n\n /**\n * Creates a fully customized instance of ChatlikeApiEndpoint.\n * @param run - The implementation of the ChatlikeApiEndpointImpl interface.\n * @returns A new instance of ChatlikeApiEndpoint .\n */\n static custom(run: StreamingChatlikeApiEndpointImpl): ChatlikeApiEndpoint {\n return new ChatlikeApiEndpoint(run);\n }\n}\n","import { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { ChatlikeApiEndpoint } from \"./subtypes/chatlike-api-endpoint\";\n\nexport interface SuggestionsApiConfig {\n apiEndpoint: ChatlikeApiEndpoint;\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultSuggestionsMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nYour job is to guess what the user will write next AS BEST YOU CAN.\nOnly guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide both the text before and after the cursor. You should use this to infer what the user is likely to write next.\n<TextAfterCursor>\n<TextBeforeCursor>\n<YourSuggestion>\n\nIf we need to add a whitespace character to the suggested text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultSuggestionsFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas.\",\n },\n {\n role: \"user\",\n 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];\n\nexport const defaultSuggestionsApiConfig: SuggestionsApiConfig = {\n apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(\n \"/api/copilotkit_chatlike\"\n ),\n makeSystemPrompt: defaultSuggestionsMakeSystemPrompt,\n fewShotMessages: defaultSuggestionsFewShotMessages,\n forwardedParams: undefined,\n};\n","import { ChatlikeApiEndpoint } from \"./subtypes/chatlike-api-endpoint\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\n\nexport interface InsertionsApiConfig {\n apiEndpoint: ChatlikeApiEndpoint;\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultInsertionsMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe user also provides you with a prompt for INSERTIONS into the text they are writing. \nYour job is to come up with an INSERTION into the text that the user would like AS BEST YOU CAN.\nOnly guess a SHORT distance ahead. Usually 1 sentence, or at most 1 paragraph.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide the text before and after the cursor, as well as the insertion prompt. You should use this to infer the best relevant insertion.\n<TextAfterCursor>\n<TextBeforeCursor>\n<InsertionPrompt>\n<YourSuggestion>\n\nIf we need to add a whitespace character to the suggested text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultInsertionsFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: \"This morning I woke up and went straight to the grocery store.\",\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"I bought a big watermelon\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"add section about the optionholder's pro rata share\",\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultInsertionsApiConfig: InsertionsApiConfig = {\n apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(\n \"/api/copilotkit_chatlike\"\n ),\n makeSystemPrompt: defaultInsertionsMakeSystemPrompt,\n fewShotMessages: defaultInsertionsFewShotMessages,\n forwardedParams: undefined,\n};\n","import { ChatlikeApiEndpoint } from \"./subtypes/chatlike-api-endpoint\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\n\nexport interface EditingApiConfig {\n apiEndpoint: ChatlikeApiEndpoint;\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultEditingMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe user also provides you with a prompt for EDITING some text they are writing. \nYour job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide the following information; use this to infer the best relevant EDIT:\n<TextBeforeCursor>\n<TextToEdit>\n<TextAfterCursor>\n<EditingPrompt>\n\n<YourEditSuggestion>\n\nIf we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultEditingFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: \"This morning I woke up and went straight to the grocery store. \",\n },\n {\n role: \"user\",\n name: \"TextToEdit\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"The grocery store was having a sale on fruit, so I decided to stock up.\",\n },\n {\n role: \"user\",\n name: \"EditingPrompt\",\n content: \"I bought a big watermelon\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"add section about the optionholder's pro rata share\",\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultEditingApiConfig: EditingApiConfig = {\n apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(\n \"/api/copilotkit_chatlike\"\n ),\n makeSystemPrompt: defaultEditingMakeSystemPrompt,\n fewShotMessages: defaultEditingFewShotMessages,\n forwardedParams: undefined,\n};\n","import {\n BaseAutosuggestionsConfig,\n defaultBaseAutosuggestionsConfig,\n} from \"../base\";\nimport {\n SuggestionsApiConfig,\n defaultSuggestionsApiConfig,\n} from \"./suggestions-api-config\";\nimport {\n InsertionsApiConfig,\n defaultInsertionsApiConfig,\n} from \"./insertions-api-config\";\nimport { ChatlikeApiEndpoint } from \".\";\nimport {\n EditingApiConfig,\n defaultEditingApiConfig,\n} from \"./editing-api-config\";\n\n// Like the base autosuggestions config, with 2 additional fields:\n// 1. externalContextCategories: string[] | undefined;\n// 2. instead of apiConfigs, we have chatApiConfigs: a higher-level abstraction that uses a ChatGPT-like API endpoint.\nexport interface AutosuggestionsConfig\n extends Omit<BaseAutosuggestionsConfig, \"apiConfig\"> {\n externalContextCategories: string[] | undefined;\n chatApiConfigs: {\n suggestionsApiConfig: SuggestionsApiConfig;\n insertionApiConfig: InsertionsApiConfig;\n editingApiConfig: EditingApiConfig;\n };\n}\n\nexport const defaultAutosuggestionsConfig: Omit<\n AutosuggestionsConfig,\n \"textareaPurpose\" | \"apiEndpoint\"\n> = {\n ...defaultBaseAutosuggestionsConfig,\n externalContextCategories: undefined,\n chatApiConfigs: {\n suggestionsApiConfig: defaultSuggestionsApiConfig,\n insertionApiConfig: defaultInsertionsApiConfig,\n editingApiConfig: defaultEditingApiConfig,\n },\n};\n"],"mappings":"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","names":[]}
|
|
@@ -1,5 +1,156 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// src/types/autosuggestions-config/subtypes/chatlike-api-endpoint.tsx
|
|
42
|
+
var ChatlikeApiEndpoint = class {
|
|
43
|
+
constructor(run) {
|
|
44
|
+
this.run = run;
|
|
45
|
+
}
|
|
46
|
+
static standardOpenAIEndpoint(apiEndpoint) {
|
|
47
|
+
return new ChatlikeApiEndpoint(
|
|
48
|
+
(abortSignal, messages, forwardedProps) => __async(this, null, function* () {
|
|
49
|
+
const res = yield fetch(apiEndpoint, {
|
|
50
|
+
method: "POST",
|
|
51
|
+
body: JSON.stringify(__spreadProps(__spreadValues({}, forwardedProps), {
|
|
52
|
+
messages
|
|
53
|
+
})),
|
|
54
|
+
signal: abortSignal
|
|
55
|
+
});
|
|
56
|
+
const bodySteram = res.body;
|
|
57
|
+
if (!bodySteram) {
|
|
58
|
+
throw new Error("The response body is empty.");
|
|
59
|
+
}
|
|
60
|
+
const stringStream = bodySteram.pipeThrough(new TextDecoderStream());
|
|
61
|
+
return stringStream;
|
|
62
|
+
})
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
static custom(run) {
|
|
66
|
+
return new ChatlikeApiEndpoint(run);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// src/types/autosuggestions-config/editing-api-config.tsx
|
|
71
|
+
var defaultEditingMakeSystemPrompt = (textareaPurpose, contextString) => {
|
|
72
|
+
return `You are a versatile writing assistant.
|
|
73
|
+
|
|
74
|
+
The user is writing some text.
|
|
75
|
+
The purpose is: "${textareaPurpose}"
|
|
76
|
+
|
|
77
|
+
The user also provides you with a prompt for EDITING some text they are writing.
|
|
78
|
+
Your job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.
|
|
79
|
+
|
|
80
|
+
Adjust yourself to the user's style and implied intent.
|
|
81
|
+
|
|
82
|
+
The user will provide the following information; use this to infer the best relevant EDIT:
|
|
83
|
+
<TextBeforeCursor>
|
|
84
|
+
<TextToEdit>
|
|
85
|
+
<TextAfterCursor>
|
|
86
|
+
<EditingPrompt>
|
|
87
|
+
|
|
88
|
+
<YourEditSuggestion>
|
|
89
|
+
|
|
90
|
+
If we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.
|
|
91
|
+
|
|
92
|
+
The following external context is also provided. Use it to help you make better suggestions!!!
|
|
93
|
+
\`\`\`
|
|
94
|
+
${contextString}
|
|
95
|
+
\`\`\`
|
|
96
|
+
`;
|
|
97
|
+
};
|
|
98
|
+
var defaultEditingFewShotMessages = [
|
|
99
|
+
{
|
|
100
|
+
role: "user",
|
|
101
|
+
name: "TextBeforeCursor",
|
|
102
|
+
content: "This morning I woke up and went straight to the grocery store. "
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
role: "user",
|
|
106
|
+
name: "TextToEdit",
|
|
107
|
+
content: "While I was there I also picked up some apples, oranges, and bananas. "
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
role: "user",
|
|
111
|
+
name: "TextAfterCursor",
|
|
112
|
+
content: "The grocery store was having a sale on fruit, so I decided to stock up."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
role: "user",
|
|
116
|
+
name: "EditingPrompt",
|
|
117
|
+
content: "I bought a big watermelon"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
role: "assistant",
|
|
121
|
+
content: " When I arrived I went straight to the produce section and picked out a big watermelon. "
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
role: "user",
|
|
125
|
+
name: "TextAfterCursor",
|
|
126
|
+
content: "and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
role: "user",
|
|
130
|
+
name: "TextBeforeCursor",
|
|
131
|
+
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;`
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
role: "user",
|
|
135
|
+
name: "InsertionPrompt",
|
|
136
|
+
content: "add section about the optionholder's pro rata share"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
role: "assistant",
|
|
140
|
+
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"; `
|
|
141
|
+
}
|
|
142
|
+
];
|
|
143
|
+
var defaultEditingApiConfig = {
|
|
144
|
+
apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(
|
|
145
|
+
"/api/copilotkit_chatlike"
|
|
146
|
+
),
|
|
147
|
+
makeSystemPrompt: defaultEditingMakeSystemPrompt,
|
|
148
|
+
fewShotMessages: defaultEditingFewShotMessages,
|
|
149
|
+
forwardedParams: void 0
|
|
150
|
+
};
|
|
151
|
+
export {
|
|
152
|
+
defaultEditingApiConfig,
|
|
153
|
+
defaultEditingFewShotMessages,
|
|
154
|
+
defaultEditingMakeSystemPrompt
|
|
155
|
+
};
|
|
5
156
|
//# sourceMappingURL=editing-api-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"
|
|
1
|
+
{"version":3,"sources":["../../../src/types/autosuggestions-config/subtypes/chatlike-api-endpoint.tsx","../../../src/types/autosuggestions-config/editing-api-config.tsx"],"sourcesContent":["import { MinimalChatGPTMessage } from \"./minimal-chat-gpt-message\";\n\nexport type ChatlikeApiEndpointImpl = (\n abortSignal: AbortSignal,\n messages: MinimalChatGPTMessage[],\n forwardedProps?: { [key: string]: any }\n) => Promise<string>;\n\nexport type StreamingChatlikeApiEndpointImpl = (\n abortSignal: AbortSignal,\n messages: MinimalChatGPTMessage[],\n forwardedProps?: { [key: string]: any }\n) => Promise<ReadableStream<string>>;\n\nexport class ChatlikeApiEndpoint {\n public run: StreamingChatlikeApiEndpointImpl;\n\n constructor(run: StreamingChatlikeApiEndpointImpl) {\n this.run = run;\n }\n\n /**\n * Creates a new instance of ChatlikeApiEndpoint with the provided API endpoint.\n * @param apiEndpoint The URL of the OpenAI-compatible API endpoint.\n * @returns A new instance of ChatlikeApiEndpoint.\n */\n static standardOpenAIEndpoint(apiEndpoint: string): ChatlikeApiEndpoint {\n return new ChatlikeApiEndpoint(\n async (\n abortSignal: AbortSignal,\n messages: MinimalChatGPTMessage[],\n forwardedProps?: { [key: string]: any }\n ) => {\n const res = await fetch(apiEndpoint, {\n method: \"POST\",\n body: JSON.stringify({\n ...forwardedProps,\n messages: messages,\n }),\n signal: abortSignal,\n });\n\n const bodySteram: ReadableStream<Uint8Array> | null = res.body;\n if (!bodySteram) {\n throw new Error(\"The response body is empty.\");\n }\n\n // map the stream to a stream of strings\n const stringStream = bodySteram.pipeThrough(new TextDecoderStream());\n\n return stringStream;\n }\n );\n }\n\n /**\n * Creates a fully customized instance of ChatlikeApiEndpoint.\n * @param run - The implementation of the ChatlikeApiEndpointImpl interface.\n * @returns A new instance of ChatlikeApiEndpoint .\n */\n static custom(run: StreamingChatlikeApiEndpointImpl): ChatlikeApiEndpoint {\n return new ChatlikeApiEndpoint(run);\n }\n}\n","import { ChatlikeApiEndpoint } from \"./subtypes/chatlike-api-endpoint\";\nimport { MakeSystemPrompt } from \"./subtypes/make-system-prompt\";\nimport { MinimalChatGPTMessage } from \"./subtypes/minimal-chat-gpt-message\";\n\nexport interface EditingApiConfig {\n apiEndpoint: ChatlikeApiEndpoint;\n makeSystemPrompt: MakeSystemPrompt;\n fewShotMessages: MinimalChatGPTMessage[];\n forwardedParams: { [key: string]: any } | undefined;\n}\n\nexport const defaultEditingMakeSystemPrompt: MakeSystemPrompt = (\n textareaPurpose,\n contextString\n) => {\n return `You are a versatile writing assistant.\n \nThe user is writing some text.\nThe purpose is: \\\"${textareaPurpose}\\\"\n\nThe user also provides you with a prompt for EDITING some text they are writing. \nYour job is to come up with an EDIT of the text that the user would like to use - AS BEST YOU CAN.\n\nAdjust yourself to the user's style and implied intent.\n\nThe user will provide the following information; use this to infer the best relevant EDIT:\n<TextBeforeCursor>\n<TextToEdit>\n<TextAfterCursor>\n<EditingPrompt>\n\n<YourEditSuggestion>\n\nIf we need to add a whitespace character to the suggested edit text, make sure to explicitly add it in.\n\nThe following external context is also provided. Use it to help you make better suggestions!!!\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n`;\n};\n\nexport const defaultEditingFewShotMessages: MinimalChatGPTMessage[] = [\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content: \"This morning I woke up and went straight to the grocery store. \",\n },\n {\n role: \"user\",\n name: \"TextToEdit\",\n content:\n \"While I was there I also picked up some apples, oranges, and bananas. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"The grocery store was having a sale on fruit, so I decided to stock up.\",\n },\n {\n role: \"user\",\n name: \"EditingPrompt\",\n content: \"I bought a big watermelon\",\n },\n {\n role: \"assistant\",\n content:\n \" When I arrived I went straight to the produce section and picked out a big watermelon. \",\n },\n {\n role: \"user\",\n name: \"TextAfterCursor\",\n content:\n \"and (iii) to the appointment of the Equityholders' Representative pursuant to Section 10.7 of the Merger Agreement and to the provisions thereof.\",\n },\n {\n role: \"user\",\n name: \"TextBeforeCursor\",\n content:\n 'The Optionholder, in the Optionholder\\'s capacity as a holder of vested Options, hereby irrevocably and unconditionally agrees: (i) that the Optionholder shall be deemed an \"Equityholder\" under the Merger Agreement and shall be entitled to the rights and benefits, and subject to the obligations, of an \"Equityholder\" thereunder;',\n },\n {\n role: \"user\",\n name: \"InsertionPrompt\",\n content: \"add section about the optionholder's pro rata share\",\n },\n {\n role: \"assistant\",\n content:\n ' (ii) that, for purposes of this Agreement and the Merger Agreement, the applicable percentage set forth opposite the name of the Optionholder in the Distribution Waterfall shall be such the Optionholder\\'s \"Pro Rata Share\"; ',\n },\n];\n\nexport const defaultEditingApiConfig: EditingApiConfig = {\n apiEndpoint: ChatlikeApiEndpoint.standardOpenAIEndpoint(\n \"/api/copilotkit_chatlike\"\n ),\n makeSystemPrompt: defaultEditingMakeSystemPrompt,\n fewShotMessages: defaultEditingFewShotMessages,\n forwardedParams: undefined,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,IAAM,sBAAN,MAA0B;AAAA,EAG/B,YAAY,KAAuC;AACjD,SAAK,MAAM;AAAA,EACb;AAAA,EAOA,OAAO,uBAAuB,aAA0C;AACtE,WAAO,IAAI;AAAA,MACT,CACE,aACA,UACA,mBACG;AACH,cAAM,MAAM,MAAM,MAAM,aAAa;AAAA,UACnC,QAAQ;AAAA,UACR,MAAM,KAAK,UAAU,iCAChB,iBADgB;AAAA,YAEnB;AAAA,UACF,EAAC;AAAA,UACD,QAAQ;AAAA,QACV,CAAC;AAED,cAAM,aAAgD,IAAI;AAC1D,YAAI,CAAC,YAAY;AACf,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC/C;AAGA,cAAM,eAAe,WAAW,YAAY,IAAI,kBAAkB,CAAC;AAEnE,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA,EAOA,OAAO,OAAO,KAA4D;AACxE,WAAO,IAAI,oBAAoB,GAAG;AAAA,EACpC;AACF;;;ACpDO,IAAM,iCAAmD,CAC9D,iBACA,kBACG;AACH,SAAO;AAAA;AAAA;AAAA,mBAGW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBlB;AAAA;AAAA;AAGF;AAEO,IAAM,gCAAyD;AAAA,EACpE;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SACE;AAAA,EACJ;AACF;AAEO,IAAM,0BAA4C;AAAA,EACvD,aAAa,oBAAoB;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;","names":[]}
|