Merge pull request #4651 from ethereum/remote_completion

fixed typewriterwarning conflict
pull/4677/head
STetsing 8 months ago committed by GitHub
commit e972ddbedb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      apps/remix-ide/src/app/plugins/openaigpt.tsx

@ -19,7 +19,7 @@ export class OpenAIGpt extends Plugin {
async message(prompt): Promise<CreateChatCompletionResponse> {
this.call('layout', 'maximizeTerminal')
this.call('terminal', 'log', { type: 'typewriterwarning', value: 'Waiting for GPT answer...'})
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Waiting for GPT answer...'})
let result
try {
result = await (
@ -38,11 +38,11 @@ export class OpenAIGpt extends Plugin {
}
if (result && result.choices && result.choices.length) {
this.call('terminal', 'log', { type: 'typewriterwarning', value: result.choices[0].message.content })
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.choices[0].message.content })
} else if (result.error) {
this.call('terminal', 'log', { type: 'typewriterwarning', value: result.error })
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.error })
} else {
this.call('terminal', 'log', { type: 'typewriterwarning', value: 'No response...' })
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'No response...' })
}
return result.data
}

Loading…
Cancel
Save