Compare commits

..
Author SHA1 Message Date
HomerandClaude Opus 5.5 9b700ee42c LLeMbas for Android 1.0.0-beta.6: pinned to LLeMbas 2.0.0-beta.9
Release / release (push) Canceled after 0s
CI / check (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 15:09:06 +00:00
HomerandClaude Opus 5.5 ec9049f4ae Schedules on a computer: "Waiting for the computer", and a watched command named as one
CI / check (push) Canceled after 0s
Seen in shot 10-schedule-on-computer: a run waiting for its computer said "Waiting for a
model" (cut off), and a watched command was labelled "Only when this page changes". The chip
now says "Waiting for the computer" when waiting_for is device (8 translations) and ends in an
ellipsis when long; a `command` watch uses the server's "Only when this command's output
changes".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:23:38 +00:00
HomerandClaude Opus 5.5 d0404f1968 Schedules on a computer: which one, its folder and mode, and "not linked now"
CI / check (push) Canceled after 0s
`runs_on` (server 57d06ee): the schedule page says Computer: name · folder · mode; each run
row names the computer, and a run waiting with error class device_away adds "not linked now"
(server's words). The fixtures carry no "does not accept scheduled work" state on /api/v2, so
that one is the run's own error text only. ScheduleContractTest reads schedule_on_device.json;
shot 10-schedule-on-computer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:15:17 +00:00
HomerandClaude Opus 5.5 b5e78d82bd Generate images in a new chat too: force_tool on POST /chats (server e0c2332)
CI / check (push) Canceled after 0s
The + option shows in a new chat as well (never an agent chat); the first message makes the
chat and asks for the picture. /me is read on opening any non-agent chat for services.images.
A send that fails gives the picture request back with the words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:06:16 +00:00
HomerandClaude Opus 5.5 a5c4fdc128 Contract at server dev e0c2332; the update check asks the instance first (GET /api/v2/apps)
CI / check (push) Canceled after 0s
Re-pinned at e0c2332 (after 2a2b24f /apps, 57d06ee schedules on a computer, e0c2332
force_tool on POST /chats): apps.json, apps_stable.json, schedule_on_device.json; `runs_on`
on schedules (parsed by the rest, not drawn yet); the schedules frame's version hash.

ReleaseCheck: the instance's recommendation first (it knows which release speaks its
/api/v2); a beta only with Include betas; a null android means no offer. A server without the
route, none signed in or none reachable falls back to GitHub's list as before. The About line
says so (8 translations). UpdateCheckTest reads both fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:05:38 +00:00
HomerandClaude Opus 5.5 9b1bf688a1 Drawer search: the chats whose messages hold the words, under the title matches
CI / check (push) Canceled after 0s
GET /api/v2/search?in=chats (server f7f2ff2), 400 ms after typing pauses and from two
characters; the title filter stays local and instant. Hits under "In the messages" with the
snippet as plain text and the server's marks drawn (markedSnippet clamps ranges that do not
fit). A failed search leaves the title filter alone. ContractTest reads search.json;
ChatGroupsTest the marks; shot 05-drawer-search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:04:17 +00:00
HomerandClaude Opus 5.5 6ed3498bc0 Scheduled-result notifications: the lock screen says nothing from the account
CI / check (push) Canceled after 0s
The public version is the app's name and the fixed sentence ("A scheduled task has a
result." / "failed", translated) again; the server's `public` names the task, so it is read
but not shown (section rule 5 outranks the beta.9 plan). Unlocked: unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:02:48 +00:00
HomerandClaude Opus 5.5 d9654dd23c Generate images from the composer; the picture in its own safe composable
CI / check (push) Canceled after 0s
+ › Generate images (when /me services.images) marks the next message, shown as a chip under
the box; it is sent with force_tool image_generate (the server's only forceable tool) on
POST /chats/{id}/messages. The tool event's `image {id, width, height}` is drawn by
GeneratedPicture: fetched only by attachment id from GET /api/v2/attachments/{id} with the
token (no URL is ever followed), at most 24 MB, decoded to a 1600 px edge, its box sized by the
server's width/height before it loads; a tap shows it whole. Markwon stays image-free.

Chosen over /v1/images/generations (models scope, which sign-in already asks): the in-chat tool
keeps the picture in the chat as the web does. A NEW chat cannot force a tool yet (POST /chats
takes no force_tool), so the option shows in an existing chat only -- server follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:54:34 +00:00
HomerandClaude Opus 5.5 87d391c352 Memory screen: list, remember, change and forget over /api/v2/memories
CI / check (push) Canceled after 0s
Drawer › Memory (server f7f2ff2): GET/POST/PATCH/DELETE /memories. Newest first, plain text
(a model may have written it; marked with the Model icon), the data group shown when there is
more than one and offered when remembering a new one. A refusal (the limit, an empty text)
is the server's sentence. Every word from the server's catalogue. ContractTest reads
memories.json and memory.json; shots 28-memory (normal, small phone at 1.5x, empty).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:51:37 +00:00
HomerandClaude Opus 5.5 737105add2 Pinned chats and folders in the drawer: pin, move, new, rename, fold, delete
CI / check (push) Canceled after 0s
The web sidebar's order: Pinned chats (wherever filed), the folders as a tree (folderTree:
position order, a folder whose parent is missing goes to the top), then today / earlier /
agent chats unfiled. PATCH /chats/{id} `pinned` and `folder_id` (server 96240be, f7f2ff2);
POST/PATCH/DELETE /folders. A tap folds a folder through PATCH `collapsed`, so the web folds
the same. Long press: Pin chat / Move to folder / Archive; on a folder Rename / Delete (its
chats stay). Strings from the server's catalogue. ChatGroupsTest, ContractTest (folders.json,
folder.json); the drawer shot now has a pinned chat, nested and collapsed folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:49:03 +00:00
HomerandClaude Opus 5.5 cd88c3e712 Scheduled-result notifications: first lines, a lock-screen version, Open / Run again
CI / check (push) Canceled after 0s
From the push's `notification` (server fd0a386): the task's name and the result's first lines
in BigTextStyle for an unlocked phone, setPublicVersion with the task's name and Finished /
Failed for the lock screen, and the actions with the server's labels in the owner's language.
Run again calls POST /schedules/{id}/run and needs the phone unlocked
(setAuthenticationRequired); Pause stays as it was. An older server's payload (no
`notification`) keeps the app's fixed sentences. ScheduleContractTest reads
push_schedule.json and push_schedule_failed.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:45:12 +00:00
HomerandClaude Opus 5.5 ad5c6ca12b Contract at server dev 3e6f6da: notifications, monitor mode, pinning, parity routes, queued
CI / check (push) Canceled after 0s
Re-pinned contract/ and the strings at the server's dev 3e6f6da (after f7f2ff2 parity routes,
96240be pinning, 00c209a monitor mode, fd0a386 scheduled-result notifications, a8a3733
progress gaps).

- Message.progress: a queued prompt draws the server's queued line ("2 ahead · 12s").
  loading_model and reading_prompt's tokens were already drawn (Progress.kt).
- Schedule.watch / ScheduleRun.watch: a watching schedule names its address on its page;
  `unchanged` runs are drawn quiet, as Unchanged.
- ScheduleRun.notification parsed (title, body, public, actions, labels) for the push work.
- The schedules frame's version hash moved (ScheduleContractTest).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:41:47 +00:00
HomerandClaude Opus 5.5 bd6c8df192 Read aloud on a chat's replies, through the instance's text-to-speech
CI / check (push) Canceled after 0s
ReadAloud (one at a time, stopped when the chat is left) is provided to the
transcript only when /api/v2/me says the instance has text-to-speech; the
reply's foot row gains Read aloud / Stop reading beside Copy. Errors go to the
chat's snackbar through explain().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:15:56 +00:00
HomerandClaude Opus 5.5 cb9ad78ee9 Archived chats: the list, and Restore chat
CI / check (push) Canceled after 0s
GET /api/v2/chats?archived=true a page at a time, from a drawer entry under
Scheduled; a tap opens the chat, Restore chat PATCHes archived=false and
refreshes the drawer. Shots 27-archived (+ small, large type) and -none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:14:25 +00:00
HomerandClaude Opus 5.5 8e47a825c5 An approval's Allow once / Deny from its notification need the phone unlocked
CI / check (push) Canceled after 0s
NotificationCompat.Action.setAuthenticationRequired: Android 12+ asks for the
unlock before the answer is sent. Run on every approval push, so the approvals
a scheduled run on a linked computer sends are covered by the same path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:12:36 +00:00
HomerandClaude Opus 5.5 0c77109a73 Update check: the public GitHub releases, daily on start and from Settings › About
CI / check (push) Canceled after 0s
ReleaseCheck reads api.github.com's list of this repository's releases over
plain HTTPS, compares with the installed version (a beta sorts below its
release; -debug is left off), and offers the newest one the person may have:
betas only to a beta install or with Include betas on. On start it runs at
most once a day while Look for new versions is on (default: on in a beta, off
in a release) and announces a version once, in a notification on its own low
channel that opens the release page. Check for an update works in both
builds; the full build's own installer stays for a found release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:11:42 +00:00
HomerandClaude Opus 5.5 fac9a3811a The chat's microphone follows Settings › Voice input, as the assistant does
CI / check (push) Canceled after 0s
usePhoneRecognizer() is the one rule for both: the phone's recogniser when it
was chosen and the phone has one (or the instance has no speech-to-text),
otherwise the instance's. With the phone's, the words go into the box as they
are said. The setting's explanation now names both users.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:08:26 +00:00
69 changed files with 3651 additions and 153 deletions

No files matched your search

