myagent-ai 1.15.28 → 1.15.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/ui/chat/chat.css +1 -0
- package/web/ui/index.html +8 -1
package/package.json
CHANGED
package/web/ui/chat/chat.css
CHANGED
|
@@ -2098,6 +2098,7 @@ body.popout-mode #popoutBtn{display:none !important}
|
|
|
2098
2098
|
.sidebar.collapsed .sidebar-search{flex-direction:column}
|
|
2099
2099
|
.sidebar.collapsed .session-list{flex-direction:column}
|
|
2100
2100
|
.sidebar.collapsed .sidebar-footer{flex-direction:column}
|
|
2101
|
+
.sidebar-footer{padding-bottom:max(12px, env(safe-area-inset-bottom))}
|
|
2101
2102
|
|
|
2102
2103
|
/* ── Header ── */
|
|
2103
2104
|
.main-header{
|
package/web/ui/index.html
CHANGED
|
@@ -1715,8 +1715,10 @@ async function deleteDept(path,name){
|
|
|
1715
1715
|
}
|
|
1716
1716
|
async function showDeptDetail(path){
|
|
1717
1717
|
try {
|
|
1718
|
-
const [dept,info]=await Promise.all([api(`/api/departments/${encodeURIComponent(path)}`),api(`/api/departments/${encodeURIComponent(path)}/info`)]);
|
|
1718
|
+
const [dept,info,agents]=await Promise.all([api(`/api/departments/${encodeURIComponent(path)}`),api(`/api/departments/${encodeURIComponent(path)}/info`),api('/api/agents')]);
|
|
1719
1719
|
if(dept.error){showToast(dept.error,'danger');return}
|
|
1720
|
+
// 刷新 allAgentsCache 确保最新
|
|
1721
|
+
allAgentsCache=Array.isArray(agents)?agents:allAgentsCache;
|
|
1720
1722
|
// 描述和负责人从 dept 元数据读取(非 info API 的 dept.md 内容)
|
|
1721
1723
|
const deptDesc=dept.description||'';
|
|
1722
1724
|
const deptHead=dept.head||'';
|
|
@@ -1771,10 +1773,15 @@ async function showDeptDetail(path){
|
|
|
1771
1773
|
}
|
|
1772
1774
|
async function addDeptAgent(path){
|
|
1773
1775
|
const sel=document.getElementById('ddAddAgent');
|
|
1776
|
+
const btn=sel?sel.nextElementSibling:null;
|
|
1774
1777
|
if(!sel||!sel.value){showToast('请选择要添加的 Agent','danger');return}
|
|
1778
|
+
if(sel.disabled||btn?.disabled)return;
|
|
1779
|
+
if(sel)sel.disabled=true;if(btn)btn.disabled=true;
|
|
1780
|
+
try{
|
|
1775
1781
|
const r=await api(`/api/departments/${encodeURIComponent(path)}/agents`,{method:'PUT',body:JSON.stringify({agents:[sel.value],action:'add'})});
|
|
1776
1782
|
if(r.error){showToast(r.error,'danger');return}
|
|
1777
1783
|
showToast('已添加','success');showDeptDetail(path);
|
|
1784
|
+
}finally{if(sel)sel.disabled=false;if(btn)btn.disabled=false}
|
|
1778
1785
|
}
|
|
1779
1786
|
async function removeDeptAgent(path,agentName){
|
|
1780
1787
|
const r=await api(`/api/departments/${encodeURIComponent(path)}/agents`,{method:'PUT',body:JSON.stringify({agents:[agentName],action:'remove'})});
|