Document and harden project handoff
This commit is contained in:
+15
-5
@@ -141,7 +141,12 @@ async function loadHealth() {
|
||||
try {
|
||||
const health = await api("/api/health");
|
||||
state.health = health;
|
||||
elements.healthLine.textContent = `${health.paper_count} papers · ${health.ollama_ok ? "Ollama online" : "Ollama offline"}`;
|
||||
const ollamaState = health.ollama_ready
|
||||
? "Ollama ready"
|
||||
: health.ollama_ok
|
||||
? "Ollama model mismatch"
|
||||
: "Ollama offline";
|
||||
elements.healthLine.textContent = `${health.paper_count} papers · ${ollamaState}`;
|
||||
} catch (error) {
|
||||
elements.healthLine.textContent = error.message;
|
||||
}
|
||||
@@ -1103,10 +1108,15 @@ function setAiBusy(isBusy, label = "") {
|
||||
}
|
||||
}
|
||||
|
||||
function isLargeModel(model) {
|
||||
const configuredLarge = state.health?.default_models?.deep;
|
||||
return model === configuredLarge || /:(large|sol)$/i.test(model);
|
||||
}
|
||||
|
||||
async function runPaperAi(mode) {
|
||||
if (!state.selectedPaper) return;
|
||||
const model = state.health?.default_models?.[mode] || (mode === "translate" ? "ChatGPT-5.6:light" : "ChatGPT-5.6:fast");
|
||||
if (model.includes(":large") && !window.confirm("将调用 large 模型,占用更多 GPU。继续?")) return;
|
||||
const model = state.health?.default_models?.[mode] || (mode === "translate" ? "ChatGPT-5.6:Luna" : "ChatGPT-5.6:Terra");
|
||||
if (isLargeModel(model) && !window.confirm("将调用 large 模型,占用更多 GPU。继续?")) return;
|
||||
setAiBusy(true, `${mode} · ${model}`);
|
||||
try {
|
||||
const payload = await api("/api/ai", {
|
||||
@@ -1124,8 +1134,8 @@ async function runPaperAi(mode) {
|
||||
}
|
||||
|
||||
async function runAtlasAi(mode, topic = "", topicB = "") {
|
||||
const model = state.health?.default_models?.[mode] || "ChatGPT-5.6:fast";
|
||||
if (model.includes(":large") && !window.confirm("将调用 large 模型做高维综合,占用更多 GPU。继续?")) return;
|
||||
const model = state.health?.default_models?.[mode] || "ChatGPT-5.6:Terra";
|
||||
if (isLargeModel(model) && !window.confirm("将调用 large 模型做高维综合,占用更多 GPU。继续?")) return;
|
||||
setAiBusy(true, `${mode} · ${model}`);
|
||||
try {
|
||||
const payload = await api("/api/atlas/ai", {
|
||||
|
||||
Reference in New Issue
Block a user