From 0a047cbb0ea0cb3ae38ea3eaf5ce3fdeb0e90965 Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Tue, 19 Aug 2025 23:57:05 +0100 Subject: [PATCH] Update setHints.js --- javascript/setHints.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/javascript/setHints.js b/javascript/setHints.js index bd7b8b19a..b8fbafe5f 100644 --- a/javascript/setHints.js +++ b/javascript/setHints.js @@ -122,6 +122,27 @@ async function tooltipShow(e) { content += `
${e.target.dataset.longHint}
`; } + // Add reload notice if needed + if (e.target.dataset.reload) { + const reloadType = e.target.dataset.reload; + let reloadText = ''; + + if (reloadType === 'model') { + reloadText = 'Requires model reload'; + } else if (reloadType === 'server') { + reloadText = 'Requires server restart'; + } + + if (reloadText) { + content += ` +
+
+ ${reloadText} +
+ `; + } + } + localeData.hint.innerHTML = content; localeData.hint.classList.add('tooltip-show'); @@ -302,6 +323,10 @@ async function setHints(analyze = false) { if (found.longHint && found.longHint.length > 0) { el.dataset.longHint = found.longHint; } + // Set reload type if available + if (found.reload && found.reload.length > 0) { + el.dataset.reload = found.reload; + } el.addEventListener('mouseover', tooltipShow); el.addEventListener('mouseout', tooltipHide); } else {