mirror of
https://github.com/dtzp555-max/ocm.git
synced 2026-07-22 13:35:08 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15798e007d |
+10
-2
@@ -3360,12 +3360,20 @@ function renderAgents() {
|
|||||||
// Build grouping: prefer explicit parentAgentId; fallback to telegram bot-root grouping.
|
// Build grouping: prefer explicit parentAgentId; fallback to telegram bot-root grouping.
|
||||||
const byId = {}; (S.agents||[]).forEach(a=>{ byId[a.id]=a; });
|
const byId = {}; (S.agents||[]).forEach(a=>{ byId[a.id]=a; });
|
||||||
|
|
||||||
// infer parentAgentId for legacy telegram sub-agents if missing
|
// infer parentAgentId for sub-agents if missing
|
||||||
const accountToRootId = {};
|
const accountToRootId = {};
|
||||||
(S.agents||[]).forEach(a=>{ if(a.hasOwnBot && a.accountId) accountToRootId[a.accountId]=a.id; });
|
(S.agents||[]).forEach(a=>{ if(a.hasOwnBot && a.accountId) accountToRootId[a.accountId]=a.id; });
|
||||||
(S.agents||[]).forEach(a=>{
|
(S.agents||[]).forEach(a=>{
|
||||||
if(!a.parentAgentId && !a.hasOwnBot && a.parentAccountId && accountToRootId[a.parentAccountId]){
|
if(a.parentAgentId || a.hasOwnBot || a.id === 'main') return; // already resolved or is a root
|
||||||
|
// Case 1: legacy telegram sub-agent with parentAccountId
|
||||||
|
if(a.parentAccountId && accountToRootId[a.parentAccountId]){
|
||||||
a._inferParentAgentId = accountToRootId[a.parentAccountId];
|
a._inferParentAgentId = accountToRootId[a.parentAccountId];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Case 2: orphan agent (no own bot, no parentAgentId, no binding-based inference)
|
||||||
|
// These are likely dynamically created sub-agents — default to 'main'
|
||||||
|
if(byId['main']){
|
||||||
|
a._inferParentAgentId = 'main';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "openclaw-manager",
|
"name": "openclaw-manager",
|
||||||
"version": "0.9.3",
|
"version": "0.9.4",
|
||||||
"description": "A local web UI for managing OpenClaw AI agents \u2014 no npm install required",
|
"description": "A local web UI for managing OpenClaw AI agents \u2014 no npm install required",
|
||||||
"main": "openclaw-manager.js",
|
"main": "openclaw-manager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user