v2.1: add Property Inspector with poll interval setting
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user