Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.
perf(tools): a shorter update_gotcha_settings, sent with every Operator request (#99)
Durganshu6e6c0e0f340e
diff --git a/app/src/main/java/com/gotcha/tools/GotchaSettingsUpdate.kt b/app/src/main/java/com/gotcha/tools/GotchaSettingsUpdate.ktindex 4b63b80..285d3c6 100644--- a/app/src/main/java/com/gotcha/tools/GotchaSettingsUpdate.kt+++ b/app/src/main/java/com/gotcha/tools/GotchaSettingsUpdate.kt@@ -386,7 +386,11 @@ object GotchaSettingsUpdate {spec.key,buildJsonObject {put("type", spec.jsonType)- put("description", "${spec.label}: ${spec.accepts}.")+ // Sent with every Operator request, so nothing twice: the type+ // already says boolean and the enum lists the choices. The parser's+ // error still spells out [Spec.accepts] if a value is wrong.+ val saysItAll = spec.jsonType == "boolean" || spec.choices != null+ put("description", if (saysItAll) spec.label else "${spec.label}: ${spec.accepts}.")spec.choices?.let { choices ->put("enum", kotlinx.serialization.json.JsonArray(choices.map(::JsonPrimitive)))}@@ -396,14 +400,13 @@ object GotchaSettingsUpdate {put(CONNECTORS_KEY,toggleSchema(- "Turn connectors on (true) or off (false), keyed by connector id: " +- catalog.connectors.keys.joinToString(", ") + ". Off keeps the sign-in but " +- "removes that connector's tools."+ "Connector id → on/off: " + catalog.connectors.keys.joinToString(", ") ++ ". Off keeps the sign-in."))put(SKILLS_KEY,- toggleSchema("Turn skills on (true) or off (false), keyed by skill id as search_skills reports it.")+ toggleSchema("Skill id (as search_skills reports it) → on/off."))}diff --git a/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt b/app/src/main/java/com/gotcha/tools/ToolDefinitions.ktindex f390d05..a4a723a 100644--- a/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt+++ b/app/src/main/java/com/gotcha/tools/ToolDefinitions.kt@@ -108,14 +108,10 @@ object ToolDefinitions {val updateGotchaSettings = tool("update_gotcha_settings",- "Change Gotcha's own settings when the user asks you to — notifications, reply and " +- "speech language, reading replies aloud, the skin, proactive assistance, the wake " +- "word's listening mode and sensitivity, and turning connectors or skills on or off. " +- "Only the settings in `changes` can be set; API keys, sign-in, the model and " +- "permissions cannot, so send the user to Settings for those (about_gotcha has the " +- "path). The user is shown every change with its current and new value and must " +- "approve it, every time; if they decline, nothing changes — do not retry unless " +- "they ask again. Change only what the user asked for.",+ "Change Gotcha's own settings when the user asks. Only the keys in `changes`; API " ++ "keys, sign-in, the model and permissions are not settable (about_gotcha has their " ++ "Settings path). The user approves every change; if they decline, don't retry " ++ "unless asked. Change only what was asked.",schema {putJsonObject("properties") {putJsonObject("changes") {