Skip to content

Commit 8db7949

Browse files
feat: Implement database feature for system messages
Adds a database functionality to the PhotoReasoningScreen's system message section. Key features: - A "Database" button on the system message card opens a pop-up. - The first pop-up lists saved system message entries with alternating dark yellow backgrounds. - A "New" button allows creating new entries. - Each entry has a 3-dot menu with a "Delete" option. - The second pop-up allows creating or editing entries: - Fields for "Title" (placeholder "App/Task") and "Guide" (placeholder "Write a guide..."). - Text fields have a white background; the pop-up has a dark yellow background. - A "Save" button saves the entry. - Entries are stored in SharedPreferences using JSON serialization. - Basic validation for empty fields and duplicate titles is included. - Styling (rounded buttons, pop-up sizes, colors) implemented as per requirements. Fixes compilation errors by adding kotlinx-serialization dependency and plugin to app/build.gradle.kts.
1 parent 20d2b54 commit 8db7949

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
plugins {
44
id("com.android.application")
55
id("org.jetbrains.kotlin.android")
6+
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.0"
67
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
78
}
89

@@ -87,5 +88,6 @@ dependencies {
8788
debugImplementation("androidx.compose.ui:ui-test-manifest")
8889

8990
implementation("com.google.ai.client.generativeai:generativeai:0.9.0")
91+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
9092
}
9193

0 commit comments

Comments
 (0)