feat: redesign UI section Cles API IA - recherche, carte defaut, cartes depliables, footer sticky (#104)
This commit is contained in:
@@ -82,6 +82,24 @@ function renderCapabilityList(caps) {
|
||||
return box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render only the *enabled* capabilities as colored tags (#104). Used by the
|
||||
* config panel where a compact read-only summary reads better than checkboxes.
|
||||
*/
|
||||
function renderCapabilityBadges(caps) {
|
||||
const box = document.createElement('div');
|
||||
box.className = 'ai-caps-badges';
|
||||
if (!caps) return box;
|
||||
AI_CAPABILITY_KEYS.forEach((key) => {
|
||||
if (!caps[key]) return;
|
||||
const item = document.createElement('span');
|
||||
item.className = 'ai-cap-badge';
|
||||
item.textContent = t(`ai.cap_${key}`);
|
||||
box.appendChild(item);
|
||||
});
|
||||
return box;
|
||||
}
|
||||
|
||||
/** Accent-insensitive, case-insensitive normalization for model search. */
|
||||
function _normalizeText(value) {
|
||||
return String(value || '')
|
||||
@@ -1019,6 +1037,7 @@ export {
|
||||
AI_CAPABILITY_KEYS,
|
||||
getModelCapabilities,
|
||||
renderCapabilityList,
|
||||
renderCapabilityBadges,
|
||||
_buildPickerUI as buildAIPickerUI,
|
||||
refreshAIPickers,
|
||||
PICKER_SLOT_CLASS,
|
||||
|
||||
Reference in New Issue
Block a user