Skip to content

Commit 00bff88

Browse files
PureWeenCopilot
andcommitted
fix: don't show fleet 'started' message before API confirms
Only show 🚀 success message after StartFleetAsync returns true, show error on false. Avoids premature success indicator on failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8b36bc3 commit 00bff88

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

PolyPilot/Components/Pages/Dashboard.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,9 +2211,10 @@
22112211
return;
22122212
}
22132213

2214-
session.History.Add(ChatMessage.SystemMessage($"🚀 Starting fleet for: *{arg}*"));
22152214
var started = await CopilotService.StartFleetAsync(sessionName, arg);
2216-
if (!started)
2215+
if (started)
2216+
session.History.Add(ChatMessage.SystemMessage($"🚀 Fleet started for: *{arg}*"));
2217+
else
22172218
session.History.Add(ChatMessage.ErrorMessage("Failed to start fleet mode. Ensure the session is connected and idle."));
22182219
}
22192220

0 commit comments

Comments
 (0)