Skip to content

Commit

Permalink
chore: complete bracket pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Feb 19, 2025
1 parent 9d87ea0 commit 0c3cbcd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const DEFAULT_COPILOT_TEMPERATURE = 0.1 as const;
export const DEFAULT_COPILOT_MAX_TOKENS = 500 as const;
export const DEFAULT_COPILOT_MAX_TOKENS = 1000 as const;
6 changes: 4 additions & 2 deletions packages/monacopilot/src/utils/result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import type {
export const createInlineCompletionResult = (
items: EditorInlineCompletion[],
): EditorInlineCompletionsResult => ({
items,
enableForwardStability: true,
items: items.map(item => ({
completeBracketPairs: true,
...item,
})),
});
5 changes: 2 additions & 3 deletions playground/components/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const Editor = () => {

const completion = registerCompletion(monaco, editor, {
endpoint: '/api/code-completion',
language: 'python',
trigger: 'onTyping',
language: 'javascript',
});

return () => {
Expand All @@ -32,7 +31,7 @@ const Editor = () => {
<MonacoEditor
height="400px"
width="800px"
language="python"
language="javascript"
className="rounded-lg border border-slate-200 dark:border-slate-800"
options={DEFAULT_MONACO_EDITOR_OPTIONS}
onMount={(editor, monaco) => {
Expand Down

0 comments on commit 0c3cbcd

Please # to comment.