remove logs

pull/4286/head
aniket-engg 11 months ago
parent 140763562b
commit a08eceb158
  1. 1
      apps/remix-ide/src/app/plugins/copilot/suggestion-service/copilot-suggestion.ts
  2. 8
      apps/remix-ide/src/app/plugins/copilot/suggestion-service/suggestion-service.ts
  3. 5
      libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts

@ -47,7 +47,6 @@ export class CopilotSuggestion extends Plugin {
const max_new_tokens = await this.call('settings', 'get', 'settings/copilot/suggest/max_new_tokens')
const temperature = await this.call('settings', 'get', 'settings/copilot/suggest/temperature')
console.log('suggest', max_new_tokens, temperature)
const options: SuggestOptions = {
do_sample: false,
top_k: 0,

@ -28,37 +28,31 @@ export class SuggestionService {
const onMessageReceived = (e) => {
switch (e.data.status) {
case 'initiate':
console.log(e.data)
this.events.emit(e.data.status, e.data)
// Model file start load: add a new progress item to the list.
break;
case 'progress':
this.events.emit(e.data.status, e.data)
console.log(e.data)
// Model file progress: update one of the progress items.
break;
case 'done':
this.events.emit(e.data.status, e.data)
console.log(e.data)
// Model file loaded: remove the progress item from the list.
break;
case 'ready':
this.events.emit(e.data.status, e.data)
console.log(e.data)
// Pipeline ready: the worker is ready to accept messages.
break;
case 'update':
this.events.emit(e.data.status, e.data)
console.log(e.data)
// Generation update: update the output text.
break;
case 'complete':
console.log(e.data)
if (this.responses[e.data.id]) {
if (this.current === e.data.id) {
this.responses[e.data.id](null, e.data)
@ -67,8 +61,6 @@ export class SuggestionService {
}
delete this.responses[e.data.id]
this.current = null
} else {
console.log('no callback for', e.data)
}
// Generation complete: re-enable the "Generate" button

@ -15,7 +15,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
async provideInlineCompletions(model: monacoTypes.editor.ITextModel, position: monacoTypes.Position, context: monacoTypes.languages.InlineCompletionContext, token: monacoTypes.CancellationToken): Promise<monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>> {
if (context.selectedSuggestionInfo) {
console.log('return empty from provideInlineCompletions')
return;
}
// get text before the position of the completion
@ -27,7 +26,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
});
if (!word.endsWith(' ') && !word.endsWith('\n') && !word.endsWith(';') && !word.endsWith('.')) {
console.log('not a trigger char')
return;
}
@ -46,7 +44,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
// use the code generation model
const {data} = await axios.post('https://gpt-chat.remixproject.org/infer', {comment: ask.replace('///', '')})
const parsedData = JSON.parse(data).trimStart()
console.log('parsedData', parsedData)
const item: monacoTypes.languages.InlineCompletion = {
insertText: parsedData
};
@ -61,7 +58,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
// abort if there is a signal
if (token.isCancellationRequested) {
console.log('aborted')
return
}
@ -81,7 +77,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
// abort if there is a signal
if (token.isCancellationRequested) {
console.log('aborted')
return
}
return {

Loading…
Cancel
Save