Localize Plugins actions and parallelize Plugins/Skills boot fetches.

Cut time-to-interactive on those admin pages and align button/table copy with the existing zh/en i18n switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-12 19:44:07 +08:00
parent f6f129931f
commit f92cb85a4a
6 changed files with 141 additions and 84 deletions

View file

@ -1220,18 +1220,13 @@ async function renderSkills() {
};
const refreshSkillsState = async () => {
await loadRows();
await loadAudits();
await loadSkillBinding();
await Promise.all([loadRows(), loadAudits(), loadSkillBinding()]);
repaint();
renderSkillBindingList();
};
try {
await loadRows();
await loadAudits();
await loadSkillBinding();
await loadSkillMode();
await Promise.all([loadRows(), loadAudits(), loadSkillBinding(), loadSkillMode()]);
const rolesForPreview = (
Array.isArray(skillBindingState.roles) && skillBindingState.roles.length
? skillBindingState.roles
@ -1378,8 +1373,7 @@ async function renderSkills() {
llmToolsBox.addEventListener("toggle", async () => {
if (!llmToolsBox.open || lazyLoadState.llmLoaded) return;
lazyLoadState.llmLoaded = true;
await loadExposureTraceSetting();
await loadLLMToolsPreview(llmRoleSelect.value);
await Promise.all([loadExposureTraceSetting(), loadLLMToolsPreview(llmRoleSelect.value)]);
});
selfCheckBox.addEventListener("toggle", async () => {
if (!selfCheckBox.open || lazyLoadState.selfCheckLoaded) return;