You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Performs any user action on the entire curren workspace or updates the workspace based on a user prompt, optionally using Retrieval-Augmented Generation (RAG) for additional context.
236
+
* Performs any user action on the entire curren workspace or updates the workspace based on a user prompt,
237
+
* optionally using Retrieval-Augmented Generation (RAG) for additional context.
constCOMPILATION_WARNING_MESSAGE='⚠️**Warning**: The compilation failed. Please check the compilation errors in the Solidity compiler plugin. Enter `/continue` or `/c` if you want Remix AI to try again until a compilable solution is generated?'
7
7
@@ -12,11 +12,9 @@ export class ContractAgent {
12
12
generationThreadID: string=''
13
13
workspaceName: string=''
14
14
contracts: any={}
15
-
performCompile: boolean=false
16
-
overrideWorkspace: boolean=false
15
+
mainPrompt: string=''
17
16
staticinstance
18
17
oldPayload: any=undefined
19
-
mainPrompt: string
20
18
21
19
privateconstructor(props){
22
20
this.plugin=props;
@@ -33,23 +31,29 @@ export class ContractAgent {
33
31
* Write the result of the generation to the workspace. Compiles the contracts one time and creates a new workspace.
34
32
* @param payload - The payload containing the generated files
35
33
* @param userPrompt - The user prompt used to generate the files
34
+
* @param statusCallback - Optional callback for status updates in chat window
// console.log('Compilation failed, trying again recursively ...')
101
-
constnewPrompt=`Payload:\n${JSON.stringify(result.errfiles)}}\n\nWhile considering this compilation error: Here is the error message\n. Try this again:${this.mainPrompt}\n `
102
-
returnawaitthis.plugin.generate(newPrompt,AssistantParams,this.generationThreadID);// reuse the same thread
0 commit comments