From 72cdc8fd7af9a3cc40865d8225fe9c8f59e7bb6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Sun, 30 Jun 2024 10:13:33 +0200 Subject: [PATCH] formated the response in terminal when AI is not available --- apps/remix-ide/src/app/plugins/solcoderAI.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/solcoderAI.tsx b/apps/remix-ide/src/app/plugins/solcoderAI.tsx index 609c47032e..80f9a6c89a 100644 --- a/apps/remix-ide/src/app/plugins/solcoderAI.tsx +++ b/apps/remix-ide/src/app/plugins/solcoderAI.tsx @@ -76,7 +76,7 @@ export class SolCoder extends Plugin { } return result.data } catch (e) { - this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) + this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ` }) return } finally { this.emit("aiInferingDone") @@ -103,7 +103,7 @@ export class SolCoder extends Plugin { }) ).json() } catch (e) { - this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) + this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ` }) this.solgpt_chat_history = [] return } finally { @@ -142,7 +142,7 @@ export class SolCoder extends Plugin { } return result.data[0] } catch (e) { - this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) + this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ` }) return } finally { this.emit("aiInferingDone") @@ -190,7 +190,7 @@ export class SolCoder extends Plugin { return result.data } catch (e) { - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `Unable to get a response ${e.message}` }) + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `Unable to get a response ` }) return } finally { this.emit("aiInferingDone") @@ -228,7 +228,7 @@ export class SolCoder extends Plugin { return result.data } catch (e) { - this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `Unable to get a response ${e.message}` }) + this.call('terminal', 'log', { type: 'aitypewriterwarning', value: `Unable to get a response` }) return } finally { this.emit("aiInferingDone") @@ -259,7 +259,7 @@ export class SolCoder extends Plugin { } return result.data[0] } catch (e) { - this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) + this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ` }) return } finally { this.emit("aiInferingDone")