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(ball): a single tap stops what's running, then listens
booboosui5455e650408b
diff --git a/app/src/main/java/net/kuafuai/andee/ScreenBodyService.kt b/app/src/main/java/net/kuafuai/andee/ScreenBodyService.ktindex e27db94..506eacd 100644--- a/app/src/main/java/net/kuafuai/andee/ScreenBodyService.kt+++ b/app/src/main/java/net/kuafuai/andee/ScreenBodyService.kt@@ -157,6 +157,38 @@ class ScreenBodyService : AccessibilityService() {// Also barge-in. Tapping the ball while Andee is talking means// the user wants the floor, so cutting TTS here keeps the// agent's own voice out of the mic.+ //+ // And a shoulder-tap, when there is a task to shoulder-tap. A+ // tap used to mean "listen" and nothing else, which left a gap+ // the moment the ball was busy: the user who wanted to+ // *redirect* it had to stop it first (three taps) and then ask+ // again (one more) — two gestures for a single intent. Tapping+ // something busy and having it stop and listen is what one+ // person does to another, and it is the only reading of the tap+ // that isn't "talk over the thing you can't hear". Triple-tap+ // still stops, and is still the *immediate* stop — see+ // [onStopClick] — because a single tap has to wait out the+ // double-tap window before it knows it isn't the first of two.+ //+ // A meeting is not a task to interrupt: stop and listen both+ // mean "end it" there. Decided once, here, rather than by+ // letting the two methods below each find a live meeting and+ // end it twice.+ if (meeting.isActive()) {+ meeting.stopFromUser()+ return+ }+ // Stop is *the* definition of stopping — `stopEverything()` —+ // reused rather than reimplemented, so the shoulder-tap and the+ // triple-tap can't drift into two different stops and the hub+ // gets its `task.stop` either way.+ //+ // Guarded on the task rather than run unconditionally: on an+ // idle ball there is nothing to stop, and the call would still+ // clear a pending 继续修改, tell the hub to stop, and flash+ // 已停止 ahead of 听着… — three side effects for a tap that+ // only ever meant "listen".+ if (dispatcher.isTaskActive()) stopEverything()startTurn()}diff --git a/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt b/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.ktindex f6c5766..36341e9 100644--- a/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt+++ b/app/src/main/java/net/kuafuai/andee/ui/FloatingWindowUi.kt@@ -66,6 +66,13 @@ import kotlin.random.Random* [BallHostFrame.registerTap]. The swipe is the one gesture that is* full-card-only, which is why the tips line spells it out.*+ * The first tap carries two verbs and the tips line still says one word for+ * it, which is not an omission: tapping something busy and having it stop and+ * listen is one intent, so it is one gesture — see [Listeners.onTalkClick] for+ * why it isn't left to the user to sequence the stop and the ask themselves.+ * What the tips line teaches is the vocabulary; what a tap *does* depends on+ * what is running, which is not something a line of text can say anyway.+ ** Everything the assistant hears, says, shows or fails at ends up in that one* list, in order. There is no separate subtitle band: [setSubtitle] writes the* list's live last row instead, so the user watches one surface rather than@@ -121,6 +128,16 @@ class FloatingWindowUi(enum class SubtitleKind { PARTIAL, FINAL }interface Listeners {+ /**+ * One tap on the ball — talk, having stopped anything that was running.+ *+ * The stop half is deliberately the host's call and not this class's:+ * only the service can see whether there is a task to interrupt, and+ * only it owns what stopping one means (the brain's turn, the+ * dispatcher's glow, the hub's `task.stop`). The window reports the+ * gesture and nothing about the state behind it — same split as+ * [onStopClick], which is the other half of that same decision.+ */fun onTalkClick()fun onSettingsClick()