File tree Expand file tree Collapse file tree 1 file changed +29
-15
lines changed Expand file tree Collapse file tree 1 file changed +29
-15
lines changed Original file line number Diff line number Diff line change @@ -146,10 +146,13 @@ curl -X POST http://localhost:8000/compile \
146146
147147```
148148{
149- "success":true,
150- "files":["Cargo.toml","src/main.rs"],
151- "build_output":"Build successful",
152- "run_output":"Hello, World!\n"
149+ "success": true,
150+ "files": [
151+ "Cargo.toml",
152+ "src/main.rs"
153+ ],
154+ "build_output": "Build successful",
155+ "run_output": "Hello, World!\n"
153156}
154157```
155158
@@ -182,17 +185,28 @@ curl -X POST http://localhost:8000/compile-and-fix \
182185#### 📤 Response:
183186
184187```
185- [filename: Cargo.toml]
186- [package]
187- name = "hello_world"
188- version = "0.1.0"
189- edition = "2021"
190-
191- [dependencies]
192-
193- [filename: src/main.rs]
194- fn main() {
195- println!("Hello, World!"); // Missing closing parenthesis
188+ {
189+ "success": true,
190+ "attempts": [
191+ {
192+ "attempt": 1,
193+ "success": false,
194+ "output": " Compiling hello_world v0.1.0 (/tmp/tmpk_0n65md)\nerror: mismatched closing delimiter: `}`\n --> src/main.rs:2:13\n |\n1 | fn main() {\n | - closing delimiter possibly meant for this\n2 | println!(\"Hello, World!\" // Missing closing parenthesis\n | ^ unclosed delimiter\n3 | }\n | ^ mismatched closing delimiter\n\nerror: could not compile `hello_world` (bin \"hello_world\") due to 1 previous error\n"
195+ },
196+ {
197+ "attempt": 2,
198+ "success": true,
199+ "output": null
200+ }
201+ ],
202+ "final_files": {
203+ "Cargo.toml": "[package]\nname = \"hello_world\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]",
204+ "src/main.rs": "fn main() {\n println!(\"Hello, World!\");\n}"
205+ },
206+ "build_output": "Build successful",
207+ "run_output": "Hello, World!\n",
208+ "similar_project_used": false,
209+ "combined_text": "[filename: Cargo.toml]\n[package]\nname = \"hello_world\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n\n[filename: src/main.rs]\nfn main() {\n println!(\"Hello, World!\");\n}"
196210}
197211```
198212
You can’t perform that action at this time.
0 commit comments