human fight non multiple choice fix

This commit is contained in:
Dorian
2026-03-10 23:26:36 +00:00
parent 68e292183a
commit 112bcde515
3 changed files with 11 additions and 4 deletions
@@ -113,6 +113,9 @@ export function useHumanChallenge(
}
if (!humanChallenge.value || humanChallenge.value.roundNumber !== data.roundNumber) {
applyChallenge(data)
} else if (data.choices?.length && humanChoices.value.length === 0) {
// SSE fallback had no choices, polling found them — update
humanChoices.value = data.choices
}
} else if (data.fightStatus === 'finished') {
humanChallenge.value = null
+1 -1
View File
@@ -553,7 +553,6 @@ async function fightAgain(botId: string) {
window.history.replaceState({}, '', `/arena/${data.fightId}`)
startPolling({ onFinished: () => stopHumanPolling(), onTimeout: () => stopHumanPolling() })
if (isHumanFight.value) {
startHumanPolling()
wireSSE()
for (let i = 0; i < 20; i++) {
await loadFight()
@@ -563,6 +562,7 @@ async function fightAgain(botId: string) {
await nextTick()
await nextTick()
if (liveFightData.value) await initLiveScene()
startHumanPolling()
}
} else {
fightError.value = `Failed to start fight (${res.status})`