monacopilot 0.8.21 → 0.8.23
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/README.md +2 -0
- package/dist/index.d.mts +4 -12
- package/dist/index.d.ts +4 -12
- package/dist/index.js +15 -9
- package/dist/index.mjs +15 -9
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -12,7 +12,6 @@ type Theme = EditorBuiltInTheme | CustomTheme;
|
|
|
12
12
|
type Endpoint = string;
|
|
13
13
|
type Filename = string;
|
|
14
14
|
type Technologies = string[];
|
|
15
|
-
type CompletionSpeed = 'little-faster' | 'normal';
|
|
16
15
|
type ExternalContext = {
|
|
17
16
|
/**
|
|
18
17
|
* The relative path from the current editing code in the editor to an external file.
|
|
@@ -28,7 +27,7 @@ type ExternalContext = {
|
|
|
28
27
|
*/
|
|
29
28
|
content: string;
|
|
30
29
|
}[];
|
|
31
|
-
interface
|
|
30
|
+
interface MonaCopilotProps extends EditorProps {
|
|
32
31
|
/**
|
|
33
32
|
* The name of the file you are editing. This is used to provide more relevant completions based on the file's purpose.
|
|
34
33
|
* For example, if you are editing a file named `utils.js`, the completions will be more relevant to utility functions.
|
|
@@ -36,7 +35,7 @@ interface CopilotEditorProps extends EditorProps {
|
|
|
36
35
|
filename?: Filename;
|
|
37
36
|
/**
|
|
38
37
|
* The API endpoint where you started the completion service.
|
|
39
|
-
* [Learn more](https://monacopilot.vercel.app/
|
|
38
|
+
* [Learn more](https://monacopilot.vercel.app/copilot/setup#integrating-copilot-to-the-editor)
|
|
40
39
|
*/
|
|
41
40
|
endpoint?: Endpoint;
|
|
42
41
|
/**
|
|
@@ -54,13 +53,6 @@ interface CopilotEditorProps extends EditorProps {
|
|
|
54
53
|
* The theme you want to use for the editor.
|
|
55
54
|
*/
|
|
56
55
|
theme?: Theme;
|
|
57
|
-
/**
|
|
58
|
-
* Controls the speed of the completion.
|
|
59
|
-
* Set to `little-faster` for slightly faster completions. Note that this option has a high cost, though not exorbitant.
|
|
60
|
-
* For a detailed cost comparison, see the [cost overview table](https://monacopilot.vercel.app/docs/copilot-cost-overview).
|
|
61
|
-
* @default 'normal'
|
|
62
|
-
*/
|
|
63
|
-
completionSpeed?: CompletionSpeed;
|
|
64
56
|
/**
|
|
65
57
|
* Helps to give more relevant completions based on the full context.
|
|
66
58
|
* You can include things like the contents/codes of other files in the same workspace.
|
|
@@ -119,6 +111,6 @@ declare class Copilot {
|
|
|
119
111
|
complete({ completionMetadata, }: CompletionRequest): Promise<CompletionResponse>;
|
|
120
112
|
}
|
|
121
113
|
|
|
122
|
-
declare const
|
|
114
|
+
declare const MonaCopilot: ({ filename, endpoint, technologies, theme, externalContext, ...props }: MonaCopilotProps) => React.JSX.Element;
|
|
123
115
|
|
|
124
|
-
export { type CompletionRequest, type CompletionResponse, Copilot, type
|
|
116
|
+
export { type CompletionRequest, type CompletionResponse, Copilot, type Endpoint, type MonaCopilotProps, type Technologies, type Theme, MonaCopilot as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ type Theme = EditorBuiltInTheme | CustomTheme;
|
|
|
12
12
|
type Endpoint = string;
|
|
13
13
|
type Filename = string;
|
|
14
14
|
type Technologies = string[];
|
|
15
|
-
type CompletionSpeed = 'little-faster' | 'normal';
|
|
16
15
|
type ExternalContext = {
|
|
17
16
|
/**
|
|
18
17
|
* The relative path from the current editing code in the editor to an external file.
|
|
@@ -28,7 +27,7 @@ type ExternalContext = {
|
|
|
28
27
|
*/
|
|
29
28
|
content: string;
|
|
30
29
|
}[];
|
|
31
|
-
interface
|
|
30
|
+
interface MonaCopilotProps extends EditorProps {
|
|
32
31
|
/**
|
|
33
32
|
* The name of the file you are editing. This is used to provide more relevant completions based on the file's purpose.
|
|
34
33
|
* For example, if you are editing a file named `utils.js`, the completions will be more relevant to utility functions.
|
|
@@ -36,7 +35,7 @@ interface CopilotEditorProps extends EditorProps {
|
|
|
36
35
|
filename?: Filename;
|
|
37
36
|
/**
|
|
38
37
|
* The API endpoint where you started the completion service.
|
|
39
|
-
* [Learn more](https://monacopilot.vercel.app/
|
|
38
|
+
* [Learn more](https://monacopilot.vercel.app/copilot/setup#integrating-copilot-to-the-editor)
|
|
40
39
|
*/
|
|
41
40
|
endpoint?: Endpoint;
|
|
42
41
|
/**
|
|
@@ -54,13 +53,6 @@ interface CopilotEditorProps extends EditorProps {
|
|
|
54
53
|
* The theme you want to use for the editor.
|
|
55
54
|
*/
|
|
56
55
|
theme?: Theme;
|
|
57
|
-
/**
|
|
58
|
-
* Controls the speed of the completion.
|
|
59
|
-
* Set to `little-faster` for slightly faster completions. Note that this option has a high cost, though not exorbitant.
|
|
60
|
-
* For a detailed cost comparison, see the [cost overview table](https://monacopilot.vercel.app/docs/copilot-cost-overview).
|
|
61
|
-
* @default 'normal'
|
|
62
|
-
*/
|
|
63
|
-
completionSpeed?: CompletionSpeed;
|
|
64
56
|
/**
|
|
65
57
|
* Helps to give more relevant completions based on the full context.
|
|
66
58
|
* You can include things like the contents/codes of other files in the same workspace.
|
|
@@ -119,6 +111,6 @@ declare class Copilot {
|
|
|
119
111
|
complete({ completionMetadata, }: CompletionRequest): Promise<CompletionResponse>;
|
|
120
112
|
}
|
|
121
113
|
|
|
122
|
-
declare const
|
|
114
|
+
declare const MonaCopilot: ({ filename, endpoint, technologies, theme, externalContext, ...props }: MonaCopilotProps) => React.JSX.Element;
|
|
123
115
|
|
|
124
|
-
export { type CompletionRequest, type CompletionResponse, Copilot, type
|
|
116
|
+
export { type CompletionRequest, type CompletionResponse, Copilot, type Endpoint, type MonaCopilotProps, type Technologies, type Theme, MonaCopilot as default };
|