-
Notifications
You must be signed in to change notification settings - Fork 19
/
pinokio.js
38 lines (38 loc) · 1.04 KB
/
pinokio.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = {
title: "Mirror",
description: "An AI powered mirror",
icon: "icon.webp",
menu: async (kernel) => {
let llama_installed = await kernel.exists(__dirname, "llama.cpp")
let app_installed = await kernel.exists(__dirname, "venv")
let installed = llama_installed && app_installed
if (installed) {
let running = await kernel.running(__dirname, "start.json")
if (running) {
return [{
icon: "fa-solid fa-spin fa-circle-notch",
text: "Running"
}, {
icon: "fa-solid fa-desktop",
text: "Server",
href: "start.json",
params: { fullscreen: true }
}]
} else {
return [{
icon: "fa-solid fa-power-off",
text: "Launch",
href: "start.json",
params: { fullscreen: true, run: true }
}]
}
} else {
return [{
icon: "fa-solid fa-plug",
text: "Install",
href: "install.json",
params: { run: true, fullscreen: true }
}]
}
}
}