diff --git a/.gitignore b/.gitignore index 4c912d6..7f73128 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ com_crashlytics_export_strings.xml .idea/android_sdk/ android_sdk/ +*.idsig diff --git a/AGENTS.md b/AGENTS.md index d3824e9..76e729f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,8 @@ # Agent Instructions -After each successfully executed programming instruction, the app must be built and submitted in the following way: +Do not perform any pre-commit steps except request code review and record learning content. After successful programming, the app must be built and submitted in the following way: -If you are not Jules, or if the Android SDK is not already installed, then you will need to install it first: +If you are not Jules, then you will need to install the Android SDK first: ``` #!/bin/bash diff --git a/app-release-signed.apk b/app-release-signed.apk deleted file mode 100644 index f14a151..0000000 Binary files a/app-release-signed.apk and /dev/null differ diff --git a/app-release-signed.apk.idsig b/app-release-signed.apk.idsig deleted file mode 100644 index 58f1c35..0000000 Binary files a/app-release-signed.apk.idsig and /dev/null differ diff --git a/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt b/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt index d0963bd..39481d9 100644 --- a/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt +++ b/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt @@ -274,13 +274,13 @@ fun MenuScreen( .padding(horizontal = 16.dp, vertical = 8.dp) ) { val annotatedText = buildAnnotatedString { - append("• Preview models could be deactivated by Google without being handed over to the final release.\\n") - append("• GPT-oss 120b is a pure text model.\\n") - append("• Gemma 3n E4B it cannot handle screenshots in the API.\\n") - append("• GPT models (Vercel) have a free budget of $5 per month.\\n") - append("GPT-5.1 Input: $1.25/M Output: $10.00/M\\n") - append("GPT-5.1 mini Input: $0.25/ M Output: $2.00/M\\n") - append("GPT-5 nano Input: $0.05/M Output: $0.40/M\\n") + append("• Preview models could be deactivated by Google without being handed over to the final release.\n") + append("• GPT-oss 120b is a pure text model.\n") + append("• Gemma 3n E4B it cannot handle screenshots in the API.\n") + append("• GPT models (Vercel) have a free budget of $5 per month.\n") + append("GPT-5.1 Input: $1.25/M Output: $10.00/M\n") + append("GPT-5.1 mini Input: $0.25/ M Output: $2.00/M\n") + append("GPT-5 nano Input: $0.05/M Output: $0.40/M\n") append("• There are rate limits for free use of Gemini models. The less powerful the models are, the more you can use them. The limits range from a maximum of 5 to 30 calls per minute. After each screenshot (every 2-3 seconds) the LLM must respond again. More information is available at ") pushStringAnnotation(tag = "URL", annotation = "https://ai.google.dev/gemini-api/docs/rate-limits") @@ -372,4 +372,3 @@ fun MenuScreenTrialExpiredPreview() { // Preview with trial expired MenuScreen(innerPadding = PaddingValues(), isTrialExpired = true, isPurchased = false) } - diff --git a/app/src/main/kotlin/com/google/ai/sample/ScreenCaptureService.kt b/app/src/main/kotlin/com/google/ai/sample/ScreenCaptureService.kt index 371f72c..ca978cf 100644 --- a/app/src/main/kotlin/com/google/ai/sample/ScreenCaptureService.kt +++ b/app/src/main/kotlin/com/google/ai/sample/ScreenCaptureService.kt @@ -734,11 +734,11 @@ sealed class VercelContent @Serializable @SerialName("text") -data class VercelTextContent(val text: String) : VercelContent() +data class VercelTextContent(@SerialName("text") val content: String) : VercelContent() @Serializable @SerialName("image_url") -data class VercelImageContent(val image_url: VercelImageUrl) : VercelContent() +data class VercelImageContent(@SerialName("image_url") val content: VercelImageUrl) : VercelContent() @Serializable data class VercelImageUrl(val url: String) @@ -767,9 +767,9 @@ private suspend fun callVercelApi(modelName: String, apiKey: String, chatHistory val messages = (chatHistory + inputContent).map { content -> val parts = content.parts.map { part -> when (part) { - is TextPart -> VercelTextContent(text = part.text) - is ImagePart -> VercelImageContent(image_url = VercelImageUrl(url = part.image.toBase64())) - else -> VercelTextContent(text = "") // Or handle other part types appropriately + is TextPart -> VercelTextContent(content = part.text) + is ImagePart -> VercelImageContent(content = VercelImageUrl(url = part.image.toBase64())) + else -> VercelTextContent(content = "") // Or handle other part types appropriately } } VercelMessage(role = if (content.role == "user") "user" else "assistant", content = parts) diff --git a/build_and_sign.sh b/build_and_sign.sh index 8d24a5a..dd95326 100755 --- a/build_and_sign.sh +++ b/build_and_sign.sh @@ -16,7 +16,7 @@ fi # 2. Download and unzip the Android SDK command-line tools echo "INFO: Downloading Android SDK..." wget -q https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip -unzip -q commandlinetools-linux-13114758_latest.zip -d android_sdk +unzip -oq commandlinetools-linux-13114758_latest.zip -d android_sdk rm commandlinetools-linux-13114758_latest.zip # 3. Restructure cmdline-tools for sdkmanager