From da0df0fd57a41476cf26dc21fdb03a3c1f3f77bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9F=83=E5=8D=9A=E6=8B=89=E9=85=B1?= Date: Sun, 1 Mar 2026 12:39:25 +0800 Subject: [PATCH] fix: call unmountPlugin before reloading plugin script When loadPlugin.js reloads a plugin, Acode loads the new script directly. The new script's init() then calls acode.setPluginUnmount(id, newDestroy), which is a simple assignment that replaces the old destroy callback. At that point the old destroy which holds references to the old sidebar app, commands, event listeners, etc. is lost forever. Fix: call acode.unmountPlugin(pluginId) before loading the new script, so the old destroy() runs while it still exists. Also remove the old