Fix beschädigten Mistral-Retry-Block in PhotoReasoningViewModel#67
Merged
Android-PowerUser merged 1 commit intocodex/analyze-technical-debt-and-complexity-o6bm9pfrom Mar 30, 2026
Conversation
Contributor
There was a problem hiding this comment.
The PR successfully fixes the corrupted Mistral retry block that was causing parser and compilation errors. The changes restore correct bracket structure and properly use the maxAttempts variable throughout the retry logic. No blocking issues found.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
eb8520c
into
codex/analyze-technical-debt-and-complexity-o6bm9p
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
reasonWithMistral(...), der dazu führte, dass nachfolgende Methoden als lokale Funktionen fehlinterpretiert wurden und vieleUnresolved reference-Fehler erzeugt wurden.Description
catch (IOException)-Block im Mistral-Request-Loop und stellt die korrekte Klammerstruktur wieder her inapp/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt.maxAttemptsund wirft bei Überschreiten eine aussagekräftigeIOException.replaceAiMessageText(...)mit dem richtigen Text-Argument undisPending = truewieder her, sodass Streaming-/Fehlermeldungen korrekt angezeigt werden.finalResponse-Zuweisung und wirft bei nicht-erfolgreichen Antworten korrektIOExceptionmit Fehlerkörper.Testing
./gradlew :app:compileDebugKotlin— vor der Änderung traten Parser-/Kompilierfehler auf (mehrereUnresolved reference) aufgrund des beschädigten Blocks, die durch die Änderungen adressiert wurden../gradlew :app:compileDebugKotlin— die Kompilierung konnte in dieser Umgebung nicht abgeschlossen werden, weil die Android SDK-Location nicht konfiguriert war (SDK location not found), daher konnte ein vollständiger Gradle-Kompilierschritt hier nicht final bestätigt werden.Codex Task