v2.1: add Property Inspector with poll interval setting

This commit is contained in:
2026-06-18 15:10:55 +08:00
parent 77c4db36d8
commit 8535838fc4
11 changed files with 1849 additions and 3 deletions
@@ -185,6 +185,14 @@ function makeActionFn(agentKey) {
if (states[ctx] && states[ctx].timer) { clearInterval(states[ctx].timer); }
delete states[ctx];
},
_didReceiveSettings: function(data) {
var ctx = data.context;
var ss = states[ctx]; if (!ss) return;
if (ss.timer) clearInterval(ss.timer);
var settings = plugin[agentKey].data[ctx];
var interval = (settings && settings.pollInterval) || POLL_INTERVAL;
ss.timer = setInterval(function() { poll(ctx); }, interval);
},
keyUp: function(data) { poll(data.context); },
};
}
@@ -192,4 +200,4 @@ function makeActionFn(agentKey) {
// Register each agent as a separate action
plugin.codex = new Actions(makeActionFn('codex'));
plugin.claude = new Actions(makeActionFn('claude'));
plugin.opencode = new Actions(makeActionFn('opencode'));
plugin.opencode = new Actions(makeActionFn('opencode'));