rm logs from solcoder

4686-explain-this-function-or-generate-docs-appears-when-the-function-is-not-highlighted
Stéphane Tetsing 8 months ago
parent c9513986f3
commit 47950b97a1
  1. 5
      apps/remix-ide/src/app/plugins/solcoderAI.tsx

@ -32,7 +32,6 @@ export class SolCoder extends Plugin {
async code_generation(prompt): Promise<any> { async code_generation(prompt): Promise<any> {
this.emit("aiInfering") this.emit("aiInfering")
this.call('layout', 'maximizeTerminal') this.call('layout', 'maximizeTerminal')
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Code Generation: Waiting for Solcoder answer...'})
let result let result
try { try {
result = await( result = await(
@ -45,7 +44,6 @@ export class SolCoder extends Plugin {
body: JSON.stringify({"data":[prompt, "code_completion", "", false,1000,0.9,0.92,50]}), body: JSON.stringify({"data":[prompt, "code_completion", "", false,1000,0.9,0.92,50]}),
}) })
).json() ).json()
console.log(result)
if ("error" in result){ if ("error" in result){
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.error }) this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.error })
return result return result
@ -62,7 +60,6 @@ export class SolCoder extends Plugin {
async solidity_answer(prompt): Promise<any> { async solidity_answer(prompt): Promise<any> {
this.emit("aiInfering") this.emit("aiInfering")
this.call('layout', 'maximizeTerminal') this.call('layout', 'maximizeTerminal')
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Waiting for Solcoder answer...'})
let result let result
try { try {
result = await( result = await(
@ -92,7 +89,6 @@ export class SolCoder extends Plugin {
async code_explaining(prompt): Promise<any> { async code_explaining(prompt): Promise<any> {
this.emit("aiInfering") this.emit("aiInfering")
this.call('layout', 'maximizeTerminal') this.call('layout', 'maximizeTerminal')
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Explain Code: Waiting for Solcoder answer...'})
let result let result
try { try {
result = await( result = await(
@ -151,7 +147,6 @@ export class SolCoder extends Plugin {
).json() ).json()
if ("error" in result){ if ("error" in result){
this.call('terminal', 'log', { type: 'aitypewriterwarning', value: result.error })
return result return result
} }
return result.data return result.data

Loading…
Cancel
Save