Fix/windows llama cpp serve and test upstream (#2669)

* fix: code runner base64, Windows serve paths, endpoint cache clear, copy-log guards, model-picker remove-recent

* Revert model-picker 'remove from recent' feature and remove stray PR_DRAFT.md
This commit is contained in:
Zen0-99
2026-06-05 13:53:33 +01:00
committed by GitHub
parent ec8fbf5d8f
commit bec594904d
7 changed files with 119 additions and 23 deletions
+19 -1
View File
@@ -1862,7 +1862,17 @@ export function _renderRunningTab() {
const startNow = el.querySelector('.cookbook-task-start-now');
if (startNow) startNow.style.display = (task.type === 'download' && task.status === 'queued') ? '' : 'none';
const terminalDiag = _terminalServeDiagnosis(task, el.querySelector('.cookbook-output-pre')?.textContent || task.output || '');
if (terminalDiag) _showDiagnosis(el, terminalDiag, el.querySelector('.cookbook-output-pre')?.textContent || task.output || '');
if (terminalDiag) {
_showDiagnosis(el, terminalDiag, el.querySelector('.cookbook-output-pre')?.textContent || task.output || '');
} else {
const existingDiag = el.querySelector('.cookbook-diagnosis');
// Keep diagnosis for failed tasks even if output was cleared and we
// can no longer re-derive the exact message — removing it would hide
// the crash reason from the user.
if (existingDiag && !['stopped', 'error', 'crashed', 'failed'].includes(task.status)) {
existingDiag.remove();
}
}
}
if (!task) {
if (el._uptimeInterval) { clearInterval(el._uptimeInterval); el._uptimeInterval = null; }
@@ -2201,6 +2211,10 @@ export function _renderRunningTab() {
items.push({ label: 'Copy last 50 lines', action: 'copy-log', custom: () => {
const out = (el.querySelector('.cookbook-output-pre')?.textContent || task.output || '');
const last = out.split('\n').slice(-50).join('\n');
if (!last.trim()) {
uiModule.showToast('No log content available yet');
return;
}
_copyText(last);
uiModule.showToast('Copied last 50 lines');
}});
@@ -2437,6 +2451,10 @@ export function _renderRunningTab() {
el.querySelector('.cookbook-output-copy').addEventListener('click', (e) => {
e.stopPropagation();
const text = el.querySelector('.cookbook-output-pre')?.textContent || '';
if (!text.trim()) {
uiModule.showToast('No log content available yet');
return;
}
_copyText(text).then(() => {
const btn = el.querySelector('.cookbook-output-copy');
const origHTML = btn.innerHTML;