CI / check (push) Canceled after 0s
A native client for a LLeMbas instance on the server's /api/v2, and the phone's digital assistant. - Sign in by device code; the token sealed in the Android Keystore; several instances. - Chats and agent chats: the list, a chat with its reply streaming as JSON server-sent events (reconnecting, whole blocks), thinking, tool calls, steered messages, the plan, jobs, stop, edit, regenerate, continue, the model, effort and Plan mode, attachments and dictation. - Cards in a sheet, answered as the page's form says it; first answer wins. - Notifications through UnifiedPush, no Google services; an approval can be answered from its notification. - The digital assistant: a VoiceInteractionService with its session (a sheet over the current app, "Include screen" off by default), a recognition service through the instance's speech-to-text, the lock-screen path that asks to unlock before sending, a Quick Settings tile and an Ask shortcut. - Share to LLeMbas; Moria and Shire from the server's tokens; nine languages; a self-updater in the `full` flavour, none in `fdroid`. Generated and pinned from the server, each checked in CI: the theme (tokens.lock.json), the contract (contract/lock.json, server 2124ba9), the strings and the icons. Built and tested only on GitHub Actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.1 KiB
Kotlin
35 lines
1.1 KiB
Kotlin
package eu.llembas.android
|
|
|
|
import eu.llembas.android.assist.AssistController
|
|
import eu.llembas.android.assist.Recorder
|
|
import eu.llembas.android.update.Updater
|
|
import org.junit.Assert.assertEquals
|
|
import org.junit.Assert.assertFalse
|
|
import org.junit.Assert.assertTrue
|
|
import org.junit.Test
|
|
|
|
class SmallThingsTest {
|
|
@Test
|
|
fun versionsCompareAsNumbers() {
|
|
assertTrue(Updater.newer("0.10.0", "0.9.9"))
|
|
assertTrue(Updater.newer("1.0.0", "0.99.0"))
|
|
assertFalse(Updater.newer("0.1.0", "0.1.0"))
|
|
assertFalse(Updater.newer("0.1.0", "0.2.0"))
|
|
}
|
|
|
|
@Test
|
|
fun aVoiceReadsNoMarkup() {
|
|
val said = AssistController.plain("**Bake** it.\n\n```sh\nbake\n```\nSee [the recipe](https://example.org).")
|
|
assertEquals("Bake it. See the recipe.", said)
|
|
}
|
|
|
|
@Test
|
|
fun aRecordingIsAValidWavFile() {
|
|
val wav = Recorder.wav(ByteArray(3200))
|
|
assertEquals(44 + 3200, wav.size)
|
|
assertEquals("RIFF", String(wav, 0, 4))
|
|
assertEquals("WAVE", String(wav, 8, 4))
|
|
assertEquals("data", String(wav, 36, 4))
|
|
}
|
|
}
|