everydaytok commited on
Commit
edeabc4
·
verified ·
1 Parent(s): a7a7ca5

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +2 -4
app.js CHANGED
@@ -402,6 +402,7 @@ async function runAsyncFeedback(projectId, userId, fullInput, images = []) {
402
  await StateManager.addHistory(projectId, 'worker', 'model', firstTurnResponse);
403
  }
404
 
 
405
  StateManager.setStatus(projectId, "Idle");
406
 
407
  // 6. Final Execution & Cleanup
@@ -443,9 +444,6 @@ async function processAndQueueResponse(projectId, rawResponse, userId) {
443
  }
444
 
445
  // Explicit Read Commands (Parsing what the AI wrote)
446
- // This allows the AI to output [READ_SCRIPT: Game.ServerScriptService.Main]
447
- // And have the backend parse it for the plugin to pick up.
448
- // (Note: StateManager.queueCommand handles the parsing logic too, but we call it here to trigger it)
449
  await StateManager.queueCommand(projectId, rawResponse);
450
  }
451
 
@@ -577,7 +575,7 @@ app.post('/project/ping', async (req, res) => {
577
  // 1. BASE RESPONSE (Visuals)
578
  const response = {
579
  action: "IDLE",
580
- status: StateManager.getStatus(projectId),
581
  snapshot: StateManager.getSnapshot(projectId)
582
  };
583
 
 
402
  await StateManager.addHistory(projectId, 'worker', 'model', firstTurnResponse);
403
  }
404
 
405
+ // --- STATUS RESET ---
406
  StateManager.setStatus(projectId, "Idle");
407
 
408
  // 6. Final Execution & Cleanup
 
444
  }
445
 
446
  // Explicit Read Commands (Parsing what the AI wrote)
 
 
 
447
  await StateManager.queueCommand(projectId, rawResponse);
448
  }
449
 
 
575
  // 1. BASE RESPONSE (Visuals)
576
  const response = {
577
  action: "IDLE",
578
+ status: StateManager.getStatus(projectId), // Will now return "Idle" by default
579
  snapshot: StateManager.getSnapshot(projectId)
580
  };
581