Fix tooltips and error icons after config parsing

- Call updateTooltips() after clearAllTooltips() to restore tooltip attributes
- Add error icons to all input fields (context-length, kv-heads, head-size,
  num-heads, num-layers, parallel, full-attention, hf-model)
- Update showConfigErrors() to handle hf-model field correctly
This commit is contained in:
Arseniy Romenskiy 2026-04-12 02:19:03 +03:00
parent ca578b93de
commit fd6208a376
2 changed files with 17 additions and 1 deletions

View file

@ -597,6 +597,9 @@
// Populate from config
populateFromConfig(config);
// Update tooltips after clearing them
updateTooltips();
// Hide loading and set focus
loadingIndicator.style.display = 'none';
hfModelInput.focus();
@ -628,7 +631,12 @@
// Show config errors
function showConfigErrors() {
Object.keys(window.configErrors).forEach(fieldId => {
const errorIcon = document.querySelector(`#${fieldId} ~ .error-icon`);
let errorIcon;
if (fieldId === 'hf-model') {
errorIcon = document.querySelector('#hf-model + .error-icon');
} else {
errorIcon = document.querySelector(`#${fieldId} ~ .error-icon`);
}
if (errorIcon) {
errorIcon.style.display = 'inline-block';
errorIcon.setAttribute('data-tooltip-ru', window.configErrors[fieldId]);