Skip to content

armgit / andee

Public Imported from GitHub
0

Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。

feat(desktop): settings match the phone's card, with a day theme and a language-driven voice provider

booboosui17e741d956f8
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Assistant.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Assistant.kt
index fc815b2..8fcb8c1 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Assistant.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Assistant.kt
@@ -91,7 +91,8 @@ object Assistant {
if (zh) "https://api.deepseek.com" else "https://api.openai.com/v1"
},
model = Settings.get("llm_model").ifEmpty { if (zh) "deepseek-flash" else "gpt-4o-mini" },
- thinking = Settings.get("llm_thinking") == "enabled",
+ // Unset reads as on, as on the phone (its build default is on); only an explicit "disabled" turns it off.
+ thinking = Settings.get("llm_thinking") != "disabled",
reasoningEffort = Settings.get("llm_reasoning_effort").ifEmpty { "high" },
)
}
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Backdrop.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Backdrop.kt
index f4fcfd5..5d3bdd2 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Backdrop.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Backdrop.kt
@@ -41,12 +41,18 @@ object Backdrop {
private const val TARGET_LUMA = 0.22f
private const val VEIL_MIN = 0.38f
private const val VEIL_MAX = 0.75f
+ // Day: the same photograph under a white veil, as on the phone (see its veilFor).
+ private const val DAY_TARGET_LUMA = 0.62f
+ private const val DAY_VEIL_MAX = 0.90f
- class Built(val image: ImageBitmap, val veil: Float)
+ class Built(val image: ImageBitmap, val veil: Float, val white: Boolean)
@Volatile private var built: Built? = null
/** Decode, shrink, blur, measure. Off the UI thread; cached after the first call. */
+ /** The theme changed: the veil is the other colour, so the next build computes it again. */
+ fun reset() { built = null }
+
fun build(): Built? {
built?.let { return it }
val src = runCatching {
@@ -65,9 +71,12 @@ object Backdrop {
boxBlur(px, w, h)
small.setRGB(0, 0, w, h, px, 0, w)
val luma = meanLuma(px)
- val veil = (1f - TARGET_LUMA / max(luma, 0.02f)).coerceIn(VEIL_MIN, VEIL_MAX)
+ val l = max(luma, 0.02f)
+ val white = !Palette.night
+ val veil = if (white) ((DAY_TARGET_LUMA - l) / (1f - l)).coerceIn(0f, DAY_VEIL_MAX)
+ else (1f - TARGET_LUMA / l).coerceIn(VEIL_MIN, VEIL_MAX)
Log.i("Backdrop", "backdrop ${w}x$h mean luma %.3f → veil %.0f%%".format(luma, veil * 100))
- return Built(small.toComposeImageBitmap(), veil).also { built = it }
+ return Built(small.toComposeImageBitmap(), veil, white).also { built = it }
}
private fun boxBlur(px: IntArray, w: Int, h: Int) {
@@ -113,13 +122,14 @@ object Backdrop {
/** The photograph and its veil, filling whatever it is put in. Black until the image is ready. */
@Composable
fun BackdropLayer(modifier: Modifier = Modifier.fillMaxSize()) {
- var b by remember { mutableStateOf(Backdrop.build()) }
- LaunchedEffect(Unit) { if (b == null) b = withContext(Dispatchers.Default) { Backdrop.build() } }
+ val night = Palette.night
+ var b by remember(night) { mutableStateOf(Backdrop.build()) }
+ LaunchedEffect(night) { if (b == null) b = withContext(Dispatchers.Default) { Backdrop.build() } }
Box(modifier.background(Palette.base)) {
b?.let {
Image(it.image, contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize())
// The veil goes on top of the image, not under it: a background behind the image darkens nothing.
- Box(Modifier.fillMaxSize().background(Color(0f, 0f, 0f, it.veil)))
+ Box(Modifier.fillMaxSize().background(if (it.white) Color(1f, 1f, 1f, it.veil) else Color(0f, 0f, 0f, it.veil)))
}
}
}
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/ChatScreen.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/ChatScreen.kt
index 84f518a..bbbe2e2 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/ChatScreen.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/ChatScreen.kt
@@ -49,37 +49,54 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
-/** The phone's `Glass` palette, so the two apps look like one product. */
-/** The phone's `Glass` night palette, exactly — so the two apps read as one product. */
+/**
+ * The phone's `Glass` palette, both of them — day (dark ink on a white card) and night — so the two
+ * apps read as one product. Every name is a getter over [night], which is Compose state: whatever
+ * reads a colour is subscribed, so flipping the theme redraws the whole window at once with no call
+ * site told.
+ */
object Palette {
- val base = Color(0xFF000000)
- val cardSolid = Color(0xF2060608)
- val cardFrosted = Color(0x99000000)
- val panel = Color(0x0FFFFFFF) // 6% white
- val panelEdge = Color(0x17FFFFFF) // 9% white
- val glass = Color(0x1FFFFFFF) // 12% white
- val glassEdge = Color(0x38FFFFFF) // 22% white
- val well = Color(0x59000000) // 35% black
- val wellEdge = Color(0x1AFFFFFF) // 10% white
- val thumb = Color(0x2EFFFFFF) // 18% white
- val thumbEdge = Color(0x40FFFFFF)
- val hairline = Color(0x2BFFFFFF) // 17% white
- val title = Color(0xFFFFFFFF)
- val label = Color(0xFFDCE1EA)
- val secondary = Color(0xFF8F97A6)
- val muted = Color(0xFF5F6775)
+ private val nightState = androidx.compose.runtime.mutableStateOf(Settings.get("theme") == "night")
+
+ /** Night is the default, as it was before the light theme existed; only an explicit `day` is light. */
+ val night: Boolean get() = nightState.value
+ fun setNight(on: Boolean) {
+ // The cached backdrop carries the old veil colour; drop it before anything redraws from it.
+ Settings.save(mapOf("theme" to if (on) "night" else "day"))
+ Backdrop.reset()
+ nightState.value = on
+ }
+
+ private fun pick(day: Long, nightV: Long) = Color(if (night) nightV else day)
+
+ val base get() = pick(0xFFFFFFFF, 0xFF000000)
+ val cardSolid get() = pick(0xFFFFFFFF, 0xF2060608)
+ val cardFrosted get() = pick(0xF2FFFFFF, 0x99000000)
+ val panel get() = pick(0x0A000000, 0x0FFFFFFF)
+ val panelEdge get() = pick(0x14000000, 0x17FFFFFF)
+ val glass get() = pick(0x0F000000, 0x1FFFFFFF)
+ val glassEdge get() = pick(0x24000000, 0x38FFFFFF)
+ val well get() = pick(0x0D000000, 0x59000000)
+ val wellEdge get() = pick(0x1A000000, 0x1AFFFFFF)
+ val thumb get() = pick(0xFFFFFFFF, 0x2EFFFFFF)
+ val thumbEdge get() = pick(0x2E000000, 0x40FFFFFF)
+ val hairline get() = pick(0x24000000, 0x2BFFFFFF)
+ val title get() = pick(0xFF0E1116, 0xFFFFFFFF)
+ val label get() = pick(0xFF2B313B, 0xFFDCE1EA)
+ val secondary get() = pick(0xFF5A6270, 0xFF8F97A6)
+ val muted get() = pick(0xFF7D8592, 0xFF5F6775)
/** Text sitting directly on the photograph. [muted] is chosen against a card and has no ground to stand on here. */
- val photoInk = Color(0xFF98A0AE)
- val accent = Color(0xFF7FA5FF)
- val tint = Color(0xFF4C6FFF)
- val danger = Color(0xFFFF6B6B)
- val ok = Color(0xFF4ADE80)
- val warn = Color(0xFFFBBF24)
+ val photoInk get() = pick(0xFF252A33, 0xFF98A0AE)
+ val accent get() = pick(0xFF3B62E0, 0xFF7FA5FF)
+ val tint get() = pick(0xFF3B62E0, 0xFF4C6FFF)
+ val danger get() = pick(0xFFDC2626, 0xFFFF6B6B)
+ val ok get() = pick(0xFF16A34A, 0xFF4ADE80)
+ val warn get() = pick(0xFFD97706, 0xFFFBBF24)
// kept for existing call sites
val text get() = title
- val accentSoft = Color(0x267FA5FF)
- val user = accent
+ val accentSoft get() = pick(0x263B62E0, 0x267FA5FF)
+ val user get() = accent
val error get() = danger
val card get() = cardSolid
}
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Glass.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Glass.kt
index c1a1bd1..0f86bd9 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Glass.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Glass.kt
@@ -127,7 +127,7 @@ fun SegmentedPicker(options: List<Pair<String, String>>, selected: String, onPic
}
@Composable
-fun GlassField(label: String, value: String, onValue: (String) -> Unit, secret: Boolean = false) {
+fun GlassField(label: String, value: String, onValue: (String) -> Unit, secret: Boolean = false, hint: String = "") {
Spacer(Modifier.height(8.dp))
Text(label, color = Palette.secondary, fontSize = 12.sp)
Spacer(Modifier.height(4.dp))
@@ -139,6 +139,10 @@ fun GlassField(label: String, value: String, onValue: (String) -> Unit, secret:
textStyle = TextStyle(color = Palette.label, fontSize = 14.sp),
cursorBrush = SolidColor(Palette.accent),
modifier = Modifier.fillMaxWidth().glassWell(12).padding(horizontal = 12.dp, vertical = 10.dp),
+ decorationBox = { inner ->
+ // A blank row shows what it resolves to, as on the phone: the hint is the value in force.
+ Box { if (value.isEmpty() && hint.isNotEmpty()) Text(hint, color = Palette.muted, fontSize = 14.sp, maxLines = 1); inner() }
+ },
)
}
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Pages.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Pages.kt
index 1247af2..b7a1c31 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Pages.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Pages.kt
@@ -42,6 +42,17 @@ object Pages {
private val dir get() = File(base, "pages").apply { mkdirs() }
private val indexFile get() = File(base, "pages.json")
+ /** 清空聊天记录 / 恢复出厂: every page and version goes, and the shelf starts again from 1. */
+ fun wipe() {
+ synchronized(lock) {
+ entries.clear()
+ nextId = 1L
+ }
+ dir.listFiles()?.forEach { it.delete() }
+ indexFile.delete()
+ onChange()
+ }
+
init { load() }
/** The id a `show_html` in this turn should file under; null = new artifact. Set by get_page, cleared each turn. */
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Settings.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Settings.kt
index bc9d1a7..aea38bf 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Settings.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/Settings.kt
@@ -35,8 +35,22 @@ object Settings {
"api_key", "asr_endpoint", "tts_endpoint", "asr_resource_id", "tts_resource_id", "tts_speaker",
"voice_provider", "lang", "max_steps", "scene", "ball", "ball_pos", "notify", "sweep", "sweep_quiet_minutes", "sweep_daily_cap",
"shell_mode", "shell_workdirs", "shell_critical_confirm", "mute",
+ "google_api_key", "google_project", "google_location", "google_asr_model", "google_tts_model", "google_base_url",
+ "google_language", "tts_sample_rate", "grounding", "show_hub", "hub_url", "device_name", "theme",
)
+ /**
+ * Which service hears and speaks: what the user picked, else by interface language — Google
+ * for English, 火山 for Chinese. Anything saved that is not exactly `google` reads as 火山, the
+ * phone's fail-closed rule. Read per use, so the language picker moves it at once.
+ */
+ fun voiceProvider(): String = when (get("voice_provider").trim().lowercase()) {
+ "google" -> "google"
+ "huoshan" -> "huoshan"
+ "" -> if (Strings.lang() == "en") "google" else "huoshan"
+ else -> "huoshan"
+ }
+
private val file get() = AppDirs.file("settings.properties")
private val lock = Any()
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/SettingsScreen.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/SettingsScreen.kt
index 5a5c5ae..b87e22c 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/SettingsScreen.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/SettingsScreen.kt
@@ -23,10 +23,19 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
+import net.kuafuai.andee.config.BrainConfig
+
+/** A string from the phone's own resources (generated into strings_*.properties), so the wording is the phone's. */
+private fun st(key: String, vararg a: Any): String = Strings.get("s_$key").let { if (a.isEmpty()) it else String.format(Strings.locale(), it, *a) }
/**
- * The settings sheet, the phone's card shape: a Glass header, segmented
- * pickers and fields. The notebook, scenes, vault, looks and self-check are in the sidebar.
+ * The settings card, laid out as the phone's: 后端 (with the voice provider inside it), 外观, 小本本,
+ * 消息提醒, 保险箱, 单次任务最多步数, and a 高级 fold carrying 显示云端选项, 诊断 and the destructive
+ * buttons. Wording comes from the phone's string resources, so a label cannot drift from its twin.
+ *
+ * What differs is only what the Mac is: a 命令行 and SSH keys section (the Mac has a shell), no wake
+ * word, no typing-IME row (neither exists here), and no 形象与表情 / 自检 doors, which the sidebar
+ * already is.
*/
@Composable
fun SettingsScreen(
@@ -35,30 +44,140 @@ fun SettingsScreen(
val zh = Strings.lang() == "zh"
fun t(a: String, b: String) = if (zh) a else b
val v = remember { mutableStateMapOf<String, String>().apply { putAll(Settings.all()) } }
- var lang by remember { mutableStateOf(Strings.lang()) }
var fullOpenAsk by remember { mutableStateOf(false) }
+ var advanced by remember { mutableStateOf(false) }
+ var confirm by remember { mutableStateOf("") } // "", "chat", "notes", "factory"
+ val brain = v["brain"].orEmpty().ifEmpty { "local" }
+
+ // The voice provider the card shows is the one in force: a saved pick, else by language.
+ val provider = when (v["voice_provider"].orEmpty().trim().lowercase()) {
+ "google" -> "google"
+ "huoshan" -> "huoshan"
+ else -> if (Strings.lang() == "en") "google" else "huoshan"
+ }
+ val en = Strings.lang() == "en"
+ val llmModelHint = if (en) "gpt-4o-mini" else "deepseek-flash"
+ val llmUrlHint = if (en) "https://api.openai.com/v1" else "https://api.deepseek.com"
Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(20.dp)) {
- GlassHeader(t("设置", "Settings"), subtitle = t("所有设置都存在本机", "Everything stays on this Mac"), onClose = onDone)
+ GlassHeader(st("settings_title"), subtitle = t("所有设置都存在本机", "Everything stays on this Mac"), onClose = onDone)
+ // ---- language: written the instant it is tapped, like the phone ----
SectionTitle(t("界面语言", "Language"))
- SegmentedPicker(listOf("zh" to "中", "en" to "EN"), lang) {
- // Written the instant it is tapped, as on the phone: the redraw in the new language is
- // the confirmation. Everything else typed on this page stays unsaved and survives the redraw.
- lang = it
+ SegmentedPicker(listOf("zh" to "中", "en" to "EN"), Strings.lang()) {
Settings.save(mapOf("lang" to it))
+ v["lang"] = it
Strings.changed()
}
- SectionTitle(t("大脑", "Backend"))
- SegmentedPicker(listOf("local" to t("本机", "Own key"), "codeflying" to "CodeFlying"), v["brain"].orEmpty().ifEmpty { "local" }) { v["brain"] = it }
- GlassField(t("API Key", "API key"), v["llm_api_key"].orEmpty(), { v["llm_api_key"] = it }, secret = true)
- GlassField(t("接口地址(留空用默认)", "Base URL (blank = default)"), v["llm_base_url"].orEmpty(), { v["llm_base_url"] = it })
- GlassField(t("模型名(留空用默认)", "Model (blank = default)"), v["llm_model"].orEmpty(), { v["llm_model"] = it })
- SectionTitle(t("思考", "Thinking"))
- SegmentedPicker(listOf("disabled" to t("关", "Off"), "enabled" to t("开", "On")), v["llm_thinking"].orEmpty().ifEmpty { "disabled" }) { v["llm_thinking"] = it }
- GlassField(t("每轮最多步数(默认 25)", "Max steps per turn (default 25)"), v["max_steps"].orEmpty(), { v["max_steps"] = it })
+ // ---- 后端 ----
+ SectionTitle(st("settings_section_brain"))
+ SegmentedPicker(
+ buildList {
+ add("local" to st("settings_brain_local"))
+ add("codeflying" to st("settings_brain_codeflying"))
+ if (v["show_hub"] == "on") add("hub" to st("settings_brain_cloud"))
+ },
+ brain,
+ ) { v["brain"] = it }
+ when (brain) {
+ "hub" -> {
+ GlassField(st("settings_hub_url"), v["hub_url"].orEmpty(), { v["hub_url"] = it }, hint = st("settings_hub_url_hint"))
+ GlassField(st("settings_device_name"), v["device_name"].orEmpty(), { v["device_name"] = it }, hint = st("settings_device_name_hint"))
+ Note(st("settings_brain_cloud_note"))
+ }
+ "codeflying" -> Note(st("settings_brain_codeflying_unconfigured"))
+ else -> {
+ GlassField(st("settings_llm_api_key"), v["llm_api_key"].orEmpty(), { v["llm_api_key"] = it }, secret = true, hint = "sk-…")
+ GlassField(st("settings_llm_model"), v["llm_model"].orEmpty(), { v["llm_model"] = it }, hint = llmModelHint)
+ GlassField(st("settings_llm_base_url"), v["llm_base_url"].orEmpty(), { v["llm_base_url"] = it }, hint = llmUrlHint)
+ RowLabel(st("settings_llm_thinking"))
+ val thinking = v["llm_thinking"].orEmpty().ifEmpty { "enabled" }
+ SegmentedPicker(listOf("enabled" to st("common_on"), "disabled" to st("common_off")), thinking) { v["llm_thinking"] = it }
+ if (thinking != "disabled") {
+ RowLabel(st("settings_llm_effort"))
+ SegmentedPicker(
+ listOf("high" to st("common_high"), "medium" to st("common_medium"), "low" to st("common_low")),
+ v["llm_reasoning_effort"].orEmpty().ifEmpty { "high" },
+ ) { v["llm_reasoning_effort"] = it }
+ }
+ Note(st("settings_brain_local_note"))
+ }
+ }
+
+ // ---- who hears and speaks (not drawn under CodeFlying, which brings its own voice) ----
+ if (brain != "codeflying") {
+ RowLabel(st("settings_voice_provider"))
+ SegmentedPicker(
+ listOf("huoshan" to st("settings_voice_provider_huoshan"), "google" to st("settings_voice_provider_google")),
+ provider,
+ ) { v["voice_provider"] = it }
+ if (provider == "google") {
+ GlassField(st("settings_google_api_key"), v["google_api_key"].orEmpty(), { v["google_api_key"] = it }, secret = true, hint = st("settings_google_api_key_hint"))
+ GlassField(st("settings_google_project"), v["google_project"].orEmpty(), { v["google_project"] = it }, hint = st("settings_google_project_hint"))
+ GlassField(st("settings_google_location"), v["google_location"].orEmpty(), { v["google_location"] = it }, hint = "asia-northeast1")
+ GlassField(st("settings_google_asr_model"), v["google_asr_model"].orEmpty(), { v["google_asr_model"] = it }, hint = "gemini-live-2.5-flash-preview-native-audio")
+ GlassField(st("settings_google_tts_model"), v["google_tts_model"].orEmpty(), { v["google_tts_model"] = it }, hint = "gemini-2.5-flash-preview-tts")
+ GlassField(st("settings_google_base_url"), v["google_base_url"].orEmpty(), { v["google_base_url"] = it }, hint = "https://aiplatform.googleapis.com")
+ GlassField(st("settings_google_language"), v["google_language"].orEmpty(), { v["google_language"] = it }, hint = st("settings_google_language_hint"))
+ Note(st("settings_voice_google_note"))
+ } else {
+ GlassField(st("settings_voice_api_key"), v["api_key"].orEmpty(), { v["api_key"] = it }, secret = true, hint = st("settings_voice_api_key_hint"))
+ GlassField(st("settings_voice_asr_endpoint"), v["asr_endpoint"].orEmpty(), { v["asr_endpoint"] = it }, hint = "wss://openspeech.bytedance.com/api/v3/sauc/bigmodel_async")
+ GlassField(st("settings_voice_asr_resource_id"), v["asr_resource_id"].orEmpty(), { v["asr_resource_id"] = it }, hint = "volc.bigasr.sauc.duration")
+ GlassField(st("settings_voice_tts_endpoint"), v["tts_endpoint"].orEmpty(), { v["tts_endpoint"] = it }, hint = "wss://openspeech.bytedance.com/api/v3/tts/bidirection")
+ GlassField(st("settings_voice_tts_resource_id"), v["tts_resource_id"].orEmpty(), { v["tts_resource_id"] = it }, hint = "seed-tts-2.0")
+ GlassField(st("settings_voice_tts_sample_rate"), v["tts_sample_rate"].orEmpty(), { v["tts_sample_rate"] = it }, hint = "24000")
+ }
+ }
+ // ---- 外观: eager, the redraw is the confirmation ----
+ SectionTitle(st("settings_section_theme"))
+ Note(st("settings_theme_note"))
+ SegmentedPicker(
+ listOf("day" to st("settings_theme_day"), "night" to st("settings_theme_night")),
+ if (Palette.night) "night" else "day",
+ ) { Palette.setNight(it == "night") }
+
+ // ---- 小本本 ----
+ SectionTitle(st("settings_section_notebook"))
+ SegmentedPicker(listOf("on" to st("common_on"), "off" to st("common_off")), v["sweep"].orEmpty().ifEmpty { "on" }) { v["sweep"] = it }
+ Note(st("settings_notebook_sweep_note"))
+ GlassField(st("settings_notebook_quiet_minutes"), v["sweep_quiet_minutes"].orEmpty(), { v["sweep_quiet_minutes"] = it }, hint = "20")
+ GlassField(st("settings_notebook_daily_cap"), v["sweep_daily_cap"].orEmpty(), { v["sweep_daily_cap"] = it }, hint = "12")
+ Note(
+ st("settings_notebook_today") + ":" + st(
+ "settings_notebook_stats", Sweep.countToday(), Sweep.tokensToday(),
+ DesktopNotebook.book.memories().size, DesktopNotebook.book.todos("pending").size,
+ ),
+ )
+
+ // ---- 消息提醒 ----
+ SectionTitle(st("settings_section_notify"))
+ SegmentedPicker(
+ listOf("off" to st("common_off"), "chat" to st("settings_notify_chat"), "all" to st("settings_notify_all")),
+ v["notify"].orEmpty().ifEmpty { "off" },
+ ) { v["notify"] = it }
+ Note(st("settings_notify_note"))
+ if (net.kuafuai.andee.desktop.mac.MacNotifications.state == net.kuafuai.andee.desktop.mac.MacNotifications.State.NO_ACCESS) {
+ Text(
+ t("读不到通知:在 系统设置 → 隐私与安全性 → 完全磁盘访问权限 里加上 Andee。",
+ "Can't read notifications: add Andee under System Settings → Privacy & Security → Full Disk Access."),
+ color = Palette.warn, fontSize = 12.sp, modifier = Modifier.padding(top = 4.dp),
+ )
+ }
+
+ // ---- 保险箱: a summary here, the card is in the sidebar ----
+ SectionTitle(st("settings_section_vault"))
+ val vaultN = remember { runCatching { net.kuafuai.andee.desktop.mac.MacVault.entries().size }.getOrDefault(0) }
+ Note(if (vaultN == 0) st("settings_vault_empty_note") else st("settings_vault_count_note", vaultN))
+
+ // ---- 单次任务最多步数 ----
+ SectionTitle(st("settings_max_steps"))
+ Note(st("settings_max_steps_note"))
+ GlassField(st("settings_max_steps"), v["max_steps"].orEmpty(), { v["max_steps"] = it }, hint = "25")
+
+ // ---- Mac only: the shell ----
SectionTitle(t("命令行", "Commands"))
SegmentedPicker(
listOf("ask" to t("问我", "Ask me"), "auto" to t("自动", "Automatic"), "read_only" to t("只读", "Read-only"), "full" to t("完全开放", "Full")),
@@ -66,14 +185,13 @@ fun SettingsScreen(
) { picked ->
if (picked == "full" && v["shell_mode"] != "full") fullOpenAsk = true else v["shell_mode"] = picked
}
- Text(
+ Note(
when (v["shell_mode"].orEmpty().ifEmpty { "ask" }) {
"auto" -> t("在沙箱里,普通命令直接跑;删大量文件、强推这类仍先问你。", "Ordinary commands run in the sandbox; destructive ones still ask first.")
"read_only" -> t("只允许查看类命令,其它一律拒绝。", "Only read-only commands are allowed.")
"full" -> t("不进沙箱、不问:Andee 能改动这台 Mac 上的任何文件。", "No sandbox, no asking: Andee can change any file.")
else -> t("只读命令直接跑,其它每条先问你。", "Read-only commands run; everything else asks first.")
},
- color = Palette.secondary, fontSize = 12.sp, modifier = Modifier.padding(top = 6.dp),
)
GlassField(t("工作文件夹(逗号分隔,留空用 ~/Andee)", "Work folders (comma-separated; blank = ~/Andee)"), v["shell_workdirs"].orEmpty(), { v["shell_workdirs"] = it })
SectionTitle(t("SSH 钥匙", "SSH keys"))
@@ -82,27 +200,49 @@ fun SettingsScreen(
FullOpenConfirm(zh, onYes = { v["shell_mode"] = "full"; fullOpenAsk = false }, onNo = { fullOpenAsk = false })
}
- SectionTitle(t("通知", "Notifications"))
- SegmentedPicker(listOf("off" to t("关", "Off"), "chat" to t("聊天类", "Chats"), "all" to t("全部", "All")), v["notify"].orEmpty().ifEmpty { "off" }) { v["notify"] = it }
- Text(
- when (net.kuafuai.andee.desktop.mac.MacNotifications.state) {
- net.kuafuai.andee.desktop.mac.MacNotifications.State.NO_ACCESS -> t(
- "读不到通知:在 系统设置 → 隐私与安全性 → 完全磁盘访问权限 里加上 Andee。",
- "Can't read notifications: add Andee under System Settings → Privacy & Security → Full Disk Access.")
- else -> t("打开后 Andee 先自己判断:忽略、告诉你,还是动手处理。", "When on, Andee decides for itself: ignore, tell you, or deal with it.")
- },
- color = Palette.secondary, fontSize = 12.sp,
- )
-
- SectionTitle(t("语音", "Voice"))
- GlassField(t("语音 Key", "Voice key"), v["api_key"].orEmpty(), { v["api_key"] = it }, secret = true)
+ // ---- 高级: folded, with the note saying what is behind it ----
+ SectionTitle(st("settings_section_advanced"))
+ Row(
+ Modifier.fillMaxWidth().glassPanel(12).clickable { advanced = !advanced }.padding(12.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Text(st("settings_advanced_note"), color = Palette.secondary, fontSize = 12.sp, modifier = Modifier.weight(1f))
+ Text(if (advanced) "⌃" else "⌄", color = Palette.secondary, fontSize = 16.sp)
+ }
+ if (advanced) {
+ SectionTitle(st("settings_show_hub"))
+ SegmentedPicker(listOf("off" to st("common_off"), "on" to st("common_on")), v["show_hub"].orEmpty().ifEmpty { "off" }) { v["show_hub"] = it }
+ Note(st("settings_show_hub_note"))
+ SectionTitle(st("settings_section_diagnostics"))
+ RowLabel(st("settings_grounding"))
+ SegmentedPicker(listOf("off" to st("common_off"), "on" to st("common_on")), v["grounding"].orEmpty().ifEmpty { "off" }) { v["grounding"] = it }
+ Note(st("settings_grounding_note"))
+ Note(st("settings_device_id") + ":" + Settings.uid())
+ Spacer(Modifier.height(12.dp))
+ when (confirm) {
+ "chat" -> ConfirmBlock(st("settings_clear_chat_confirm_title"), st("settings_clear_chat_confirm_body"), st("settings_clear_chat_confirm"),
+ onNo = { confirm = "" }) { Assistant.stop(); Scrollback.wipe(); Pages.wipe(); confirm = "" }
+ "notes" -> ConfirmBlock(st("settings_clear_notes_confirm_title"), st("settings_clear_notes_confirm_body"), st("settings_clear_notes_confirm"),
+ onNo = { confirm = "" }) { DesktopNotebook.book.wipe(); confirm = "" }
+ "factory" -> ConfirmBlock(
+ st("settings_factory_reset_confirm_title"),
+ st("settings_factory_reset_list_intro") + "\n" + factoryItems(zh).joinToString("\n") { "· $it" } + "\n" + st("settings_factory_reset_after"),
+ st("settings_factory_reset_confirm"), onNo = { confirm = "" },
+ ) { factoryReset(); confirm = ""; onDone() }
+ else -> Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
+ DangerButton(st("settings_clear_chat")) { confirm = "chat" }
+ DangerButton(st("settings_clear_notes")) { confirm = "notes" }
+ DangerButton(st("settings_factory_reset")) { confirm = "factory" }
+ }
+ }
+ }
Spacer(Modifier.height(20.dp))
// Equal halves, cancel on the left and the main action on the right.
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(10.dp)) {
- SecondaryButton(t("取消", "Cancel"), Modifier.weight(1f)) { onDone() }
- PrimaryButton(t("保存", "Save"), Modifier.weight(1f)) {
+ SecondaryButton(st("common_cancel"), Modifier.weight(1f)) { onDone() }
+ PrimaryButton(st("common_save"), Modifier.weight(1f)) {
Settings.save(v.toMap())
v["ball"]?.let { MacBall.pickLook(it) }
Thread { Assistant.ensure() }.start()
@@ -117,6 +257,55 @@ fun SettingsScreen(
}
}
+@Composable
+private fun Note(text: String) {
+ Text(text, color = Palette.secondary, fontSize = 12.sp, modifier = Modifier.padding(top = 6.dp))
+}
+
+@Composable
+private fun RowLabel(text: String) {
+ Text(text, color = Palette.secondary, fontSize = 12.sp, modifier = Modifier.padding(top = 12.dp, bottom = 4.dp))
+}
+
+@Composable
+private fun DangerButton(label: String, onClick: () -> Unit) {
+ Text(
+ label, color = Palette.danger, fontSize = 14.sp, fontWeight = androidx.compose.ui.text.font.FontWeight.Medium,
+ textAlign = androidx.compose.ui.text.style.TextAlign.Center,
+ modifier = Modifier.fillMaxWidth().glassPanel(14).clickable { onClick() }.padding(vertical = 11.dp),
+ )
+}
+
+@Composable
+private fun ConfirmBlock(title: String, body: String, confirmLabel: String, onNo: () -> Unit, onYes: () -> Unit) {
+ Column(Modifier.fillMaxWidth().glassPanel(12).padding(12.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
+ Text(title, color = Palette.danger, fontSize = 14.sp)
+ Text(body, color = Palette.label, fontSize = 13.sp)
+ Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
+ SecondaryButton(st("common_cancel"), Modifier.weight(1f)) { onNo() }
+ DangerButton(confirmLabel, onYes)
+ }
+ }
+}
+
+/** What 恢复出厂设置 removes on the Mac, in the order the confirmation lists it. */
+private fun factoryItems(zh: Boolean): List<String> =
+ if (zh) listOf("所有设置和 Key", "小本本(记忆、提醒、情景)", "保险箱里的账号", "聊天记录和它生成过的页面", "SSH 钥匙和命令白名单")
+ else listOf("All settings and keys", "The notebook (memories, reminders, scenes)", "The vault accounts", "The chat history and pages it made", "SSH keys and the command allow-list")
+
+/** Wipes everything the card promised to. Irreversible; the confirmation lists it first. */
+private fun factoryReset() {
+ Assistant.stop()
+ runCatching { Scrollback.wipe() }
+ runCatching { Pages.wipe() }
+ runCatching { DesktopNotebook.book.wipe() }
+ runCatching { net.kuafuai.andee.desktop.mac.MacVault.wipe() }
+ runCatching { net.kuafuai.andee.desktop.shell.AndeeAgent.keys().forEach { net.kuafuai.andee.desktop.shell.AndeeAgent.delete(it.name) } }
+ runCatching { AppDirs.file("shell_always_allow.json").delete() }
+ runCatching { AppDirs.file("settings.properties").delete() }
+ Strings.changed()
+}
+
@Composable
private fun FullOpenConfirm(zh: Boolean, onYes: () -> Unit, onNo: () -> Unit) {
fun t(a: String, b: String) = if (zh) a else b
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/UiShot.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/UiShot.kt
index 7b95dc9..f83b079 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/UiShot.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/UiShot.kt
@@ -23,6 +23,11 @@ fun main(args: Array<String>) {
val h = args.getOrElse(2) { "820" }.toInt()
val out = File(args.getOrElse(3) { "/tmp/ui.png" })
System.setProperty("andee.home", File.createTempFile("andee-shot", "").also { it.delete(); it.mkdirs() }.path)
+ // Optional: `lang=en` and `theme=day`, set in the throwaway home before anything draws.
+ for (a in args.drop(5)) a.split('=', limit = 2).takeIf { it.size == 2 }?.let { (k, v) ->
+ if (k == "lang") Settings.save(mapOf("lang" to v))
+ if (k == "theme") Palette.setNight(v == "night")
+ }
if (args.getOrElse(4) { "" } == "empty") Scrollback.wipe() else seed()
@Suppress("UNUSED_VARIABLE") val unused = 0
if (args.getOrElse(4) { "" } == "pending") {
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/mac/MacDevice.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/mac/MacDevice.kt
index 7291d80..a556832 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/mac/MacDevice.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/mac/MacDevice.kt
@@ -340,6 +340,9 @@ object MacVault {
return (0 until a.length()).map { a.getJSONObject(it) }
}
+ /** 恢复出厂: the encrypted file goes, and the Keychain key opens nothing. */
+ fun wipe() = store.wipe()
+
fun save(all: List<JSONObject>) {
check(store.write(JSONArray(all).toString())) { "the vault could not be saved (is the login Keychain locked?)" }
}
diff --git a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/voice/MacVoice.kt b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/voice/MacVoice.kt
index bafa6d5..51a87b2 100644
--- a/desktop/src/main/kotlin/net/kuafuai/andee/desktop/voice/MacVoice.kt
+++ b/desktop/src/main/kotlin/net/kuafuai/andee/desktop/voice/MacVoice.kt
@@ -66,8 +66,8 @@ object MacVoice {
// The voice is the character's: read from the look the ball is wearing, per utterance, as the phone does.
ttsSpeaker = net.kuafuai.andee.ui.ball.BallLooks.byName(Settings.get("ball").ifEmpty { null }).voice
.ifEmpty { "zh_female_vv_uranus_bigtts" },
- ttsSampleRate = 24_000,
- voiceProvider = Settings.get("voice_provider").ifEmpty { VoiceSettings.VOICE_HUOSHAN },
+ ttsSampleRate = Settings.get("tts_sample_rate").toIntOrNull()?.takeIf { it in 8_000..48_000 } ?: 24_000,
+ voiceProvider = Settings.voiceProvider(),
googleApiKey = Settings.get("google_api_key"),
googleBaseUrl = Settings.get("google_base_url").ifEmpty { "https://aiplatform.googleapis.com" },
googleProject = Settings.get("google_project"),
diff --git a/desktop/src/main/resources/strings_en.properties b/desktop/src/main/resources/strings_en.properties
index 0a634b9..490ef89 100644
--- a/desktop/src/main/resources/strings_en.properties
+++ b/desktop/src/main/resources/strings_en.properties
@@ -37,3 +37,129 @@ ball_look_bajie=Pigsy
ball_look_rabbit=Rascal
ball_look_bear=Bear
ball_look_imp=Imp
+
+# ---- phone settings strings (generated from app/src/main/res; same wording as the phone card) ----
+s_settings_title=Settings
+s_settings_default_device_name=This device
+s_settings_factory_reset=Factory reset
+s_common_cancel=Cancel
+s_common_save=Save
+s_settings_factory_reset_confirm_title=Factory reset?
+s_settings_factory_reset_list_intro=These are deleted for good — there is no backup:
+s_settings_factory_reset_after=The device goes back to a fresh install: keys have to be entered again and the wake word has to be recorded again.
+s_settings_factory_reset_back=No, go back
+s_settings_factory_reset_confirm=Erase everything
+s_settings_clear_chat=Clear chat history
+s_settings_clear_chat_confirm_title=Clear the chat history?
+s_settings_clear_chat_confirm_body=The conversation record and its pages are deleted, and everything said in this session is forgotten. The notebook is untouched.
+s_settings_clear_chat_confirm=Clear it
+s_settings_clear_notes=Clear the notebook
+s_settings_clear_notes_confirm_title=Clear the notebook?
+s_settings_clear_notes_confirm_body=Everything it noted down, your preferences, and any reminder not yet due are deleted, with no way back. The current chat history is untouched.
+s_settings_clear_notes_confirm=Clear it
+s_settings_section_brain=Backend
+s_settings_brain_panel_note=Takes effect when you close this panel — no need to restart the accessibility service.
+s_settings_brain_cloud=Cloud
+s_settings_brain_local=On-device
+s_settings_brain_codeflying=CodeFlying
+s_settings_show_hub=Show cloud option
+s_settings_show_hub_note=Adds a Cloud backend tab for connecting to a hub you host yourself.
+s_settings_brain_codeflying_note=CodeFlying (CodeFlying.app) is connected: models and voice are set up and ready to go. You can also tap into a long list of third-party services — AI image, video and music generation, location, weather, PDF conversion, search, news, stocks and more. CodeFlying wraps and bills all of them in one place, so you never have to sign up with each provider or juggle their keys and invoices.\n\nAccount and top-ups: open CodeFlying.app in a computer browser and sign in. If you see a balance error (HTTP 402), top up there.\n\nNote: using CodeFlying backend services may incur charges.
+s_settings_brain_codeflying_unconfigured=Want Andee to draw, make videos, write music, check the weather, search the news, convert PDFs, or watch stocks for you? Connect CodeFlying: models and voice come set up, and a long list of third-party services is one hookup away, with no separate sign-ups, keys or invoices.\n\nTo get started, open CodeFlying.app in a computer browser and generate your own Andee install package in one click, then install it over this app. New users get free credit, so you can try it first.\n\nNote: using CodeFlying backend services may incur charges.
+s_settings_hub_url=Hub URL
+s_settings_hub_url_hint=Link your cloud agent
+s_settings_device_name=Device name
+s_settings_device_name_hint=What the hub should call this device
+s_settings_brain_cloud_note=The brain lives on a hub you run yourself; this device only acts.
+s_settings_llm_api_key=API key
+s_settings_llm_model=Model
+s_settings_llm_base_url=Base URL
+s_settings_llm_thinking=Deep thinking
+s_common_on=On
+s_common_off=Off
+s_settings_llm_effort=Reasoning effort
+s_common_high=High
+s_common_medium=Medium
+s_common_low=Low
+s_settings_brain_local_note=The device runs the agent loop itself, with no hub. Without a key it will not take over.
+s_settings_section_wake=Wake word
+s_settings_wake_enrolled=Enrolled — say your wake word and it wakes up
+s_settings_wake_not_enrolled=Not enrolled — pick a phrase and say it 3 times to wake me by voice, e.g. “Hey Andee”
+s_settings_wake_record=Record
+s_settings_wake_locked_on=Listen while locked: on
+s_settings_wake_locked_off=Listen while locked: off
+s_settings_wake_locked_note=Andee keeps listening with the screen off. That costs battery: the microphone stays open, and so does the system recording indicator.
+s_common_clear=Clear
+s_common_delete=Delete
+s_settings_section_vault=Vault
+s_settings_vault_empty_note=No accounts yet — once saved, Andee can log in as you when a task needs it
+s_settings_vault_count_note=%1$d saved — the brain may read the phone and email, but only this device types the password
+s_settings_vault_manage=Manage
+s_settings_section_voice=Volcengine endpoints
+s_settings_section_voice_key=Speech
+s_settings_voice_factory_note=The source ships without a key. Enter your own to hear and speak; leave the rows below blank for the default endpoints.
+s_settings_voice_api_key=Volcengine API key
+s_settings_voice_api_key_hint=Volcengine Speech key — hearing and speaking both need it
+s_settings_voice_in_use=In use
+s_settings_voice_in_use_own=the Volcengine account you entered
+s_settings_voice_in_use_factory=nothing yet — hearing and speaking are off
+s_settings_voice_asr_endpoint=ASR endpoint
+s_settings_voice_asr_resource_id=ASR resource ID
+s_settings_voice_tts_endpoint=TTS endpoint
+s_settings_voice_tts_resource_id=TTS resource ID
+s_settings_voice_tts_sample_rate=TTS sample rate
+s_settings_voice_provider=Voice provider
+s_settings_voice_provider_huoshan=Volcengine
+s_settings_voice_provider_google=Google
+s_settings_google_api_key=Google API key
+s_settings_google_api_key_hint=Vertex Express key — hearing and speaking both use it
+s_settings_google_key_builtin=Built in at package time — leave blank to use it
+s_settings_google_project=Project number
+s_settings_google_project_hint=The GCP project *number* (not its id); recognition needs it
+s_settings_google_location=Location
+s_settings_google_asr_model=Recognition model
+s_settings_google_tts_model=Synthesis model
+s_settings_google_base_url=Endpoint
+s_settings_google_language=Language
+s_settings_google_language_hint=blank = detect automatically
+s_settings_voice_google_note=Recognition runs on Gemini Live (so it needs the project number and location); synthesis is plain HTTP. The key stays on this device.
+s_settings_section_diagnostics=Diagnostics
+s_settings_section_advanced=Advanced
+s_settings_max_steps=Max steps per task
+s_settings_max_steps_note=The most tool calls the AI may make in a single task before stopping with a final answer. Guards against runaway loops and bills. Default 25 — a dozen steps is enough for most tasks.
+s_settings_advanced_note=Show the cloud option, typing, diagnostics and factory reset. Nothing here for day-to-day use.
+s_settings_grounding=Grounding capture
+s_settings_grounding_note=Records coordinate taps and screenshots to files/grounding for offline analysis — it photographs whatever you are doing. Needs the accessibility service restarted to take effect.
+s_settings_device_id=Device ID
+s_settings_section_notebook=Notebook
+s_settings_notebook_sweep_note=Once a conversation goes quiet it reviews it by itself: keeps what is worth keeping, schedules what it owes. On by default — this is where "it remembers" comes from. Off means it stops spending your key on those calls.
+s_settings_notebook_quiet_minutes=Quiet minutes before a review
+s_settings_notebook_daily_cap=Reviews per day, at most
+s_settings_notebook_today=Today / so far
+s_settings_notebook_stats=%1$d reviews (~%2$d tokens) · %3$d memories · %4$d promises open
+s_settings_notebook_browse=See what it remembers
+s_settings_section_notify=Notifications
+s_settings_notify_chat=Chat apps
+s_settings_notify_all=Everything
+s_settings_notify_note=When a message arrives it decides for itself whether it is worth your attention: lets the noise go, says the useful part out loud, handles what needs handling. "Chat apps" means the ones with a person on the other end — WeChat, QQ, DingTalk, Lark, SMS. "Everything" watches the rest too, minus progress bars and permanent notifications. It only puts a card up when it cannot decide. Off means nothing interrupts you — the messages are all still there, and you can ask about them whenever.
+s_settings_section_typing=Typing
+s_settings_typing_no_ime=ADBKeyboard is the only keyboard on this device and it has no keyboard UI, so nothing can be typed right now. Enable one in system settings and it will show up here.
+s_settings_typing_current=Your keyboard
+s_settings_typing_note=Normally it is your own keyboard, and you can type in any app. While I am typing something for you it switches to ADBKeyboard (which has no keyboard UI — that is the only way it works), and switches straight back.
+s_common_show=Show
+s_common_hide=Hide
+s_settings_scenes_browse=Manage scenes
+s_factory_reset_target_keys=the Volcano and DeepSeek keys, and every speech and brain setting
+s_factory_reset_target_notebook=the notebook: what it remembers and what it promised
+s_factory_reset_target_vault=the accounts, passwords and bank cards kept in the vault
+s_factory_reset_target_wake=the wake-word recordings (they will have to be recorded again)
+s_factory_reset_target_history=the conversation history and the pages it generated
+s_factory_reset_target_web=cookies and local storage left behind by the pages it drew
+s_factory_reset_target_grounding=the grounding screenshots and logs
+s_settings_section_theme=Appearance
+s_settings_theme_note=Light is a white card with dark text; dark is a dark card with light text. It switches at once — card, pages, bubbles and everything around the ball together.
+s_settings_theme_day=Light
+s_settings_theme_night=Dark
+s_settings_section_expr=Looks & expressions
+s_settings_expr_note=See every character and every expression; tap one to switch.
+s_settings_expr_open=Open
diff --git a/desktop/src/main/resources/strings_zh.properties b/desktop/src/main/resources/strings_zh.properties
index 9bd6e43..be86b4c 100644
--- a/desktop/src/main/resources/strings_zh.properties
+++ b/desktop/src/main/resources/strings_zh.properties
@@ -37,3 +37,129 @@ ball_look_bajie=八戒
ball_look_rabbit=贱贱兔
ball_look_bear=憨憨熊
ball_look_imp=小恶魔
+
+# ---- phone settings strings (generated from app/src/main/res; same wording as the phone card) ----
+s_settings_title=设置
+s_settings_default_device_name=这台设备
+s_settings_factory_reset=恢复出厂设置
+s_common_cancel=取消
+s_common_save=保存
+s_settings_factory_reset_confirm_title=恢复出厂设置?
+s_settings_factory_reset_list_intro=下面这些会被删掉,删了就找不回来:
+s_settings_factory_reset_after=设备会回到刚装好的样子:需要重新填 key,唤醒词要重新录。
+s_settings_factory_reset_back=不,返回
+s_settings_factory_reset_confirm=确认清空
+s_settings_clear_chat=清空聊天记录
+s_settings_clear_chat_confirm_title=清空聊天记录?
+s_settings_clear_chat_confirm_body=对话记录和它生成过的页面会删掉,这场对话聊过的内容它也会忘掉。小本本不受影响。
+s_settings_clear_chat_confirm=确认清空
+s_settings_clear_notes=清空小本本
+s_settings_clear_notes_confirm_title=清空小本本?
+s_settings_clear_notes_confirm_body=它记下的事、你的偏好、还没到点的提醒,都会删掉,找不回来。这场聊天记录不受影响。
+s_settings_clear_notes_confirm=确认清空
+s_settings_section_brain=后端
+s_settings_brain_panel_note=关掉这个面板就生效,不用重开无障碍服务。
+s_settings_brain_cloud=云端
+s_settings_brain_local=本机
+s_settings_brain_codeflying=CodeFlying
+s_settings_show_hub=显示云端选项
+s_settings_show_hub_note=把「云端」加到后端选项里,用来连你自己搭的 Hub。
+s_settings_brain_codeflying_note=已接入 CodeFlying(CodeFlying.net):默认模型和语音都配好了,开箱就能用。还能直接调用海量第三方能力 —— AI 画图/做视频/写音乐、定位、天气、PDF 转换、搜索、新闻、股票……全部由 CodeFlying 统一封装、统一计费,不用自己逐个去申请密钥、对账单。\n\n账户管理和充值:用电脑浏览器打开 CodeFlying.net 登录。如果提示余额不足(HTTP 402),去那里充值即可。\n\n提示:使用 CodeFlying 的后端服务可能会产生费用。
+s_settings_brain_codeflying_unconfigured=想让 Andee 直接会画图、做视频、写音乐、查天气、搜新闻、转 PDF、看股票?接上 CodeFlying 就行:默认模型和语音都帮你配好,海量第三方能力一次接入,不用自己逐个申请密钥、对账单。\n\n怎么开始:用电脑浏览器打开 CodeFlying.net,一键生成专属于你的 Andee 安装包,装上去替换当前应用就好。新用户可免费获得额度,先试试再决定。\n\n提示:使用 CodeFlying 的后端服务可能会产生费用。
+s_settings_hub_url=Hub 地址
+s_settings_hub_url_hint=链接你的云端Agent
+s_settings_device_name=设备名
+s_settings_device_name_hint=Hub 那边怎么称呼这台设备
+s_settings_brain_cloud_note=大脑在你自己搭的 Hub 那边,这台设备只负责动手。
+s_settings_llm_api_key=接口密钥
+s_settings_llm_model=模型
+s_settings_llm_base_url=接口地址
+s_settings_llm_thinking=深度思考
+s_common_on=开
+s_common_off=关
+s_settings_llm_effort=思考强度
+s_common_high=高
+s_common_medium=中
+s_common_low=低
+s_settings_brain_local_note=设备自己跑 agent loop,不连 Hub。没有 Key 就不会接管。
+s_settings_section_wake=语音唤醒
+s_settings_wake_enrolled=已录入 —— 说出你录的唤醒词就行
+s_settings_wake_not_enrolled=未录入 —— 自己选个词录 3 遍就能语音唤醒,例如「嘿 Andee」
+s_settings_wake_record=录入
+s_settings_wake_locked_on=锁屏时也听:已开启
+s_settings_wake_locked_off=锁屏时也听:已关闭
+s_settings_wake_locked_note=屏幕关闭时也会听。更耗电,麦克风会一直开着,状态栏的录音提示也会一直显示。
+s_common_clear=清除
+s_common_delete=删除
+s_settings_section_vault=保险箱
+s_settings_vault_empty_note=还没有存账号 —— 存了之后,Andee 办事时可以直接用它们登录
+s_settings_vault_count_note=已存 %1$d 个账号 —— 手机号邮箱大脑读得到,密码只由设备替你敲进输入框
+s_settings_vault_manage=管理
+s_settings_section_voice=火山接口地址
+s_settings_section_voice_key=语音
+s_settings_voice_factory_note=源码不带密钥。填上自己的 Key 才听得见、说得出;下面几行留空用默认地址即可。
+s_settings_voice_api_key=火山 API Key
+s_settings_voice_api_key_hint=火山引擎语音服务的 Key,听和说都靠它
+s_settings_voice_in_use=现在用的
+s_settings_voice_in_use_own=你自己填的那个火山账号
+s_settings_voice_in_use_factory=还没填,听和说都用不了
+s_settings_voice_asr_endpoint=识别地址
+s_settings_voice_asr_resource_id=识别资源 ID
+s_settings_voice_tts_endpoint=合成地址
+s_settings_voice_tts_resource_id=合成资源 ID
+s_settings_voice_tts_sample_rate=合成采样率
+s_settings_voice_provider=语音服务商
+s_settings_voice_provider_huoshan=火山
+s_settings_voice_provider_google=谷歌
+s_settings_google_api_key=Google API Key
+s_settings_google_api_key_hint=Vertex Express Key,听和说都用它
+s_settings_google_key_builtin=已内置(编译时写入),留空即用它
+s_settings_google_project=项目号
+s_settings_google_project_hint=GCP 的项目编号(不是项目名),识别要用
+s_settings_google_location=区域
+s_settings_google_asr_model=识别模型
+s_settings_google_tts_model=合成模型
+s_settings_google_base_url=接口地址
+s_settings_google_language=语言
+s_settings_google_language_hint=留空 = 自动判断
+s_settings_voice_google_note=识别走 Gemini Live(需要项目号和区域),合成走 HTTP。密钥只存在这台设备上。
+s_settings_section_diagnostics=诊断
+s_settings_section_advanced=高级
+s_settings_max_steps=单次任务最多步数
+s_settings_max_steps_note=每轮任务里 AI 最多能调用多少次工具。超过就停下并给个结束语,防止死循环烧 token。默认 25,一般的任务十几步就够了。
+s_settings_advanced_note=显示云端选项、打字、诊断和恢复出厂设置。日常用不到,都藏在这里。
+s_settings_grounding=接地采集
+s_settings_grounding_note=把坐标点击和截图记到 files/grounding 供离线分析 —— 它会拍下你当时在做的事。改完要重开无障碍服务才生效。
+s_settings_device_id=设备 ID
+s_settings_section_notebook=小本本
+s_settings_notebook_sweep_note=聊完静下来之后,它会自己回头看一眼:该记的记下、该跟的排上。默认开着 —— 「它记得住」就是这么来的。关掉之后不再花你的 key 做这件事。
+s_settings_notebook_quiet_minutes=静默多久算聊完(分钟)
+s_settings_notebook_daily_cap=每天最多复盘几次
+s_settings_notebook_today=今天 / 攒到现在
+s_settings_notebook_stats=复盘 %1$d 次(约 %2$d tokens)· 记住 %3$d 条 · 还欠着 %4$d 件事
+s_settings_notebook_browse=看它记得的事
+s_settings_section_notify=消息提醒
+s_settings_notify_chat=聊天类
+s_settings_notify_all=全部
+s_settings_notify_note=来消息的时候,它先自己看一眼值不值当:没事的就放过,要紧的说一声,该办的直接去办。「聊天类」是微信、QQ、钉钉、飞书、短信这些有人在那头的;「全部」连其它 App 也一起看(进度条、常驻通知除外)。拿不准的才弹牌子问你。关掉就谁也不打扰你 —— 消息都还在,想知道的时候问它一声就行。
+s_settings_section_typing=打字
+s_settings_typing_no_ime=这台设备上只有 ADBKeyboard(它没有键盘界面),所以现在打不了字。去系统设置里启用一个输入法,这里就会出现。
+s_settings_typing_current=你现在的输入法
+s_settings_typing_note=平时就是你自己的输入法 —— 任何 App 里都能正常打字。我替你打字时会临时切到 ADBKeyboard(它没有键盘界面,只能这么用),打完立刻切回来。
+s_common_show=显示
+s_common_hide=隐藏
+s_settings_scenes_browse=管理情景
+s_factory_reset_target_keys=火山 key、DeepSeek key,以及所有语音与大脑的设置
+s_factory_reset_target_notebook=小本本:记住的事、答应过还没办的事
+s_factory_reset_target_vault=保险箱里存的账号密码和银行卡
+s_factory_reset_target_wake=唤醒词的录音(要重新录一遍)
+s_factory_reset_target_history=对话历史,和它生成过的页面
+s_factory_reset_target_web=内置页面留下的 cookie 与本地存储
+s_factory_reset_target_grounding=接地采集存下的截图与日志
+s_settings_section_theme=外观
+s_settings_theme_note=浅色是白底深字,深色是深底浅字。点一下立刻换,卡片、页面、气泡和小球周围一起变。
+s_settings_theme_day=浅色
+s_settings_theme_night=深色
+s_settings_section_expr=形象与表情
+s_settings_expr_note=看看每个形象和每个表情,点一下就换。
+s_settings_expr_open=打开