feat(app): start Strata from the data folder and point the brain at it
M5 step 4, second part. The services start the LLM first: the installed Strata with the M0 kit's model and normal placement (models in models/llm, parallel 1, or 2 when a chat channel answers every message, pictures off, --restart), wait until /v1/models lists the model, and stop it last. The first start downloads the model; the dashboard shows Strata's last line and percentage, and stop also cancels a start (the server is cleared). llm.url uses a server the app does not start. On every start the app writes config/brain.json (Strata's /v1, the listed model id, memory/jarvis.db) and hands it to the worker as JARVIS_CONFIG_PATH. Loading a config with its own db_path no longer creates ~/.local/share/jarvis. service_start/service_restart run in the background. Settings gain llm.context and llm.port (model screen) and llm.url (file only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -242,21 +242,33 @@ function dashboardHeader(d) {
|
||||
h("h1", { style: "margin:0" }, "대시보드"),
|
||||
h("div", { class: "row" }, h("span", { class: "badge " + cls }, label),
|
||||
d.state === "running" ? [act("service_restart", "다시 시작"), act("service_stop", "정지")]
|
||||
: d.state === "starting" ? act("service_stop", "정지")
|
||||
: act("service_start", "시작", true))),
|
||||
d.error ? h("div", { class: "card", style: "border-color:var(--bad);margin-bottom:12px" }, d.error) : null);
|
||||
}
|
||||
|
||||
const LLM = { off: "꺼짐", starting: "준비 중", ready: "준비", failed: "실패" };
|
||||
|
||||
function dashboardBody(d) {
|
||||
const med = d.latency?.median ?? {};
|
||||
const s = (ms) => (ms == null ? "–" : (ms / 1000).toFixed(2) + "초");
|
||||
const w = d.worker;
|
||||
const llm = d.llm;
|
||||
const pct = llm?.percent != null ? ` ${llm.percent}%` : "";
|
||||
return h("div", {},
|
||||
llm?.state === "starting" ? h("div", { class: "card", style: "margin-bottom:12px" },
|
||||
h("h2", {}, "대화 모델 준비 중" + pct),
|
||||
h("div", { class: "small muted" }, llm.managed
|
||||
? "처음 시작할 때는 대화 모델(약 23GB)을 받느라 오래 걸릴 수 있습니다. 그동안 정지할 수 있습니다."
|
||||
: "설정한 대화 모델 서버의 응답을 기다리고 있습니다."),
|
||||
llm.note ? h("div", { class: "small", style: "margin-top:6px;word-break:break-all" }, llm.note) : null) : null,
|
||||
h("div", { class: "grid" },
|
||||
h("div", { class: "card" }, h("h2", {}, "연결"), h("div", { class: "kv" },
|
||||
h("span", { class: "k" }, "디스코드"), h("span", {}, d.discord ?? "연결 안 됨"),
|
||||
h("span", { class: "k" }, "음성 워커"), h("span", {}, w ? (w.connected ? "연결됨" : "연결 안 됨") : "–"),
|
||||
h("span", { class: "k" }, "STT / TTS"), h("span", {}, w ? `${w.sttReady ? "준비" : "–"} / ${w.ttsReady ? "준비" : "–"}` : "–"),
|
||||
h("span", { class: "k" }, "워커 재시작"), h("span", {}, w?.restarts ?? "–"))),
|
||||
h("span", { class: "k" }, "워커 재시작"), h("span", {}, w?.restarts ?? "–"),
|
||||
h("span", { class: "k" }, "대화 모델"), h("span", {}, llm ? (LLM[llm.state] ?? llm.state) : "–"))),
|
||||
h("div", { class: "card" }, h("h2", {}, "음성 채널"),
|
||||
h("div", {}, d.voiceChannel ? `채널 ${d.voiceChannel}` : "들어가 있지 않음"),
|
||||
h("div", { class: "small muted", style: "margin-top:6px" },
|
||||
@@ -521,7 +533,7 @@ async function wizard(status) {
|
||||
})];
|
||||
},
|
||||
async () => [h("h2", {}, "준비됐습니다"),
|
||||
h("p", {}, "시작하면 봇이 디스코드에 연결되고, 처음 시작할 때 서버에 슬래시 명령을 등록합니다."),
|
||||
h("p", {}, "시작하면 대화 모델을 켜고 봇이 디스코드에 연결되며, 처음 시작할 때 서버에 슬래시 명령을 등록합니다. 처음에는 대화 모델(약 23GB)을 받아서 오래 걸립니다. 진행 상황은 대시보드에 나옵니다."),
|
||||
nav(true, async () => {
|
||||
try { await api("wizard_finish"); } catch (e) { return fail(e); }
|
||||
root.hidden = true;
|
||||
|
||||
Reference in New Issue
Block a user