Add explanatory comments across codebase

This commit is contained in:
Stefano Zini
2026-11-04 14:23:18 +01:00
parent b8aa5548a2
commit 82b72b6c28
34 changed files with 934 additions and 0 deletions
+11
View File
@@ -1,15 +1,19 @@
// Pinokio launcher entry: the menu buttons depend on whether the app is installed and what is running.
module.exports = {
version: "7.0",
title: "Teams Whisper",
description: "Record Teams calls and turn them into meeting reports, fully local",
menu: async (kernel, info) => {
// Installed marker: the bge-m3 embedding model that install.js downloads.
let installed = info.exists("app/models/bge-m3-Q8_0.gguf")
// Which launcher scripts are currently running.
let running = {
install: info.running("install.js"),
start: info.running("start.js"),
update: info.running("update.js"),
reset: info.running("reset.js")
}
// While install is running, show only the Installing entry.
if (running.install) {
return [{
default: true,
@@ -17,10 +21,13 @@ module.exports = {
text: "Installing",
href: "install.js",
}]
// Installed: the menu depends on whether the server (start.js) is running.
} else if (installed) {
if (running.start) {
// start.js saves the server URL in local state once it is ready.
let local = info.local("start.js")
if (local && local.url) {
// Server running with a known URL: links to the Web UI, Prefect, extension, login and terminal.
return [{
default: true,
icon: "fa-solid fa-rocket",
@@ -43,6 +50,7 @@ module.exports = {
text: "Terminal",
href: "start.js",
}]
// Server running but URL not known yet: only the terminal.
} else {
return [{
default: true,
@@ -51,6 +59,7 @@ module.exports = {
href: "start.js",
}]
}
// Other jobs in progress: show only their status.
} else if (running.update) {
return [{
default: true,
@@ -66,6 +75,7 @@ module.exports = {
href: "reset.js",
}]
} else {
// Installed and idle: full menu.
return [{
default: true,
icon: "fa-solid fa-power-off",
@@ -93,6 +103,7 @@ module.exports = {
href: "reset.js",
}]
}
// Not installed: only Install.
} else {
return [{
default: true,