+55
View File
@@ -3,6 +3,61 @@
What changed in each release of LLeMbas for Android. Versions follow SemVer; until 1.0.0 the app
is in alpha and releases come off `main`.
## [1.0.0-beta.6] — 2026-11-10
For LLeMbas server 2.0 (2.0.0-beta.9 or later for schedules on a computer, the update check through the instance, pinning, folders, memory and search).
### Added
- **The app tells you when a newer version is out.** Settings › About › *Look for new versions*:
at most once a day, when the app starts, it asks your instance which release goes with it
(an instance older than that reads the public list of LLeMbas for Android releases on GitHub;
plain HTTPS, no Google service, nothing about you sent) and, when there is a newer one, says so in a notification that opens the release's page with its APKs. On by
default in a beta, off in a release. *Include betas* offers test versions too (on by default
in a beta). **Check for an update** asks at once, in either build; the full build can then
install a release itself.
- **Archived chats**, in the drawer under Scheduled: every archived chat, newest first. A tap
opens one; **Restore chat** puts it back among your chats.
- **Read aloud on a reply** in a chat, beside Copy, when your instance has text-to-speech: the
same voice the assistant answers in. Tap again (or another reply's) to stop; leaving the chat
stops it too.
- **Pinned chats and folders** in the drawer, as on the web: pinned chats at the top wherever
they are filed, then your folders as a tree (a tap folds or opens one, and the web folds it
too), then the rest. A long press on a chat offers **Pin chat** and **Move to folder**; on a
folder, **Rename folder** and **Delete folder** (its chats stay). **New folder** is beside New
chat at the top of the drawer.
- **Search finds words inside your chats.** Typing in the drawer's search box still filters
the titles at once; a moment later the chats whose messages hold the words follow under *In
the messages*, with the words marked.
- **Generate images** in a chat, when your instance makes pictures: from **+** in the composer,
the next message asks for one (a new chat can start with a picture too), and the picture shows in the reply at its own size. A tap opens
it whole. Only pictures your instance made and keeps are drawn; nothing is loaded from an
address a reply names.
- **Memory**, in the drawer: what models remember about you, as Settings › Memory on the web.
A tap changes or forgets one; **Remember** adds one (in the data group you pick, when you have
more than one). What a model wrote is marked, and shown as plain text.
- **A scheduled task that runs on one of your computers** says which, in which folder and mode,
on its page and in each run; a run that found the computer away says *not linked now*.
- **A scheduled task that watches a web page** says so on its page (*Only when this page
changes*, and the address), and a run that found the page unchanged is shown as *Unchanged*.
- **A scheduled task's notification shows its result.** Unlocked, it carries the task's name
and the first lines of what it found (pull it open for more); on the lock screen only
*LLeMbas* and that a scheduled task finished or failed, nothing from your account. **Run again** starts the task again from the
notification, once the phone is unlocked. Needs an instance that sends these; an older one
keeps the fixed sentence.
- **A message waiting behind a reply says how many are ahead of it** and for how long it has
waited, where the instance tells.
### Changed
- **Allow once and Deny on an approval's notification ask for the phone to be unlocked first**
(Android 12 and newer), so a locked phone cannot answer for you. This holds for the
approvals a scheduled run on a computer will send too.
- **The microphone in a chat follows Settings › Voice input**, as the assistant does: with
*LLeMbas* it records and your instance writes the words down when you stop; with *Phone* the
phone's own recogniser writes them into the box as you speak and stops at the end of what you
said. The setting's explanation now says it covers both.
## [1.0.0-beta.5] — 2026-11-10
For LLeMbas server 2.0 (2.0.0-beta.8 or later for the progress line, the subagent list and the new agent chat's Subagents setting).
+1 -1
View File
@@ -31,7 +31,7 @@ android {
// The one source of the version. versionCode is derived from it, so the two cannot
// drift, and a beta sorts below its release: 1.0.0-beta.1 -> 1000001,
// 1.0.0-beta.2 -> 1000002, 1.0.0 -> 1000099, 1.2.3 -> 1020399.
versionName = "1.0.0-beta.5"
versionName = "1.0.0-beta.6"
versionCode = versionName!!.split("-beta.").let { parts ->
val (a, b, c) = parts[0].split(".").map { it.toInt() }
val pre = if (parts.size == 2) parts[1].toInt() else 99
@@ -20,7 +20,9 @@ class LembasApp : Application() {
NotificationChannel(CHANNEL_ASKS, getString(R.string.channel_asks), NotificationManager.IMPORTANCE_HIGH),
NotificationChannel(CHANNEL_SCHEDULED, getString(R.string.channel_scheduled), NotificationManager.IMPORTANCE_DEFAULT),
NotificationChannel(CHANNEL_SCHEDULED_FAILURES, getString(R.string.channel_scheduled_failures), NotificationManager.IMPORTANCE_HIGH),
).onEach { it.lockscreenVisibility = android.app.Notification.VISIBILITY_PRIVATE },
).onEach { it.lockscreenVisibility = android.app.Notification.VISIBILITY_PRIVATE } +
// A new version of the app says nothing about the account.
NotificationChannel(CHANNEL_UPDATES, getString(R.string.channel_updates), NotificationManager.IMPORTANCE_LOW),
)
// LLeMbas 2.0 has no reports, so 0.1's channel for them goes rather than sit empty in
// the system's settings.
@@ -32,6 +34,7 @@ class LembasApp : Application() {
const val CHANNEL_ASKS = "asks"
const val CHANNEL_SCHEDULED = "scheduled_results"
const val CHANNEL_SCHEDULED_FAILURES = "scheduled_failures"
const val CHANNEL_UPDATES = "updates"
}
}
@@ -33,15 +33,18 @@ import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import eu.llembas.android.api.Chat
import eu.llembas.android.api.Folder
import eu.llembas.android.auth.Instance
import eu.llembas.android.auth.Prefs
import eu.llembas.android.push.Notifications
import eu.llembas.android.push.Push
import eu.llembas.android.ui.chat.ChatScreen
import eu.llembas.android.ui.files.FilesScreen
import eu.llembas.android.ui.home.ArchivedScreen
import eu.llembas.android.ui.home.ChatsViewModel
import eu.llembas.android.ui.home.DrawerActions
import eu.llembas.android.ui.home.DrawerContent
import eu.llembas.android.ui.memory.MemoryScreen
import eu.llembas.android.ui.scheduled.RunScreen
import eu.llembas.android.ui.scheduled.ScheduleEditScreen
import eu.llembas.android.ui.scheduled.ScheduleScreen
@@ -50,6 +53,7 @@ import eu.llembas.android.ui.scheduled.SchedulingModelsScreen
import eu.llembas.android.ui.settings.SettingsScreen
import eu.llembas.android.ui.signin.SignInScreen
import eu.llembas.android.ui.theme.LembasTheme
import eu.llembas.android.update.ReleaseCheck
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
@@ -71,6 +75,8 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
take(intent)
followLanguage()
// At most once a day, and only while Settings › About says so (update/ReleaseCheck.kt).
lifecycleScope.launch { runCatching { ReleaseCheck(this@MainActivity).daily() } }
if (Build.VERSION.SDK_INT >= 33 &&
ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED
) {
@@ -200,15 +206,33 @@ class MainActivity : ComponentActivity() {
override fun archive(chat: Chat) = chats.archive(chat)
override fun pin(chat: Chat, pinned: Boolean) = chats.pin(chat, pinned)
override fun move(chat: Chat, folderId: String?) = chats.move(chat, folderId)
override fun newFolder(name: String, then: Chat?) = chats.newFolder(name, then)
override fun renameFolder(folder: Folder, name: String) = chats.renameFolder(folder, name)
override fun toggleFolder(folder: Folder) = chats.toggleFolder(folder)
override fun deleteFolder(folder: Folder) = chats.deleteFolder(folder)
override fun files() = over("files")
override fun scheduled() = over("scheduled")
override fun archived() = over("archived")
override fun memory() = over("memory")
override fun settings() = over("settings")
override fun more() = chats.more()
override fun retry() = chats.load()
override fun search(query: String) = chats.search(query)
}
}
val menu: () -> Unit = { scope.launch { drawer.open() } }
@@ -251,6 +275,10 @@ class MainActivity : ComponentActivity() {
)
}
composable("files") { FilesScreen(onBack = { nav.popBackStack() }) }
composable("archived") {
ArchivedScreen(onBack = { nav.popBackStack() }, onOpen = { top("chat/$it") }, onRestored = { chats.load() })
}
composable("memory") { MemoryScreen(onBack = { nav.popBackStack() }) }
composable("scheduled") {
ScheduledScreen(
onBack = { nav.popBackStack() },
@@ -155,6 +155,47 @@ class ApiClient(val base: String, private val token: String, val http: OkHttpCli
suspend fun folders(): List<Folder> = get<FolderList>("/folders").folders
/** A new folder, at the top or inside [parentId] (`folder.manage`; nesting is capped). */
suspend fun createFolder(name: String, parentId: String? = null): Folder = send<FolderEnvelope>(
"POST",
"/folders",
buildJsonObject {
put("name", name)
if (parentId != null) put("parent_id", parentId)
},
).folder
/** Any of `name`, `parent_id`, `collapsed`. */
suspend fun updateFolder(id: String, changes: JsonObject): Folder = send<FolderEnvelope>("PATCH", "/folders/${segment(id)}", changes).folder
/** The folder and the folders inside it; their chats fall back to no folder. */
suspend fun deleteFolder(id: String) = empty(authed("$v2/folders/${segment(id)}").delete().build())
/** The app releases this server recommends; 404 from a server older than the route. */
suspend fun apps(): AppsInfo = get("/apps")
/** The web's search in JSON: chats by their words (and meaning, where indexed), files, memories. */
suspend fun search(q: String, within: String = "all", limit: Int = 20): SearchResults = get("/search?q=${segment(q)}&in=${segment(within)}&limit=$limit")
// --- Memory (`library.use`) -----------------------------------------------------------------
/** The person's memories, every data group, and the groups they may file one in. */
suspend fun memories(): MemoryList = get("/memories")
suspend fun addMemory(content: String, groupId: String? = null): Memory = send<MemoryEnvelope>(
"POST",
"/memories",
buildJsonObject {
put("content", content)
if (groupId != null) put("data_group_id", groupId)
},
).memory
suspend fun editMemory(id: String, content: String): Memory =
send<MemoryEnvelope>("PATCH", "/memories/${segment(id)}", buildJsonObject { put("content", content) }).memory
suspend fun forgetMemory(id: String) = empty(authed("$v2/memories/${segment(id)}").delete().build())
suspend fun devices(): List<LinkedDevice> = get<DeviceList>("/devices").devices
/** The token revokes itself (`lembas logout`'s route). */
@@ -185,6 +226,7 @@ class ApiClient(val base: String, private val token: String, val http: OkHttpCli
mode: String? = null,
agent: AgentTarget? = null,
agents: AgentsSetting? = null,
forceTool: String? = null,
): NewChat = send(
"POST",
"/chats",
@@ -196,6 +238,7 @@ class ApiClient(val base: String, private val token: String, val http: OkHttpCli
mode?.let { put("mode", it) }
agents?.let { put("agents", agentsJson(it)) }
put("temporary", temporary)
forceTool?.let { put("force_tool", it) }
// An agent chat runs on a linked device; an empty directory is the device's first
// allowed one. A device that is no longer linked makes it an ordinary chat on the
// server, rather than losing the message.
@@ -207,12 +250,14 @@ class ApiClient(val base: String, private val token: String, val http: OkHttpCli
},
)
suspend fun sendMessage(chatId: String, text: String, attachments: List<String> = emptyList()): Turn = send(
/** A turn. [forceTool] makes the model call that tool (the server allows `image_generate` only). */
suspend fun sendMessage(chatId: String, text: String, attachments: List<String> = emptyList(), forceTool: String? = null): Turn = send(
"POST",
"/chats/$chatId/messages",
buildJsonObject {
put("text", text)
put("attachments", JsonArray(attachments.map { JsonPrimitive(it) }))
forceTool?.let { put("force_tool", it) }
},
)
@@ -89,6 +89,9 @@ data class Me(
/** The instance's text-to-speech (the assistant's voice reply, Read aloud). */
val hasTextToSpeech: Boolean get() = services["tts"] == true
/** The instance makes pictures for this person (`image_generate`, in a chat). */
val hasImages: Boolean get() = services["images"] == true
}
@Serializable
@@ -176,7 +179,88 @@ data class AgentSubagents(val offered: Boolean = false, @SerialName("device_runs
data class SubagentsOffer(val offered: Boolean = false, @SerialName("named_only") val namedOnly: Boolean = false, val cap: Int? = null)
@Serializable
data class Folder(val id: String, val name: String = "", @SerialName("parent_id") val parentId: String? = null, val kind: String = "", val position: Int = 0)
data class Folder(
val id: String,
val name: String = "",
@SerialName("parent_id") val parentId: String? = null,
val kind: String = "",
val position: Int = 0,
val collapsed: Boolean = false,
)
@Serializable
data class FolderEnvelope(val folder: Folder)
/**
* One hit of `GET /api/v2/search`: a chat (by [id]), a file (by [path]) or a memory. [snippet] is
* plain text -- a chat's may be model output -- and [marks] the `[start, end)` ranges matched in it.
*/
@Serializable
data class SearchHit(
val kind: String = "",
val id: String? = null,
val title: String = "",
val snippet: String = "",
val marks: List<List<Int>> = emptyList(),
val archived: Boolean = false,
val agent: Boolean = false,
val path: String? = null,
)
@Serializable
data class SearchGroup(val kind: String = "", val more: Boolean = false, val hits: List<SearchHit> = emptyList())
@Serializable
data class SearchResults(
val q: String = "",
@SerialName("in") val within: String = "",
val offered: List<String> = emptyList(),
val results: List<SearchGroup> = emptyList(),
) {
fun hits(kind: String): List<SearchHit> = results.firstOrNull { it.kind == kind }?.hits.orEmpty()
}
/** One app release the server recommends (`GET /api/v2/apps`), with the page its files are on. */
@Serializable
data class AppRelease(val version: String = "", val tag: String = "", val channel: String = "", val page: String = "")
@Serializable
data class ServerChannel(val version: String = "", val channel: String = "")
/**
* Which release of each app goes with this server: a stable server names only a stable app, a
* beta server the newer of the app's stable and beta. Null for an app it recommends none of.
*/
@Serializable
data class AppsInfo(val server: ServerChannel = ServerChannel(), val apps: Map<String, AppRelease?> = emptyMap()) {
val android: AppRelease? get() = apps["android"]
}
/** A data group: whose records a memory is kept among. */
@Serializable
data class DataGroup(val id: String = "", val name: String = "")
/**
* One memory (`/api/v2/memories`, Settings › Memory on the web): its text, who wrote it (`user`
* or `model` -- a model's is model output, drawn as plain text), and its data group.
*/
@Serializable
data class Memory(
val id: String,
val content: String = "",
val author: String = "",
@SerialName("data_group") val dataGroup: DataGroup = DataGroup(),
@SerialName("created_at") val createdAt: String? = null,
@SerialName("updated_at") val updatedAt: String? = null,
) {
val byModel: Boolean get() = author == "model"
}
@Serializable
data class MemoryList(val memories: List<Memory> = emptyList(), val groups: List<DataGroup> = emptyList())
@Serializable
data class MemoryEnvelope(val memory: Memory)
@Serializable
data class FolderList(val folders: List<Folder> = emptyList())
@@ -298,9 +382,19 @@ data class ToolCall(
val children: List<ToolCall>? = null,
/** The `show` tool's card: a file put in front of the person. Never its text. */
val show: ShowCard? = null,
/** `image_generate`'s picture: the server's own attachment, by id, and its size. */
val image: GeneratedImage? = null,
val block: ToolBlock = ToolBlock(),
)
/**
* A picture the instance made (`event["image"]`): an attachment of the chat's owner, fetched
* with the token from `GET /api/v2/attachments/{id}` and nowhere else. Its size is known before
* it loads, so the space it takes does not jump.
*/
@Serializable
data class GeneratedImage(val id: String = "", val width: Int = 0, val height: Int = 0)
/**
* What a `show` call put in front of the person (`event["show"]`, harness spec 3.0.0): the
* file's name and where it is, never its contents -- the viewer fetches those. A file from the
@@ -412,6 +506,8 @@ data class Message(
val steps: List<Step> = emptyList(),
val plan: JsonObject? = null,
val metrics: Metrics? = null,
/** A prompt queued behind a running reply: `{phase: queued, since, ahead}`; null otherwise. */
val progress: Progress? = null,
) {
val isUser: Boolean get() = role == "user"
}
@@ -555,6 +651,12 @@ data class PushPayload(
val status: String? = null,
val visibility: String? = null,
val actions: List<String> = emptyList(),
/**
* The run's notification as the server wrote it (newer servers; the payload is encrypted end
* to end): the task's name and the result's first lines, the lock-screen version, and the
* actions' labels in the owner's language. Null from an older server: the fixed sentence then.
*/
val notification: RunNotification? = null,
)
// --- The activity panel (`GET /chats/{chat}/activity`) -------------------------------------
@@ -63,6 +63,10 @@ data class ScheduleRun(
val preview: String = "",
val error: RunError? = null,
val notified: Boolean = false,
/** The notification the server made for this run, when it made one (see [RunNotification]). */
val notification: RunNotification? = null,
/** A watching schedule's look at its address on this run (`unchanged` when nothing moved). */
val watch: RunWatch? = null,
)
/**
@@ -96,6 +100,10 @@ data class Schedule(
@SerialName("chat_id") val chatId: String? = null,
@SerialName("fired_count") val firedCount: Int = 0,
@SerialName("failure_streak") val failureStreak: Int = 0,
/** Monitor mode: what the schedule watches; the model runs only when it changed. */
val watch: ScheduleWatch? = null,
/** The linked computer it runs on, as an agent chat there; null: on the server. */
@SerialName("runs_on") val runsOn: RunsOn? = null,
@SerialName("last_error") val lastError: String? = null,
@SerialName("last_run") val lastRun: ScheduleRun? = null,
val running: Boolean = false,
@@ -171,3 +179,48 @@ data class SchedulingModel(
/** `GET`/`PUT /schedules/models`: the models, the instance's order, and the person's narrowing. */
@Serializable
data class SchedulingModels(val models: List<SchedulingModel> = emptyList(), val instance: List<String> = emptyList(), val mine: List<String> = emptyList())
/** What a watching schedule looks at before each run: [kind] `url` and the address. */
@Serializable
data class ScheduleWatch(val kind: String = "", val target: String = "", @SerialName("changed_at") val changedAt: String? = null)
/** One run's look: whether the address [changed] since the last one, or why the look failed. */
@Serializable
data class RunWatch(val kind: String = "", val changed: Boolean = false, val first: Boolean = false, val bytes: Long = 0, val error: String? = null)
/** The lock-screen half of a [RunNotification]: the task's name and Finished / Failed only. */
@Serializable
data class PublicNotice(val title: String = "", val body: String = "")
/**
* A scheduled run's notification as the server wrote it, in the owner's language: [title] (the
* task's name) and [body] (the result's first lines) for an unlocked phone, [public] for the
* lock screen, and [actions] (`open`, `run_again`, `pause`) with their [labels]. [ask] names the
* action the body asks about (`pause` after failures).
*/
@Serializable
data class RunNotification(
val title: String = "",
val body: String = "",
val public: PublicNotice = PublicNotice(),
val actions: List<String> = emptyList(),
val labels: Map<String, String> = emptyMap(),
val ask: String = "",
)
/**
* Where a schedule runs when not on the server (harness spec 3.5.0): a linked computer
* ([deviceName]), the folder there, the agent mode (never wider than Edit unless chosen), and how
* long an approval it needs waits on the phone.
*/
@Serializable
data class RunsOn(
val device: String = "",
@SerialName("device_name") val deviceName: String = "",
val cwd: String = "",
val mode: String = "",
@SerialName("approval_wait_minutes") val approvalWaitMinutes: Int? = null,
)
/** A run that waits because its computer is not linked (`error.class` `device_away`). */
val ScheduleRun.computerAway: Boolean get() = error?.kind == "device_away"
@@ -14,7 +14,6 @@ import eu.llembas.android.api.LiveReply
import eu.llembas.android.api.ModelInfo
import eu.llembas.android.api.Step
import eu.llembas.android.api.StreamClient
import eu.llembas.android.auth.Prefs
import eu.llembas.android.lembas
import eu.llembas.android.push.Notifications
import eu.llembas.android.ui.explain
@@ -194,12 +193,7 @@ class AssistController(private val context: Context, private val scope: Coroutin
/** Which recogniser: the one Settings names, else whichever this phone and instance have. */
private suspend fun phoneEngine(): Boolean {
val wanted = context.lembas.instances.prefs.first().voiceInput
val phoneHas = PhoneRecognizer.available(context)
return when {
wanted == Prefs.VOICE_PHONE && phoneHas -> true
stt == false && phoneHas -> true
else -> false
}
return usePhoneRecognizer(wanted, PhoneRecognizer.available(context), stt)
}
@android.annotation.SuppressLint("MissingPermission")
@@ -16,6 +16,7 @@ import android.speech.RecognitionService
import android.speech.RecognizerIntent
import android.speech.SpeechRecognizer
import androidx.annotation.RequiresPermission
import eu.llembas.android.auth.Prefs
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
@@ -277,3 +278,14 @@ class PhoneRecognizer(private val context: Context) {
fun available(context: Context): Boolean = onDevice(context) || component(context) != null
}
}
/**
* Which recogniser Settings › Voice input means, for the assistant and the chat's microphone
* alike: the phone's when it was chosen and the phone has one, or when the instance said it has
* no speech-to-text ([instanceStt] false; null is "not known", which leaves the choice as set).
*/
fun usePhoneRecognizer(wanted: String, phoneHas: Boolean, instanceStt: Boolean?): Boolean = when {
!phoneHas -> false
wanted == Prefs.VOICE_PHONE -> true
else -> instanceStt == false
}
@@ -89,6 +89,13 @@ data class Prefs(
val lastAssistChat: String = "",
val lastAssistTitle: String = "",
val lastAssistAt: Long = 0,
/** Settings › About: look for new versions (null: on in a beta, off in a release). */
val updateCheck: Boolean? = null,
/** ... and include betas (null: on in a beta, off in a release). */
val updateBetas: Boolean? = null,
val updateCheckedAt: Long = 0,
/** The last version a notification announced, so it is announced once. */
val updateNotified: String = "",
) {
companion object {
const val VOICE_LEMBAS = "lembas"
@@ -122,35 +122,41 @@ object Notifications {
// The body can name a command or a file; on a locked screen only the title shows.
.setVisibility(NotificationCompat.VISIBILITY_PRIVATE)
// An approval can be answered from here: once, or no. "Always" and a corrected command
// need the card itself, so they stay in the app.
// need the card itself, so they stay in the app. Either answer asks for the phone to be
// unlocked first (Android 12+): a locked phone in somebody else's hand must not say yes
// to a command -- nor no to a run that waits on it, a scheduled one included.
if (payload.kind == "ask" && payload.ask == "approval" && chatId != null && payload.interactionId != null) {
builder.addAction(0, context.getString(R.string.card_allow_once), answer(context, instance, chatId, payload.interactionId, "allow", id))
builder.addAction(0, context.getString(R.string.card_deny), answer(context, instance, chatId, payload.interactionId, "deny", id))
builder.addAction(unlocked(context.getString(R.string.card_allow_once), answer(context, instance, chatId, payload.interactionId, "allow", id)))
builder.addAction(unlocked(context.getString(R.string.card_deny), answer(context, instance, chatId, payload.interactionId, "deny", id)))
}
NotificationManagerCompat.from(context).notify(id, builder.build())
}
/**
* A scheduled run's result or failure, on its own channel, built from the server's payload
* alone ([ScheduledNotice]): the payload carries ids and one of the server's own fixed
* sentences, never the result. Unlocked: the instance's name and that sentence. On the lock
* screen the public version: the app's name and "a scheduled task has a result" (or failed).
* A tap and Open go to the run; Pause is there when the server offers it.
* alone ([ScheduledNotice]). Unlocked: the task's name and the result's first lines, as the
* server cut them (BigTextStyle opens them). On the lock screen only the public version: the
* app's name and "A scheduled task has a result." (or failed) -- nothing from the account, so
* the server's `public` (which names the task) is not used. A tap and Open go to the run;
* Run again starts it again, once the phone is unlocked; Pause is there when offered.
*/
private fun scheduled(context: Context, instance: String, payload: PushPayload) {
val notice = ScheduledNotice.from(payload) ?: return
val channel = if (notice.failed) LembasApp.CHANNEL_SCHEDULED_FAILURES else LembasApp.CHANNEL_SCHEDULED
val fixed = context.getString(if (notice.failed) R.string.scheduled_failed_public else R.string.scheduled_result_public)
val open = opener(context, instance, notice.id, chatId = null, scheduleId = notice.scheduleId, runId = notice.runId)
// The lock screen gets nothing from the account (Working-notes rule 5): the app's name
// and a fixed sentence, never the task's name the server offers in `public`.
val public = NotificationCompat.Builder(context, channel)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(context.getString(R.string.app_name))
.setContentText(fixed)
.build()
val body = payload.body.ifBlank { fixed }
val title = notice.title.ifBlank { payload.title.ifBlank { context.getString(R.string.scheduled) } }
val body = notice.body.ifBlank { payload.body.ifBlank { fixed } }
val builder = NotificationCompat.Builder(context, channel)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(payload.title.ifBlank { context.getString(R.string.scheduled) })
.setContentTitle(title)
.setContentText(body)
.setStyle(NotificationCompat.BigTextStyle().bigText(body))
.setAutoCancel(true)
@@ -158,11 +164,22 @@ object Notifications {
.setCategory(if (notice.failed) Notification.CATEGORY_ERROR else Notification.CATEGORY_STATUS)
.setVisibility(NotificationCompat.VISIBILITY_PRIVATE)
.setPublicVersion(public)
if (notice.open) builder.addAction(0, context.getString(R.string.viewer_open), open)
if (notice.pause) builder.addAction(0, context.getString(R.string.schedule_pause), pause(context, instance, notice.scheduleId, notice.id))
if (notice.open) builder.addAction(0, notice.label("open", context.getString(R.string.viewer_open)), open)
if (notice.runAgain) {
val again = scheduleAction(context, instance, notice.scheduleId, notice.id, ScheduleActionReceiver.RUN_AGAIN)
builder.addAction(unlocked(notice.label("run_again", context.getString(R.string.schedule_run_again)), again))
}
if (notice.pause) {
val pause = scheduleAction(context, instance, notice.scheduleId, notice.id, ScheduleActionReceiver.PAUSE)
builder.addAction(0, notice.label("pause", context.getString(R.string.schedule_pause)), pause)
}
NotificationManagerCompat.from(context).notify(notice.id, builder.build())
}
/** A notification action Android runs only once the phone is unlocked. */
private fun unlocked(title: String, intent: PendingIntent): NotificationCompat.Action =
NotificationCompat.Action.Builder(0, title, intent).setAuthenticationRequired(true).build()
private fun opener(context: Context, instance: String, id: Int, chatId: String?, scheduleId: String? = null, runId: String? = null): PendingIntent =
PendingIntent.getActivity(
context,
@@ -176,15 +193,17 @@ object Notifications {
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
)
private fun pause(context: Context, instance: String, schedule: String, notification: Int): PendingIntent = PendingIntent.getBroadcast(
context,
("pause$schedule").hashCode(),
Intent(context, ScheduleActionReceiver::class.java)
.putExtra("instance", instance)
.putExtra("schedule", schedule)
.putExtra("notification", notification),
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
)
private fun scheduleAction(context: Context, instance: String, schedule: String, notification: Int, action: String): PendingIntent =
PendingIntent.getBroadcast(
context,
(action + schedule).hashCode(),
Intent(context, ScheduleActionReceiver::class.java)
.putExtra("instance", instance)
.putExtra("schedule", schedule)
.putExtra("action", action)
.putExtra("notification", notification),
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
)
private fun answer(context: Context, instance: String, chat: String, card: String, verdict: String, notification: Int): PendingIntent =
PendingIntent.getBroadcast(
@@ -223,16 +242,20 @@ class CardActionReceiver : BroadcastReceiver() {
}
}
/** A scheduled task's Pause, from its notification. */
/** A scheduled task's Pause or Run again, from its notification. */
class ScheduleActionReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val pending = goAsync()
val instance = intent.getStringExtra("instance") ?: return pending.finish()
val schedule = intent.getStringExtra("schedule") ?: return pending.finish()
val action = intent.getStringExtra("action") ?: PAUSE
background.launch {
try {
Push.instance(context, instance)?.let { found ->
runCatching { context.lembas.instances.clientFor(found).pauseSchedule(schedule, true) }
val client = context.lembas.instances.clientFor(found)
// A failure (gone, busy) is the server's to say on the run page; the
// notification goes either way, and a new run sends its own.
runCatching { if (action == RUN_AGAIN) client.runScheduleNow(schedule) else client.pauseSchedule(schedule, true) }
}
NotificationManagerCompat.from(context).cancel(intent.getIntExtra("notification", 0))
} finally {
@@ -240,4 +263,9 @@ class ScheduleActionReceiver : BroadcastReceiver() {
}
}
}
companion object {
const val PAUSE = "pause"
const val RUN_AGAIN = "run_again"
}
}
@@ -5,8 +5,11 @@ import eu.llembas.android.api.PushPayload
/**
* What a scheduled run's push asks the app to show, read from the server's payload alone
* (services/schedule/notify.py `payload`): the schedule and the run it is about, whether it
* failed, and the actions the server offers. A payload without ids falls back to its `url`
* (`/scheduled/{schedule}?run={run}`), as a browser would open it.
* failed, the actions the server offers, and -- from a server that sends its `notification` --
* the words: [title] and [body] (the result's first lines) for an unlocked phone, and the
* actions' [labels]. [publicTitle] / [publicBody] are read but not shown: they name the task,
* and the lock screen gets nothing from the account. A payload without ids falls back to its `url` (`/scheduled/{schedule}?run={run}`),
* as a browser would open it.
*/
data class ScheduledNotice(
val scheduleId: String,
@@ -16,10 +19,20 @@ data class ScheduledNotice(
val askPause: Boolean,
val open: Boolean,
val pause: Boolean,
val runAgain: Boolean = false,
/** Empty when the server sent no `notification`: the app's fixed sentences are used then. */
val title: String = "",
val body: String = "",
val publicTitle: String = "",
val publicBody: String = "",
val labels: Map<String, String> = emptyMap(),
) {
/** One notification per run: a later push about the same run replaces it. */
val id: Int get() = "scheduled:${runId ?: scheduleId}".hashCode()
/** The server's label for [action] in the owner's language, or [fallback]. */
fun label(action: String, fallback: String): String = labels[action]?.takeIf { it.isNotBlank() } ?: fallback
companion object {
const val KIND_RESULT = "schedule"
const val KIND_FAILED = "schedule_failed"
@@ -30,9 +43,13 @@ data class ScheduledNotice(
val schedule = payload.scheduleId?.takeIf { it.isNotBlank() } ?: urlSchedule ?: return null
val run = payload.runId?.takeIf { it.isNotBlank() } ?: urlRun
val failed = payload.kind == KIND_FAILED
val askPause = payload.ask == "pause"
// An older payload named no actions: Open always, Pause for a failure.
val actions = payload.actions.ifEmpty { if (failed) listOf("open", "pause") else listOf("open") }
val words = payload.notification
val ask = words?.ask?.takeIf { it.isNotBlank() } ?: payload.ask
val askPause = ask == "pause"
// The notification's own actions first; an older payload named none: Open always,
// Pause for a failure.
val actions = words?.actions?.takeIf { it.isNotEmpty() }
?: payload.actions.ifEmpty { if (failed) listOf("open", "pause") else listOf("open") }
return ScheduledNotice(
scheduleId = schedule,
runId = run,
@@ -40,6 +57,12 @@ data class ScheduledNotice(
askPause = askPause,
open = "open" in actions,
pause = "pause" in actions || askPause,
runAgain = "run_again" in actions,
title = words?.title.orEmpty(),
body = words?.body.orEmpty(),
publicTitle = words?.public?.title.orEmpty(),
publicBody = words?.public?.body.orEmpty(),
labels = words?.labels.orEmpty(),
)
}
@@ -68,6 +68,7 @@ import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
@@ -135,18 +136,27 @@ fun ChatScreen(
}
}
ChatContent(
state = state,
actions = model,
agent = isAgent,
snackbar = snackbar,
onMenu = onMenu,
onNewChat = onNewChat,
onLeave = onLeave,
onActivity = { activityOpen = true },
onShow = { showing = it },
onKind = onKind,
)
// Read aloud on a reply, when the instance has a voice; it stops when the chat is left.
val context = LocalContext.current
val scope = rememberCoroutineScope()
val readAloud = remember { ReadAloud(context, scope) { said -> scope.launch { snackbar.showSnackbar(said) } } }
LaunchedEffect(Unit) { readAloud.load() }
DisposableEffect(Unit) { onDispose { readAloud.stop() } }
CompositionLocalProvider(LocalReadAloud provides readAloud.takeIf { it.available }) {
ChatContent(
state = state,
actions = model,
agent = isAgent,
snackbar = snackbar,
onMenu = onMenu,
onNewChat = onNewChat,
onLeave = onLeave,
onActivity = { activityOpen = true },
onShow = { showing = it },
onKind = onKind,
)
}
if (activityOpen) {
// A device's files are on the device: the sheet lists them, the tree cannot open them.
@@ -75,6 +75,8 @@ data class ChatState(
val compacting: Boolean = false,
/** What a chat not made yet will be made with: chosen in the top bar and the tune sheet. */
val draft: Draft = Draft(),
/** The instance makes pictures for this person (`/me` `services.images`). */
val imagesOffered: Boolean = false,
/** The subagent tree (spec 3.4.0) from this chat's last `tree` frame; null until one came. */
val tree: SubagentTree? = null,
/** For a new agent chat: whether it may have subagents, and whether its device runs them. */
@@ -93,8 +95,13 @@ data class Draft(
val agentMode: String = "edit",
val device: String? = null,
val directory: String = "",
/** The next message asks for a picture (`force_tool: image_generate`); cleared once sent. */
val image: Boolean = false,
)
/** The one tool a message may force (the server's `FORCEABLE_TOOLS`): make a picture. */
const val IMAGE_TOOL = "image_generate"
/** The model in force: the chat's, else the one chosen for the new chat, else the default. */
val ChatState.modelId: String?
get() = chat?.model?.ifBlank { null } ?: draft.model ?: models.firstOrNull { it.default }?.id ?: models.firstOrNull()?.id
@@ -220,6 +227,7 @@ class ChatViewModel(app: Application) :
val list = runCatching { client.modelList(chatId) }.getOrNull()
val models = list?.models.orEmpty()
_state.update { it.copy(modelsCap = list?.subagentsCap) }
if (!agent) runCatching { client.me() }.onSuccess { me -> _state.update { it.copy(imagesOffered = me.hasImages) } }
if (chatId == null) {
val devices = if (agent) client.devices() else emptyList()
val base = if (agent) getApplication<Application>().lembas.instances.current()?.base.orEmpty() else ""
@@ -342,11 +350,13 @@ class ChatViewModel(app: Application) :
val attached = _state.value.pending
val files = attached.map { it.id }
if (text.isBlank() && files.isEmpty()) return
// A picture, asked for from + (not in an agent chat, which runs on a computer).
val picture = draft.image && now.imagesOffered && !agentChat
viewModelScope.launch {
try {
val client = api()
val chat = _state.value.chat
_state.update { it.copy(pending = emptyList()) }
_state.update { it.copy(pending = emptyList(), draft = it.draft.copy(image = false)) }
if (chat == null) {
val made = client.createChat(
text,
@@ -357,15 +367,16 @@ class ChatViewModel(app: Application) :
mode = mode,
agent = agent,
agents = agents,
forceTool = if (picture) IMAGE_TOOL else null,
)
_state.update { it.copy(chat = made.chat, messages = listOfNotNull(made.message, made.reply)) }
made.reply?.let { follow(it.id) }
} else {
took(client.sendMessage(chat.id, text, files))
took(client.sendMessage(chat.id, text, files, forceTool = if (picture) IMAGE_TOOL else null))
}
} catch (e: Exception) {
// Nothing was sent: the words and the attachments go back to the composer.
_state.update { it.copy(pending = attached + it.pending, unsent = text) }
_state.update { it.copy(pending = attached + it.pending, unsent = text, draft = it.draft.copy(image = picture || it.draft.image)) }
fail(e)
}
}
@@ -31,6 +31,7 @@ import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.ArrowUpward
import androidx.compose.material.icons.filled.Brush
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.Mic
@@ -47,6 +48,7 @@ import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.IconButtonDefaults
import androidx.compose.material3.InputChip
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
@@ -58,6 +60,7 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.material3.TextFieldDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -80,9 +83,13 @@ import androidx.core.content.ContextCompat
import eu.llembas.android.R
import eu.llembas.android.api.AgentsSetting
import eu.llembas.android.api.LinkedDevice
import eu.llembas.android.assist.PhoneRecognizer
import eu.llembas.android.assist.Recorder
import eu.llembas.android.assist.usePhoneRecognizer
import eu.llembas.android.auth.Prefs
import eu.llembas.android.lembas
import eu.llembas.android.ui.theme.LocalPalette
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
private val Field = RoundedCornerShape(28.dp)
@@ -152,18 +159,47 @@ fun Composer(state: ChatState, actions: ChatActions, agent: Boolean, onTune: ()
var listening by remember { mutableStateOf(false) }
var photo by remember { mutableStateOf<Uri?>(null) }
val recorder = remember { Recorder(scope) }
val phone = remember { PhoneRecognizer(context) }
// What was typed before the phone's recogniser began: its words go after it as they come.
var before by remember { mutableStateOf("") }
DisposableEffect(Unit) { onDispose { phone.stop() } }
val pickFiles = rememberLauncherForActivityResult(ActivityResultContracts.GetMultipleContents()) { actions.attach(it) }
val pickPhotos = rememberLauncherForActivityResult(ActivityResultContracts.PickMultipleVisualMedia()) { actions.attach(it) }
val takePhoto = rememberLauncherForActivityResult(ActivityResultContracts.TakePicture()) { taken ->
photo?.let { if (taken) actions.attach(listOf(it)) }
photo = null
}
val askMic = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { granted ->
if (granted) {
recorder.start()
listening = true
// Settings › Voice input decides, as it does for the assistant: the instance's speech-to-text
// (record, then written down when the person stops) or the phone's recogniser (words as they
// are said, the end found by the recogniser).
fun startListening() {
scope.launch {
val wanted = runCatching { context.lembas.instances.prefs.first().voiceInput }.getOrDefault(Prefs.VOICE_LEMBAS)
if (usePhoneRecognizer(wanted, PhoneRecognizer.available(context), instanceStt = null)) {
before = text
listening = true
phone.start(
onPartial = { words -> if (listening) text = (before + " " + words).trim() },
onLevel = {},
onResult = { words ->
listening = false
text = (before + " " + words).trim()
},
onFail = {
listening = false
text = before
},
)
} else {
recorder.start()
listening = true
}
}
}
val askMic = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { granted ->
if (granted) startListening()
}
// A message the server did not take comes back here, so nothing typed is lost.
LaunchedEffect(state.unsent) {
state.unsent?.let {
@@ -186,6 +222,17 @@ fun Composer(state: ChatState, actions: ChatActions, agent: Boolean, onTune: ()
) {
Column {
if (state.uploading) LinearProgressIndicator(Modifier.fillMaxWidth().padding(horizontal = 20.dp, vertical = 4.dp))
if (state.draft.image) {
// The next message asks for a picture: said where it is typed, and undone here.
InputChip(
selected = true,
onClick = { actions.updateDraft { it.copy(image = false) } },
label = { Text(stringResource(R.string.image_generate)) },
leadingIcon = { Icon(Icons.Filled.Brush, contentDescription = null, modifier = Modifier.size(18.dp)) },
trailingIcon = { Icon(Icons.Filled.Close, contentDescription = stringResource(R.string.remove), modifier = Modifier.size(18.dp)) },
modifier = Modifier.padding(start = 12.dp, top = 8.dp).heightIn(min = 40.dp),
)
}
if (state.pending.isNotEmpty()) {
Row(
Modifier.horizontalScroll(rememberScrollState()).padding(start = 12.dp, end = 12.dp, top = 12.dp),
@@ -276,6 +323,18 @@ fun Composer(state: ChatState, actions: ChatActions, agent: Boolean, onTune: ()
pickFiles.launch("*/*")
},
)
// A picture made by the instance: the next message (or the one that makes
// the chat) asks for it. Not in an agent chat, which runs on a computer.
if (state.imagesOffered && !agent) {
DropdownMenuItem(
leadingIcon = { Icon(Icons.Filled.Brush, contentDescription = null) },
text = { Text(stringResource(R.string.image_generate)) },
onClick = {
attachMenu = false
actions.updateDraft { it.copy(image = true) }
},
)
}
}
}
// The tune button: the icon, and what is set in a few words. It sits in the one
@@ -307,7 +366,10 @@ fun Composer(state: ChatState, actions: ChatActions, agent: Boolean, onTune: ()
}
}
IconButton(onClick = {
if (listening) {
if (listening && !recorder.recording) {
// The phone's recogniser: stop, and its last words come to onResult.
phone.finish()
} else if (listening) {
listening = false
scope.launch {
val wav = recorder.stop()
@@ -317,8 +379,7 @@ fun Composer(state: ChatState, actions: ChatActions, agent: Boolean, onTune: ()
}
}
} else if (ContextCompat.checkSelfPermission(context, Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED) {
recorder.start()
listening = true
startListening()
} else {
askMic.launch(Manifest.permission.RECORD_AUDIO)
}
@@ -0,0 +1,122 @@
package eu.llembas.android.ui.chat
import android.content.Context
import android.graphics.BitmapFactory
import android.util.LruCache
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Image
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import eu.llembas.android.R
import eu.llembas.android.api.GeneratedImage
import eu.llembas.android.lembas
import eu.llembas.android.ui.theme.LocalPalette
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
/**
* The pictures the instance made, fetched the one way the app fetches a chat's files: by
* attachment id, from the instance it is signed in to, with its token. There is no URL to
* follow -- a model's words can name an address, but never a picture this draws -- and nothing
* bigger than [MAX_BYTES] is decoded.
*/
private object Pictures {
/** Longest edge decoded: enough for a phone held either way, small enough to keep a few. */
private const val EDGE = 1600
private const val MAX_BYTES = 24 * 1024 * 1024
private val cache = LruCache<String, ImageBitmap>(8)
private val failed = mutableSetOf<String>()
fun cached(id: String): ImageBitmap? = cache.get(id)
suspend fun load(context: Context, id: String): ImageBitmap? {
cache.get(id)?.let { return it }
if (id.isBlank() || id in failed) return null
val api = context.lembas.instances.client() ?: return null
val bytes = runCatching { api.attachmentBytes(id) }.getOrNull()?.takeIf { it.size <= MAX_BYTES }
val image = bytes?.let { decode(it) }
if (image == null) failed += id else cache.put(id, image)
return image
}
private suspend fun decode(bytes: ByteArray): ImageBitmap? = withContext(Dispatchers.Default) {
val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }
BitmapFactory.decodeByteArray(bytes, 0, bytes.size, bounds)
if (bounds.outWidth <= 0 || bounds.outHeight <= 0) return@withContext null
var sample = 1
while (maxOf(bounds.outWidth, bounds.outHeight) / (sample * 2) >= EDGE) sample *= 2
BitmapFactory.decodeByteArray(bytes, 0, bytes.size, BitmapFactory.Options().apply { inSampleSize = sample })?.asImageBitmap()
}
}
/**
* A picture `image_generate` made, in the reply: as wide as the reply allows (at most 480 dp),
* its height from the size the server said, so the transcript does not jump when it arrives. A
* tap shows it on its own, whole, on the page's ground; a tap or Back closes it.
*/
@Composable
fun GeneratedPicture(image: GeneratedImage, modifier: Modifier = Modifier) {
val palette = LocalPalette.current
val context = LocalContext.current
val still = LocalInspectionMode.current
var bitmap by remember(image.id) { mutableStateOf(Pictures.cached(image.id)) }
var whole by remember { mutableStateOf(false) }
LaunchedEffect(image.id) { if (bitmap == null && !still) bitmap = Pictures.load(context, image.id) }
val ratio = if (image.width > 0 && image.height > 0) image.width.toFloat() / image.height else 1f
val shape = RoundedCornerShape(16.dp)
val described = stringResource(R.string.image_generated)
Box(
modifier
.widthIn(max = 480.dp)
.fillMaxWidth()
.aspectRatio(ratio.coerceIn(0.25f, 4f))
.clip(shape)
.background(palette.surfaceRaised)
.border(1.dp, palette.border, shape)
.then(if (bitmap != null) Modifier.clickable { whole = true } else Modifier),
contentAlignment = Alignment.Center,
) {
val shown = bitmap
if (shown != null) {
Image(shown, contentDescription = described, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize())
} else {
Icon(Icons.Filled.Image, contentDescription = described, tint = palette.inkFaint, modifier = Modifier.size(32.dp))
}
}
val shown = bitmap
if (whole && shown != null) {
Dialog(onDismissRequest = { whole = false }, properties = DialogProperties(usePlatformDefaultWidth = false)) {
Box(Modifier.fillMaxSize().background(palette.bg).clickable { whole = false }, contentAlignment = Alignment.Center) {
Image(shown, contentDescription = described, contentScale = ContentScale.Fit, modifier = Modifier.fillMaxSize())
}
}
}
}
@@ -0,0 +1,69 @@
package eu.llembas.android.ui.chat
import android.content.Context
import androidx.compose.runtime.Stable
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import eu.llembas.android.assist.AssistController
import eu.llembas.android.assist.Speaker
import eu.llembas.android.lembas
import eu.llembas.android.ui.explain
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
/**
* A reply read aloud by the instance's text-to-speech (`/v1/audio/speech`), the same voice the
* assistant answers in. One at a time: another reply's Read aloud stops the first. [available]
* only when the instance says it has text-to-speech (`/api/v2/me` services), so a phone never
* shows a button that can only fail.
*/
@Stable
class ReadAloud(private val context: Context, private val scope: CoroutineScope, private val onError: (String) -> Unit) {
private val speaker = Speaker(context)
private var job: Job? = null
var available by mutableStateOf(false)
private set
/** The message being read (or fetched to be read), else null. */
var reading by mutableStateOf<String?>(null)
private set
suspend fun load() {
available = runCatching { context.lembas.instances.client()?.me()?.hasTextToSpeech == true }.getOrDefault(false)
}
fun toggle(messageId: String, markdown: String) {
if (reading == messageId) return stop()
stop()
reading = messageId
job = scope.launch {
try {
val api = context.lembas.instances.client() ?: return@launch
speaker.play(api.speech(AssistController.plain(markdown)))
speaker.playing.first { !it }
} catch (e: CancellationException) {
throw e
} catch (e: Exception) {
onError(context.explain(e))
} finally {
if (reading == messageId) reading = null
}
}
}
fun stop() {
job?.cancel()
job = null
speaker.stop()
reading = null
}
}
/** Provided by the chat; null where nothing can read aloud (the screenshots, a run's page). */
val LocalReadAloud = compositionLocalOf<ReadAloud?> { null }
@@ -34,6 +34,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.VolumeUp
import androidx.compose.material.icons.filled.ContentCopy
import androidx.compose.material.icons.filled.Description
import androidx.compose.material.icons.filled.Edit
@@ -43,6 +44,7 @@ import androidx.compose.material.icons.filled.Image
import androidx.compose.material.icons.filled.Psychology
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.SelectAll
import androidx.compose.material.icons.filled.Stop
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.DropdownMenu
@@ -86,6 +88,7 @@ import eu.llembas.android.api.ToolCall
import eu.llembas.android.lembas
import eu.llembas.android.ui.MarkdownText
import eu.llembas.android.ui.Segment
import eu.llembas.android.ui.progressLineOf
import eu.llembas.android.ui.splitFences
import eu.llembas.android.ui.theme.LocalPalette
import kotlinx.coroutines.Dispatchers
@@ -152,8 +155,9 @@ fun UserMessage(message: Message, canEdit: Boolean, onEdit: () -> Unit, modifier
}
}
if (message.queued) {
// The server's queued progress ("Queued, 2 ahead · 12s") where it sends one.
Text(
stringResource(R.string.queued),
progressLineOf(message.progress) ?: stringResource(R.string.queued),
style = MaterialTheme.typography.labelSmall,
color = palette.inkFaint,
modifier = Modifier.padding(top = 4.dp, end = 4.dp),
@@ -180,6 +184,7 @@ fun AssistantMessage(
) {
val palette = LocalPalette.current
val copy = LocalCopy.current
val readAloud = LocalReadAloud.current
var menu by remember { mutableStateOf(false) }
var selecting by remember { mutableStateOf(false) }
val words = replyText(message.copy(steps = steps))
@@ -233,6 +238,17 @@ fun AssistantMessage(
)
}
}
if (readAloud != null && words.isNotBlank()) {
val reading = readAloud.reading == message.id
IconButton(onClick = { readAloud.toggle(message.id, words) }) {
Icon(
if (reading) Icons.Filled.Stop else Icons.AutoMirrored.Filled.VolumeUp,
contentDescription = stringResource(if (reading) R.string.assist_stop_reading else R.string.assist_read_aloud),
tint = if (reading) palette.accent else palette.inkFaint,
modifier = Modifier.size(20.dp),
)
}
}
if (canRegenerate) {
IconButton(onClick = onRegenerate) {
Icon(
@@ -450,8 +466,8 @@ private fun ThinkingChip(step: Step) {
/**
* One round of tools as one chip: a single call by its title ("bake --slow"), several by their
* count. Open, each call is its block (command, change, output). A `show` card is drawn apart,
* always in view.
* count. Open, each call is its block (command, change, output). A `show` card and a picture
* the instance made are drawn apart, always in view.
*/
@Composable
private fun ToolsChip(step: Step, onShow: ((ShowCard) -> Unit)?) {
@@ -486,6 +502,9 @@ private fun ToolsChip(step: Step, onShow: ((ShowCard) -> Unit)?) {
}
}
shows.forEach { call -> ToolCallBlock(call, onShow = onShow) }
// A picture the instance made stays in view, like a `show` card: it is the answer.
step.calls.mapNotNull { call -> call.image?.takeIf { it.id.isNotBlank() && call.status != "error" && call.error.isNullOrEmpty() } }
.forEach { GeneratedPicture(it) }
}
@Composable
@@ -0,0 +1,188 @@
@file:OptIn(androidx.compose.material3.ExperimentalMaterial3Api::class)
package eu.llembas.android.ui.home
import android.app.Application
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Terminal
import androidx.compose.material.icons.filled.Unarchive
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
import androidx.compose.material3.ListItemDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewModelScope
import androidx.lifecycle.viewmodel.compose.viewModel
import eu.llembas.android.R
import eu.llembas.android.api.Chat
import eu.llembas.android.lembas
import eu.llembas.android.ui.explain
import eu.llembas.android.ui.theme.LocalPalette
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import kotlinx.serialization.json.buildJsonObject
import kotlinx.serialization.json.put
/** The archived chats (`GET /api/v2/chats?archived=true`), newest first, a page at a time. */
class ArchivedViewModel(app: Application) : AndroidViewModel(app) {
private val _state = MutableStateFlow(ChatsState(loading = true))
val state = _state.asStateFlow()
fun load() {
viewModelScope.launch {
_state.update { it.copy(loading = true, error = null) }
try {
val api = getApplication<Application>().lembas.instances.client() ?: return@launch
val page = api.chats(archived = true)
_state.value = ChatsState(chats = page.chats, more = page.more)
} catch (e: Exception) {
_state.update { it.copy(loading = false, error = getApplication<Application>().explain(e)) }
}
}
}
fun more() {
val last = _state.value.chats.lastOrNull() ?: return
viewModelScope.launch {
try {
val api = getApplication<Application>().lembas.instances.client() ?: return@launch
val page = api.chats(archived = true, before = last.id)
_state.update { it.copy(chats = it.chats + page.chats, more = page.more) }
} catch (e: Exception) {
_state.update { it.copy(error = getApplication<Application>().explain(e)) }
}
}
}
/** Back among the chats: the web UI's Restore chat. [then] refreshes the drawer's list. */
fun restore(chat: Chat, then: () -> Unit) {
_state.update { s -> s.copy(chats = s.chats.filterNot { it.id == chat.id }) }
viewModelScope.launch {
runCatching {
getApplication<Application>().lembas.instances.client()
?.updateChat(chat.id, buildJsonObject { put("archived", false) })
}.onSuccess { then() }
.onFailure { e ->
_state.update { it.copy(error = getApplication<Application>().explain(e)) }
load()
}
}
}
}
interface ArchivedActions {
fun open(chat: Chat) {}
fun restore(chat: Chat) {}
fun more() {}
fun reload() {}
}
@Composable
fun ArchivedScreen(onBack: () -> Unit, onOpen: (String) -> Unit, onRestored: () -> Unit, model: ArchivedViewModel = viewModel()) {
val state by model.state.collectAsStateWithLifecycle()
LaunchedEffect(Unit) { model.load() }
ArchivedContent(
state,
object : ArchivedActions {
override fun open(chat: Chat) = onOpen(chat.id)
override fun restore(chat: Chat) = model.restore(chat, onRestored)
override fun more() = model.more()
override fun reload() = model.load()
},
onBack,
)
}
/**
* The archived chats: each opens as it is, and Restore puts it back among the chats. A row is
* the title (which gives) and the restore button (which keeps its 48 dp).
*/
@Composable
fun ArchivedContent(state: ChatsState, actions: ArchivedActions, onBack: () -> Unit = {}) {
val palette = LocalPalette.current
Scaffold(
containerColor = palette.bg,
topBar = {
TopAppBar(
colors = TopAppBarDefaults.topAppBarColors(containerColor = palette.bg, scrolledContainerColor = palette.bg),
title = { Text(stringResource(R.string.archived)) },
navigationIcon = {
IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(R.string.back)) }
},
)
},
) { padding ->
PullToRefreshBox(isRefreshing = state.loading && state.chats.isNotEmpty(), onRefresh = actions::reload, modifier = Modifier.padding(padding)) {
LazyColumn(Modifier.fillMaxSize()) {
state.error?.let { error ->
item {
ListItem(
headlineContent = { Text(error, color = palette.danger, style = MaterialTheme.typography.bodyMedium) },
trailingContent = { TextButton(onClick = actions::reload) { Text(stringResource(R.string.retry)) } },
colors = ListItemDefaults.colors(containerColor = palette.bg),
)
}
}
if (state.chats.isEmpty() && !state.loading && state.error == null) {
item {
Box(Modifier.fillMaxWidth().padding(24.dp)) {
Text(stringResource(R.string.archived_none), color = palette.inkMuted, style = MaterialTheme.typography.bodyMedium)
}
}
}
items(state.chats, key = { it.id }) { chat ->
ListItem(
headlineContent = {
Text(chat.title.ifBlank { stringResource(R.string.new_chat) }, maxLines = 2, overflow = TextOverflow.Ellipsis)
},
leadingContent = if (chat.kind == "agent") {
{ Icon(Icons.Filled.Terminal, contentDescription = null, tint = palette.inkMuted) }
} else {
null
},
trailingContent = {
IconButton(onClick = { actions.restore(chat) }) {
Icon(Icons.Filled.Unarchive, contentDescription = stringResource(R.string.archived_restore), tint = palette.accent)
}
},
colors = ListItemDefaults.colors(containerColor = palette.bg),
modifier = Modifier.clickable { actions.open(chat) },
)
HorizontalDivider(color = palette.border, modifier = Modifier.padding(start = 16.dp))
}
if (state.more) {
item { LaunchedEffect(state.chats.size) { actions.more() } }
}
}
}
}
}
@@ -1,16 +1,33 @@
package eu.llembas.android.ui.home
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import eu.llembas.android.api.Chat
import eu.llembas.android.api.Folder
import java.time.LocalDate
import java.time.OffsetDateTime
import java.time.ZoneId
/** A folder in the drawer, [depth] levels in, with the chats filed in it that are shown. */
data class FolderGroup(val folder: Folder, val depth: Int, val chats: List<Chat>)
/**
* The drawer's list in its sections: the chats of today, the earlier ones, and the agent chats
* (which run on a linked computer) on their own. Each keeps the server's order, newest first.
* The drawer's list in its sections, as the web's sidebar has them: the pinned chats (wherever
* they are filed), the folders as a tree with their chats, then the unfiled chats of today, the
* earlier ones, and the agent chats (which run on a linked computer) on their own. Each keeps
* the server's order, newest first.
*/
data class ChatGroups(val today: List<Chat> = emptyList(), val earlier: List<Chat> = emptyList(), val agents: List<Chat> = emptyList()) {
val isEmpty: Boolean get() = today.isEmpty() && earlier.isEmpty() && agents.isEmpty()
data class ChatGroups(
val today: List<Chat> = emptyList(),
val earlier: List<Chat> = emptyList(),
val agents: List<Chat> = emptyList(),
val pinned: List<Chat> = emptyList(),
val folders: List<FolderGroup> = emptyList(),
) {
/** Nothing to show: no chat in any section (a collapsed folder may hold some, so it counts). */
val isEmpty: Boolean get() =
today.isEmpty() && earlier.isEmpty() && agents.isEmpty() && pinned.isEmpty() && folders.all { it.chats.isEmpty() && !it.folder.collapsed }
}
/** The day a chat was last written in, where the phone is; null when the server did not say. */
@@ -19,13 +36,69 @@ fun Chat.day(zone: ZoneId): LocalDate? = (updatedAt ?: createdAt)?.let { stamp -
}
/**
* Split [chats] for the drawer, keeping those whose title holds [query] (any case; blank keeps
* all). A chat without a date counts as earlier.
* The folders as the tree they are, each after its parent and siblings in the server's
* `position` order, with its depth. A folder whose parent is not in the list counts as a top
* one, so nothing is lost.
*/
fun groupChats(chats: List<Chat>, query: String, today: LocalDate, zone: ZoneId): ChatGroups {
fun folderTree(folders: List<Folder>): List<Pair<Folder, Int>> {
val ids = folders.map { it.id }.toSet()
val children = folders.groupBy { it.parentId?.takeIf { p -> p in ids } }
val out = mutableListOf<Pair<Folder, Int>>()
val seen = mutableSetOf<String>()
fun walk(parent: String?, depth: Int) {
children[parent].orEmpty().sortedBy { it.position }.forEach { f ->
if (seen.add(f.id)) {
out += f to depth
walk(f.id, depth + 1)
}
}
}
walk(null, 0)
return out
}
/**
* Split [chats] for the drawer, keeping those whose title holds [query] (any case; blank keeps
* all). A chat without a date counts as earlier; one filed in a folder the list does not have
* counts as unfiled. A collapsed folder hides its chats and the folders inside it; while
* searching, folders without a match are left out and none is collapsed.
*/
fun groupChats(chats: List<Chat>, query: String, today: LocalDate, zone: ZoneId, folders: List<Folder> = emptyList()): ChatGroups {
val wanted = query.trim()
val shown = if (wanted.isEmpty()) chats else chats.filter { it.title.contains(wanted, ignoreCase = true) }
val (agents, plain) = shown.partition { it.isAgent }
val searching = wanted.isNotEmpty()
val shown = if (!searching) chats else chats.filter { it.title.contains(wanted, ignoreCase = true) }
val (pinned, rest) = shown.partition { it.pinned }
val ids = folders.map { it.id }.toSet()
val (filed, unfiled) = rest.partition { it.folderId != null && it.folderId in ids }
val byFolder = filed.groupBy { it.folderId }
val groups = mutableListOf<FolderGroup>()
var hiddenBelow: Int? = null
for ((folder, depth) in folderTree(folders)) {
if (hiddenBelow != null && depth > hiddenBelow) continue
hiddenBelow = null
val own = byFolder[folder.id].orEmpty()
if (searching) {
if (own.isNotEmpty()) groups += FolderGroup(folder, depth, own)
continue
}
groups += FolderGroup(folder, depth, if (folder.collapsed) emptyList() else own)
if (folder.collapsed) hiddenBelow = depth
}
val (agents, plain) = unfiled.partition { it.isAgent }
val (now, before) = plain.partition { it.day(zone) == today }
return ChatGroups(today = now, earlier = before, agents = agents)
return ChatGroups(today = now, earlier = before, agents = agents, pinned = pinned, folders = groups)
}
/**
* A search hit's snippet with its [marks] drawn in [style]. The ranges are the server's; one that
* runs past the text (it counts characters, not UTF-16 units) is cut to fit, and a broken one is
* left out, so a bad range never throws.
*/
fun markedSnippet(snippet: String, marks: List<List<Int>>, style: SpanStyle): AnnotatedString = buildAnnotatedString {
append(snippet)
marks.forEach { range ->
val start = range.getOrNull(0)?.coerceIn(0, snippet.length) ?: return@forEach
val end = range.getOrNull(1)?.coerceIn(start, snippet.length) ?: return@forEach
if (end > start) addStyle(style, start, end)
}
}
@@ -3,6 +3,7 @@ package eu.llembas.android.ui.home
import android.app.Application
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@@ -20,14 +21,24 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.DriveFileMove
import androidx.compose.material.icons.filled.Archive
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.CreateNewFolder
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.DriveFileRenameOutline
import androidx.compose.material.icons.filled.EditNote
import androidx.compose.material.icons.filled.ExpandLess
import androidx.compose.material.icons.filled.ExpandMore
import androidx.compose.material.icons.filled.Folder
import androidx.compose.material.icons.filled.Inventory2
import androidx.compose.material.icons.filled.Psychology
import androidx.compose.material.icons.filled.PushPin
import androidx.compose.material.icons.filled.Schedule
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.filled.Terminal
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.HorizontalDivider
@@ -35,6 +46,7 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalDrawerSheet
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
@@ -53,6 +65,8 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.lifecycle.AndroidViewModel
@@ -60,21 +74,36 @@ import androidx.lifecycle.viewModelScope
import eu.llembas.android.R
import eu.llembas.android.api.Chat
import eu.llembas.android.api.Doorstep
import eu.llembas.android.api.Folder
import eu.llembas.android.api.SearchHit
import eu.llembas.android.api.fit
import eu.llembas.android.lembas
import eu.llembas.android.ui.explain
import eu.llembas.android.ui.signin.refusal
import eu.llembas.android.ui.theme.LocalPalette
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.buildJsonObject
import kotlinx.serialization.json.put
import java.time.LocalDate
import java.time.ZoneId
data class ChatsState(val chats: List<Chat> = emptyList(), val more: Boolean = false, val loading: Boolean = false, val error: String? = null)
data class ChatsState(
val chats: List<Chat> = emptyList(),
val more: Boolean = false,
val loading: Boolean = false,
val error: String? = null,
/** The person's chat folders (`GET /folders`); empty where they have none. */
val folders: List<Folder> = emptyList(),
/** Chats whose messages hold the search words (`GET /search?in=chats`), and the words asked. */
val found: List<SearchHit> = emptyList(),
val foundFor: String = "",
)
/** The drawer's list: every chat of the instance in use, both kinds, newest first. */
class ChatsViewModel(app: Application) : AndroidViewModel(app) {
@@ -104,7 +133,9 @@ class ChatsViewModel(app: Application) : AndroidViewModel(app) {
return@launch
}
val page = api.chats()
_state.value = ChatsState(chats = page.chats, more = page.more)
// Folders are a side dish: the chats show without them if they cannot be read.
val folders = runCatching { api.folders() }.getOrDefault(_state.value.folders)
_state.value = ChatsState(chats = page.chats, more = page.more, folders = folders)
} catch (e: Exception) {
_state.update { it.copy(loading = false, error = getApplication<Application>().explain(e)) }
}
@@ -137,25 +168,113 @@ class ChatsViewModel(app: Application) : AndroidViewModel(app) {
}
}
}
private var searching: Job? = null
/**
* Search the chats' messages on the instance for [query], once typing pauses: the title
* filter is the phone's own, this finds the words inside. Under two characters, nothing.
*/
fun search(query: String) {
searching?.cancel()
val q = query.trim()
if (q.length < 2) {
_state.update { it.copy(found = emptyList(), foundFor = "") }
return
}
searching = viewModelScope.launch {
delay(SEARCH_PAUSE_MS)
// A failure leaves the title filter alone; the search is the extra.
runCatching { getApplication<Application>().lembas.instances.client()?.search(q, within = "chats") }
.getOrNull()
?.let { found -> _state.update { it.copy(found = found.hits("chats"), foundFor = q) } }
}
}
/** Pinned chats stay at the top of the list, wherever they are filed (the web's Pin). */
fun pin(chat: Chat, pinned: Boolean) = changeChat(chat.copy(pinned = pinned), buildJsonObject { put("pinned", pinned) })
/** File [chat] in [folderId], or take it out of its folder with null. */
fun move(chat: Chat, folderId: String?) = changeChat(chat.copy(folderId = folderId), buildJsonObject { put("folder_id", folderId) })
private fun changeChat(changed: Chat, body: JsonObject) {
_state.update { s -> s.copy(chats = s.chats.map { if (it.id == changed.id) changed else it }) }
viewModelScope.launch {
runCatching { getApplication<Application>().lembas.instances.client()?.updateChat(changed.id, body) }
.onFailure { e -> failed(e) }
}
}
/** A new folder at the top, and [then] the chat to file in it, if any. */
fun newFolder(name: String, then: Chat? = null) {
viewModelScope.launch {
runCatching {
val api = getApplication<Application>().lembas.instances.client() ?: return@launch
val folder = api.createFolder(name)
_state.update { it.copy(folders = it.folders + folder) }
if (then != null) move(then, folder.id)
}.onFailure { e -> failed(e) }
}
}
fun renameFolder(folder: Folder, name: String) = changeFolder(folder.copy(name = name), buildJsonObject { put("name", name) })
/** Open or fold a folder; the server keeps it, so the web's sidebar folds the same. */
fun toggleFolder(folder: Folder) = changeFolder(folder.copy(collapsed = !folder.collapsed), buildJsonObject { put("collapsed", !folder.collapsed) })
private fun changeFolder(changed: Folder, body: JsonObject) {
_state.update { s -> s.copy(folders = s.folders.map { if (it.id == changed.id) changed else it }) }
viewModelScope.launch {
runCatching { getApplication<Application>().lembas.instances.client()?.updateFolder(changed.id, body) }
.onFailure { e -> failed(e) }
}
}
/** The folder and those inside it go; their chats stay, in no folder (the server's rule). */
fun deleteFolder(folder: Folder) {
viewModelScope.launch {
runCatching { getApplication<Application>().lembas.instances.client()?.deleteFolder(folder.id) }
.onSuccess { load() }
.onFailure { e -> failed(e) }
}
}
/** A refusal is the server's sentence; the list is read again so it shows what is true. */
private fun failed(e: Throwable) {
_state.update { it.copy(error = getApplication<Application>().explain(e)) }
load()
}
}
private const val SEARCH_PAUSE_MS = 400L
/** Where the drawer can go, besides a chat. */
interface DrawerActions {
fun newChat() {}
fun newAgentChat() {}
fun open(chatId: String) {}
fun archive(chat: Chat) {}
fun pin(chat: Chat, pinned: Boolean) {}
fun move(chat: Chat, folderId: String?) {}
fun newFolder(name: String, then: Chat?) {}
fun renameFolder(folder: Folder, name: String) {}
fun toggleFolder(folder: Folder) {}
fun deleteFolder(folder: Folder) {}
fun files() {}
fun scheduled() {}
fun archived() {}
fun memory() {}
fun settings() {}
fun more() {}
fun retry() {}
fun search(query: String) {}
}
/**
* The navigation drawer: New chat at the top, search, Files and Scheduled, then the chats --
* today's, the earlier ones, and the agent chats -- and Settings with the account at the foot.
* A long press on a chat offers Archive.
* The navigation drawer: New chat (and New folder) at the top, search, Files, Scheduled,
* Archived and Memory, then the chats -- the pinned ones, the folders as a tree with theirs, then today's,
* the earlier ones and the agent chats -- and Settings with the account at the foot. A long press
* on a chat offers Pin, Move to folder and Archive; on a folder, Rename and Delete.
*/
@Composable
fun DrawerContent(
@@ -166,14 +285,26 @@ fun DrawerContent(
modifier: Modifier = Modifier,
today: LocalDate = LocalDate.now(),
zone: ZoneId = ZoneId.systemDefault(),
initialQuery: String = "",
) {
val palette = LocalPalette.current
var query by rememberSaveable { mutableStateOf("") }
val groups = remember(state.chats, query, today) { groupChats(state.chats, query, today, zone) }
var query by rememberSaveable { mutableStateOf(initialQuery) }
LaunchedEffect(query) { actions.search(query) }
val groups = remember(state.chats, state.folders, query, today) { groupChats(state.chats, query, today, zone, state.folders) }
// The one dialog open at a time: a chat to file, a folder to name (new or renamed), one to delete.
var moving by remember { mutableStateOf<Chat?>(null) }
var naming by remember { mutableStateOf<FolderNaming?>(null) }
var deleting by remember { mutableStateOf<Folder?>(null) }
val chatActions = remember(actions) {
ChatRowActions(open = actions::open, archive = actions::archive, pin = actions::pin, move = { moving = it })
}
ModalDrawerSheet(modifier = modifier, drawerContainerColor = palette.surface, drawerShape = RoundedCornerShape(topEnd = 24.dp, bottomEnd = 24.dp)) {
Column(Modifier.fillMaxHeight()) {
Row(Modifier.fillMaxWidth().padding(start = 24.dp, end = 8.dp, top = 12.dp), verticalAlignment = Alignment.CenterVertically) {
Text(stringResource(R.string.app_name), style = MaterialTheme.typography.titleLarge, modifier = Modifier.weight(1f))
IconButton(onClick = { naming = FolderNaming() }) {
Icon(Icons.Filled.CreateNewFolder, contentDescription = stringResource(R.string.folder_new))
}
IconButton(onClick = actions::newChat) { Icon(Icons.Filled.EditNote, contentDescription = stringResource(R.string.new_chat)) }
}
TextField(
@@ -201,6 +332,8 @@ fun DrawerContent(
item { DrawerItem(Icons.Filled.Terminal, stringResource(R.string.new_agent_chat), onClick = actions::newAgentChat) }
item { DrawerItem(Icons.Filled.Folder, stringResource(R.string.files), onClick = actions::files) }
item { DrawerItem(Icons.Filled.Schedule, stringResource(R.string.scheduled), onClick = actions::scheduled) }
item { DrawerItem(Icons.Filled.Inventory2, stringResource(R.string.archived), onClick = actions::archived) }
item { DrawerItem(Icons.Filled.Psychology, stringResource(R.string.memory), onClick = actions::memory) }
item { HorizontalDivider(color = palette.border, modifier = Modifier.padding(horizontal = 28.dp, vertical = 8.dp)) }
state.error?.let { error ->
item {
@@ -210,10 +343,38 @@ fun DrawerContent(
}
}
}
section(R.string.chats_today, groups.today, current, actions)
section(R.string.chats_earlier, groups.earlier, current, actions)
section(R.string.chats_agents, groups.agents, current, actions)
if (groups.isEmpty && !state.loading && state.error == null) {
section(R.string.chats_pinned, groups.pinned, current, chatActions, key = "pinned")
groups.folders.forEach { group ->
item(key = "f${group.folder.id}") {
FolderItem(
group.folder,
group.depth,
onToggle = { actions.toggleFolder(group.folder) },
onRename = { naming = FolderNaming(group.folder) },
onDelete = { deleting = group.folder },
)
}
items(group.chats, key = { "f${group.folder.id}/${it.id}" }) { chat ->
ChatItem(chat, chat.id == current, chatActions, indent = 16 * (group.depth + 1))
}
}
section(R.string.chats_today, groups.today, current, chatActions)
section(R.string.chats_earlier, groups.earlier, current, chatActions)
section(R.string.chats_agents, groups.agents, current, chatActions)
// What the instance found inside the messages, for the words in the box now.
val inMessages = if (query.isNotBlank() && state.foundFor == query.trim()) state.found.filter { it.id != null } else emptyList()
if (inMessages.isNotEmpty()) {
item(key = "hfound") {
Text(
stringResource(R.string.chats_found_in_messages),
style = MaterialTheme.typography.labelLarge,
color = palette.inkFaint,
modifier = Modifier.padding(start = 28.dp, end = 28.dp, top = 12.dp, bottom = 4.dp),
)
}
items(inMessages, key = { "s${it.id}" }) { hit -> FoundItem(hit, onOpen = { actions.open(hit.id!!) }) }
}
if (groups.isEmpty && inMessages.isEmpty() && !state.loading && state.error == null) {
item {
Text(
stringResource(if (query.isBlank()) R.string.empty_chats else R.string.chats_none_found),
@@ -232,9 +393,86 @@ fun DrawerContent(
Spacer(Modifier.size(8.dp))
}
}
moving?.let { chat ->
MoveDialog(
chat,
state.folders,
onPick = { folder ->
moving = null
actions.move(chat, folder)
},
onNewFolder = {
moving = null
naming = FolderNaming(then = chat)
},
onDismiss = { moving = null },
)
}
naming?.let { asked ->
FolderNameDialog(
asked.folder?.name.orEmpty(),
title = if (asked.folder != null) R.string.folder_rename else R.string.folder_new,
onSave = { name ->
naming = null
if (asked.folder != null) actions.renameFolder(asked.folder, name) else actions.newFolder(name, asked.then)
},
onDismiss = { naming = null },
)
}
deleting?.let { folder ->
AlertDialog(
onDismissRequest = { deleting = null },
text = { Text(stringResource(R.string.folder_delete_confirm, folder.name)) },
confirmButton = {
TextButton(onClick = {
deleting = null
actions.deleteFolder(folder)
}) { Text(stringResource(R.string.folder_delete), color = LocalPalette.current.danger) }
},
dismissButton = { TextButton(onClick = { deleting = null }) { Text(stringResource(R.string.cancel)) } },
)
}
}
private fun LazyListScope.section(title: Int, chats: List<Chat>, current: String?, actions: DrawerActions) {
/**
* A chat found by its words: its title, and the snippet with the matched words marked (plain
* text -- a snippet can be model output).
*/
@Composable
private fun FoundItem(hit: SearchHit, onOpen: () -> Unit) {
val palette = LocalPalette.current
val marked = remember(hit.snippet, hit.marks, palette) {
markedSnippet(hit.snippet, hit.marks, SpanStyle(color = palette.ink, fontWeight = FontWeight.SemiBold, background = palette.accentSoft))
}
Column(
Modifier
.fillMaxWidth()
.padding(horizontal = 12.dp)
.clip(RoundedCornerShape(20.dp))
.clickable(onClick = onOpen)
.heightIn(min = 48.dp)
.padding(horizontal = 16.dp, vertical = 8.dp),
) {
Text(
hit.title.ifBlank { stringResource(R.string.new_chat) },
style = MaterialTheme.typography.bodyLarge,
color = palette.ink,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
if (hit.snippet.isNotBlank()) {
Text(marked, style = MaterialTheme.typography.bodySmall, color = palette.inkMuted, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
}
}
/** A folder to name: [folder] to rename, or a new one (into which [then] is filed, if given). */
private data class FolderNaming(val folder: Folder? = null, val then: Chat? = null)
/** What a chat's row can do: open it, and from its long-press menu Pin, Move to folder, Archive. */
private class ChatRowActions(val open: (String) -> Unit, val archive: (Chat) -> Unit, val pin: (Chat, Boolean) -> Unit, val move: (Chat) -> Unit)
private fun LazyListScope.section(title: Int, chats: List<Chat>, current: String?, actions: ChatRowActions, key: String = "c") {
if (chats.isEmpty()) return
item(key = "h$title") {
Text(
@@ -244,7 +482,134 @@ private fun LazyListScope.section(title: Int, chats: List<Chat>, current: String
modifier = Modifier.padding(start = 28.dp, end = 28.dp, top = 12.dp, bottom = 4.dp),
)
}
items(chats, key = { it.id }) { chat -> ChatItem(chat, chat.id == current, actions) }
items(chats, key = { "$key${it.id}" }) { chat -> ChatItem(chat, chat.id == current, actions) }
}
/**
* A folder's row: its name (which gives), indented by its depth, and a chevron that says whether
* it is open. A tap folds or opens it; a long press offers Rename folder and Delete folder.
*/
@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun FolderItem(folder: Folder, depth: Int, onToggle: () -> Unit, onRename: () -> Unit, onDelete: () -> Unit) {
val palette = LocalPalette.current
var menu by remember { mutableStateOf(false) }
Box(Modifier.fillMaxWidth().padding(start = 12.dp + (16 * depth).dp, end = 12.dp)) {
Row(
Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(28.dp))
.combinedClickable(onClick = onToggle, onLongClick = { menu = true })
.heightIn(min = 48.dp)
.padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(Icons.Filled.Folder, contentDescription = null, tint = palette.inkFaint, modifier = Modifier.size(20.dp))
Spacer(Modifier.width(12.dp))
Text(
folder.name,
style = MaterialTheme.typography.bodyLarge,
color = palette.inkMuted,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f),
)
Icon(
if (folder.collapsed) Icons.Filled.ExpandMore else Icons.Filled.ExpandLess,
contentDescription = null,
tint = palette.inkFaint,
modifier = Modifier.size(20.dp),
)
}
DropdownMenu(expanded = menu, onDismissRequest = { menu = false }) {
DropdownMenuItem(
leadingIcon = { Icon(Icons.Filled.DriveFileRenameOutline, contentDescription = null) },
text = { Text(stringResource(R.string.folder_rename)) },
onClick = {
menu = false
onRename()
},
)
DropdownMenuItem(
leadingIcon = { Icon(Icons.Filled.Delete, contentDescription = null) },
text = { Text(stringResource(R.string.folder_delete)) },
onClick = {
menu = false
onDelete()
},
)
}
}
}
/** Move to folder: No folder, every folder as its tree, and New folder at the foot. */
@Composable
private fun MoveDialog(chat: Chat, folders: List<Folder>, onPick: (String?) -> Unit, onNewFolder: () -> Unit, onDismiss: () -> Unit) {
val palette = LocalPalette.current
val tree = remember(folders) { folderTree(folders) }
AlertDialog(
onDismissRequest = onDismiss,
title = { Text(stringResource(R.string.folder_move)) },
text = {
LazyColumn {
item { PickRow(stringResource(R.string.folder_none), depth = 0, chosen = chat.folderId == null) { onPick(null) } }
items(tree, key = { it.first.id }) { (folder, depth) ->
PickRow(folder.name, depth, chosen = chat.folderId == folder.id) { onPick(folder.id) }
}
item {
TextButton(onClick = onNewFolder, modifier = Modifier.heightIn(min = 48.dp)) {
Icon(Icons.Filled.CreateNewFolder, contentDescription = null, tint = palette.accent)
Spacer(Modifier.width(8.dp))
Text(stringResource(R.string.folder_new))
}
}
}
},
confirmButton = {},
dismissButton = { TextButton(onClick = onDismiss) { Text(stringResource(R.string.cancel)) } },
)
}
@Composable
private fun PickRow(label: String, depth: Int, chosen: Boolean, onClick: () -> Unit) {
val palette = LocalPalette.current
Row(
Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.background(if (chosen) palette.accentSoft else Color.Transparent)
.clickable(onClick = onClick)
.heightIn(min = 48.dp)
.padding(start = 8.dp + (16 * depth).dp, end = 8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(Icons.Filled.Folder, contentDescription = null, tint = palette.inkFaint, modifier = Modifier.size(20.dp))
Spacer(Modifier.width(12.dp))
Text(label, style = MaterialTheme.typography.bodyLarge, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
/** New folder / Rename folder: one line, saved only with a name. */
@Composable
private fun FolderNameDialog(initial: String, title: Int, onSave: (String) -> Unit, onDismiss: () -> Unit) {
var name by remember { mutableStateOf(initial) }
AlertDialog(
onDismissRequest = onDismiss,
title = { Text(stringResource(title)) },
text = {
OutlinedTextField(
value = name,
onValueChange = { name = it },
singleLine = true,
label = { Text(stringResource(R.string.folder_name)) },
modifier = Modifier.fillMaxWidth(),
)
},
confirmButton = {
TextButton(onClick = { onSave(name.trim()) }, enabled = name.isNotBlank()) { Text(stringResource(R.string.save)) }
},
dismissButton = { TextButton(onClick = onDismiss) { Text(stringResource(R.string.cancel)) } },
)
}
@Composable
@@ -270,10 +635,10 @@ private fun DrawerItem(icon: ImageVector, label: String, subtitle: String? = nul
/** One chat: its title (which gives), and a dot for news or for a reply being written. */
@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun ChatItem(chat: Chat, selected: Boolean, actions: DrawerActions) {
private fun ChatItem(chat: Chat, selected: Boolean, actions: ChatRowActions, indent: Int = 0) {
val palette = LocalPalette.current
var menu by remember { mutableStateOf(false) }
Box(Modifier.fillMaxWidth().padding(horizontal = 12.dp)) {
Box(Modifier.fillMaxWidth().padding(start = 12.dp + indent.dp, end = 12.dp)) {
Row(
Modifier
.fillMaxWidth()
@@ -298,6 +663,22 @@ private fun ChatItem(chat: Chat, selected: Boolean, actions: DrawerActions) {
}
}
DropdownMenu(expanded = menu, onDismissRequest = { menu = false }) {
DropdownMenuItem(
leadingIcon = { Icon(Icons.Filled.PushPin, contentDescription = null) },
text = { Text(stringResource(if (chat.pinned) R.string.chat_unpin else R.string.chat_pin)) },
onClick = {
menu = false
actions.pin(chat, !chat.pinned)
},
)
DropdownMenuItem(
leadingIcon = { Icon(Icons.AutoMirrored.Filled.DriveFileMove, contentDescription = null) },
text = { Text(stringResource(R.string.folder_move)) },
onClick = {
menu = false
actions.move(chat)
},
)
DropdownMenuItem(
leadingIcon = { Icon(Icons.Filled.Archive, contentDescription = null) },
text = { Text(stringResource(R.string.archive)) },
@@ -0,0 +1,290 @@
@file:OptIn(androidx.compose.material3.ExperimentalMaterial3Api::class)
package eu.llembas.android.ui.memory
import android.app.Application
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.SmartToy
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.ExtendedFloatingActionButton
import androidx.compose.material3.FilterChip
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
import androidx.compose.material3.ListItemDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewModelScope
import androidx.lifecycle.viewmodel.compose.viewModel
import eu.llembas.android.R
import eu.llembas.android.api.DataGroup
import eu.llembas.android.api.Memory
import eu.llembas.android.lembas
import eu.llembas.android.ui.explain
import eu.llembas.android.ui.theme.LocalPalette
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
data class MemoryState(
val memories: List<Memory> = emptyList(),
val groups: List<DataGroup> = emptyList(),
val loading: Boolean = false,
val error: String? = null,
)
/** The person's memories (`/api/v2/memories`): read, added, changed and forgotten. */
class MemoryViewModel(app: Application) : AndroidViewModel(app) {
private val _state = MutableStateFlow(MemoryState(loading = true))
val state = _state.asStateFlow()
fun load() {
viewModelScope.launch {
_state.update { it.copy(loading = true, error = null) }
try {
val api = getApplication<Application>().lembas.instances.client() ?: return@launch
val list = api.memories()
_state.value = MemoryState(memories = list.memories, groups = list.groups)
} catch (e: Exception) {
_state.update { it.copy(loading = false, error = getApplication<Application>().explain(e)) }
}
}
}
fun add(content: String, groupId: String?) = act { api ->
val made = api.addMemory(content, groupId)
_state.update { it.copy(memories = listOf(made) + it.memories) }
}
fun edit(memory: Memory, content: String) = act { api ->
val changed = api.editMemory(memory.id, content)
_state.update { s -> s.copy(memories = s.memories.map { if (it.id == changed.id) changed else it }) }
}
fun forget(memory: Memory) = act { api ->
api.forgetMemory(memory.id)
_state.update { s -> s.copy(memories = s.memories.filterNot { it.id == memory.id }) }
}
/** One change; a refusal (a limit, an empty text, one already gone) is the server's sentence. */
private fun act(change: suspend (eu.llembas.android.api.ApiClient) -> Unit) {
viewModelScope.launch {
try {
val api = getApplication<Application>().lembas.instances.client() ?: return@launch
_state.update { it.copy(error = null) }
change(api)
} catch (e: Exception) {
_state.update { it.copy(error = getApplication<Application>().explain(e)) }
}
}
}
}
interface MemoryActions {
fun add(content: String, groupId: String?) {}
fun edit(memory: Memory, content: String) {}
fun forget(memory: Memory) {}
fun reload() {}
}
@Composable
fun MemoryScreen(onBack: () -> Unit, model: MemoryViewModel = viewModel()) {
val state by model.state.collectAsStateWithLifecycle()
LaunchedEffect(Unit) { model.load() }
MemoryContent(
state,
object : MemoryActions {
override fun add(content: String, groupId: String?) = model.add(content, groupId)
override fun edit(memory: Memory, content: String) = model.edit(memory, content)
override fun forget(memory: Memory) = model.forget(memory)
override fun reload() = model.load()
},
onBack,
)
}
/** What the dialog is for: a new memory ([memory] null), or changing one. */
private data class Editing(val memory: Memory? = null)
/**
* Memory, as Settings › Memory on the web: what models remember about you, newest first. A row
* is the text (plain, never markdown: a model may have written it), with a mark when a model
* did and the data group when there is more than one. A tap edits or forgets it; Add remembers
* something new.
*/
@Composable
fun MemoryContent(state: MemoryState, actions: MemoryActions, onBack: () -> Unit = {}) {
val palette = LocalPalette.current
var editing by remember { mutableStateOf<Editing?>(null) }
val manyGroups = state.groups.size > 1
Scaffold(
containerColor = palette.bg,
topBar = {
TopAppBar(
colors = TopAppBarDefaults.topAppBarColors(containerColor = palette.bg, scrolledContainerColor = palette.bg),
title = { Text(stringResource(R.string.memory)) },
navigationIcon = {
IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(R.string.back)) }
},
)
},
floatingActionButton = {
ExtendedFloatingActionButton(
onClick = { editing = Editing() },
icon = { Icon(Icons.Filled.Add, contentDescription = null) },
text = { Text(stringResource(R.string.memory_remember)) },
containerColor = palette.accent,
contentColor = palette.accentInk,
)
},
) { padding ->
PullToRefreshBox(isRefreshing = state.loading && state.memories.isNotEmpty(), onRefresh = actions::reload, modifier = Modifier.padding(padding)) {
LazyColumn(Modifier.fillMaxSize()) {
item {
Text(
stringResource(R.string.memory_intro),
style = MaterialTheme.typography.bodyMedium,
color = palette.inkMuted,
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
)
}
state.error?.let { error ->
item {
ListItem(
headlineContent = { Text(error, color = palette.danger, style = MaterialTheme.typography.bodyMedium) },
trailingContent = { TextButton(onClick = actions::reload) { Text(stringResource(R.string.retry)) } },
colors = ListItemDefaults.colors(containerColor = palette.bg),
)
}
}
if (state.memories.isEmpty() && !state.loading && state.error == null) {
item {
Box(Modifier.fillMaxWidth().padding(24.dp)) {
Text(stringResource(R.string.memory_none), color = palette.inkMuted, style = MaterialTheme.typography.bodyMedium)
}
}
}
items(state.memories, key = { it.id }) { memory ->
ListItem(
headlineContent = { Text(memory.content, maxLines = 4, overflow = TextOverflow.Ellipsis) },
supportingContent = if (manyGroups) {
{ Text(memory.dataGroup.name, color = palette.inkFaint, maxLines = 1, overflow = TextOverflow.Ellipsis) }
} else {
null
},
trailingContent = if (memory.byModel) {
{ Icon(Icons.Filled.SmartToy, contentDescription = stringResource(R.string.memory_by_model), tint = palette.inkFaint) }
} else {
null
},
colors = ListItemDefaults.colors(containerColor = palette.bg),
modifier = Modifier.clickable { editing = Editing(memory) }.heightIn(min = 48.dp),
)
HorizontalDivider(color = palette.border, modifier = Modifier.padding(start = 16.dp))
}
// Room under the last row for the button over it.
item { Box(Modifier.heightIn(min = 88.dp)) }
}
}
}
editing?.let { asked ->
MemoryDialog(
asked.memory,
groups = if (manyGroups) state.groups else emptyList(),
onSave = { content, group ->
editing = null
if (asked.memory != null) actions.edit(asked.memory, content) else actions.add(content, group)
},
onForget = {
editing = null
asked.memory?.let(actions::forget)
},
onDismiss = { editing = null },
)
}
}
/**
* A memory's text in one box. New: Remember, and the data group when there is a choice. An
* existing one: Save and Forget.
*/
@OptIn(ExperimentalLayoutApi::class)
@Composable
private fun MemoryDialog(memory: Memory?, groups: List<DataGroup>, onSave: (String, String?) -> Unit, onForget: () -> Unit, onDismiss: () -> Unit) {
val palette = LocalPalette.current
var text by remember { mutableStateOf(memory?.content.orEmpty()) }
var group by remember { mutableStateOf(groups.firstOrNull()?.id) }
AlertDialog(
onDismissRequest = onDismiss,
title = { Text(stringResource(if (memory == null) R.string.memory_remember else R.string.memory)) },
text = {
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
OutlinedTextField(
value = text,
onValueChange = { text = it },
label = { Text(stringResource(R.string.memory_label)) },
placeholder = { Text(stringResource(R.string.memory_hint)) },
minLines = 2,
maxLines = 8,
modifier = Modifier.fillMaxWidth(),
)
if (memory == null && groups.isNotEmpty()) {
Text(stringResource(R.string.memory_group), style = MaterialTheme.typography.labelLarge, color = palette.inkMuted)
FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
groups.forEach { g ->
FilterChip(selected = group == g.id, onClick = { group = g.id }, label = { Text(g.name) })
}
}
}
if (memory != null) {
TextButton(onClick = onForget, modifier = Modifier.heightIn(min = 48.dp)) {
Text(stringResource(R.string.memory_forget), color = palette.danger)
}
}
}
},
confirmButton = {
TextButton(onClick = { onSave(text.trim(), group) }, enabled = text.isNotBlank()) {
Text(stringResource(if (memory == null) R.string.memory_remember else R.string.save))
}
},
dismissButton = { TextButton(onClick = onDismiss) { Text(stringResource(R.string.cancel)) } },
)
}
@@ -119,7 +119,7 @@ fun RunContent(state: RunState, onBack: () -> Unit = {}, onOpenChat: (String) ->
Surface(shape = RoundedCornerShape(20.dp), color = palette.surfaceRaised, contentColor = palette.ink, modifier = Modifier.fillMaxWidth()) {
Column(Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
StatusChip(run.status, run.missed)
StatusChip(run.status, run.missed, run.waitingFor)
Spacer(Modifier.width(8.dp))
Text(
ScheduleLogic.moment(run.finishedAt ?: run.startedAt ?: run.dueAt) ?: "—",
@@ -11,7 +11,7 @@ enum class Tone { Good, Quiet, Bad, Waiting, Neutral }
object ScheduleLogic {
fun tone(status: String): Tone = when (status) {
"ok" -> Tone.Good
"silent" -> Tone.Quiet
"silent", "unchanged" -> Tone.Quiet
"failed", "missed" -> Tone.Bad
"waiting", "running" -> Tone.Waiting
else -> Tone.Neutral
@@ -27,6 +27,7 @@ import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Computer
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.Pause
@@ -75,11 +76,13 @@ import eu.llembas.android.R
import eu.llembas.android.api.ApiClient
import eu.llembas.android.api.ApiException
import eu.llembas.android.api.LembasJson
import eu.llembas.android.api.RunsOn
import eu.llembas.android.api.Schedule
import eu.llembas.android.api.ScheduleCompiled
import eu.llembas.android.api.ScheduleRun
import eu.llembas.android.api.SchedulesFrame
import eu.llembas.android.api.StreamClient
import eu.llembas.android.api.computerAway
import eu.llembas.android.lembas
import eu.llembas.android.ui.explain
import eu.llembas.android.ui.progressLineOf
@@ -270,7 +273,7 @@ private fun ScheduleCard(schedule: Schedule, onOpen: () -> Unit, onPause: (Boole
}
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(top = 4.dp)) {
val shown = if (schedule.running) "running" else schedule.lastRun?.status
shown?.let { StatusChip(it, schedule.lastRun?.missed ?: 0) }
shown?.let { StatusChip(it, schedule.lastRun?.missed ?: 0, schedule.lastRun?.waitingFor) }
val next = when {
schedule.paused -> stringResource(R.string.schedule_paused)
else -> ScheduleLogic.moment(schedule.nextRun)?.let { stringResource(R.string.schedule_next, it) }
@@ -295,21 +298,22 @@ private fun ScheduleCard(schedule: Schedule, onOpen: () -> Unit, onPause: (Boole
/** A run's status in words, on its tone's soft colour. */
@Composable
fun StatusChip(status: String, missed: Int = 0) {
fun StatusChip(status: String, missed: Int = 0, waitingFor: String? = null) {
val palette = LocalPalette.current
val (ink, soft) = toneColours(palette, ScheduleLogic.tone(status))
val words = when (status) {
"ok" -> stringResource(R.string.run_ok)
"silent" -> stringResource(R.string.run_silent)
"unchanged" -> stringResource(R.string.run_unchanged)
"failed" -> stringResource(R.string.run_failed)
"missed" -> stringResource(R.string.run_missed, maxOf(missed, 1).toString())
"skipped" -> stringResource(R.string.run_skipped)
"waiting" -> stringResource(R.string.run_waiting)
"waiting" -> stringResource(if (waitingFor == "device") R.string.run_waiting_computer else R.string.run_waiting)
"running" -> stringResource(R.string.run_running)
else -> status
}
Box(Modifier.background(soft, RoundedCornerShape(8.dp)).padding(horizontal = 8.dp, vertical = 3.dp)) {
Text(words, style = MaterialTheme.typography.labelMedium, color = ink, maxLines = 1)
Text(words, style = MaterialTheme.typography.labelMedium, color = ink, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
@@ -535,6 +539,17 @@ private fun ScheduleBody(
if (facts.isNotEmpty()) {
Text(facts.joinToString(" · "), style = MaterialTheme.typography.bodySmall, color = palette.inkFaint)
}
schedule.runsOn?.let { on -> ComputerLine(on, away = schedule.lastRun?.computerAway == true) }
schedule.watch?.target?.takeIf { it.isNotBlank() }?.let { url ->
Text(
stringResource(if (schedule.watch?.kind == "command") R.string.schedule_watching_command else R.string.schedule_watching) + ": " +
url,
style = MaterialTheme.typography.bodySmall,
color = palette.inkFaint,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
)
}
}
}
}
@@ -580,7 +595,7 @@ private fun ScheduleBody(
)
}
}
items(state.runs, key = { it.id }) { run -> RunRow(run, onOpen = { onOpenRun(run) }) }
items(state.runs, key = { it.id }) { run -> RunRow(run, schedule.runsOn, onOpen = { onOpenRun(run) }) }
if (state.more) item { LaunchedEffect(state.runs.size) { onMore() } }
}
}
@@ -600,6 +615,71 @@ private fun modeWords(mode: String): String? = when (mode) {
else -> null
}
/**
* Where a schedule runs: Computer: its name · the folder there · the mode, and "not linked now"
* in the waiting colour when its last run found it away. The folder gives first.
*/
@Composable
private fun ComputerLine(on: RunsOn, away: Boolean) {
val palette = LocalPalette.current
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(Icons.Filled.Computer, contentDescription = null, tint = palette.inkFaint, modifier = Modifier.size(16.dp))
Spacer(Modifier.width(6.dp))
val parts = listOfNotNull(
stringResource(R.string.schedule_computer) + ": " + on.deviceName.ifBlank { on.device },
on.cwd.takeIf { it.isNotBlank() },
agentModeWords(on.mode),
)
Text(parts.joinToString(" · "), style = MaterialTheme.typography.bodySmall, color = palette.inkFaint, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
if (away) {
Text(
on.deviceName.ifBlank { on.device } + ": " + stringResource(R.string.schedule_computer_away),
style = MaterialTheme.typography.bodySmall,
color = palette.warning,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
}
}
/** A run row's line: the computer's name, and "not linked now" when the run found it away. */
@Composable
private fun ComputerName(on: RunsOn, away: Boolean) {
val palette = LocalPalette.current
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(Icons.Filled.Computer, contentDescription = stringResource(R.string.schedule_computer), tint = palette.inkFaint, modifier = Modifier.size(14.dp))
Spacer(Modifier.width(4.dp))
Text(
on.deviceName.ifBlank {
on.device
},
style = MaterialTheme.typography.bodySmall,
color = palette.inkMuted,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f, fill = false),
)
if (away) {
Text(
" · " + stringResource(R.string.schedule_computer_away),
style = MaterialTheme.typography.bodySmall,
color = palette.warning,
maxLines = 1,
softWrap = false,
)
}
}
}
@Composable
private fun agentModeWords(mode: String): String? = when (mode) {
"manual" -> stringResource(R.string.mode_manual)
"edit" -> stringResource(R.string.mode_edit)
"auto" -> stringResource(R.string.mode_auto)
else -> null
}
@Composable
internal fun Header(text: String) {
Text(
@@ -616,7 +696,7 @@ internal fun Header(text: String) {
* whole row opens the run.
*/
@Composable
private fun RunRow(run: ScheduleRun, onOpen: () -> Unit) {
private fun RunRow(run: ScheduleRun, runsOn: RunsOn?, onOpen: () -> Unit) {
val palette = LocalPalette.current
Surface(
onClick = onOpen,
@@ -626,9 +706,11 @@ private fun RunRow(run: ScheduleRun, onOpen: () -> Unit) {
modifier = Modifier.fillMaxWidth(),
) {
Row(Modifier.heightIn(min = 64.dp).padding(horizontal = 12.dp, vertical = 10.dp), verticalAlignment = Alignment.Top) {
Box(Modifier.width(112.dp)) { StatusChip(run.status, run.missed) }
Box(Modifier.width(112.dp)) { StatusChip(run.status, run.missed, run.waitingFor) }
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(ScheduleLogic.moment(run.startedAt ?: run.dueAt) ?: "—", style = MaterialTheme.typography.bodyMedium)
// Which computer the run was for, and whether it was away.
runsOn?.let { on -> ComputerName(on, away = run.computerAway) }
RunFacts(run, maxLines = 2)
}
}
@@ -28,6 +28,7 @@ import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Assistant
import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.icons.filled.Dns
import androidx.compose.material.icons.filled.Download
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.Mic
import androidx.compose.material.icons.filled.Notifications
@@ -35,9 +36,11 @@ import androidx.compose.material.icons.filled.NotificationsActive
import androidx.compose.material.icons.filled.Palette
import androidx.compose.material.icons.filled.PhoneAndroid
import androidx.compose.material.icons.filled.RecordVoiceOver
import androidx.compose.material.icons.filled.Science
import androidx.compose.material.icons.filled.SystemUpdate
import androidx.compose.material.icons.filled.Timer
import androidx.compose.material.icons.filled.Translate
import androidx.compose.material.icons.filled.Update
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@@ -77,7 +80,13 @@ import eu.llembas.android.auth.Prefs
import eu.llembas.android.lembas
import eu.llembas.android.push.Push
import eu.llembas.android.ui.theme.LocalPalette
import eu.llembas.android.update.AppVersion
import eu.llembas.android.update.ReleaseCheck
import eu.llembas.android.update.UpdateOffer
import eu.llembas.android.update.UpdateResult
import eu.llembas.android.update.Updater
import eu.llembas.android.update.checksUpdates
import eu.llembas.android.update.offersBetas
import kotlinx.coroutines.launch
/** What the settings page does; every action has a do-nothing default for the screenshots. */
@@ -95,6 +104,10 @@ interface SettingsActions {
fun assistantListens(on: Boolean) {}
fun readAloud(on: Boolean) {}
fun checkUpdate() {}
fun openRelease() {}
fun installUpdate() {}
fun updateCheck(on: Boolean) {}
fun updateBetas(on: Boolean) {}
}
/** What the settings page shows. */
@@ -105,8 +118,12 @@ data class SettingsState(
val hasDistributor: Boolean = false,
val pushNote: String? = null,
val updateNote: String? = null,
/** A newer release the last check found: the row opens its page, the full build can install it. */
val updateFound: String? = null,
val version: String = "",
val selfUpdate: Boolean = false,
/** Whether the app itself is a beta: the update settings' defaults follow it. */
val beta: Boolean = false,
/** Whether the phone has a speech recogniser of its own (Settings › Voice input › Phone). */
val phoneRecognizer: Boolean = false,
)
@@ -121,6 +138,8 @@ fun SettingsScreen(onBack: () -> Unit, onAddInstance: () -> Unit) {
val prefs by store.prefs.collectAsState(initial = Prefs())
var pushNote by remember { mutableStateOf<String?>(null) }
var updateNote by remember { mutableStateOf<String?>(null) }
var updateFound by remember { mutableStateOf<UpdateOffer?>(null) }
val beta = remember { AppVersion.parse(BuildConfig.VERSION_NAME)?.isBeta ?: false }
val distributors = remember { Push.distributors(context) }
val actions = remember {
object : SettingsActions {
@@ -182,8 +201,40 @@ fun SettingsScreen(onBack: () -> Unit, onAddInstance: () -> Unit) {
}
override fun checkUpdate() {
updateNote = context.getString(R.string.update_checking)
scope.launch {
when (val found = ReleaseCheck(context).check()) {
is UpdateResult.Newer -> {
updateFound = found.offer
updateNote = context.getString(R.string.update_available, found.offer.version.toString())
}
UpdateResult.Current -> {
updateFound = null
updateNote = context.getString(R.string.update_none)
}
UpdateResult.Unreachable -> updateNote = context.getString(R.string.update_unreachable)
}
}
}
override fun openRelease() {
updateFound?.let { offer -> runCatching { context.startActivity(ReleaseCheck.open(offer.page)) } }
}
// The full build's own installer, for a release (llembas.eu names its APK and hash).
override fun installUpdate() {
scope.launch { updateNote = Updater(context).checkAndOffer() }
}
override fun updateCheck(on: Boolean) {
scope.launch { store.savePrefs { it.copy(updateCheck = on) } }
}
override fun updateBetas(on: Boolean) {
scope.launch { store.savePrefs { it.copy(updateBetas = on) } }
}
}
}
SettingsContent(
@@ -194,8 +245,10 @@ fun SettingsScreen(onBack: () -> Unit, onAddInstance: () -> Unit) {
hasDistributor = distributors.isNotEmpty(),
pushNote = pushNote,
updateNote = updateNote,
updateFound = updateFound?.version?.toString(),
version = BuildConfig.VERSION_NAME,
selfUpdate = BuildConfig.SELF_UPDATE,
beta = beta,
phoneRecognizer = remember { PhoneRecognizer.available(context) },
),
actions,
@@ -402,15 +455,42 @@ fun SettingsContent(state: SettingsState, actions: SettingsActions, onBack: () -
item {
Group(stringResource(R.string.settings_about)) {
SettingRow(Icons.Filled.Info, stringResource(R.string.about_version, state.version), onClick = {})
if (state.selfUpdate) {
Rule()
// A found release: the row opens its page; until then it checks.
SettingRow(
Icons.Filled.SystemUpdate,
stringResource(R.string.update_check),
subtitle = state.updateNote,
onClick = if (state.updateFound != null) actions::openRelease else actions::checkUpdate,
)
// The full build installs a release itself; a beta is installed from its page.
val found = state.updateFound
if (state.selfUpdate && found != null && !found.contains("-")) {
Rule()
SettingRow(
Icons.Filled.SystemUpdate,
stringResource(R.string.update_check),
subtitle = state.updateNote,
onClick = actions::checkUpdate,
Icons.Filled.Download,
stringResource(R.string.update_install, found),
onClick = actions::installUpdate,
)
}
Rule()
val checks = state.prefs.checksUpdates(state.beta)
SettingRow(
Icons.Filled.Update,
stringResource(R.string.update_auto),
subtitle = stringResource(R.string.update_auto_line),
onClick = { actions.updateCheck(!checks) },
trailing = { Switch(checked = checks, onCheckedChange = actions::updateCheck) },
)
Rule()
val betas = state.prefs.offersBetas(state.beta)
SettingRow(
Icons.Filled.Science,
stringResource(R.string.update_betas),
subtitle = stringResource(R.string.update_betas_line),
onClick = { actions.updateBetas(!betas) },
trailing = { Switch(checked = betas, onCheckedChange = actions::updateBetas) },
)
}
}
}
@@ -1,4 +1,4 @@
// Generated by scripts/fetch-tokens.py from the LLeMbas server's tokens.css at v2.0.0-beta.8. Do not edit.
// Generated by scripts/fetch-tokens.py from the LLeMbas server's tokens.css at v2.0.0-beta.9. Do not edit.
package eu.llembas.android.ui.theme
import androidx.compose.ui.graphics.Color
@@ -0,0 +1,198 @@
package eu.llembas.android.update
import android.Manifest
import android.app.Notification
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.net.Uri
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import eu.llembas.android.BuildConfig
import eu.llembas.android.LembasApp
import eu.llembas.android.R
import eu.llembas.android.api.AppsInfo
import eu.llembas.android.api.LembasJson
import eu.llembas.android.api.SharedHttp
import eu.llembas.android.api.await
import eu.llembas.android.auth.Prefs
import eu.llembas.android.lembas
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.withContext
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.ListSerializer
import okhttp3.Request
/** A version as the releases name it: `1.2.3`, or `1.2.3-beta.4`, which sorts below `1.2.3`. */
data class AppVersion(val major: Int, val minor: Int, val patch: Int, val beta: Int?) : Comparable<AppVersion> {
val isBeta: Boolean get() = beta != null
override fun compareTo(other: AppVersion): Int = compareValuesBy(
this,
other,
{ it.major },
{ it.minor },
{ it.patch },
// A release sorts above every beta of itself.
{ it.beta ?: Int.MAX_VALUE },
)
override fun toString(): String = "$major.$minor.$patch" + (beta?.let { "-beta.$it" } ?: "")
companion object {
private val SHAPE = Regex("""^v?(\d+)\.(\d+)\.(\d+)(?:-beta\.(\d+))?$""")
/**
* A tag or a version name; a test build's `-debug…` is left off first. Anything else
* (`-rc.1`, a typo) is not a version this check knows, and is never offered.
*/
fun parse(text: String): AppVersion? {
val match = SHAPE.matchEntire(text.trim().substringBefore("-debug")) ?: return null
val (a, b, c, beta) = match.destructured
return AppVersion(a.toInt(), b.toInt(), c.toInt(), beta.takeIf { it.isNotEmpty() }?.toInt())
}
}
}
/** One of GitHub's releases, as far as the check needs it. */
@Serializable
data class PublicRelease(
@SerialName("tag_name") val tag: String,
val prerelease: Boolean = false,
val draft: Boolean = false,
@SerialName("html_url") val page: String = "",
)
/** A newer release to tell the person about: its version and the page its APKs are on. */
data class UpdateOffer(val version: AppVersion, val page: String)
/** What a check found. */
sealed interface UpdateResult {
data class Newer(val offer: UpdateOffer) : UpdateResult
data object Current : UpdateResult
data object Unreachable : UpdateResult
}
/**
* The update check: the release the instance recommends (`GET /api/v2/apps`), which knows what
* speaks its API; from a server without that, the public releases of the app on GitHub, read
* over plain HTTPS -- no
* Google service, no account, nothing sent but the request itself. It runs when the app starts,
* at most once a day and only while Settings › About › *Look for new versions* is on (on by
* default in a beta, off in a release), and when the person taps *Check for an update*. A newer
* release becomes a notification that opens its page, where the APKs are; installing stays the
* person's step (or F-Droid's, or Obtainium's).
*
* Betas are offered to a beta, or to anyone who turned *Include betas* on.
*/
class ReleaseCheck(private val context: Context) {
suspend fun check(): UpdateResult = withContext(Dispatchers.IO) {
val prefs = context.lembas.instances.prefs.first()
val installed = AppVersion.parse(BuildConfig.VERSION_NAME) ?: return@withContext UpdateResult.Current
// The instance first: it knows which release speaks its /api/v2. Only a server without
// the route (or none signed in, or none reachable) leaves it to GitHub's list.
val server = runCatching { context.lembas.instances.client()?.apps() }.getOrNull()
if (server != null) {
return@withContext recommended(server, installed, prefs.offersBetas(installed.isBeta))
?.let { UpdateResult.Newer(it) } ?: UpdateResult.Current
}
try {
val releases = SharedHttp.newCall(
Request.Builder().url(RELEASES).header("Accept", "application/vnd.github+json").build(),
).await().use {
if (!it.isSuccessful) return@withContext UpdateResult.Unreachable
LembasJson.decodeFromString(ListSerializer(PublicRelease.serializer()), it.body!!.string())
}
newest(releases, installed, prefs.offersBetas(installed.isBeta))
?.let { UpdateResult.Newer(it) } ?: UpdateResult.Current
} catch (e: Exception) {
UpdateResult.Unreachable
}
}
/** On start: once a day at most, when the setting is on; a release is announced once. */
suspend fun daily(now: Long = System.currentTimeMillis()) {
val store = context.lembas.instances
val prefs = store.prefs.first()
val installed = AppVersion.parse(BuildConfig.VERSION_NAME) ?: return
if (!prefs.checksUpdates(installed.isBeta) || !due(prefs.updateCheckedAt, now)) return
val found = check()
if (found == UpdateResult.Unreachable) return
store.savePrefs { it.copy(updateCheckedAt = now) }
val offer = (found as? UpdateResult.Newer)?.offer ?: return
if (offer.version.toString() == prefs.updateNotified) return
notify(offer)
store.savePrefs { it.copy(updateNotified = offer.version.toString()) }
}
fun notify(offer: UpdateOffer) {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) return
val page = PendingIntent.getActivity(
context,
NOTIFICATION,
open(offer.page),
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
)
val text = context.getString(R.string.update_notice_text)
val notice = NotificationCompat.Builder(context, LembasApp.CHANNEL_UPDATES)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(context.getString(R.string.update_notice_title, offer.version.toString()))
.setContentText(text)
.setStyle(NotificationCompat.BigTextStyle().bigText(text))
.setContentIntent(page)
.setAutoCancel(true)
.setCategory(Notification.CATEGORY_RECOMMENDATION)
// Nothing from the account: the app's version is fine on a locked screen.
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.build()
NotificationManagerCompat.from(context).notify(NOTIFICATION, notice)
}
companion object {
const val REPOSITORY = "https://github.com/LLeMbas/LLeMbas-Android"
const val RELEASES = "https://api.github.com/repos/LLeMbas/LLeMbas-Android/releases?per_page=30"
private const val DAY_MS = 24L * 60 * 60 * 1000
private const val NOTIFICATION = 0x11e4
/** The newest release later than [installed] that may be offered; drafts never are. */
fun newest(releases: List<PublicRelease>, installed: AppVersion, betas: Boolean): UpdateOffer? = releases
.asSequence()
.filter { !it.draft }
.mapNotNull { r -> AppVersion.parse(r.tag)?.let { it to r } }
// A pre-release is a beta whatever its tag says, and a beta tag is one whatever GitHub says.
.filter { (v, r) -> betas || (!v.isBeta && !r.prerelease) }
.filter { (v, _) -> v > installed }
.maxByOrNull { (v, _) -> v }
?.let { (v, r) -> UpdateOffer(v, r.page.ifBlank { "$REPOSITORY/releases/tag/${r.tag}" }) }
/**
* The server's recommendation, when it is newer than [installed] and may be offered: a
* beta only with [betas]. None recommended (null) is no offer -- the server knows no
* Android release that speaks its API, so none is pushed.
*/
fun recommended(info: AppsInfo, installed: AppVersion, betas: Boolean): UpdateOffer? {
val app = info.android ?: return null
val version = AppVersion.parse(app.version) ?: return null
if (version.isBeta && !betas) return null
if (version <= installed) return null
val tag = app.tag.ifBlank { "v$version" }
return UpdateOffer(version, app.page.takeIf { it.startsWith("https://") } ?: "$REPOSITORY/releases/tag/$tag")
}
fun due(last: Long, now: Long): Boolean = last <= 0 || now - last >= DAY_MS || now < last
fun open(url: String): Intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
}
}
/** *Look for new versions*: as chosen, else on in a beta and off in a release. */
fun Prefs.checksUpdates(installedIsBeta: Boolean): Boolean = updateCheck ?: installedIsBeta
/** *Include betas*: as chosen, else on in a beta and off in a release. */
fun Prefs.offersBetas(installedIsBeta: Boolean): Boolean = updateBetas ?: installedIsBeta
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">O čem si promluvíme?</string>
<string name="loading_line">Pečou se lembasy…</string>
<string name="archive">Archivovat</string>
<string name="archived">Archivované</string>
<string name="archived_restore">Obnovit konverzaci</string>
<string name="archived_none">Žádné archivované konverzace.</string>
<string name="memory">Paměť</string>
<string name="memory_intro">Co si o vás modely pamatují</string>
<string name="memory_none">Zatím nic. Model, který má nástroj paměti, sem přidá záznam, když mu řeknete něco, co stojí za uchování.</string>
<string name="memory_remember">Zapamatovat</string>
<string name="memory_label">Co říká tento záznam v paměti</string>
<string name="memory_hint">Něco, co stojí za zapamatování</string>
<string name="memory_group">Datová skupina</string>
<string name="memory_forget">Zapomenout</string>
<string name="memory_by_model">Model</string>
<string name="chats_pinned">Připnuté konverzace</string>
<string name="chat_pin">Připnout konverzaci</string>
<string name="chat_unpin">Odepnout konverzaci</string>
<string name="folder_move">Přesunout do složky</string>
<string name="folder_none">Bez složky</string>
<string name="folder_new">Nová složka</string>
<string name="folder_name">Název složky</string>
<string name="folder_rename">Přejmenovat složku</string>
<string name="folder_delete">Smazat složku</string>
<string name="folder_delete_confirm">Smazat složku „%1$s“? Konverzace v ní zůstanou.</string>
<string name="delete">Smazat</string>
<string name="edit">Upravit</string>
<string name="regenerate">Vygenerovat znovu</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Vyfotit</string>
<string name="attach_choose_photos">Vybrat fotky</string>
<string name="attach_choose_files">Vybrat soubory</string>
<string name="image_generate">Generovat obrázky</string>
<string name="image_generated">Vygenerovaný obrázek</string>
<string name="copy_message">Zkopírovat zprávu</string>
<string name="copied">Zkopírováno.</string>
<string name="rename_chat">Přejmenovat konverzaci</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Dnes</string>
<string name="chats_earlier">Dříve</string>
<string name="chats_agents">Chaty s agentem</string>
<string name="chats_found_in_messages">Ve zprávách</string>
<string name="chats_none_found">Žádný chat to nemá v názvu.</string>
<string name="clear">Vymazat</string>
<string name="composer_hint_agent">Řekněte agentovi, co má udělat</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Nedá vědět nikdy</string>
<string name="run_ok">Hotovo</string>
<string name="run_silent">Nic nového</string>
<string name="run_unchanged">Beze změny</string>
<string name="schedule_computer">Počítač</string>
<string name="schedule_computer_away">teď není propojený</string>
<string name="schedule_watching">Jen když se tato stránka změní</string>
<string name="schedule_watching_command">Jen když se změní výstup tohoto příkazu</string>
<string name="run_failed">Selhalo</string>
<string name="run_missed">Zmeškáno ×%1$s</string>
<string name="run_skipped">Vynecháno</string>
<string name="run_waiting">Čeká na model</string>
<string name="run_waiting_computer">Čeká na počítač</string>
<string name="run_running">Běží</string>
<string name="run_model_instead">%1$s, místo %2$s</string>
<string name="run_retry_at">Zkusí to znovu v %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Selhání naplánovaných úloh</string>
<string name="scheduled_result_public">Naplánovaná úloha má výsledek.</string>
<string name="scheduled_failed_public">Naplánovaná úloha selhala.</string>
<string name="schedule_run_again">Spustit znovu</string>
<string name="card_approval">Povolit to?</string>
<string name="card_allow_once">Povolit jednou</string>
<string name="card_allow_always">Toto vždy povolit</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Povolte aplikaci LLeMbas instalovat aktualizace a pak to zkontrolujte znovu.</string>
<string name="update_bad_file">Stažený soubor neodpovídal verzi a byl zahozen.</string>
<string name="update_installing">Instaluje se %1$s…</string>
<string name="update_checking">Kontroluje se…</string>
<string name="update_available">Je k dispozici %1$s. Klepnutím otevřete stránku vydání.</string>
<string name="update_install">Nainstalovat %1$s</string>
<string name="update_auto">Hledat nové verze</string>
<string name="update_auto_line">Nejvýš jednou denně, při spuštění, se aplikace zeptá vaší instance, které vydání k ní patří (u starší instance si přečte seznam vydání na GitHubu), a upozorněním vám dá vědět, když je k dispozici novější. Nic o vás se nikam jinam neposílá. Ve verzi beta zapnuto, jinak vypnuto.</string>
<string name="update_betas">Včetně beta verzí</string>
<string name="update_betas_line">Nabízet i testovací verze, nejen vydání. Zapnuto, když je tato aplikace sama beta.</string>
<string name="channel_updates">Aktualizace aplikace</string>
<string name="update_notice_title">LLeMbas pro Android %1$s</string>
<string name="update_notice_text">Je k dispozici novější verze. Klepnutím otevřete stránku vydání.</string>
<string name="assist_hint">Zeptejte se na cokoli</string>
<string name="assist_signed_out">Nejprve se v aplikaci přihlaste k instanci LLeMbas.</string>
<string name="assist_open_app">Otevřít aplikaci</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Telefon (Google nebo systémový)</string>
<string name="voice_input_phone_line">Vlastní rozpoznávání řeči v telefonu. Slova se objevují, jak mluvíte; nahrávka jde tam, kam ji to rozpoznávání pošle.</string>
<string name="voice_input_phone_none">Tento telefon nemá vlastní rozpoznávání řeči.</string>
<string name="voice_input_hint">Používá ho asistent. S LLeMbas se slova objevují s malým zpožděním a pauza je odešle; s rozpoznáváním v telefonu se objevují, jak mluvíte.</string>
<string name="voice_input_hint">Používá ho asistent i mikrofon v konverzaci. S LLeMbas asistent ukazuje slova s malým zpožděním a pauza je odešle, konverzace je zapíše, když přestanete; s rozpoznáváním v telefonu se objevují, jak mluvíte.</string>
<string name="share_sending">Odesílá se do LLeMbas…</string>
<string name="share_default_prompt">Podívejte se na tohle.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">Worüber sprechen wir?</string>
<string name="loading_line">Lembas wird gebacken…</string>
<string name="archive">Archivieren</string>
<string name="archived">Archiviert</string>
<string name="archived_restore">Chat wiederherstellen</string>
<string name="archived_none">Keine archivierten Chats.</string>
<string name="memory">Gedächtnis</string>
<string name="memory_intro">Was sich Modelle über Sie merken</string>
<string name="memory_none">Noch nichts. Ein Modell mit dem Gedächtniswerkzeug ergänzt dies, wenn Sie ihm etwas Merkenswertes sagen.</string>
<string name="memory_remember">Merken</string>
<string name="memory_label">Was diese Erinnerung besagt</string>
<string name="memory_hint">Etwas Merkenswertes</string>
<string name="memory_group">Datengruppe</string>
<string name="memory_forget">Vergessen</string>
<string name="memory_by_model">Modell</string>
<string name="chats_pinned">Angeheftete Chats</string>
<string name="chat_pin">Chat anheften</string>
<string name="chat_unpin">Chat loslösen</string>
<string name="folder_move">In Ordner verschieben</string>
<string name="folder_none">Kein Ordner</string>
<string name="folder_new">Neuer Ordner</string>
<string name="folder_name">Ordnername</string>
<string name="folder_rename">Ordner umbenennen</string>
<string name="folder_delete">Ordner löschen</string>
<string name="folder_delete_confirm">Den Ordner „%1$s“ löschen? Die Chats darin bleiben erhalten.</string>
<string name="delete">Löschen</string>
<string name="edit">Bearbeiten</string>
<string name="regenerate">Neu generieren</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Foto aufnehmen</string>
<string name="attach_choose_photos">Fotos auswählen</string>
<string name="attach_choose_files">Dateien auswählen</string>
<string name="image_generate">Bilder generieren</string>
<string name="image_generated">Das generierte Bild</string>
<string name="copy_message">Nachricht kopieren</string>
<string name="copied">Kopiert.</string>
<string name="rename_chat">Chat umbenennen</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Heute</string>
<string name="chats_earlier">Früher</string>
<string name="chats_agents">Agenten-Chats</string>
<string name="chats_found_in_messages">In den Nachrichten</string>
<string name="chats_none_found">Kein Chat hat das im Titel.</string>
<string name="clear">Leeren</string>
<string name="composer_hint_agent">Sag dem Agenten, was er tun soll</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Meldet sich nie</string>
<string name="run_ok">Fertig</string>
<string name="run_silent">Nichts Neues</string>
<string name="run_unchanged">Unverändert</string>
<string name="schedule_computer">Computer</string>
<string name="schedule_computer_away">gerade nicht verbunden</string>
<string name="schedule_watching">Nur wenn sich diese Seite ändert</string>
<string name="schedule_watching_command">Nur wenn sich die Ausgabe dieses Befehls ändert</string>
<string name="run_failed">Fehlgeschlagen</string>
<string name="run_missed">Verpasst ×%1$s</string>
<string name="run_skipped">Übersprungen</string>
<string name="run_waiting">Wartet auf ein Modell</string>
<string name="run_waiting_computer">Wartet auf den Computer</string>
<string name="run_running">Läuft</string>
<string name="run_model_instead">%1$s statt %2$s</string>
<string name="run_retry_at">Neuer Versuch um %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Geplante Fehler</string>
<string name="scheduled_result_public">Eine geplante Aufgabe hat ein Ergebnis.</string>
<string name="scheduled_failed_public">Eine geplante Aufgabe ist fehlgeschlagen.</string>
<string name="schedule_run_again">Erneut ausführen</string>
<string name="card_approval">Das erlauben?</string>
<string name="card_allow_once">Einmal erlauben</string>
<string name="card_allow_always">Dies immer erlauben</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Erlauben Sie LLeMbas, Updates zu installieren, und prüfen Sie dann erneut.</string>
<string name="update_bad_file">Der Download stimmte nicht mit der Version überein und wurde verworfen.</string>
<string name="update_installing">%1$s wird installiert…</string>
<string name="update_checking">Wird geprüft…</string>
<string name="update_available">%1$s ist verfügbar. Tippen Sie, um die Release-Seite zu öffnen.</string>
<string name="update_install">%1$s installieren</string>
<string name="update_auto">Nach neuen Versionen suchen</string>
<string name="update_auto_line">Höchstens einmal am Tag, beim Start, fragt die App Ihre Instanz, welches Release zu ihr passt (bei einer älteren Instanz: die Liste der Releases auf GitHub), und meldet per Benachrichtigung, wenn es ein neueres gibt. Nichts über Sie wird anderswohin gesendet. In einer Beta standardmäßig an, sonst aus.</string>
<string name="update_betas">Betas einbeziehen</string>
<string name="update_betas_line">Auch Testversionen anbieten, nicht nur Releases. Standardmäßig an, wenn diese App selbst eine Beta ist.</string>
<string name="channel_updates">App-Updates</string>
<string name="update_notice_title">LLeMbas für Android %1$s</string>
<string name="update_notice_text">Eine neuere Version ist verfügbar. Tippen Sie, um die Release-Seite zu öffnen.</string>
<string name="assist_hint">Fragen Sie irgendetwas</string>
<string name="assist_signed_out">Melden Sie sich zuerst in der App bei einer LLeMbas-Instanz an.</string>
<string name="assist_open_app">App öffnen</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Telefon (Google oder das System)</string>
<string name="voice_input_phone_line">Die eigene Spracherkennung des Telefons. Die Wörter erscheinen beim Sprechen; die Aufnahme geht dorthin, wohin diese Erkennung sie schickt.</string>
<string name="voice_input_phone_none">Dieses Telefon hat keine eigene Spracherkennung.</string>
<string name="voice_input_hint">Wird vom Assistenten genutzt. Mit LLeMbas erscheinen die Wörter einen Moment später, und eine Pause sendet sie; mit der Erkennung des Telefons erscheinen sie beim Sprechen.</string>
<string name="voice_input_hint">Wird vom Assistenten und vom Mikrofon im Chat genutzt. Mit LLeMbas zeigt der Assistent die Wörter einen Moment später, und eine Pause sendet sie, ein Chat schreibt sie auf, wenn Sie aufhören; mit der Erkennung des Telefons erscheinen sie beim Sprechen.</string>
<string name="share_sending">Wird an LLeMbas gesendet…</string>
<string name="share_default_prompt">Schauen Sie sich das an.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">¿De qué hablamos?</string>
<string name="loading_line">Horneando lembas…</string>
<string name="archive">Archivar</string>
<string name="archived">Archivados</string>
<string name="archived_restore">Restaurar chat</string>
<string name="archived_none">No hay chats archivados.</string>
<string name="memory">Memoria</string>
<string name="memory_intro">Lo que los modelos recuerdan de usted</string>
<string name="memory_none">Todavía nada. Un modelo con la herramienta de memoria añade algo aquí cuando usted le cuenta algo que vale la pena conservar.</string>
<string name="memory_remember">Recordar</string>
<string name="memory_label">Qué dice esta memoria</string>
<string name="memory_hint">Algo que vale la pena recordar</string>
<string name="memory_group">Grupo de datos</string>
<string name="memory_forget">Olvidar</string>
<string name="memory_by_model">Modelo</string>
<string name="chats_pinned">Chats fijados</string>
<string name="chat_pin">Fijar chat</string>
<string name="chat_unpin">Dejar de fijar el chat</string>
<string name="folder_move">Mover a carpeta</string>
<string name="folder_none">Sin carpeta</string>
<string name="folder_new">Nueva carpeta</string>
<string name="folder_name">Nombre de la carpeta</string>
<string name="folder_rename">Renombrar carpeta</string>
<string name="folder_delete">Eliminar carpeta</string>
<string name="folder_delete_confirm">¿Eliminar la carpeta «%1$s»? Los chats que contiene se conservan.</string>
<string name="delete">Eliminar</string>
<string name="edit">Editar</string>
<string name="regenerate">Regenerar</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Hacer una foto</string>
<string name="attach_choose_photos">Elegir fotos</string>
<string name="attach_choose_files">Elegir archivos</string>
<string name="image_generate">Generar imágenes</string>
<string name="image_generated">La imagen generada</string>
<string name="copy_message">Copiar mensaje</string>
<string name="copied">Copiado.</string>
<string name="rename_chat">Renombrar chat</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Hoy</string>
<string name="chats_earlier">Antes</string>
<string name="chats_agents">Chats de agente</string>
<string name="chats_found_in_messages">En los mensajes</string>
<string name="chats_none_found">Ningún chat lo tiene en el título.</string>
<string name="clear">Borrar</string>
<string name="composer_hint_agent">Dile al agente qué hacer</string>
@@ -193,10 +218,16 @@
<string name="notify_never">No avisa nunca</string>
<string name="run_ok">Hecho</string>
<string name="run_silent">Nada nuevo</string>
<string name="run_unchanged">Sin cambios</string>
<string name="schedule_computer">Ordenador</string>
<string name="schedule_computer_away">no vinculado ahora</string>
<string name="schedule_watching">Solo cuando esta página cambie</string>
<string name="schedule_watching_command">Solo cuando cambie la salida de este comando</string>
<string name="run_failed">Fallidos</string>
<string name="run_missed">Perdida ×%1$s</string>
<string name="run_skipped">Omitida</string>
<string name="run_waiting">Esperando un modelo</string>
<string name="run_waiting_computer">Esperando al ordenador</string>
<string name="run_running">En ejecución</string>
<string name="run_model_instead">%1$s, en lugar de %2$s</string>
<string name="run_retry_at">Lo intenta de nuevo a las %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Fallos programados</string>
<string name="scheduled_result_public">Una tarea programada tiene un resultado.</string>
<string name="scheduled_failed_public">Una tarea programada falló.</string>
<string name="schedule_run_again">Ejecutar de nuevo</string>
<string name="card_approval">¿Permitir esto?</string>
<string name="card_allow_once">Permitir una vez</string>
<string name="card_allow_always">Permitir siempre esto</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Permita que LLeMbas instale actualizaciones y vuelva a comprobarlo.</string>
<string name="update_bad_file">La descarga no coincidía con la versión y se descartó.</string>
<string name="update_installing">Instalando %1$s…</string>
<string name="update_checking">Comprobando…</string>
<string name="update_available">%1$s está disponible. Toque para abrir su página de publicación.</string>
<string name="update_install">Instalar %1$s</string>
<string name="update_auto">Buscar nuevas versiones</string>
<string name="update_auto_line">Como mucho una vez al día, al iniciarse, la aplicación pregunta a su instancia qué versión le corresponde (con una instancia más antigua, lee la lista de versiones en GitHub) y le avisa con una notificación cuando hay una más reciente. No se envía nada sobre usted a ningún otro sitio. Activado por defecto en una beta; si no, desactivado.</string>
<string name="update_betas">Incluir betas</string>
<string name="update_betas_line">Ofrecer también versiones de prueba, no solo publicaciones. Activado por defecto cuando esta aplicación es una beta.</string>
<string name="channel_updates">Actualizaciones de la aplicación</string>
<string name="update_notice_title">LLeMbas para Android %1$s</string>
<string name="update_notice_text">Hay una versión más reciente. Toque para abrir su página de publicación.</string>
<string name="assist_hint">Pregunte lo que quiera</string>
<string name="assist_signed_out">Primero inicie sesión en una instancia de LLeMbas en la aplicación.</string>
<string name="assist_open_app">Abrir la aplicación</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Teléfono (Google o el del sistema)</string>
<string name="voice_input_phone_line">El reconocimiento de voz del propio teléfono. Las palabras aparecen mientras habla; la grabación va adonde ese reconocimiento la envíe.</string>
<string name="voice_input_phone_none">Este teléfono no tiene reconocimiento de voz propio.</string>
<string name="voice_input_hint">La usa el asistente. Con LLeMbas las palabras aparecen un momento después y una pausa las envía; con el reconocimiento del teléfono aparecen mientras habla.</string>
<string name="voice_input_hint">La usan el asistente y el micrófono de un chat. Con LLeMbas el asistente muestra las palabras un momento después y una pausa las envía, y un chat las escribe cuando usted para; con el reconocimiento del teléfono aparecen mientras habla.</string>
<string name="share_sending">Enviando a LLeMbas…</string>
<string name="share_default_prompt">Échele un vistazo a esto.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">De quoi allons-nous parler ?</string>
<string name="loading_line">Cuisson des lembas…</string>
<string name="archive">Archiver</string>
<string name="archived">Archivées</string>
<string name="archived_restore">Restaurer la conversation</string>
<string name="archived_none">Aucune conversation archivée.</string>
<string name="memory">Mémoire</string>
<string name="memory_intro">Ce que les modèles retiennent de vous</string>
<string name="memory_none">Rien pour l\'instant. Un modèle disposant de l\'outil de mémoire ajoute ici ce que vous lui dites qui vaut la peine d\'être retenu.</string>
<string name="memory_remember">Retenir</string>
<string name="memory_label">Ce que dit ce souvenir</string>
<string name="memory_hint">Quelque chose qui vaut la peine d\'être retenu</string>
<string name="memory_group">Groupe de données</string>
<string name="memory_forget">Oublier</string>
<string name="memory_by_model">Modèle</string>
<string name="chats_pinned">Discussions épinglées</string>
<string name="chat_pin">Épingler la discussion</string>
<string name="chat_unpin">Désépingler la discussion</string>
<string name="folder_move">Déplacer vers un dossier</string>
<string name="folder_none">Aucun dossier</string>
<string name="folder_new">Nouveau dossier</string>
<string name="folder_name">Nom du dossier</string>
<string name="folder_rename">Renommer le dossier</string>
<string name="folder_delete">Supprimer le dossier</string>
<string name="folder_delete_confirm">Supprimer le dossier « %1$s » ? Les conversations qu\'il contient sont conservées.</string>
<string name="delete">Supprimer</string>
<string name="edit">Modifier</string>
<string name="regenerate">Régénérer</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Prendre une photo</string>
<string name="attach_choose_photos">Choisir des photos</string>
<string name="attach_choose_files">Choisir des fichiers</string>
<string name="image_generate">Générer des images</string>
<string name="image_generated">L\'image générée</string>
<string name="copy_message">Copier le message</string>
<string name="copied">Copié.</string>
<string name="rename_chat">Renommer la conversation</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Aujourd’hui</string>
<string name="chats_earlier">Plus tôt</string>
<string name="chats_agents">Discussions d’agent</string>
<string name="chats_found_in_messages">Dans les messages</string>
<string name="chats_none_found">Aucune discussion ne l’a dans son titre.</string>
<string name="clear">Effacer</string>
<string name="composer_hint_agent">Dites à l’agent quoi faire</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Ne prévient jamais</string>
<string name="run_ok">Terminé</string>
<string name="run_silent">Rien de neuf</string>
<string name="run_unchanged">Inchangé</string>
<string name="schedule_computer">Ordinateur</string>
<string name="schedule_computer_away">non relié pour l’instant</string>
<string name="schedule_watching">Seulement quand cette page change</string>
<string name="schedule_watching_command">Seulement quand la sortie de cette commande change</string>
<string name="run_failed">Échecs</string>
<string name="run_missed">Manquée ×%1$s</string>
<string name="run_skipped">Sautée</string>
<string name="run_waiting">En attente d’un modèle</string>
<string name="run_waiting_computer">En attente de l’ordinateur</string>
<string name="run_running">En cours</string>
<string name="run_model_instead">%1$s, au lieu de %2$s</string>
<string name="run_retry_at">Nouvel essai à %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Échecs planifiés</string>
<string name="scheduled_result_public">Une tâche planifiée a un résultat.</string>
<string name="scheduled_failed_public">Une tâche planifiée a échoué.</string>
<string name="schedule_run_again">Relancer</string>
<string name="card_approval">Autoriser ceci ?</string>
<string name="card_allow_once">Autoriser une fois</string>
<string name="card_allow_always">Toujours autoriser ceci</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Autorisez LLeMbas à installer des mises à jour, puis vérifiez à nouveau.</string>
<string name="update_bad_file">Le téléchargement ne correspondait pas à la version et a été rejeté.</string>
<string name="update_installing">Installation de %1$s…</string>
<string name="update_checking">Vérification…</string>
<string name="update_available">%1$s est disponible. Touchez pour ouvrir sa page de publication.</string>
<string name="update_install">Installer %1$s</string>
<string name="update_auto">Rechercher de nouvelles versions</string>
<string name="update_auto_line">Au plus une fois par jour, au démarrage, l’application demande à votre instance quelle version lui correspond (avec une instance plus ancienne, elle lit la liste des versions sur GitHub) et vous prévient par une notification lorsqu’il en existe une plus récente. Rien sur vous n’est envoyé ailleurs. Activé par défaut dans une bêta, désactivé sinon.</string>
<string name="update_betas">Inclure les bêtas</string>
<string name="update_betas_line">Proposer aussi les versions de test, pas seulement les publications. Activé par défaut quand cette application est elle-même une bêta.</string>
<string name="channel_updates">Mises à jour de l’application</string>
<string name="update_notice_title">LLeMbas pour Android %1$s</string>
<string name="update_notice_text">Une version plus récente est disponible. Touchez pour ouvrir sa page de publication.</string>
<string name="assist_hint">Demandez n\'importe quoi</string>
<string name="assist_signed_out">Connectez-vous d\'abord à une instance LLeMbas dans l\'application.</string>
<string name="assist_open_app">Ouvrir l\'application</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Téléphone (Google ou celui du système)</string>
<string name="voice_input_phone_line">La reconnaissance vocale du téléphone. Les mots apparaissent pendant que vous parlez ; l’enregistrement va là où cette reconnaissance l’envoie.</string>
<string name="voice_input_phone_none">Ce téléphone n’a pas de reconnaissance vocale propre.</string>
<string name="voice_input_hint">Utilisée par l’assistant. Avec LLeMbas, les mots apparaissent avec un léger décalage et une pause les envoie ; avec la reconnaissance du téléphone, ils apparaissent pendant que vous parlez.</string>
<string name="voice_input_hint">Utilisée par l’assistant et par le micro d’une conversation. Avec LLeMbas, l’assistant affiche les mots avec un léger décalage et une pause les envoie, et une conversation les écrit quand vous vous arrêtez ; avec la reconnaissance du téléphone, ils apparaissent pendant que vous parlez.</string>
<string name="share_sending">Envoi à LLeMbas…</string>
<string name="share_default_prompt">Jetez un œil à ceci.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">Miről beszéljünk?</string>
<string name="loading_line">Lembas sül…</string>
<string name="archive">Archiválás</string>
<string name="archived">Archivált</string>
<string name="archived_restore">Csevegés visszaállítása</string>
<string name="archived_none">Nincs archivált csevegés.</string>
<string name="memory">Memória</string>
<string name="memory_intro">Amit a modellek megjegyeztek Önről</string>
<string name="memory_none">Még semmi. A memóriaeszközzel rendelkező modell akkor egészíti ki, amikor valami megjegyzésre érdemeset mond neki.</string>
<string name="memory_remember">Megjegyzés</string>
<string name="memory_label">Mit mond ez a memória</string>
<string name="memory_hint">Valami, amit érdemes megjegyezni</string>
<string name="memory_group">Adatcsoport</string>
<string name="memory_forget">Elfelejtés</string>
<string name="memory_by_model">Modell</string>
<string name="chats_pinned">Kitűzött beszélgetések</string>
<string name="chat_pin">Beszélgetés kitűzése</string>
<string name="chat_unpin">Kitűzés megszüntetése</string>
<string name="folder_move">Áthelyezés mappába</string>
<string name="folder_none">Nincs mappa</string>
<string name="folder_new">Új mappa</string>
<string name="folder_name">Mappa neve</string>
<string name="folder_rename">Mappa átnevezése</string>
<string name="folder_delete">Mappa törlése</string>
<string name="folder_delete_confirm">Törli a(z) „%1$s” mappát? A benne lévő csevegések megmaradnak.</string>
<string name="delete">Törlés</string>
<string name="edit">Szerkesztés</string>
<string name="regenerate">Újragenerálás</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Fénykép készítése</string>
<string name="attach_choose_photos">Fényképek kiválasztása</string>
<string name="attach_choose_files">Fájlok kiválasztása</string>
<string name="image_generate">Képek generálása</string>
<string name="image_generated">A generált kép</string>
<string name="copy_message">Üzenet másolása</string>
<string name="copied">Másolva.</string>
<string name="rename_chat">Csevegés átnevezése</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Ma</string>
<string name="chats_earlier">Korábban</string>
<string name="chats_agents">Ügynök-csevegések</string>
<string name="chats_found_in_messages">Az üzenetekben</string>
<string name="chats_none_found">Egy csevegés címében sincs ilyen.</string>
<string name="clear">Törlés</string>
<string name="composer_hint_agent">Mondja meg az ügynöknek, mit tegyen</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Soha nem szól</string>
<string name="run_ok">Kész</string>
<string name="run_silent">Semmi új</string>
<string name="run_unchanged">Változatlan</string>
<string name="schedule_computer">Számítógép</string>
<string name="schedule_computer_away">most nincs összekapcsolva</string>
<string name="schedule_watching">Csak ha ez az oldal megváltozik</string>
<string name="schedule_watching_command">Csak ha ennek a parancsnak a kimenete változik</string>
<string name="run_failed">Sikertelen</string>
<string name="run_missed">Kimaradt ×%1$s</string>
<string name="run_skipped">Kihagyva</string>
<string name="run_waiting">Modellre vár</string>
<string name="run_waiting_computer">Várakozás a számítógépre</string>
<string name="run_running">Fut</string>
<string name="run_model_instead">%1$s, %2$s helyett</string>
<string name="run_retry_at">Újrapróbálja: %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Ütemezett hibák</string>
<string name="scheduled_result_public">Egy ütemezett feladatnak eredménye van.</string>
<string name="scheduled_failed_public">Egy ütemezett feladat sikertelen volt.</string>
<string name="schedule_run_again">Futtatás újra</string>
<string name="card_approval">Engedélyezzük ezt?</string>
<string name="card_allow_once">Engedélyezés egyszer</string>
<string name="card_allow_always">Ennek mindig engedélyezése</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Engedélyezze, hogy az LLeMbas frissítéseket telepítsen, majd ellenőrizze újra.</string>
<string name="update_bad_file">A letöltés nem egyezett a verzióval, és el lett dobva.</string>
<string name="update_installing">%1$s telepítése…</string>
<string name="update_checking">Ellenőrzés…</string>
<string name="update_available">Elérhető a(z) %1$s. Koppintson a kiadás oldalának megnyitásához.</string>
<string name="update_install">%1$s telepítése</string>
<string name="update_auto">Új verziók keresése</string>
<string name="update_auto_line">Naponta legfeljebb egyszer, induláskor az alkalmazás megkérdezi a példányát, melyik kiadás illik hozzá (régebbi példánynál a GitHubon lévő kiadások listáját olvassa be), és értesítésben jelzi, ha van újabb. Önről semmi nem megy máshová. Béta verzióban alapból bekapcsolva, egyébként kikapcsolva.</string>
<string name="update_betas">Béták is</string>
<string name="update_betas_line">Tesztverziók felajánlása is, nem csak kiadásoké. Alapból bekapcsolva, ha ez az alkalmazás maga is béta.</string>
<string name="channel_updates">Alkalmazásfrissítések</string>
<string name="update_notice_title">LLeMbas Androidra %1$s</string>
<string name="update_notice_text">Újabb verzió érhető el. Koppintson a kiadás oldalának megnyitásához.</string>
<string name="assist_hint">Kérdezzen bármit</string>
<string name="assist_signed_out">Először jelentkezzen be egy LLeMbas példányba az alkalmazásban.</string>
<string name="assist_open_app">Alkalmazás megnyitása</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Telefon (Google vagy a rendszeré)</string>
<string name="voice_input_phone_line">A telefon saját beszédfelismerője. A szavak beszéd közben jelennek meg; a felvétel oda megy, ahová az a felismerő küldi.</string>
<string name="voice_input_phone_none">Ennek a telefonnak nincs saját beszédfelismerője.</string>
<string name="voice_input_hint">Az asszisztens használja. LLeMbasszal a szavak kis késéssel jelennek meg, és egy szünet elküldi őket; a telefon felismerőjével beszéd közben jelennek meg.</string>
<string name="voice_input_hint">Az asszisztens és a csevegés mikrofonja használja. LLeMbasszal az asszisztens kis késéssel mutatja a szavakat, és egy szünet elküldi őket, a csevegés pedig akkor írja le őket, amikor abbahagyja; a telefon felismerőjével beszéd közben jelennek meg.</string>
<string name="share_sending">Küldés az LLeMbas-nak…</string>
<string name="share_default_prompt">Nézze meg ezt.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">Di cosa parliamo?</string>
<string name="loading_line">I lembas stanno cuocendo…</string>
<string name="archive">Archivia</string>
<string name="archived">Archiviate</string>
<string name="archived_restore">Ripristina chat</string>
<string name="archived_none">Nessuna chat archiviata.</string>
<string name="memory">Memoria</string>
<string name="memory_intro">Cosa ricordano di te i modelli</string>
<string name="memory_none">Ancora niente. Un modello con lo strumento memoria aggiunge qualcosa qui quando gli dici qualcosa che vale la pena ricordare.</string>
<string name="memory_remember">Ricorda</string>
<string name="memory_label">Cosa dice questa memoria</string>
<string name="memory_hint">Qualcosa che vale la pena ricordare</string>
<string name="memory_group">Gruppo di dati</string>
<string name="memory_forget">Dimentica</string>
<string name="memory_by_model">Modello</string>
<string name="chats_pinned">Chat fissate</string>
<string name="chat_pin">Fissa la chat</string>
<string name="chat_unpin">Togli la chat dalle fissate</string>
<string name="folder_move">Sposta nella cartella</string>
<string name="folder_none">Nessuna cartella</string>
<string name="folder_new">Nuova cartella</string>
<string name="folder_name">Nome della cartella</string>
<string name="folder_rename">Rinomina cartella</string>
<string name="folder_delete">Elimina cartella</string>
<string name="folder_delete_confirm">Eliminare la cartella “%1$s”? Le chat al suo interno vengono conservate.</string>
<string name="delete">Elimina</string>
<string name="edit">Modifica</string>
<string name="regenerate">Rigenera</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Scatta una foto</string>
<string name="attach_choose_photos">Scegli foto</string>
<string name="attach_choose_files">Scegli file</string>
<string name="image_generate">Generare immagini</string>
<string name="image_generated">L\'immagine generata</string>
<string name="copy_message">Copia messaggio</string>
<string name="copied">Copiato.</string>
<string name="rename_chat">Rinomina chat</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Oggi</string>
<string name="chats_earlier">Prima</string>
<string name="chats_agents">Chat con agente</string>
<string name="chats_found_in_messages">Nei messaggi</string>
<string name="chats_none_found">Nessuna chat lo ha nel titolo.</string>
<string name="clear">Svuota</string>
<string name="composer_hint_agent">Di’ all’agente cosa fare</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Non avvisa mai</string>
<string name="run_ok">Fatto</string>
<string name="run_silent">Niente di nuovo</string>
<string name="run_unchanged">Invariato</string>
<string name="schedule_computer">Computer</string>
<string name="schedule_computer_away">non collegato ora</string>
<string name="schedule_watching">Solo quando questa pagina cambia</string>
<string name="schedule_watching_command">Solo quando cambia l\'output di questo comando</string>
<string name="run_failed">Non riusciti</string>
<string name="run_missed">Saltata ×%1$s</string>
<string name="run_skipped">Ignorata</string>
<string name="run_waiting">In attesa di un modello</string>
<string name="run_waiting_computer">In attesa del computer</string>
<string name="run_running">In esecuzione</string>
<string name="run_model_instead">%1$s, invece di %2$s</string>
<string name="run_retry_at">Riprova alle %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Errori pianificati</string>
<string name="scheduled_result_public">Un’attività pianificata ha un risultato.</string>
<string name="scheduled_failed_public">Un’attività pianificata non è riuscita.</string>
<string name="schedule_run_again">Esegui di nuovo</string>
<string name="card_approval">Consentire questo?</string>
<string name="card_allow_once">Consenti una volta</string>
<string name="card_allow_always">Consenti sempre questo</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Consenti a LLeMbas di installare gli aggiornamenti, poi controlla di nuovo.</string>
<string name="update_bad_file">Il download non corrispondeva alla versione ed è stato scartato.</string>
<string name="update_installing">Installazione di %1$s…</string>
<string name="update_checking">Controllo in corso…</string>
<string name="update_available">%1$s è disponibile. Tocca per aprire la pagina della release.</string>
<string name="update_install">Installa %1$s</string>
<string name="update_auto">Cerca nuove versioni</string>
<string name="update_auto_line">Al massimo una volta al giorno, all’avvio, l’app chiede alla sua istanza quale release le corrisponde (con un’istanza più vecchia, legge l’elenco delle release su GitHub) e la avvisa con una notifica quando ce n’è una più recente. Nulla su di lei viene inviato altrove. Attivo per impostazione predefinita in una beta, altrimenti disattivato.</string>
<string name="update_betas">Includi le beta</string>
<string name="update_betas_line">Offri anche le versioni di prova, non solo le release. Attivo per impostazione predefinita quando questa app è essa stessa una beta.</string>
<string name="channel_updates">Aggiornamenti dell’app</string>
<string name="update_notice_title">LLeMbas per Android %1$s</string>
<string name="update_notice_text">È disponibile una versione più recente. Tocca per aprire la pagina della release.</string>
<string name="assist_hint">Chiedi qualsiasi cosa</string>
<string name="assist_signed_out">Accedi prima a un\'istanza LLeMbas nell\'app.</string>
<string name="assist_open_app">Apri l\'app</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Telefono (Google o quello di sistema)</string>
<string name="voice_input_phone_line">Il riconoscimento vocale del telefono. Le parole appaiono mentre parla; la registrazione va dove la manda quel riconoscimento.</string>
<string name="voice_input_phone_none">Questo telefono non ha un riconoscimento vocale proprio.</string>
<string name="voice_input_hint">La usa l’assistente. Con LLeMbas le parole appaiono con un attimo di ritardo e una pausa le invia; con il riconoscimento del telefono appaiono mentre parla.</string>
<string name="voice_input_hint">La usano l’assistente e il microfono di una chat. Con LLeMbas l’assistente mostra le parole con un attimo di ritardo e una pausa le invia, e una chat le scrive quando si ferma; con il riconoscimento del telefono appaiono mentre parla.</string>
<string name="share_sending">Invio a LLeMbas…</string>
<string name="share_default_prompt">Dai un\'occhiata a questo.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">O czym porozmawiamy?</string>
<string name="loading_line">Lembasy się pieczą…</string>
<string name="archive">Archiwizuj</string>
<string name="archived">Zarchiwizowane</string>
<string name="archived_restore">Przywróć czat</string>
<string name="archived_none">Brak zarchiwizowanych czatów.</string>
<string name="memory">Pamięć</string>
<string name="memory_intro">Co modele pamiętają o użytkowniku</string>
<string name="memory_none">Jeszcze nic. Model z narzędziem pamięci dodaje tu wpis, gdy usłyszy coś, co warto zachować.</string>
<string name="memory_remember">Zapamiętaj</string>
<string name="memory_label">Treść tego wspomnienia</string>
<string name="memory_hint">Coś, co warto zapamiętać</string>
<string name="memory_group">Grupa danych</string>
<string name="memory_forget">Zapomnij</string>
<string name="memory_by_model">Model</string>
<string name="chats_pinned">Przypięte czaty</string>
<string name="chat_pin">Przypnij czat</string>
<string name="chat_unpin">Odepnij czat</string>
<string name="folder_move">Przenieś do folderu</string>
<string name="folder_none">Bez folderu</string>
<string name="folder_new">Nowy folder</string>
<string name="folder_name">Nazwa folderu</string>
<string name="folder_rename">Zmień nazwę folderu</string>
<string name="folder_delete">Usuń folder</string>
<string name="folder_delete_confirm">Usunąć folder „%1$s”? Czaty w nim zostaną zachowane.</string>
<string name="delete">Usuń</string>
<string name="edit">Edytuj</string>
<string name="regenerate">Wygeneruj ponownie</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Zrób zdjęcie</string>
<string name="attach_choose_photos">Wybierz zdjęcia</string>
<string name="attach_choose_files">Wybierz pliki</string>
<string name="image_generate">Generuj obrazy</string>
<string name="image_generated">Wygenerowany obraz</string>
<string name="copy_message">Kopiuj wiadomość</string>
<string name="copied">Skopiowano.</string>
<string name="rename_chat">Zmień nazwę czatu</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Dzisiaj</string>
<string name="chats_earlier">Wcześniej</string>
<string name="chats_agents">Czaty z agentem</string>
<string name="chats_found_in_messages">W wiadomościach</string>
<string name="chats_none_found">Żaden czat nie ma tego w tytule.</string>
<string name="clear">Wyczyść</string>
<string name="composer_hint_agent">Powiedz agentowi, co ma zrobić</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Nigdy nie powiadamia</string>
<string name="run_ok">Gotowe</string>
<string name="run_silent">Nic nowego</string>
<string name="run_unchanged">Bez zmian</string>
<string name="schedule_computer">Komputer</string>
<string name="schedule_computer_away">teraz niepołączony</string>
<string name="schedule_watching">Tylko gdy ta strona się zmieni</string>
<string name="schedule_watching_command">Tylko gdy zmieni się wynik tego polecenia</string>
<string name="run_failed">Nieudane</string>
<string name="run_missed">Pominięto ×%1$s</string>
<string name="run_skipped">Pominięto</string>
<string name="run_waiting">Czeka na model</string>
<string name="run_waiting_computer">Czeka na komputer</string>
<string name="run_running">Działa</string>
<string name="run_model_instead">%1$s zamiast %2$s</string>
<string name="run_retry_at">Ponowi próbę o %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Błędy zaplanowanych zadań</string>
<string name="scheduled_result_public">Zaplanowane zadanie ma wynik.</string>
<string name="scheduled_failed_public">Zaplanowane zadanie się nie powiodło.</string>
<string name="schedule_run_again">Uruchom ponownie</string>
<string name="card_approval">Zezwolić na to?</string>
<string name="card_allow_once">Zezwól raz</string>
<string name="card_allow_always">Zawsze na to zezwalaj</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Zezwól LLeMbas na instalowanie aktualizacji, a potem sprawdź ponownie.</string>
<string name="update_bad_file">Pobrany plik nie zgadzał się z wersją i został odrzucony.</string>
<string name="update_installing">Instalowanie %1$s…</string>
<string name="update_checking">Sprawdzanie…</string>
<string name="update_available">Dostępna jest wersja %1$s. Dotknij, aby otworzyć jej stronę wydania.</string>
<string name="update_install">Zainstaluj %1$s</string>
<string name="update_auto">Szukaj nowych wersji</string>
<string name="update_auto_line">Najwyżej raz dziennie, przy uruchomieniu, aplikacja pyta twoją instancję, które wydanie do niej pasuje (przy starszej instancji odczytuje listę wydań z GitHuba), i daje znać powiadomieniem, gdy jest nowsze. Nic o tobie nie jest wysyłane nigdzie indziej. W wersji beta domyślnie włączone, w przeciwnym razie wyłączone.</string>
<string name="update_betas">Uwzględniaj bety</string>
<string name="update_betas_line">Proponuj też wersje testowe, nie tylko wydania. Domyślnie włączone, gdy ta aplikacja sama jest betą.</string>
<string name="channel_updates">Aktualizacje aplikacji</string>
<string name="update_notice_title">LLeMbas na Androida %1$s</string>
<string name="update_notice_text">Dostępna jest nowsza wersja. Dotknij, aby otworzyć jej stronę wydania.</string>
<string name="assist_hint">Zapytaj o cokolwiek</string>
<string name="assist_signed_out">Najpierw zaloguj się do instancji LLeMbas w aplikacji.</string>
<string name="assist_open_app">Otwórz aplikację</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Telefon (Google lub systemowy)</string>
<string name="voice_input_phone_line">Własne rozpoznawanie mowy telefonu. Słowa pojawiają się w trakcie mówienia; nagranie trafia tam, dokąd wyśle je to rozpoznawanie.</string>
<string name="voice_input_phone_none">Ten telefon nie ma własnego rozpoznawania mowy.</string>
<string name="voice_input_hint">Używa go asystent. Z LLeMbas słowa pojawiają się z lekkim opóźnieniem, a pauza je wysyła; z rozpoznawaniem telefonu pojawiają się w trakcie mówienia.</string>
<string name="voice_input_hint">Używa go asystent i mikrofon w czacie. Z LLeMbas asystent pokazuje słowa z lekkim opóźnieniem, a pauza je wysyła, czat zapisuje je, gdy przestaniesz; z rozpoznawaniem telefonu pojawiają się w trakcie mówienia.</string>
<string name="share_sending">Wysyłanie do LLeMbas…</string>
<string name="share_default_prompt">Zobacz to.</string>
</resources>
+43 -1
View File
@@ -23,6 +23,28 @@
<string name="empty_chat">O čom sa pozhovárame?</string>
<string name="loading_line">Pečú sa lembasy…</string>
<string name="archive">Archivovať</string>
<string name="archived">Archivované</string>
<string name="archived_restore">Obnoviť konverzáciu</string>
<string name="archived_none">Žiadne archivované konverzácie.</string>
<string name="memory">Pamäť</string>
<string name="memory_intro">Čo si o vás modely pamätajú</string>
<string name="memory_none">Zatiaľ nič. Model, ktorý má nástroj pamäti, tu pridá záznam, keď mu povieš niečo, čo sa vyplatí uchovať.</string>
<string name="memory_remember">Zapamätať</string>
<string name="memory_label">Čo si táto pamäť pamätá</string>
<string name="memory_hint">Niečo, čo sa vyplatí zapamätať</string>
<string name="memory_group">Dátová oblasť</string>
<string name="memory_forget">Zabudnúť</string>
<string name="memory_by_model">Model</string>
<string name="chats_pinned">Pripnuté konverzácie</string>
<string name="chat_pin">Pripnúť konverzáciu</string>
<string name="chat_unpin">Odopnúť konverzáciu</string>
<string name="folder_move">Presunúť do zložky</string>
<string name="folder_none">Bez zložky</string>
<string name="folder_new">Nová zložka</string>
<string name="folder_name">Názov zložky</string>
<string name="folder_rename">Premenovať zložku</string>
<string name="folder_delete">Zmazať zložku</string>
<string name="folder_delete_confirm">Zmazať zložku „%1$s“? Konverzácie v nej zostanú.</string>
<string name="delete">Zmazať</string>
<string name="edit">Upraviť</string>
<string name="regenerate">Vygenerovať znova</string>
@@ -40,6 +62,8 @@
<string name="attach_take_photo">Odfotiť</string>
<string name="attach_choose_photos">Vybrať fotky</string>
<string name="attach_choose_files">Vybrať súbory</string>
<string name="image_generate">Generovať obrázky</string>
<string name="image_generated">Vygenerovaný obrázok</string>
<string name="copy_message">Skopírovať správu</string>
<string name="copied">Skopírované.</string>
<string name="rename_chat">Premenovať konverzáciu</string>
@@ -123,6 +147,7 @@
<string name="chats_today">Dnes</string>
<string name="chats_earlier">Skôr</string>
<string name="chats_agents">Čety s agentom</string>
<string name="chats_found_in_messages">V správach</string>
<string name="chats_none_found">Žiadny čet to nemá v názve.</string>
<string name="clear">Vymazať</string>
<string name="composer_hint_agent">Povedzte agentovi, čo má urobiť</string>
@@ -193,10 +218,16 @@
<string name="notify_never">Nedá vedieť nikdy</string>
<string name="run_ok">Hotovo</string>
<string name="run_silent">Nič nové</string>
<string name="run_unchanged">Bez zmeny</string>
<string name="schedule_computer">Počítač</string>
<string name="schedule_computer_away">teraz nie je prepojený</string>
<string name="schedule_watching">Len keď sa táto stránka zmení</string>
<string name="schedule_watching_command">Len keď sa zmení výstup tohto príkazu</string>
<string name="run_failed">Zlyhalo</string>
<string name="run_missed">Zmeškané ×%1$s</string>
<string name="run_skipped">Vynechané</string>
<string name="run_waiting">Čaká na model</string>
<string name="run_waiting_computer">Čaká na počítač</string>
<string name="run_running">Beží</string>
<string name="run_model_instead">%1$s, namiesto %2$s</string>
<string name="run_retry_at">Skúsi to znova o %1$s</string>
@@ -213,6 +244,7 @@
<string name="channel_scheduled_failures">Zlyhania naplánovaných úloh</string>
<string name="scheduled_result_public">Naplánovaná úloha má výsledok.</string>
<string name="scheduled_failed_public">Naplánovaná úloha zlyhala.</string>
<string name="schedule_run_again">Spustiť znova</string>
<string name="card_approval">Povoliť to?</string>
<string name="card_allow_once">Povoliť raz</string>
<string name="card_allow_always">Toto vždy povoliť</string>
@@ -319,6 +351,16 @@
<string name="update_allow_installs">Povoľte aplikácii LLeMbas instalovať aktualizácie a potom to skontrolujte znova.</string>
<string name="update_bad_file">Stiahnutý súbor nezodpovedal verzii a bol zahodený.</string>
<string name="update_installing">Inštaluje sa %1$s…</string>
<string name="update_checking">Kontroluje sa…</string>
<string name="update_available">Je dostupná %1$s. Ťuknutím otvoríte stránku vydania.</string>
<string name="update_install">Nainštalovať %1$s</string>
<string name="update_auto">Hľadať nové verzie</string>
<string name="update_auto_line">Najviac raz denne, pri spustení, sa aplikácia opýta vašej inštancie, ktoré vydanie k nej patrí (pri staršej inštancii si prečíta zoznam vydaní na GitHube), a upozornením vám dá vedieť, keď je dostupné novšie. Nič o vás sa nikam inam neposiela. V beta verzii zapnuté, inak vypnuté.</string>
<string name="update_betas">Vrátane beta verzií</string>
<string name="update_betas_line">Ponúkať aj testovacie verzie, nielen vydania. Zapnuté, keď je táto aplikácia sama beta.</string>
<string name="channel_updates">Aktualizácie aplikácie</string>
<string name="update_notice_title">LLeMbas pre Android %1$s</string>
<string name="update_notice_text">Je dostupná novšia verzia. Ťuknutím otvoríte stránku vydania.</string>
<string name="assist_hint">Spýtajte sa na čokoľvek</string>
<string name="assist_signed_out">Najprv sa v aplikácii prihláste do inštancie LLeMbas.</string>
<string name="assist_open_app">Otvoriť aplikáciu</string>
@@ -356,7 +398,7 @@
<string name="voice_input_phone">Telefón (Google alebo systémový)</string>
<string name="voice_input_phone_line">Vlastné rozpoznávanie reči v telefóne. Slová sa objavujú, ako hovoríte; nahrávka ide tam, kam ju to rozpoznávanie pošle.</string>
<string name="voice_input_phone_none">Tento telefón nemá vlastné rozpoznávanie reči.</string>
<string name="voice_input_hint">Používa ho asistent. S LLeMbas sa slová objavujú s malým oneskorením a pauza ich odošle; s rozpoznávaním v telefóne sa objavujú, ako hovoríte.</string>
<string name="voice_input_hint">Používa ho asistent aj mikrofón v konverzácii. S LLeMbas asistent ukazuje slová s malým oneskorením a pauza ich odošle, konverzácia ich zapíše, keď prestanete; s rozpoznávaním v telefóne sa objavujú, ako hovoríte.</string>
<string name="share_sending">Odosiela sa do LLeMbas…</string>
<string name="share_default_prompt">Pozrite sa na toto.</string>
</resources>
+43 -1
View File
@@ -24,6 +24,28 @@
<string name="empty_chat">What shall we talk about?</string>
<string name="loading_line">Baking lembas…</string>
<string name="archive">Archive</string>
<string name="archived">Archived</string>
<string name="archived_restore">Restore chat</string>
<string name="archived_none">No archived chats.</string>
<string name="memory">Memory</string>
<string name="memory_intro">What models remember about you</string>
<string name="memory_none">Nothing yet. A model with the memory tool adds to this when you tell it something worth keeping.</string>
<string name="memory_remember">Remember</string>
<string name="memory_label">What this memory says</string>
<string name="memory_hint">Something worth remembering</string>
<string name="memory_group">Data group</string>
<string name="memory_forget">Forget</string>
<string name="memory_by_model">Model</string>
<string name="chats_pinned">Pinned chats</string>
<string name="chat_pin">Pin chat</string>
<string name="chat_unpin">Unpin chat</string>
<string name="folder_move">Move to folder</string>
<string name="folder_none">No folder</string>
<string name="folder_new">New folder</string>
<string name="folder_name">Folder name</string>
<string name="folder_rename">Rename folder</string>
<string name="folder_delete">Delete folder</string>
<string name="folder_delete_confirm">Delete the folder “%1$s”? Chats inside it are kept.</string>
<string name="delete">Delete</string>
<string name="edit">Edit</string>
<string name="regenerate">Regenerate</string>
@@ -41,6 +63,8 @@
<string name="attach_take_photo">Take a photo</string>
<string name="attach_choose_photos">Choose photos</string>
<string name="attach_choose_files">Choose files</string>
<string name="image_generate">Generate images</string>
<string name="image_generated">The generated image</string>
<string name="copy_message">Copy message</string>
<string name="copied">Copied.</string>
<string name="rename_chat">Rename chat</string>
@@ -124,6 +148,7 @@
<string name="chats_today">Today</string>
<string name="chats_earlier">Earlier</string>
<string name="chats_agents">Agent chats</string>
<string name="chats_found_in_messages">In the messages</string>
<string name="chats_none_found">No chat has that in its title.</string>
<string name="clear">Clear</string>
<string name="composer_hint_agent">Tell the agent what to do</string>
@@ -194,10 +219,16 @@
<string name="notify_never">Never tells you</string>
<string name="run_ok">Done</string>
<string name="run_silent">Nothing new</string>
<string name="run_unchanged">Unchanged</string>
<string name="schedule_computer">Computer</string>
<string name="schedule_computer_away">not linked now</string>
<string name="schedule_watching">Only when this page changes</string>
<string name="schedule_watching_command">Only when this command\'s output changes</string>
<string name="run_failed">Failed</string>
<string name="run_missed">Missed ×%1$s</string>
<string name="run_skipped">Skipped</string>
<string name="run_waiting">Waiting for a model</string>
<string name="run_waiting_computer">Waiting for the computer</string>
<string name="run_running">Running</string>
<string name="run_model_instead">%1$s, instead of %2$s</string>
<string name="run_retry_at">Tries again at %1$s</string>
@@ -214,6 +245,7 @@
<string name="channel_scheduled_failures">Scheduled failures</string>
<string name="scheduled_result_public">A scheduled task has a result.</string>
<string name="scheduled_failed_public">A scheduled task failed.</string>
<string name="schedule_run_again">Run again</string>
<string name="card_approval">Allow this?</string>
<string name="card_allow_once">Allow once</string>
<string name="card_allow_always">Always allow this</string>
@@ -321,6 +353,16 @@
<string name="update_allow_installs">Allow LLeMbas to install updates, then check again.</string>
<string name="update_bad_file">The download did not match the release and was discarded.</string>
<string name="update_installing">Installing %1$s…</string>
<string name="update_checking">Checking…</string>
<string name="update_available">%1$s is available. Tap to open its release page.</string>
<string name="update_install">Install %1$s</string>
<string name="update_auto">Look for new versions</string>
<string name="update_auto_line">At most once a day, when the app starts, it asks your instance which release goes with it (an older instance: the list of releases on GitHub) and tells you in a notification when there is a newer one. Nothing about you is sent anywhere else. On by default in a beta, off otherwise.</string>
<string name="update_betas">Include betas</string>
<string name="update_betas_line">Offer test versions as well as releases. On by default when this app is itself a beta.</string>
<string name="channel_updates">App updates</string>
<string name="update_notice_title">LLeMbas for Android %1$s</string>
<string name="update_notice_text">A newer version is available. Tap to open its release page.</string>
<string name="assist_hint">Ask anything</string>
<string name="assist_signed_out">Sign in to a LLeMbas instance in the app first.</string>
<string name="assist_open_app">Open the app</string>
@@ -358,7 +400,7 @@
<string name="voice_input_phone">Phone (Google or the system\'s)</string>
<string name="voice_input_phone_line">The phone\'s own recogniser. The words appear as you speak; the recording goes wherever that recogniser sends it.</string>
<string name="voice_input_phone_none">This phone has no speech recogniser of its own.</string>
<string name="voice_input_hint">Used by the assistant. With LLeMbas the words appear a moment behind you, and a pause sends them; with the phone\'s recogniser they appear as you speak.</string>
<string name="voice_input_hint">Used by the assistant and by the microphone in a chat. With LLeMbas the assistant shows the words a moment behind you and a pause sends them, and a chat writes them down when you stop; with the phone\'s recogniser they appear as you speak.</string>
<string name="share_sending">Sending to LLeMbas…</string>
<string name="share_default_prompt">Have a look at this.</string>
</resources>
@@ -8,6 +8,8 @@ import eu.llembas.android.assist.AssistTurn
import eu.llembas.android.assist.Recorder
import eu.llembas.android.assist.SheetStop
import eu.llembas.android.assist.settle
import eu.llembas.android.assist.usePhoneRecognizer
import eu.llembas.android.auth.Prefs
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
@@ -73,4 +75,16 @@ class AssistTest {
}
assertTrue(Recorder.rms(loud, loud.size) > 0.9f)
}
@Test
fun voiceInputChoosesTheSameRecogniserForTheAssistantAndTheChat() {
// Chosen and present: the phone's.
assertTrue(usePhoneRecognizer(Prefs.VOICE_PHONE, phoneHas = true, instanceStt = null))
// Chosen but absent: the instance's, whatever it said.
assertFalse(usePhoneRecognizer(Prefs.VOICE_PHONE, phoneHas = false, instanceStt = false))
// LLeMbas chosen: the instance's, unless it said it has no speech-to-text.
assertFalse(usePhoneRecognizer(Prefs.VOICE_LEMBAS, phoneHas = true, instanceStt = null))
assertFalse(usePhoneRecognizer(Prefs.VOICE_LEMBAS, phoneHas = true, instanceStt = true))
assertTrue(usePhoneRecognizer(Prefs.VOICE_LEMBAS, phoneHas = true, instanceStt = false))
}
}
@@ -1,8 +1,14 @@
package eu.llembas.android
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.font.FontWeight
import eu.llembas.android.api.Chat
import eu.llembas.android.api.Folder
import eu.llembas.android.ui.home.folderTree
import eu.llembas.android.ui.home.groupChats
import eu.llembas.android.ui.home.markedSnippet
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
import java.time.LocalDate
@@ -41,4 +47,55 @@ class ChatGroupsTest {
assertEquals(listOf("a"), groupChats(chats, " BREAD ", today, zone).earlier.map { it.id })
assertTrue(groupChats(chats, "nothing", today, zone).isEmpty)
}
@Test
fun pinnedFirstWhereverFiledAndFoldersAsATree() {
val folders = listOf(
Folder("inner", "Recipes", parentId = "top", position = 0),
Folder("top", "Waybread", position = 1),
Folder("first", "Letters", position = 0),
// Its parent is not in the list: shown at the top rather than lost.
Folder("stray", "Stray", parentId = "gone", position = 2),
)
assertEquals(listOf("first" to 0, "top" to 0, "inner" to 1, "stray" to 0), folderTree(folders).map { it.first.id to it.second })
val chats = listOf(
Chat(id = "p", title = "Pinned and filed", folderId = "inner", pinned = true),
Chat(id = "r", title = "Rye", folderId = "inner"),
Chat(id = "w", title = "Wrapping", folderId = "top"),
Chat(id = "u", title = "Unfiled", updatedAt = "2026-03-10T08:00:00+00:00"),
Chat(id = "x", title = "In a folder this list does not have", folderId = "elsewhere"),
)
val groups = groupChats(chats, "", today, zone, folders)
assertEquals(listOf("p"), groups.pinned.map { it.id })
assertEquals(
listOf("first" to emptyList(), "top" to listOf("w"), "inner" to listOf("r"), "stray" to emptyList<String>()),
groups.folders.map {
it.folder.id to
it.chats.map { c -> c.id }
},
)
assertEquals(listOf("u"), groups.today.map { it.id })
assertEquals(listOf("x"), groups.earlier.map { it.id })
}
@Test
fun aCollapsedFolderHidesItsChatsAndTheFoldersInside() {
val folders = listOf(Folder("top", "Waybread", collapsed = true), Folder("inner", "Recipes", parentId = "top"), Folder("next", "Letters", position = 1))
val chats = listOf(Chat(id = "r", title = "Rye", folderId = "inner"), Chat(id = "w", title = "Wrapping", folderId = "top"))
val groups = groupChats(chats, "", today, zone, folders)
assertEquals(listOf("top" to emptyList(), "next" to emptyList<String>()), groups.folders.map { it.folder.id to it.chats.map { c -> c.id } })
assertFalse(groups.isEmpty)
// Searching opens everything, and leaves out folders without a match.
val found = groupChats(chats, "rye", today, zone, folders)
assertEquals(listOf("inner" to listOf("r")), found.folders.map { it.folder.id to it.chats.map { c -> c.id } })
}
@Test
fun aSnippetsMarksAndOnesThatDoNotFit() {
val bold = SpanStyle(fontWeight = FontWeight.Bold)
val marked = markedSnippet("how long does lembas keep", listOf(listOf(14, 20), listOf(22, 99), listOf(5), listOf(9, 3)), bold)
assertEquals("how long does lembas keep", marked.text)
assertEquals(listOf(14 to 20, 22 to 25), marked.spanStyles.map { it.start to it.end })
}
}
@@ -9,14 +9,19 @@ import eu.llembas.android.api.ChatPage
import eu.llembas.android.api.DoneFrame
import eu.llembas.android.api.FileContent
import eu.llembas.android.api.FileListing
import eu.llembas.android.api.FolderEnvelope
import eu.llembas.android.api.FolderList
import eu.llembas.android.api.JobsFrame
import eu.llembas.android.api.LembasJson
import eu.llembas.android.api.LiveReply
import eu.llembas.android.api.Me
import eu.llembas.android.api.MemoryEnvelope
import eu.llembas.android.api.MemoryList
import eu.llembas.android.api.Message
import eu.llembas.android.api.Metrics
import eu.llembas.android.api.ModelList
import eu.llembas.android.api.Plan
import eu.llembas.android.api.SearchResults
import eu.llembas.android.api.StatusFrame
import eu.llembas.android.api.SteeredFrame
import eu.llembas.android.api.StepsFrame
@@ -47,6 +52,46 @@ class ContractTest {
private fun <T> read(name: String, serializer: KSerializer<T>): T = LembasJson.decodeFromString(serializer, text(name))
@Test
fun theFoldersAndOne() {
val folders = read("folders", FolderList.serializer()).folders
assertEquals(listOf("fold1", "fold2"), folders.map { it.id })
assertEquals("fold1", folders[1].parentId)
assertTrue(folders[1].collapsed)
assertEquals("Waybread", read("folder", FolderEnvelope.serializer()).folder.name)
}
@Test
fun theMemoriesAndOne() {
val list = read("memories", MemoryList.serializer())
val one = list.memories.single()
assertEquals("Prefers lembas warm.", one.content)
assertFalse(one.byModel)
assertEquals("default", one.dataGroup.id)
assertEquals(listOf("Default"), list.groups.map { it.name })
assertEquals("mem1", read("memory", MemoryEnvelope.serializer()).memory.id)
}
@Test
fun theSearchFindsAChatAFileAndAMemory() {
val found = read("search", SearchResults.serializer())
assertEquals(listOf("chats", "files", "memories"), found.offered)
val chat = found.hits("chats").single()
assertEquals("chat1", chat.id)
assertEquals("lembas", chat.snippet.substring(chat.marks[0][0], chat.marks[0][1]))
assertEquals("/home/frodo/bread.md", found.hits("files").single().path)
assertEquals("mem1", found.hits("memories").single().id)
assertTrue(found.results.first().more)
}
@Test
fun aScheduleThatRunsOnAComputer() {
val schedule = LembasJson.parseToJsonElement(text("schedule_on_device")).jsonObject
// Parsed by the app's model without a field for it yet: the rest must still read.
assertEquals("sched3", read("schedule_on_device", eu.llembas.android.api.ScheduleEnvelope.serializer()).schedule.id)
assertTrue("runs_on" in schedule.getValue("schedule").jsonObject)
}
@Test
fun theVersionIsOneThisAppReads() {
val version = LembasJson.parseToJsonElement(text("version")).toString()
@@ -130,6 +175,13 @@ class ContractTest {
val user = read("message_user", Message.serializer())
assertTrue(user.isUser)
assertEquals("How is lembas made?", user.text)
assertNull(user.progress)
// A prompt waiting behind a running reply says so, and how many are ahead of it.
val queued = read("message_queued", Message.serializer())
assertTrue(queued.queued)
assertEquals("queued", queued.progress!!.phase)
assertEquals(2, queued.progress!!.ahead)
val reply = read("message_assistant", Message.serializer())
assertEquals(listOf("thinking", "text", "tools", "steer", "text"), reply.steps.map { it.kind })
@@ -12,8 +12,11 @@ import eu.llembas.android.api.ScheduleList
import eu.llembas.android.api.ScheduleRuns
import eu.llembas.android.api.SchedulesFrame
import eu.llembas.android.api.SchedulingModels
import eu.llembas.android.api.computerAway
import eu.llembas.android.push.ScheduledNotice
import eu.llembas.android.ui.scheduled.ScheduleLogic
import eu.llembas.android.ui.scheduled.SchedulingLogic
import eu.llembas.android.ui.scheduled.Tone
import kotlinx.serialization.KSerializer
import kotlinx.serialization.json.int
import kotlinx.serialization.json.jsonArray
@@ -84,10 +87,40 @@ class ScheduleContractTest {
assertWaybread(read("schedules", ScheduleList.serializer()).schedules.single())
assertWaybread(read("schedule", ScheduleEnvelope.serializer()).schedule)
val frame = read("event_schedules", SchedulesFrame.serializer())
assertEquals("6852d52c0c9575b0", frame.version)
assertEquals("8bee85746004dc19", frame.version)
assertWaybread(frame.schedules.single())
}
@Test
fun aWatchingScheduleAndItsUnchangedRun() {
// Monitor mode (`schedule_watching.json`): the address it looks at, and a run that found
// nothing changed -- no model, no notification.
val watching = read("schedule_watching", ScheduleEnvelope.serializer()).schedule
assertEquals("url", watching.watch!!.kind)
assertEquals("https://shop.example/mallorn", watching.watch!!.target)
val run = watching.lastRun!!
assertEquals("unchanged", run.status)
assertFalse(run.watch!!.changed)
assertNull(run.notification)
assertEquals(Tone.Quiet, ScheduleLogic.tone(run.status))
// A schedule that watches nothing says null.
assertNull(read("schedule", ScheduleEnvelope.serializer()).schedule.watch)
}
@Test
fun aScheduleOnAComputerAndARunThatFoundItAway() {
val on = read("schedule_on_device", ScheduleEnvelope.serializer()).schedule
val where = on.runsOn!!
assertEquals("bag-end", where.deviceName)
assertEquals("/home/frodo/waybread", where.cwd)
assertEquals("edit", where.mode)
assertEquals(30, where.approvalWaitMinutes)
val run = on.lastRun!!
assertEquals("device", run.waitingFor)
assertTrue(run.computerAway)
assertNull(read("schedule", ScheduleEnvelope.serializer()).schedule.runsOn)
}
@Test
fun theRunsAWaitingOneAndOneInFull() {
val page = read("schedule_runs", ScheduleRuns.serializer())
@@ -191,6 +224,35 @@ class ScheduleContractTest {
assertTrue(notice.id != notice.copy(runId = "run3").id)
}
@Test
fun theServersNotificationWordsAndRunAgain() {
// `push_schedule.json`: the task's name and first lines unlocked, Finished on the lock
// screen, Open and Run again with the owner's labels.
val done = ScheduledNotice.from(read("push_schedule", PushPayload.serializer()))!!
assertEquals("Waybread check", done.title)
assertEquals("All the waybread is wrapped.", done.body)
assertEquals("Waybread check", done.publicTitle)
assertEquals("Finished", done.publicBody)
assertTrue(done.open)
assertTrue(done.runAgain)
assertFalse(done.pause)
assertEquals("Run again", done.label("run_again", "x"))
assertEquals("x", done.label("pause", "x"))
// `push_schedule_failed.json`: three failures ask about Pause, beside Open and Run again.
val failed = ScheduledNotice.from(read("push_schedule_failed", PushPayload.serializer()))!!
assertTrue(failed.failed)
assertTrue(failed.askPause)
assertTrue(failed.pause)
assertTrue(failed.runAgain)
assertEquals("Failed", failed.publicBody)
assertEquals("run3", failed.runId)
// The run's own copy (the schedules frame) says the same.
val run = read("schedule_run", RunResult.serializer()).run
assertEquals(listOf("open", "run_again"), run.notification!!.actions)
}
@Test
fun aPushWithOnlyItsUrlAndOneThatIsNotScheduled() {
val bare = PushPayload(kind = "schedule", url = "/scheduled/sched1?run=run1")
@@ -15,6 +15,21 @@ import org.junit.Test
* cards are in `contract/tool_show.json` and read by `ContractTest`.
*/
class ShowAndServerTest {
@Test
fun aGeneratedPictureIsAnAttachmentIdAndASize() {
// services/images/tool.py: `image: {id, width, height}` on the tool event; no URL at all.
val call = LembasJson.decodeFromString(
ToolCall.serializer(),
"""{"id":"t1","name":"image_generate","status":"ok","attachment_id":"att1",
"image":{"id":"att1","width":1216,"height":832},"block":{"kind":"image","title":"a leaf"}}""",
)
assertEquals("att1", call.image!!.id)
assertEquals(1216, call.image!!.width)
assertEquals(832, call.image!!.height)
assertNull(LembasJson.decodeFromString(ToolCall.serializer(), """{"name":"read"}""").image)
assertEquals("image_generate", eu.llembas.android.ui.chat.IMAGE_TOOL)
}
private fun call(json: String) = LembasJson.decodeFromString(ToolCall.serializer(), json)
@Test
@@ -0,0 +1,101 @@
package eu.llembas.android
import eu.llembas.android.api.AppsInfo
import eu.llembas.android.api.LembasJson
import eu.llembas.android.auth.Prefs
import eu.llembas.android.update.AppVersion
import eu.llembas.android.update.PublicRelease
import eu.llembas.android.update.ReleaseCheck
import eu.llembas.android.update.checksUpdates
import eu.llembas.android.update.offersBetas
import kotlinx.serialization.builtins.ListSerializer
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
class UpdateCheckTest {
private fun v(text: String) = AppVersion.parse(text)!!
@Test
fun versionsSortAsTheirCodesDo() {
assertTrue(v("1.0.0-beta.2") > v("1.0.0-beta.1"))
assertTrue(v("1.0.0-beta.10") > v("1.0.0-beta.9"))
assertTrue(v("1.0.0") > v("1.0.0-beta.99"))
assertTrue(v("1.0.1-beta.1") > v("1.0.0"))
assertEquals(v("v1.2.3"), v("1.2.3"))
// A test build's suffix is not part of the version.
assertEquals(v("1.0.0-beta.5"), v("1.0.0-beta.5-debug.44"))
assertNull(AppVersion.parse("1.0.0-rc.1"))
assertNull(AppVersion.parse("latest"))
}
// GitHub's answer, cut to what the check reads plus a field it does not.
private val releases = LembasJson.decodeFromString(
ListSerializer(PublicRelease.serializer()),
"""
[
{"tag_name": "v1.1.0-beta.1", "prerelease": true, "draft": false, "html_url": "https://example.org/b1", "assets": []},
{"tag_name": "v1.0.1", "prerelease": false, "draft": false, "html_url": "https://example.org/101"},
{"tag_name": "v1.2.0", "prerelease": false, "draft": true, "html_url": "https://example.org/draft"},
{"tag_name": "v1.0.0", "prerelease": false, "html_url": "https://example.org/100"},
{"tag_name": "nightly", "prerelease": true}
]
""",
)
@Test
fun aReleaseIsOfferedTheNewestItMayHave() {
// A release without betas: the newest release, never the draft.
val stable = ReleaseCheck.newest(releases, v("1.0.0"), betas = false)!!
assertEquals(v("1.0.1"), stable.version)
assertEquals("https://example.org/101", stable.page)
// With betas: the beta above it.
assertEquals(v("1.1.0-beta.1"), ReleaseCheck.newest(releases, v("1.0.0"), betas = true)!!.version)
// Nothing newer: nothing offered.
assertNull(ReleaseCheck.newest(releases, v("1.1.0-beta.1"), betas = true))
assertNull(ReleaseCheck.newest(releases, v("1.0.1"), betas = false))
}
@Test
fun theSettingsFollowTheInstalledChannelUntilChosen() {
val unset = Prefs()
assertTrue(unset.checksUpdates(installedIsBeta = true))
assertFalse(unset.checksUpdates(installedIsBeta = false))
assertTrue(unset.offersBetas(installedIsBeta = true))
assertFalse(unset.offersBetas(installedIsBeta = false))
assertFalse(Prefs(updateCheck = false).checksUpdates(installedIsBeta = true))
assertTrue(Prefs(updateBetas = true).offersBetas(installedIsBeta = false))
}
@Test
fun onceADayAtMost() {
val day = 24L * 60 * 60 * 1000
assertTrue(ReleaseCheck.due(0, 5))
assertFalse(ReleaseCheck.due(1_000, 1_000 + day - 1))
assertTrue(ReleaseCheck.due(1_000, 1_000 + day))
// A clock set back is not a reason to wait a year.
assertTrue(ReleaseCheck.due(10 * day, day))
}
@Test
fun theServersRecommendationComesFirst() {
fun read(name: String) = LembasJson.decodeFromString(
AppsInfo.serializer(),
requireNotNull(javaClass.classLoader!!.getResource("$name.json")).readText(),
)
val beta = read("apps")
assertEquals("1.1.0-beta.2", beta.android!!.version)
val offer = ReleaseCheck.recommended(beta, v("1.0.0-beta.5"), betas = true)!!
assertEquals("1.1.0-beta.2", offer.version.toString())
assertEquals("https://github.com/LLeMbas/LLeMbas-Android/releases/tag/v1.1.0-beta.2", offer.page)
// A beta is not offered to someone who did not want betas, nor anything not newer.
assertNull(ReleaseCheck.recommended(beta, v("1.0.0-beta.5"), betas = false))
assertNull(ReleaseCheck.recommended(beta, v("1.1.0-beta.2"), betas = true))
// A stable server with no Android pin recommends nothing, so nothing is offered.
val stable = read("apps_stable")
assertNull(stable.android)
assertNull(ReleaseCheck.recommended(stable, v("1.0.0-beta.5"), betas = true))
}
}
@@ -8,9 +8,13 @@ import eu.llembas.android.api.AgentsSetting
import eu.llembas.android.api.Attachment
import eu.llembas.android.api.Chat
import eu.llembas.android.api.ContextPart
import eu.llembas.android.api.DataGroup
import eu.llembas.android.api.Folder
import eu.llembas.android.api.GeneratedImage
import eu.llembas.android.api.LembasJson
import eu.llembas.android.api.LinkedDevice
import eu.llembas.android.api.LiveReply
import eu.llembas.android.api.Memory
import eu.llembas.android.api.Message
import eu.llembas.android.api.Metrics
import eu.llembas.android.api.ModelList
@@ -21,9 +25,11 @@ import eu.llembas.android.api.RunResult
import eu.llembas.android.api.RunTokens
import eu.llembas.android.api.Schedule
import eu.llembas.android.api.ScheduleCompiled
import eu.llembas.android.api.ScheduleEnvelope
import eu.llembas.android.api.ScheduleRun
import eu.llembas.android.api.SchedulingModel
import eu.llembas.android.api.SchedulingModels
import eu.llembas.android.api.SearchHit
import eu.llembas.android.api.Step
import eu.llembas.android.api.SubagentTree
import eu.llembas.android.api.SubagentsOffer
@@ -41,6 +47,7 @@ import eu.llembas.android.auth.Prefs
import eu.llembas.android.ui.chat.ChatState
import eu.llembas.android.ui.chat.Draft
import eu.llembas.android.ui.home.ChatsState
import eu.llembas.android.ui.memory.MemoryState
import eu.llembas.android.ui.scheduled.EditState
import eu.llembas.android.ui.scheduled.ModelsState
import eu.llembas.android.ui.scheduled.RunState
@@ -111,6 +118,38 @@ object Fakes {
val chat = Chat(id = "c1", title = "Packing for the road", model = "qwen", updatedAt = "2026-03-10T09:00:00+00:00")
// A picture the instance made, and the composer asking for the next one.
val picture = ChatState(
chat = chat,
models = models,
imagesOffered = true,
draft = Draft(image = true),
messages = listOf(
Message(id = "p1", role = "user", text = "Draw lembas wrapped in a mallorn leaf, on a wooden table."),
Message(
id = "p2",
role = "assistant",
model = "qwen",
steps = listOf(
Step(
index = 0,
kind = "tools",
calls = listOf(
ToolCall(
id = "g1",
name = "image_generate",
status = "ok",
image = GeneratedImage(id = "att-picture", width = 1216, height = 832),
block = ToolBlock(kind = "image", title = "lembas in a mallorn leaf"),
),
),
),
Step(index = 1, kind = "text", markdown = "Here it is: the leaf folded twice, as the elves wrap it."),
),
),
),
)
val newChat = ChatState(models = models)
val newAgentChat = ChatState(
@@ -264,6 +303,49 @@ object Fakes {
Chat(id = "c5", title = "Translate the recipe into Slovak", updatedAt = "2026-03-08T10:00:00+00:00"),
Chat(id = "c6", title = "Why do leaves keep bread fresh, and does it work with any leaf or only some?", updatedAt = "2026-03-01T10:00:00+00:00"),
Chat(id = "c7", title = "Clean up the build scripts", kind = "agent", updatedAt = "2026-03-02T10:00:00+00:00"),
Chat(id = "c8", title = "The cram recipe, for the long road", folderId = "f2", pinned = true, updatedAt = "2026-02-20T10:00:00+00:00"),
Chat(id = "c9", title = "Honey cakes for the party", folderId = "f2", updatedAt = "2026-02-21T10:00:00+00:00"),
Chat(id = "c10", title = "Which leaves to wrap it in", folderId = "f1", updatedAt = "2026-02-22T10:00:00+00:00"),
),
folders = listOf(
Folder(id = "f1", name = "Baking", position = 0),
Folder(id = "f2", name = "Recipes from the Shire, the long list", parentId = "f1", position = 0),
Folder(id = "f3", name = "Letters", position = 1, collapsed = true),
),
)
// Memory: one the person wrote, two a model did, in two data groups.
val memory = MemoryState(
memories = listOf(
Memory("m1", "Prefers lembas warm, with a little honey.", author = "user", dataGroup = DataGroup("default", "Default")),
Memory(
"m2",
"Is walking to the mountain with three friends and asks for recipes that keep for weeks without spoiling on the road.",
author = "model",
dataGroup = DataGroup("default", "Default"),
),
Memory("m3", "Writes the garden's diary in Slovak.", author = "model", dataGroup = DataGroup("garden", "The garden")),
),
groups = listOf(DataGroup("default", "Default"), DataGroup("garden", "The garden")),
)
val chatsFound = chats.copy(
foundFor = "bread",
found = listOf(
SearchHit(
kind = "chat",
id = "c4",
title = "Sourdough timings",
snippet = "…leave the bread to rise overnight, then bake it at dawn…",
marks = listOf(listOf(11, 16)),
),
SearchHit(
kind = "chat",
id = "c6",
title = "Why do leaves keep bread fresh, and does it work with any leaf or only some?",
snippet = "Mallorn leaves keep waybread fresh for weeks; other leaves dry the bread out within days.",
marks = listOf(listOf(20, 28), listOf(67, 72)),
),
),
)
@@ -429,6 +511,10 @@ object Fakes {
preview = "Little happened over the weekend: one grid-storage tender in Austria.",
)
private val onComputer = LembasJson.decodeFromString(ScheduleEnvelope.serializer(), text("schedule_on_device")).schedule
val scheduleOnComputer = ScheduleState(schedule = onComputer, runs = listOfNotNull(onComputer.lastRun))
val schedule = ScheduleState(
schedule = schedules[0],
runs = listOf(
@@ -28,8 +28,14 @@ import eu.llembas.android.ui.chat.ChatContent
import eu.llembas.android.ui.chat.ModelPickerContent
import eu.llembas.android.ui.chat.TuneContent
import eu.llembas.android.ui.chat.modelId
import eu.llembas.android.ui.home.ArchivedActions
import eu.llembas.android.ui.home.ArchivedContent
import eu.llembas.android.ui.home.ChatsState
import eu.llembas.android.ui.home.DrawerActions
import eu.llembas.android.ui.home.DrawerContent
import eu.llembas.android.ui.memory.MemoryActions
import eu.llembas.android.ui.memory.MemoryContent
import eu.llembas.android.ui.memory.MemoryState
import eu.llembas.android.ui.scheduled.RunContent
import eu.llembas.android.ui.scheduled.ScheduleContent
import eu.llembas.android.ui.scheduled.ScheduleEditContent
@@ -50,6 +56,10 @@ private object NoChatActions : ChatActions
private object NoDrawerActions : DrawerActions
private object NoArchivedActions : ArchivedActions
private object NoMemoryActions : MemoryActions
private object NoActivityActions : ActivityActions
private object NoSettingsActions : SettingsActions
@@ -113,6 +123,23 @@ class ScreenShots {
}
shoot("05-drawer", content = drawn)
shoot("05-drawer", Phone.Small, content = drawn)
// Searching: the titles that match, then what the instance found inside the messages.
shoot("05-drawer-search") {
ModalNavigationDrawer(
drawerState = rememberDrawerState(DrawerValue.Open),
drawerContent = {
DrawerContent(
Fakes.chatsFound,
current = null,
account = "Home · frodo@example.org",
actions = NoDrawerActions,
today = Fakes.today,
zone = ZoneOffset.UTC,
initialQuery = "bread",
)
},
) { ChatContent(Fakes.transcript, NoChatActions, agent = false) }
}
}
@Test
@@ -157,6 +184,13 @@ class ScreenShots {
@Test
fun schedule() = shoot("10-schedule") { ScheduleContent(Fakes.schedule) }
@Test
fun scheduleOnAComputer() {
// The server's own fixture: on bag-end, in a folder, Edit, and the computer away.
shoot("10-schedule-on-computer") { ScheduleContent(Fakes.scheduleOnComputer) }
shoot("10-schedule-on-computer", Phone.Small, fontScale = 1.5f) { ScheduleContent(Fakes.scheduleOnComputer) }
}
@Test
fun scheduleEdit() = shoot("11-schedule-edit") { ScheduleEditContent(Fakes.editing, editing = false) }
@@ -232,6 +266,27 @@ class ScreenShots {
@Test
fun schedulingModels() = shoot("13-scheduling-models") { SchedulingModelsContent(Fakes.schedulingModels) }
@Test
fun archived() {
shoot("27-archived") { ArchivedContent(Fakes.chats, NoArchivedActions) }
shoot("27-archived", Phone.Small, fontScale = 1.5f) { ArchivedContent(Fakes.chats, NoArchivedActions) }
shoot("27-archived-none") { ArchivedContent(ChatsState(), NoArchivedActions) }
}
@Test
fun picture() {
// The picture's place is its size before it loads (screenshots fetch nothing).
shoot("29-generated-image") { ChatContent(Fakes.picture, NoChatActions, agent = false) }
shoot("29-generated-image", Phone.Small, fontScale = 1.5f) { ChatContent(Fakes.picture, NoChatActions, agent = false) }
}
@Test
fun memory() {
shoot("28-memory") { MemoryContent(Fakes.memory, NoMemoryActions) }
shoot("28-memory", Phone.Small, fontScale = 1.5f) { MemoryContent(Fakes.memory, NoMemoryActions) }
shoot("28-memory-none") { MemoryContent(MemoryState(), NoMemoryActions) }
}
}
/**
+20
View File
@@ -0,0 +1,20 @@
{
"server": {
"version": "2.1.0-beta.3",
"channel": "beta"
},
"apps": {
"android": {
"version": "1.1.0-beta.2",
"tag": "v1.1.0-beta.2",
"channel": "beta",
"page": "https://github.com/LLeMbas/LLeMbas-Android/releases/tag/v1.1.0-beta.2"
},
"desktop": {
"version": "1.0.1",
"tag": "v1.0.1",
"channel": "stable",
"page": "https://github.com/LLeMbas/LLeMbas-Desktop/releases/tag/v1.0.1"
}
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"server": {
"version": "2.0.0",
"channel": "stable"
},
"apps": {
"android": null,
"desktop": {
"version": "1.0.1",
"tag": "v1.0.1",
"channel": "stable",
"page": "https://github.com/LLeMbas/LLeMbas-Desktop/releases/tag/v1.0.1"
}
}
}
+22 -2
View File
@@ -1,5 +1,5 @@
{
"version": "6852d52c0c9575b0",
"version": "8bee85746004dc19",
"schedules": [
{
"id": "sched1",
@@ -51,6 +51,8 @@
"chat_id": "chat1",
"fired_count": 3,
"failure_streak": 0,
"watch": null,
"runs_on": null,
"last_error": null,
"last_run": {
"id": "run1",
@@ -81,7 +83,25 @@
"report_path": null,
"preview": "All the waybread is wrapped.",
"error": null,
"notified": true
"notified": true,
"notification": {
"title": "Waybread check",
"body": "All the waybread is wrapped.",
"public": {
"title": "Waybread check",
"body": "Finished"
},
"actions": [
"open",
"run_again"
],
"labels": {
"open": "Open",
"run_again": "Run again"
},
"ask": ""
},
"watch": null
},
"running": false,
"created_at": "2026-01-02T03:04:05+00:00"
+10
View File
@@ -0,0 +1,10 @@
{
"folder": {
"id": "fold1",
"name": "Waybread",
"parent_id": null,
"kind": "",
"position": 0,
"collapsed": false
}
}
+20
View File
@@ -0,0 +1,20 @@
{
"folders": [
{
"id": "fold1",
"name": "Waybread",
"parent_id": null,
"kind": "",
"position": 0,
"collapsed": false
},
{
"id": "fold2",
"name": "Recipes",
"parent_id": "fold1",
"kind": "chat",
"position": 1,
"collapsed": true
}
]
}
+3 -3
View File
@@ -1,5 +1,5 @@
{
"ref": "v2.0.0-beta.8",
"commit": "d06ca353b801916302f0ce0cc9ae3e5244ff184f",
"sha256": "2a5bf83cf3e8b1b883cc4e1eae10b91466be868842b3728b276e4db5941001c2"
"ref": "v2.0.0-beta.9",
"commit": "3b7da5fc7ac72d5de9229919793dd299c03da6a8",
"sha256": "08565486a9707bf7f11a7e5baeae16fbae38598d89975c5ad6c8178cd066a6c5"
}
+28 -1
View File
@@ -26,5 +26,32 @@
"search": true,
"fetch": true,
"images": false
}
},
"scopes": [
"app",
"models"
],
"language_setting": "sk",
"languages": [
{
"id": "en",
"name": "English"
},
{
"id": "sk",
"name": "Slovenčina"
}
],
"themes": [
{
"id": "moria",
"label": "Moria",
"scheme": "dark"
},
{
"id": "shire",
"label": "Shire",
"scheme": "light"
}
]
}
+21
View File
@@ -0,0 +1,21 @@
{
"memories": [
{
"id": "mem1",
"content": "Prefers lembas warm.",
"author": "user",
"data_group": {
"id": "default",
"name": "Default"
},
"created_at": "2026-01-02T03:04:05+00:00",
"updated_at": "2026-01-02T03:04:05+00:00"
}
],
"groups": [
{
"id": "default",
"name": "Default"
}
]
}
+13
View File
@@ -0,0 +1,13 @@
{
"memory": {
"id": "mem1",
"content": "Prefers lembas warm.",
"author": "user",
"data_group": {
"id": "default",
"name": "Default"
},
"created_at": "2026-01-02T03:04:05+00:00",
"updated_at": "2026-01-02T03:04:05+00:00"
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"id": "msg3",
"role": "user",
"created_at": "2026-01-02T03:04:05+00:00",
"complete": false,
"stopped": false,
"error": null,
"queued": true,
"machine": false,
"origin": "",
"model": null,
"attachments": [],
"text": "And the leaves?",
"progress": {
"phase": "queued",
"since": 1767323045000,
"ahead": 2
}
}
+2 -1
View File
@@ -10,5 +10,6 @@
"origin": "",
"model": null,
"attachments": [],
"text": "How is lembas made?"
"text": "How is lembas made?",
"progress": null
}
+34
View File
@@ -0,0 +1,34 @@
{
"schedule_id": "sched1",
"run_id": "run1",
"chat_id": "chat1",
"status": "ok",
"visibility": "private",
"actions": [
"open",
"run_again"
],
"ask": "",
"notification": {
"title": "Waybread check",
"body": "All the waybread is wrapped.",
"public": {
"title": "Waybread check",
"body": "Finished"
},
"actions": [
"open",
"run_again"
],
"labels": {
"open": "Open",
"run_again": "Run again"
},
"ask": ""
},
"pause_label": "Pause",
"title": "LLeMbas",
"body": "A scheduled task has finished.",
"url": "/scheduled/sched1?run=run1",
"kind": "schedule"
}
+37
View File
@@ -0,0 +1,37 @@
{
"schedule_id": "sched1",
"run_id": "run3",
"chat_id": "chat1",
"status": "failed",
"visibility": "private",
"actions": [
"open",
"run_again",
"pause"
],
"ask": "pause",
"notification": {
"title": "Waybread check",
"body": "Failed 3 times in a row. Pause it?",
"public": {
"title": "Waybread check",
"body": "Failed"
},
"actions": [
"open",
"run_again",
"pause"
],
"labels": {
"open": "Open",
"run_again": "Run again",
"pause": "Pause"
},
"ask": "pause"
},
"pause_label": "Pause",
"title": "LLeMbas",
"body": "A scheduled task failed 3 times in a row. Pause it?",
"url": "/scheduled/sched1?run=run3",
"kind": "schedule_failed"
}
+21 -1
View File
@@ -49,6 +49,8 @@
"chat_id": "chat1",
"fired_count": 3,
"failure_streak": 0,
"watch": null,
"runs_on": null,
"last_error": null,
"last_run": {
"id": "run1",
@@ -79,7 +81,25 @@
"report_path": null,
"preview": "All the waybread is wrapped.",
"error": null,
"notified": true
"notified": true,
"notification": {
"title": "Waybread check",
"body": "All the waybread is wrapped.",
"public": {
"title": "Waybread check",
"body": "Finished"
},
"actions": [
"open",
"run_again"
],
"labels": {
"open": "Open",
"run_again": "Run again"
},
"ask": ""
},
"watch": null
},
"running": false,
"created_at": "2026-01-02T03:04:05+00:00"
+98
View File
@@ -0,0 +1,98 @@
{
"schedule": {
"id": "sched3",
"title": "Nightly tests",
"instruction": "Run the tests.",
"request": "every night at 02:00",
"rule": {
"every": {
"minutes": 1440
}
},
"description": "Every 1 day",
"timezone": "UTC",
"enabled": true,
"next_run": "2026-01-03T02:00:00+00:00",
"next_runs": [],
"target": "chat",
"mode": "fresh",
"notify": "matters",
"catch_up": "one",
"grace_minutes": null,
"model": null,
"effort": null,
"agents": null,
"tools": [
"files",
"recall",
"search",
"fetch",
"memory",
"skills",
"plan"
],
"origin": "user",
"chat_id": "chat2",
"fired_count": 3,
"failure_streak": 0,
"watch": {
"kind": "command",
"command": "git log -1 --format=%H",
"timeout_s": 30,
"target": "git log -1 --format=%H",
"changed_at": "2026-01-02T03:04:05+00:00"
},
"runs_on": {
"device": "tok1",
"device_name": "bag-end",
"cwd": "/home/frodo/waybread",
"mode": "edit",
"approval_wait_minutes": 30
},
"last_error": null,
"last_run": {
"id": "run5",
"schedule_id": "sched3",
"status": "waiting",
"timing": "on_time",
"missed": 0,
"due_at": "2026-01-02T03:04:05+00:00",
"started_at": null,
"finished_at": null,
"waiting_for": "device",
"retry_at": "2026-01-02T03:09:05+00:00",
"progress": {
"phase": "retrying",
"since": 1767323045000,
"reason": "Waiting for bag-end to be linked.",
"in": 0,
"attempt": 1
},
"attempts": 1,
"model": {
"id": null,
"name": null,
"reason": null,
"switched_from": null
},
"tokens": {
"prompt": 0,
"completion": 0
},
"cost": null,
"chat_id": null,
"message_id": null,
"report_path": null,
"preview": "",
"error": {
"class": "device_away",
"text": "Waiting for bag-end to be linked."
},
"notified": false,
"notification": null,
"watch": null
},
"running": false,
"created_at": "2026-01-02T03:04:05+00:00"
}
}
+19 -1
View File
@@ -28,7 +28,25 @@
"report_path": null,
"preview": "All the waybread is wrapped.",
"error": null,
"notified": true
"notified": true,
"notification": {
"title": "Waybread check",
"body": "All the waybread is wrapped.",
"public": {
"title": "Waybread check",
"body": "Finished"
},
"actions": [
"open",
"run_again"
],
"labels": {
"open": "Open",
"run_again": "Run again"
},
"ask": ""
},
"watch": null
},
"text": "All the waybread is *wrapped*."
}
+22 -2
View File
@@ -37,7 +37,9 @@
"class": "no_model",
"text": "Waiting for a free model: Qwen: it is answering someone."
},
"notified": false
"notified": false,
"notification": null,
"watch": null
},
{
"id": "run1",
@@ -68,7 +70,25 @@
"report_path": null,
"preview": "All the waybread is wrapped.",
"error": null,
"notified": true
"notified": true,
"notification": {
"title": "Waybread check",
"body": "All the waybread is wrapped.",
"public": {
"title": "Waybread check",
"body": "Finished"
},
"actions": [
"open",
"run_again"
],
"labels": {
"open": "Open",
"run_again": "Run again"
},
"ask": ""
},
"watch": null
}
],
"more": false
+89
View File
@@ -0,0 +1,89 @@
{
"schedule": {
"id": "sched2",
"title": "Mallorn price",
"instruction": "Say the new price.",
"request": "every hour, when the page changes",
"rule": {
"every": {
"minutes": 60
}
},
"description": "Every 1 hour",
"timezone": "UTC",
"enabled": true,
"next_run": "2026-01-02T04:04:05+00:00",
"next_runs": [],
"target": "chat",
"mode": "fresh",
"notify": "matters",
"catch_up": "one",
"grace_minutes": null,
"model": null,
"effort": null,
"agents": null,
"tools": [
"files",
"recall",
"search",
"fetch",
"memory",
"skills",
"plan"
],
"origin": "user",
"chat_id": null,
"fired_count": 7,
"failure_streak": 0,
"watch": {
"kind": "url",
"url": "https://shop.example/mallorn",
"target": "https://shop.example/mallorn",
"changed_at": "2026-01-02T03:04:05+00:00"
},
"runs_on": null,
"last_error": null,
"last_run": {
"id": "run4",
"schedule_id": "sched2",
"status": "unchanged",
"timing": "on_time",
"missed": 0,
"due_at": "2026-01-02T03:04:05+00:00",
"started_at": "2026-01-02T03:04:05+00:00",
"finished_at": "2026-01-02T03:04:05+00:00",
"waiting_for": null,
"retry_at": null,
"progress": null,
"attempts": 1,
"model": {
"id": null,
"name": null,
"reason": null,
"switched_from": null
},
"tokens": {
"prompt": 0,
"completion": 0
},
"cost": null,
"chat_id": null,
"message_id": null,
"report_path": null,
"preview": "",
"error": null,
"notified": false,
"notification": null,
"watch": {
"kind": "url",
"changed": false,
"first": false,
"hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bytes": 5120,
"error": null
}
},
"running": false,
"created_at": "2026-01-02T03:04:05+00:00"
}
}
+21 -1
View File
@@ -50,6 +50,8 @@
"chat_id": "chat1",
"fired_count": 3,
"failure_streak": 0,
"watch": null,
"runs_on": null,
"last_error": null,
"last_run": {
"id": "run1",
@@ -80,7 +82,25 @@
"report_path": null,
"preview": "All the waybread is wrapped.",
"error": null,
"notified": true
"notified": true,
"notification": {
"title": "Waybread check",
"body": "All the waybread is wrapped.",
"public": {
"title": "Waybread check",
"body": "Finished"
},
"actions": [
"open",
"run_again"
],
"labels": {
"open": "Open",
"run_again": "Run again"
},
"ask": ""
},
"watch": null
},
"running": false,
"created_at": "2026-01-02T03:04:05+00:00"
+26
View File
@@ -0,0 +1,26 @@
{
"scope": {
"families": [
{
"gate": "notes",
"label": "Notes",
"on": true
},
{
"gate": "web",
"label": "Web search",
"on": false
}
],
"skills": [
{
"name": "baking",
"description": "Bake waybread.",
"on": true
}
],
"allow": [
"bash:ls *"
]
}
}
+69
View File
@@ -0,0 +1,69 @@
{
"q": "lembas",
"in": "all",
"offered": [
"chats",
"files",
"memories"
],
"results": [
{
"kind": "chats",
"more": true,
"hits": [
{
"kind": "chat",
"title": "Waybread",
"snippet": "…how long does lembas keep & travel?",
"marks": [
[
15,
21
]
],
"archived": false,
"id": "chat1",
"agent": false
}
]
},
{
"kind": "files",
"more": false,
"hits": [
{
"kind": "file",
"title": "bread.md",
"snippet": "/home/frodo/bread.md — Lembas recipe",
"marks": [
[
23,
29
]
],
"archived": false,
"path": "/home/frodo/bread.md"
}
]
},
{
"kind": "memories",
"more": false,
"hits": [
{
"kind": "memory",
"id": "mem1",
"title": "",
"snippet": "Prefers lembas warm.",
"marks": [
[
8,
14
]
],
"archived": false
}
]
}
]
}
+44 -1
View File
@@ -36,6 +36,28 @@ STRINGS: dict[str, str] = {
"empty_chat": "What shall we talk about?",
"loading_line": "Baking lembas…",
"archive": "Archive",
"archived": "Archived",
"archived_restore": "Restore chat",
"archived_none": "No archived chats.",
"memory": "Memory",
"memory_intro": "What models remember about you",
"memory_none": "Nothing yet. A model with the memory tool adds to this when you tell it something worth keeping.",
"memory_remember": "Remember",
"memory_label": "What this memory says",
"memory_hint": "Something worth remembering",
"memory_group": "Data group",
"memory_forget": "Forget",
"memory_by_model": "Model",
"chats_pinned": "Pinned chats",
"chat_pin": "Pin chat",
"chat_unpin": "Unpin chat",
"folder_move": "Move to folder",
"folder_none": "No folder",
"folder_new": "New folder",
"folder_name": "Folder name",
"folder_rename": "Rename folder",
"folder_delete": "Delete folder",
"folder_delete_confirm": "Delete the folder “%1$s”? Chats inside it are kept.",
"delete": "Delete",
"edit": "Edit",
"regenerate": "Regenerate",
@@ -53,6 +75,8 @@ STRINGS: dict[str, str] = {
"attach_take_photo": "Take a photo",
"attach_choose_photos": "Choose photos",
"attach_choose_files": "Choose files",
"image_generate": "Generate images",
"image_generated": "The generated image",
"copy_message": "Copy message",
"copied": "Copied.",
"rename_chat": "Rename chat",
@@ -138,6 +162,7 @@ STRINGS: dict[str, str] = {
"chats_today": "Today",
"chats_earlier": "Earlier",
"chats_agents": "Agent chats",
"chats_found_in_messages": "In the messages",
"chats_none_found": "No chat has that in its title.",
"clear": "Clear",
"composer_hint_agent": "Tell the agent what to do",
@@ -210,10 +235,16 @@ STRINGS: dict[str, str] = {
"notify_never": "Never tells you",
"run_ok": "Done",
"run_silent": "Nothing new",
"run_unchanged": "Unchanged",
"schedule_computer": "Computer",
"schedule_computer_away": "not linked now",
"schedule_watching": "Only when this page changes",
"schedule_watching_command": "Only when this command's output changes",
"run_failed": "Failed",
"run_missed": "Missed ×%1$s",
"run_skipped": "Skipped",
"run_waiting": "Waiting for a model",
"run_waiting_computer": "Waiting for the computer",
"run_running": "Running",
"run_model_instead": "%1$s, instead of %2$s",
"run_retry_at": "Tries again at %1$s",
@@ -230,6 +261,7 @@ STRINGS: dict[str, str] = {
"channel_scheduled_failures": "Scheduled failures",
"scheduled_result_public": "A scheduled task has a result.",
"scheduled_failed_public": "A scheduled task failed.",
"schedule_run_again": "Run again",
# Cards
"card_approval": "Allow this?",
"card_allow_once": "Allow once",
@@ -345,6 +377,16 @@ STRINGS: dict[str, str] = {
"update_allow_installs": "Allow LLeMbas to install updates, then check again.",
"update_bad_file": "The download did not match the release and was discarded.",
"update_installing": "Installing %1$s…",
"update_checking": "Checking…",
"update_available": "%1$s is available. Tap to open its release page.",
"update_install": "Install %1$s",
"update_auto": "Look for new versions",
"update_auto_line": "At most once a day, when the app starts, it asks your instance which release goes with it (an older instance: the list of releases on GitHub) and tells you in a notification when there is a newer one. Nothing about you is sent anywhere else. On by default in a beta, off otherwise.",
"update_betas": "Include betas",
"update_betas_line": "Offer test versions as well as releases. On by default when this app is itself a beta.",
"channel_updates": "App updates",
"update_notice_title": "LLeMbas for Android %1$s",
"update_notice_text": "A newer version is available. Tap to open its release page.",
# Assistant
"assist_hint": "Ask anything",
"assist_signed_out": "Sign in to a LLeMbas instance in the app first.",
@@ -383,7 +425,7 @@ STRINGS: dict[str, str] = {
"voice_input_phone": "Phone (Google or the system's)",
"voice_input_phone_line": "The phone's own recogniser. The words appear as you speak; the recording goes wherever that recogniser sends it.",
"voice_input_phone_none": "This phone has no speech recogniser of its own.",
"voice_input_hint": "Used by the assistant. With LLeMbas the words appear a moment behind you, and a pause sends them; with the phone's recogniser they appear as you speak.",
"voice_input_hint": "Used by the assistant and by the microphone in a chat. With LLeMbas the assistant shows the words a moment behind you and a pause sends them, and a chat writes them down when you stop; with the phone's recogniser they appear as you speak.",
# Share
"share_sending": "Sending to LLeMbas…",
"share_default_prompt": "Have a look at this.",
@@ -422,4 +464,5 @@ SERVER_ENGLISH: dict[str, str] = {
"agent_steps": "%(steps)s steps, %(tools)s tools",
"agent_stop": "Stop %(name)s",
"agent_stop_member_confirm": "Stop %(name)s and the members under it? They leave the team.",
"folder_delete_confirm": "Delete the folder “%(name)s”? Chats inside it are kept.",
}
+128 -24
View File
@@ -17,6 +17,7 @@
"agent_runs_on": "Běží na %1$s, ve složce %2$s",
"agent_stop_confirm": "Zastavit %1$s? Co dosud udělal, zůstane.",
"archive": "Archivovat",
"archived_none": "Žádné archivované konverzace.",
"assist_answer_in_app": "Tato odpověď čeká na vaše rozhodnutí: otevřete ji v aplikaci.",
"assist_connecting": "Připojování…",
"assist_continue": "Pokračovat v poslední konverzaci",
@@ -64,8 +65,10 @@
"channel_asks": "Otázky a schválení",
"channel_scheduled": "Výsledky naplánovaných úloh",
"channel_scheduled_failures": "Selhání naplánovaných úloh",
"channel_updates": "Aktualizace aplikace",
"chats_agents": "Chaty s agentem",
"chats_earlier": "Dříve",
"chats_found_in_messages": "Ve zprávách",
"chats_none_found": "Žádný chat to nemá v názvu.",
"chats_open": "Otevřít chaty",
"chats_search": "Hledat v chatech",
@@ -125,6 +128,7 @@
"run_silent": "Nic nového",
"run_skipped": "Vynecháno",
"run_waiting": "Čeká na model",
"run_waiting_computer": "Čeká na počítač",
"schedule_delete_confirm": "Smazat tento plán? Jeho dřívější výsledky zůstanou ve svých chatech.",
"schedule_edit": "Upravit plán",
"schedule_history": "Historie",
@@ -189,12 +193,22 @@
"thinking_switch_hint": "Pomalejší a lepší u těžkých otázek.",
"tile_ask": "Zeptat se LLeMbas",
"tools_used": "Použité nástroje: %1$s",
"tree_context": "kontext %1$s%%",
"tune": "Možnosti",
"update_allow_installs": "Povolte aplikaci LLeMbas instalovat aktualizace a pak to zkontrolujte znovu.",
"update_auto": "Hledat nové verze",
"update_auto_line": "Nejvýš jednou denně, při spuštění, se aplikace zeptá vaší instance, které vydání k ní patří (u starší instance si přečte seznam vydání na GitHubu), a upozorněním vám dá vědět, když je k dispozici novější. Nic o vás se nikam jinam neposílá. Ve verzi beta zapnuto, jinak vypnuto.",
"update_available": "Je k dispozici %1$s. Klepnutím otevřete stránku vydání.",
"update_bad_file": "Stažený soubor neodpovídal verzi a byl zahozen.",
"update_betas": "Včetně beta verzí",
"update_betas_line": "Nabízet i testovací verze, nejen vydání. Zapnuto, když je tato aplikace sama beta.",
"update_check": "Zkontrolovat aktualizaci",
"update_checking": "Kontroluje se…",
"update_install": "Nainstalovat %1$s",
"update_installing": "Instaluje se %1$s…",
"update_none": "Toto je nejnovější verze.",
"update_notice_text": "Je k dispozici novější verze. Klepnutím otevřete stránku vydání.",
"update_notice_title": "LLeMbas pro Android %1$s",
"update_unreachable": "Aktualizaci se nepodařilo stáhnout.",
"viewer_html_source": "Toto je zdrojový kód stránky. Samotnou stránku uvidíte po otevření v prohlížeči.",
"viewer_long_markdown": "Dlouhý soubor, proto je zobrazen jako prostý text.",
@@ -202,13 +216,12 @@
"viewer_too_large": "Tento soubor je příliš velký na zobrazení; zobrazit lze nejvýše 1 MB.",
"viewer_unavailable": "Tento server zatím aplikaci soubor předat neumí. Otevřete ho v prohlížeči.",
"voice_input": "Hlasový vstup",
"voice_input_hint": "Používá ho asistent. S LLeMbas se slova objevují s malým zpožděním a pauza je odešle; s rozpoznáváním v telefonu se objevují, jak mluvíte.",
"voice_input_hint": "Používá ho asistent i mikrofon v konverzaci. S LLeMbas asistent ukazuje slova s malým zpožděním a pauza je odešle, konverzace je zapíše, když přestanete; s rozpoznáváním v telefonu se objevují, jak mluvíte.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "Převod řeči na text vaší instance, přes server. Nahrávka jde na vaši instanci a nikam jinam.",
"voice_input_phone": "Telefon (Google nebo systémový)",
"voice_input_phone_line": "Vlastní rozpoznávání řeči v telefonu. Slova se objevují, jak mluvíte; nahrávka jde tam, kam ji to rozpoznávání pošle.",
"voice_input_phone_none": "Tento telefon nemá vlastní rozpoznávání řeči.",
"tree_context": "kontext %1$s%%"
"voice_input_phone_none": "Tento telefon nemá vlastní rozpoznávání řeči."
},
"de": {
"about_version": "LLeMbas für Android %1$s",
@@ -228,6 +241,7 @@
"agent_runs_on": "Läuft auf %1$s, in %2$s",
"agent_stop_confirm": "%1$s stoppen? Was bisher getan wurde, bleibt.",
"archive": "Archivieren",
"archived_none": "Keine archivierten Chats.",
"assist_answer_in_app": "Diese Antwort wartet auf Ihre Entscheidung: öffnen Sie sie in der App.",
"assist_connecting": "Verbinden…",
"assist_continue": "Letzten Chat fortsetzen",
@@ -275,8 +289,10 @@
"channel_asks": "Fragen und Bestätigungen",
"channel_scheduled": "Geplante Ergebnisse",
"channel_scheduled_failures": "Geplante Fehler",
"channel_updates": "App-Updates",
"chats_agents": "Agenten-Chats",
"chats_earlier": "Früher",
"chats_found_in_messages": "In den Nachrichten",
"chats_none_found": "Kein Chat hat das im Titel.",
"chats_open": "Chats öffnen",
"chats_search": "Chats durchsuchen",
@@ -337,6 +353,7 @@
"run_silent": "Nichts Neues",
"run_skipped": "Übersprungen",
"run_waiting": "Wartet auf ein Modell",
"run_waiting_computer": "Wartet auf den Computer",
"schedule_delete_confirm": "Diesen Zeitplan löschen? Seine bisherigen Ergebnisse bleiben in ihren Chats.",
"schedule_edit": "Zeitplan bearbeiten",
"schedule_history": "Verlauf",
@@ -401,12 +418,22 @@
"thinking_switch_hint": "Langsamer, und besser bei schwierigen Fragen.",
"tile_ask": "LLeMbas fragen",
"tools_used": "%1$s Werkzeuge genutzt",
"tree_context": "%1$s%% Kontext",
"tune": "Optionen",
"update_allow_installs": "Erlauben Sie LLeMbas, Updates zu installieren, und prüfen Sie dann erneut.",
"update_auto": "Nach neuen Versionen suchen",
"update_auto_line": "Höchstens einmal am Tag, beim Start, fragt die App Ihre Instanz, welches Release zu ihr passt (bei einer älteren Instanz: die Liste der Releases auf GitHub), und meldet per Benachrichtigung, wenn es ein neueres gibt. Nichts über Sie wird anderswohin gesendet. In einer Beta standardmäßig an, sonst aus.",
"update_available": "%1$s ist verfügbar. Tippen Sie, um die Release-Seite zu öffnen.",
"update_bad_file": "Der Download stimmte nicht mit der Version überein und wurde verworfen.",
"update_betas": "Betas einbeziehen",
"update_betas_line": "Auch Testversionen anbieten, nicht nur Releases. Standardmäßig an, wenn diese App selbst eine Beta ist.",
"update_check": "Nach einem Update suchen",
"update_checking": "Wird geprüft…",
"update_install": "%1$s installieren",
"update_installing": "%1$s wird installiert…",
"update_none": "Dies ist die neueste Version.",
"update_notice_text": "Eine neuere Version ist verfügbar. Tippen Sie, um die Release-Seite zu öffnen.",
"update_notice_title": "LLeMbas für Android %1$s",
"update_unreachable": "Das Update konnte nicht abgerufen werden.",
"viewer_html_source": "Das ist der Quelltext der Seite. Die Seite selbst sehen Sie im Browser.",
"viewer_long_markdown": "Eine lange Datei, daher wird sie als reiner Text angezeigt.",
@@ -414,13 +441,12 @@
"viewer_too_large": "Diese Datei ist zu groß zum Anzeigen; höchstens 1 MB kann angezeigt werden.",
"viewer_unavailable": "Dieser Server kann die Datei der App noch nicht übergeben. Öffnen Sie sie stattdessen im Browser.",
"voice_input": "Spracheingabe",
"voice_input_hint": "Wird vom Assistenten genutzt. Mit LLeMbas erscheinen die Wörter einen Moment später, und eine Pause sendet sie; mit der Erkennung des Telefons erscheinen sie beim Sprechen.",
"voice_input_hint": "Wird vom Assistenten und vom Mikrofon im Chat genutzt. Mit LLeMbas zeigt der Assistent die Wörter einen Moment später, und eine Pause sendet sie, ein Chat schreibt sie auf, wenn Sie aufhören; mit der Erkennung des Telefons erscheinen sie beim Sprechen.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "Die Spracherkennung Ihrer Instanz, über den Server. Die Aufnahme geht an Ihre Instanz und nirgendwo sonst hin.",
"voice_input_phone": "Telefon (Google oder das System)",
"voice_input_phone_line": "Die eigene Spracherkennung des Telefons. Die Wörter erscheinen beim Sprechen; die Aufnahme geht dorthin, wohin diese Erkennung sie schickt.",
"voice_input_phone_none": "Dieses Telefon hat keine eigene Spracherkennung.",
"tree_context": "%1$s%% Kontext"
"voice_input_phone_none": "Dieses Telefon hat keine eigene Spracherkennung."
},
"es": {
"about_version": "LLeMbas para Android %1$s",
@@ -440,6 +466,7 @@
"agent_runs_on": "Se ejecuta en %1$s, en %2$s",
"agent_stop_confirm": "¿Detener %1$s? Lo que ha hecho hasta ahora se queda.",
"archive": "Archivar",
"archived_none": "No hay chats archivados.",
"assist_answer_in_app": "Esta respuesta espera su decisión: ábrala en la app.",
"assist_connecting": "Conectando…",
"assist_continue": "Continuar el último chat",
@@ -487,8 +514,10 @@
"channel_asks": "Preguntas y aprobaciones",
"channel_scheduled": "Resultados programados",
"channel_scheduled_failures": "Fallos programados",
"channel_updates": "Actualizaciones de la aplicación",
"chats_agents": "Chats de agente",
"chats_earlier": "Antes",
"chats_found_in_messages": "En los mensajes",
"chats_none_found": "Ningún chat lo tiene en el título.",
"chats_open": "Abrir los chats",
"chats_search": "Buscar chats",
@@ -548,6 +577,7 @@
"run_silent": "Nada nuevo",
"run_skipped": "Omitida",
"run_waiting": "Esperando un modelo",
"run_waiting_computer": "Esperando al ordenador",
"schedule_delete_confirm": "¿Eliminar esta programación? Sus resultados anteriores se quedan en sus chats.",
"schedule_edit": "Editar programación",
"schedule_history": "Historial",
@@ -612,12 +642,22 @@
"thinking_switch_hint": "Más lento, y mejor con preguntas difíciles.",
"tile_ask": "Preguntar a LLeMbas",
"tools_used": "Usó %1$s herramientas",
"tree_context": "%1$s%% de contexto",
"tune": "Opciones",
"update_allow_installs": "Permita que LLeMbas instale actualizaciones y vuelva a comprobarlo.",
"update_auto": "Buscar nuevas versiones",
"update_auto_line": "Como mucho una vez al día, al iniciarse, la aplicación pregunta a su instancia qué versión le corresponde (con una instancia más antigua, lee la lista de versiones en GitHub) y le avisa con una notificación cuando hay una más reciente. No se envía nada sobre usted a ningún otro sitio. Activado por defecto en una beta; si no, desactivado.",
"update_available": "%1$s está disponible. Toque para abrir su página de publicación.",
"update_bad_file": "La descarga no coincidía con la versión y se descartó.",
"update_betas": "Incluir betas",
"update_betas_line": "Ofrecer también versiones de prueba, no solo publicaciones. Activado por defecto cuando esta aplicación es una beta.",
"update_check": "Buscar una actualización",
"update_checking": "Comprobando…",
"update_install": "Instalar %1$s",
"update_installing": "Instalando %1$s…",
"update_none": "Esta es la versión más reciente.",
"update_notice_text": "Hay una versión más reciente. Toque para abrir su página de publicación.",
"update_notice_title": "LLeMbas para Android %1$s",
"update_unreachable": "No se pudo obtener la actualización.",
"viewer_html_source": "Este es el código fuente de la página. Ábrala en el navegador para ver la página.",
"viewer_long_markdown": "Un archivo largo, por eso se muestra como texto sin formato.",
@@ -625,13 +665,12 @@
"viewer_too_large": "Este archivo es demasiado grande para mostrarlo; se puede mostrar como máximo 1 MB.",
"viewer_unavailable": "Este servidor todavía no puede entregar el archivo a la aplicación. Ábralo en el navegador.",
"voice_input": "Entrada de voz",
"voice_input_hint": "La usa el asistente. Con LLeMbas las palabras aparecen un momento después y una pausa las envía; con el reconocimiento del teléfono aparecen mientras habla.",
"voice_input_hint": "La usan el asistente y el micrófono de un chat. Con LLeMbas el asistente muestra las palabras un momento después y una pausa las envía, y un chat las escribe cuando usted para; con el reconocimiento del teléfono aparecen mientras habla.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "La conversión de voz a texto de su instancia, a través del servidor. La grabación va a su instancia y a ningún otro sitio.",
"voice_input_phone": "Teléfono (Google o el del sistema)",
"voice_input_phone_line": "El reconocimiento de voz del propio teléfono. Las palabras aparecen mientras habla; la grabación va adonde ese reconocimiento la envíe.",
"voice_input_phone_none": "Este teléfono no tiene reconocimiento de voz propio.",
"tree_context": "%1$s%% de contexto"
"voice_input_phone_none": "Este teléfono no tiene reconocimiento de voz propio."
},
"fr": {
"about_version": "LLeMbas pour Android %1$s",
@@ -651,6 +690,7 @@
"agent_runs_on": "S’exécute sur %1$s, dans %2$s",
"agent_stop_confirm": "Arrêter %1$s ? Ce qu’il a déjà fait reste.",
"archive": "Archiver",
"archived_none": "Aucune conversation archivée.",
"assist_answer_in_app": "Cette réponse attend votre décision : ouvrez-la dans l’app.",
"assist_connecting": "Connexion…",
"assist_continue": "Reprendre la dernière conversation",
@@ -698,8 +738,10 @@
"channel_asks": "Questions et approbations",
"channel_scheduled": "Résultats planifiés",
"channel_scheduled_failures": "Échecs planifiés",
"channel_updates": "Mises à jour de l’application",
"chats_agents": "Discussions d’agent",
"chats_earlier": "Plus tôt",
"chats_found_in_messages": "Dans les messages",
"chats_none_found": "Aucune discussion ne l’a dans son titre.",
"chats_open": "Ouvrir les discussions",
"chats_search": "Rechercher dans les discussions",
@@ -760,6 +802,7 @@
"run_silent": "Rien de neuf",
"run_skipped": "Sautée",
"run_waiting": "En attente d’un modèle",
"run_waiting_computer": "En attente de l’ordinateur",
"schedule_delete_confirm": "Supprimer cette planification ? Ses résultats passés restent dans leurs discussions.",
"schedule_edit": "Modifier la planification",
"schedule_history": "Historique",
@@ -824,12 +867,22 @@
"thinking_switch_hint": "Plus lent, et meilleur sur les questions difficiles.",
"tile_ask": "Demander à LLeMbas",
"tools_used": "%1$s outils utilisés",
"tree_context": "%1$s%% du contexte",
"tune": "Options",
"update_allow_installs": "Autorisez LLeMbas à installer des mises à jour, puis vérifiez à nouveau.",
"update_auto": "Rechercher de nouvelles versions",
"update_auto_line": "Au plus une fois par jour, au démarrage, l’application demande à votre instance quelle version lui correspond (avec une instance plus ancienne, elle lit la liste des versions sur GitHub) et vous prévient par une notification lorsqu’il en existe une plus récente. Rien sur vous n’est envoyé ailleurs. Activé par défaut dans une bêta, désactivé sinon.",
"update_available": "%1$s est disponible. Touchez pour ouvrir sa page de publication.",
"update_bad_file": "Le téléchargement ne correspondait pas à la version et a été rejeté.",
"update_betas": "Inclure les bêtas",
"update_betas_line": "Proposer aussi les versions de test, pas seulement les publications. Activé par défaut quand cette application est elle-même une bêta.",
"update_check": "Rechercher une mise à jour",
"update_checking": "Vérification…",
"update_install": "Installer %1$s",
"update_installing": "Installation de %1$s…",
"update_none": "C'est la version la plus récente.",
"update_notice_text": "Une version plus récente est disponible. Touchez pour ouvrir sa page de publication.",
"update_notice_title": "LLeMbas pour Android %1$s",
"update_unreachable": "La mise à jour n'a pas pu être récupérée.",
"viewer_html_source": "Ceci est le code source de la page. Ouvrez-la dans le navigateur pour voir la page elle-même.",
"viewer_long_markdown": "Un fichier long, il est donc affiché en texte brut.",
@@ -837,13 +890,12 @@
"viewer_too_large": "Ce fichier est trop volumineux pour être affiché ; 1 Mo au plus peut être affiché.",
"viewer_unavailable": "Ce serveur ne peut pas encore transmettre le fichier à l'application. Ouvrez-le plutôt dans le navigateur.",
"voice_input": "Saisie vocale",
"voice_input_hint": "Utilisée par l’assistant. Avec LLeMbas, les mots apparaissent avec un léger décalage et une pause les envoie ; avec la reconnaissance du téléphone, ils apparaissent pendant que vous parlez.",
"voice_input_hint": "Utilisée par l’assistant et par le micro d’une conversation. Avec LLeMbas, l’assistant affiche les mots avec un léger décalage et une pause les envoie, et une conversation les écrit quand vous vous arrêtez ; avec la reconnaissance du téléphone, ils apparaissent pendant que vous parlez.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "La transcription de votre instance, via le serveur. L’enregistrement va à votre instance et nulle part ailleurs.",
"voice_input_phone": "Téléphone (Google ou celui du système)",
"voice_input_phone_line": "La reconnaissance vocale du téléphone. Les mots apparaissent pendant que vous parlez ; l’enregistrement va là où cette reconnaissance l’envoie.",
"voice_input_phone_none": "Ce téléphone n’a pas de reconnaissance vocale propre.",
"tree_context": "%1$s%% du contexte"
"voice_input_phone_none": "Ce téléphone n’a pas de reconnaissance vocale propre."
},
"hu": {
"about_version": "LLeMbas Androidra %1$s",
@@ -863,6 +915,7 @@
"agent_runs_on": "Itt fut: %1$s, ebben: %2$s",
"agent_stop_confirm": "Leállítja: %1$s? Amit eddig elvégzett, megmarad.",
"archive": "Archiválás",
"archived_none": "Nincs archivált csevegés.",
"assist_answer_in_app": "Ez a válasz az Ön döntésére vár: nyissa meg az alkalmazásban.",
"assist_connecting": "Csatlakozás…",
"assist_continue": "Az utolsó csevegés folytatása",
@@ -910,8 +963,10 @@
"channel_asks": "Kérdések és jóváhagyások",
"channel_scheduled": "Ütemezett eredmények",
"channel_scheduled_failures": "Ütemezett hibák",
"channel_updates": "Alkalmazásfrissítések",
"chats_agents": "Ügynök-csevegések",
"chats_earlier": "Korábban",
"chats_found_in_messages": "Az üzenetekben",
"chats_none_found": "Egy csevegés címében sincs ilyen.",
"chats_open": "Csevegések megnyitása",
"chats_search": "Keresés a csevegésekben",
@@ -972,6 +1027,7 @@
"run_silent": "Semmi új",
"run_skipped": "Kihagyva",
"run_waiting": "Modellre vár",
"run_waiting_computer": "Várakozás a számítógépre",
"schedule_delete_confirm": "Törli ezt az ütemezést? A korábbi eredményei megmaradnak a csevegéseikben.",
"schedule_edit": "Ütemezés szerkesztése",
"schedule_history": "Előzmények",
@@ -1036,12 +1092,22 @@
"thinking_switch_hint": "Lassabb, de jobb a nehéz kérdéseknél.",
"tile_ask": "Kérdés az LLeMbas-tól",
"tools_used": "%1$s eszköz használva",
"tree_context": "%1$s%% kontextus",
"tune": "Beállítások",
"update_allow_installs": "Engedélyezze, hogy az LLeMbas frissítéseket telepítsen, majd ellenőrizze újra.",
"update_auto": "Új verziók keresése",
"update_auto_line": "Naponta legfeljebb egyszer, induláskor az alkalmazás megkérdezi a példányát, melyik kiadás illik hozzá (régebbi példánynál a GitHubon lévő kiadások listáját olvassa be), és értesítésben jelzi, ha van újabb. Önről semmi nem megy máshová. Béta verzióban alapból bekapcsolva, egyébként kikapcsolva.",
"update_available": "Elérhető a(z) %1$s. Koppintson a kiadás oldalának megnyitásához.",
"update_bad_file": "A letöltés nem egyezett a verzióval, és el lett dobva.",
"update_betas": "Béták is",
"update_betas_line": "Tesztverziók felajánlása is, nem csak kiadásoké. Alapból bekapcsolva, ha ez az alkalmazás maga is béta.",
"update_check": "Frissítés keresése",
"update_checking": "Ellenőrzés…",
"update_install": "%1$s telepítése",
"update_installing": "%1$s telepítése…",
"update_none": "Ez a legújabb verzió.",
"update_notice_text": "Újabb verzió érhető el. Koppintson a kiadás oldalának megnyitásához.",
"update_notice_title": "LLeMbas Androidra %1$s",
"update_unreachable": "A frissítést nem sikerült letölteni.",
"viewer_html_source": "Ez az oldal forráskódja. Magát az oldalt a böngészőben megnyitva láthatja.",
"viewer_long_markdown": "Hosszú fájl, ezért egyszerű szövegként jelenik meg.",
@@ -1049,13 +1115,12 @@
"viewer_too_large": "Ez a fájl túl nagy a megjelenítéshez; legfeljebb 1 MB jeleníthető meg.",
"viewer_unavailable": "Ez a szerver még nem tudja átadni a fájlt az alkalmazásnak. Nyissa meg inkább a böngészőben.",
"voice_input": "Hangbevitel",
"voice_input_hint": "Az asszisztens használja. LLeMbasszal a szavak kis késéssel jelennek meg, és egy szünet elküldi őket; a telefon felismerőjével beszéd közben jelennek meg.",
"voice_input_hint": "Az asszisztens és a csevegés mikrofonja használja. LLeMbasszal az asszisztens kis késéssel mutatja a szavakat, és egy szünet elküldi őket, a csevegés pedig akkor írja le őket, amikor abbahagyja; a telefon felismerőjével beszéd közben jelennek meg.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "A példánya beszédfelismerése, a szerveren át. A felvétel a példányához megy, máshová nem.",
"voice_input_phone": "Telefon (Google vagy a rendszeré)",
"voice_input_phone_line": "A telefon saját beszédfelismerője. A szavak beszéd közben jelennek meg; a felvétel oda megy, ahová az a felismerő küldi.",
"voice_input_phone_none": "Ennek a telefonnak nincs saját beszédfelismerője.",
"tree_context": "%1$s%% kontextus"
"voice_input_phone_none": "Ennek a telefonnak nincs saját beszédfelismerője."
},
"it": {
"about_version": "LLeMbas per Android %1$s",
@@ -1075,6 +1140,7 @@
"agent_runs_on": "Gira su %1$s, in %2$s",
"agent_stop_confirm": "Fermare %1$s? Ciò che ha fatto finora resta.",
"archive": "Archivia",
"archived_none": "Nessuna chat archiviata.",
"assist_answer_in_app": "Questa risposta attende una sua decisione: la apra nell’app.",
"assist_connecting": "Connessione…",
"assist_continue": "Continua l’ultima chat",
@@ -1122,8 +1188,10 @@
"channel_asks": "Domande e approvazioni",
"channel_scheduled": "Risultati pianificati",
"channel_scheduled_failures": "Errori pianificati",
"channel_updates": "Aggiornamenti dell’app",
"chats_agents": "Chat con agente",
"chats_earlier": "Prima",
"chats_found_in_messages": "Nei messaggi",
"chats_none_found": "Nessuna chat lo ha nel titolo.",
"chats_open": "Apri le chat",
"chats_search": "Cerca nelle chat",
@@ -1183,6 +1251,7 @@
"run_silent": "Niente di nuovo",
"run_skipped": "Ignorata",
"run_waiting": "In attesa di un modello",
"run_waiting_computer": "In attesa del computer",
"schedule_delete_confirm": "Eliminare questa pianificazione? I risultati passati restano nelle loro chat.",
"schedule_edit": "Modifica pianificazione",
"schedule_history": "Cronologia",
@@ -1247,12 +1316,22 @@
"thinking_switch_hint": "Più lento, e migliore con le domande difficili.",
"tile_ask": "Chiedi a LLeMbas",
"tools_used": "Usati %1$s strumenti",
"tree_context": "%1$s%% del contesto",
"tune": "Opzioni",
"update_allow_installs": "Consenti a LLeMbas di installare gli aggiornamenti, poi controlla di nuovo.",
"update_auto": "Cerca nuove versioni",
"update_auto_line": "Al massimo una volta al giorno, all’avvio, l’app chiede alla sua istanza quale release le corrisponde (con un’istanza più vecchia, legge l’elenco delle release su GitHub) e la avvisa con una notifica quando ce n’è una più recente. Nulla su di lei viene inviato altrove. Attivo per impostazione predefinita in una beta, altrimenti disattivato.",
"update_available": "%1$s è disponibile. Tocca per aprire la pagina della release.",
"update_bad_file": "Il download non corrispondeva alla versione ed è stato scartato.",
"update_betas": "Includi le beta",
"update_betas_line": "Offri anche le versioni di prova, non solo le release. Attivo per impostazione predefinita quando questa app è essa stessa una beta.",
"update_check": "Controlla aggiornamenti",
"update_checking": "Controllo in corso…",
"update_install": "Installa %1$s",
"update_installing": "Installazione di %1$s…",
"update_none": "Questa è la versione più recente.",
"update_notice_text": "È disponibile una versione più recente. Tocca per aprire la pagina della release.",
"update_notice_title": "LLeMbas per Android %1$s",
"update_unreachable": "Non è stato possibile scaricare l'aggiornamento.",
"viewer_html_source": "Questo è il sorgente della pagina. Aprila nel browser per vedere la pagina.",
"viewer_long_markdown": "Un file lungo, quindi è mostrato come testo semplice.",
@@ -1260,13 +1339,12 @@
"viewer_too_large": "Questo file è troppo grande da mostrare; si può mostrare al massimo 1 MB.",
"viewer_unavailable": "Questo server non può ancora passare il file all'app. Aprilo invece nel browser.",
"voice_input": "Input vocale",
"voice_input_hint": "La usa l’assistente. Con LLeMbas le parole appaiono con un attimo di ritardo e una pausa le invia; con il riconoscimento del telefono appaiono mentre parla.",
"voice_input_hint": "La usano l’assistente e il microfono di una chat. Con LLeMbas l’assistente mostra le parole con un attimo di ritardo e una pausa le invia, e una chat le scrive quando si ferma; con il riconoscimento del telefono appaiono mentre parla.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "La trascrizione della sua istanza, tramite il server. La registrazione va alla sua istanza e da nessun’altra parte.",
"voice_input_phone": "Telefono (Google o quello di sistema)",
"voice_input_phone_line": "Il riconoscimento vocale del telefono. Le parole appaiono mentre parla; la registrazione va dove la manda quel riconoscimento.",
"voice_input_phone_none": "Questo telefono non ha un riconoscimento vocale proprio.",
"tree_context": "%1$s%% del contesto"
"voice_input_phone_none": "Questo telefono non ha un riconoscimento vocale proprio."
},
"pl": {
"about_version": "LLeMbas na Androida %1$s",
@@ -1286,6 +1364,7 @@
"agent_runs_on": "Działa na %1$s, w %2$s",
"agent_stop_confirm": "Zatrzymać %1$s? To, co już zrobił, zostaje.",
"archive": "Archiwizuj",
"archived_none": "Brak zarchiwizowanych czatów.",
"assist_answer_in_app": "Ta odpowiedź czeka na Twoją decyzję: otwórz ją w aplikacji.",
"assist_connecting": "Łączenie…",
"assist_continue": "Kontynuuj ostatni czat",
@@ -1333,8 +1412,10 @@
"channel_asks": "Pytania i zatwierdzenia",
"channel_scheduled": "Wyniki zaplanowanych zadań",
"channel_scheduled_failures": "Błędy zaplanowanych zadań",
"channel_updates": "Aktualizacje aplikacji",
"chats_agents": "Czaty z agentem",
"chats_earlier": "Wcześniej",
"chats_found_in_messages": "W wiadomościach",
"chats_none_found": "Żaden czat nie ma tego w tytule.",
"chats_open": "Otwórz czaty",
"chats_search": "Szukaj czatów",
@@ -1394,6 +1475,7 @@
"run_silent": "Nic nowego",
"run_skipped": "Pominięto",
"run_waiting": "Czeka na model",
"run_waiting_computer": "Czeka na komputer",
"schedule_delete_confirm": "Usunąć ten harmonogram? Jego wcześniejsze wyniki zostaną w swoich czatach.",
"schedule_edit": "Edytuj harmonogram",
"schedule_history": "Historia",
@@ -1458,12 +1540,22 @@
"thinking_switch_hint": "Wolniej, i lepiej przy trudnych pytaniach.",
"tile_ask": "Zapytaj LLeMbas",
"tools_used": "Użyte narzędzia: %1$s",
"tree_context": "%1$s%% kontekstu",
"tune": "Opcje",
"update_allow_installs": "Zezwól LLeMbas na instalowanie aktualizacji, a potem sprawdź ponownie.",
"update_auto": "Szukaj nowych wersji",
"update_auto_line": "Najwyżej raz dziennie, przy uruchomieniu, aplikacja pyta twoją instancję, które wydanie do niej pasuje (przy starszej instancji odczytuje listę wydań z GitHuba), i daje znać powiadomieniem, gdy jest nowsze. Nic o tobie nie jest wysyłane nigdzie indziej. W wersji beta domyślnie włączone, w przeciwnym razie wyłączone.",
"update_available": "Dostępna jest wersja %1$s. Dotknij, aby otworzyć jej stronę wydania.",
"update_bad_file": "Pobrany plik nie zgadzał się z wersją i został odrzucony.",
"update_betas": "Uwzględniaj bety",
"update_betas_line": "Proponuj też wersje testowe, nie tylko wydania. Domyślnie włączone, gdy ta aplikacja sama jest betą.",
"update_check": "Sprawdź aktualizację",
"update_checking": "Sprawdzanie…",
"update_install": "Zainstaluj %1$s",
"update_installing": "Instalowanie %1$s…",
"update_none": "To jest najnowsza wersja.",
"update_notice_text": "Dostępna jest nowsza wersja. Dotknij, aby otworzyć jej stronę wydania.",
"update_notice_title": "LLeMbas na Androida %1$s",
"update_unreachable": "Nie udało się pobrać aktualizacji.",
"viewer_html_source": "To jest źródło strony. Otwórz ją w przeglądarce, aby zobaczyć samą stronę.",
"viewer_long_markdown": "Długi plik, dlatego jest pokazany jako zwykły tekst.",
@@ -1471,13 +1563,12 @@
"viewer_too_large": "Ten plik jest za duży, by go pokazać; można pokazać najwyżej 1 MB.",
"viewer_unavailable": "Ten serwer nie potrafi jeszcze przekazać pliku aplikacji. Otwórz go w przeglądarce.",
"voice_input": "Wprowadzanie głosowe",
"voice_input_hint": "Używa go asystent. Z LLeMbas słowa pojawiają się z lekkim opóźnieniem, a pauza je wysyła; z rozpoznawaniem telefonu pojawiają się w trakcie mówienia.",
"voice_input_hint": "Używa go asystent i mikrofon w czacie. Z LLeMbas asystent pokazuje słowa z lekkim opóźnieniem, a pauza je wysyła, czat zapisuje je, gdy przestaniesz; z rozpoznawaniem telefonu pojawiają się w trakcie mówienia.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "Zamiana mowy na tekst Twojej instancji, przez serwer. Nagranie trafia do Twojej instancji i nigdzie indziej.",
"voice_input_phone": "Telefon (Google lub systemowy)",
"voice_input_phone_line": "Własne rozpoznawanie mowy telefonu. Słowa pojawiają się w trakcie mówienia; nagranie trafia tam, dokąd wyśle je to rozpoznawanie.",
"voice_input_phone_none": "Ten telefon nie ma własnego rozpoznawania mowy.",
"tree_context": "%1$s%% kontekstu"
"voice_input_phone_none": "Ten telefon nie ma własnego rozpoznawania mowy."
},
"sk": {
"about_version": "LLeMbas pre Android %1$s",
@@ -1497,6 +1588,7 @@
"agent_runs_on": "Beží na %1$s, v priečinku %2$s",
"agent_stop_confirm": "Zastaviť %1$s? Čo doteraz urobil, zostane.",
"archive": "Archivovať",
"archived_none": "Žiadne archivované konverzácie.",
"assist_answer_in_app": "Táto odpoveď čaká na vaše rozhodnutie: otvorte ju v aplikácii.",
"assist_connecting": "Pripája sa…",
"assist_continue": "Pokračovať v poslednej konverzácii",
@@ -1544,8 +1636,10 @@
"channel_asks": "Otázky a schválenia",
"channel_scheduled": "Výsledky naplánovaných úloh",
"channel_scheduled_failures": "Zlyhania naplánovaných úloh",
"channel_updates": "Aktualizácie aplikácie",
"chats_agents": "Čety s agentom",
"chats_earlier": "Skôr",
"chats_found_in_messages": "V správach",
"chats_none_found": "Žiadny čet to nemá v názve.",
"chats_open": "Otvoriť čety",
"chats_search": "Hľadať v četoch",
@@ -1605,6 +1699,7 @@
"run_silent": "Nič nové",
"run_skipped": "Vynechané",
"run_waiting": "Čaká na model",
"run_waiting_computer": "Čaká na počítač",
"schedule_delete_confirm": "Zmazať tento plán? Jeho doterajšie výsledky zostanú vo svojich četoch.",
"schedule_edit": "Upraviť plán",
"schedule_history": "História",
@@ -1669,12 +1764,22 @@
"thinking_switch_hint": "Pomalšie a lepšie pri ťažkých otázkach.",
"tile_ask": "Spýtať sa LLeMbas",
"tools_used": "Použité nástroje: %1$s",
"tree_context": "kontext %1$s %%",
"tune": "Možnosti",
"update_allow_installs": "Povoľte aplikácii LLeMbas instalovať aktualizácie a potom to skontrolujte znova.",
"update_auto": "Hľadať nové verzie",
"update_auto_line": "Najviac raz denne, pri spustení, sa aplikácia opýta vašej inštancie, ktoré vydanie k nej patrí (pri staršej inštancii si prečíta zoznam vydaní na GitHube), a upozornením vám dá vedieť, keď je dostupné novšie. Nič o vás sa nikam inam neposiela. V beta verzii zapnuté, inak vypnuté.",
"update_available": "Je dostupná %1$s. Ťuknutím otvoríte stránku vydania.",
"update_bad_file": "Stiahnutý súbor nezodpovedal verzii a bol zahodený.",
"update_betas": "Vrátane beta verzií",
"update_betas_line": "Ponúkať aj testovacie verzie, nielen vydania. Zapnuté, keď je táto aplikácia sama beta.",
"update_check": "Skontrolovať aktualizáciu",
"update_checking": "Kontroluje sa…",
"update_install": "Nainštalovať %1$s",
"update_installing": "Inštaluje sa %1$s…",
"update_none": "Toto je najnovšia verzia.",
"update_notice_text": "Je dostupná novšia verzia. Ťuknutím otvoríte stránku vydania.",
"update_notice_title": "LLeMbas pre Android %1$s",
"update_unreachable": "Aktualizáciu sa nepodarilo stiahnuť.",
"viewer_html_source": "Toto je zdrojový kód stránky. Samotnú stránku uvidíte po otvorení v prehliadači.",
"viewer_long_markdown": "Dlhý súbor, preto je zobrazený ako obyčajný text.",
@@ -1682,12 +1787,11 @@
"viewer_too_large": "Tento súbor je príliš veľký na zobrazenie; zobraziť možno najviac 1 MB.",
"viewer_unavailable": "Tento server zatiaľ nevie aplikácii súbor odovzdať. Otvorte ho v prehliadači.",
"voice_input": "Hlasový vstup",
"voice_input_hint": "Používa ho asistent. S LLeMbas sa slová objavujú s malým oneskorením a pauza ich odošle; s rozpoznávaním v telefóne sa objavujú, ako hovoríte.",
"voice_input_hint": "Používa ho asistent aj mikrofón v konverzácii. S LLeMbas asistent ukazuje slová s malým oneskorením a pauza ich odošle, konverzácia ich zapíše, keď prestanete; s rozpoznávaním v telefóne sa objavujú, ako hovoríte.",
"voice_input_lembas": "LLeMbas",
"voice_input_lembas_line": "Prevod reči na text vašej inštancie, cez server. Nahrávka ide na vašu inštanciu a nikam inam.",
"voice_input_phone": "Telefón (Google alebo systémový)",
"voice_input_phone_line": "Vlastné rozpoznávanie reči v telefóne. Slová sa objavujú, ako hovoríte; nahrávka ide tam, kam ju to rozpoznávanie pošle.",
"voice_input_phone_none": "Tento telefón nemá vlastné rozpoznávanie reči.",
"tree_context": "kontext %1$s %%"
"voice_input_phone_none": "Tento telefón nemá vlastné rozpoznávanie reči."
}
}
+3 -3
View File
@@ -1,5 +1,5 @@
{
"tag": "v2.0.0-beta.8",
"commit": "d06ca353b801916302f0ce0cc9ae3e5244ff184f",
"sha256": "0ae7e775eb5466e1081f6a6a38186414f1bd5fe5e7388604b35a32d341483638"
"tag": "v2.0.0-beta.9",
"commit": "3b7da5fc7ac72d5de9229919793dd299c03da6a8",
"sha256": "9057a56beb78ef9f3042555841014b9372ac415e70e054f41afcd488a9f14777"
}