feat(agent-office): agentActivity API 헬퍼 추가
This commit is contained in:
11
src/api.js
11
src/api.js
@@ -594,6 +594,17 @@ export const sendAgentCommand = (agent, action, params={}) => apiPost('/api/age
|
||||
export const approveAgentTask = (agent, task_id, approved, feedback='') => apiPost('/api/agent-office/approve', { agent, task_id, approved, feedback });
|
||||
export const getAgentStates = () => apiGet('/api/agent-office/states');
|
||||
export const getActivityFeed = (limit=50, offset=0) => apiGet(`/api/agent-office/activity?limit=${limit}&offset=${offset}`);
|
||||
// 횡단 오버사이트 타임라인용 — 빈 값은 쿼리에서 제외(백엔드 브랜치 선택).
|
||||
export const agentActivity = ({ agent_id, type, status, days, limit = 30, offset = 0 } = {}) => {
|
||||
const p = new URLSearchParams();
|
||||
if (agent_id) p.set('agent_id', agent_id);
|
||||
if (type) p.set('type', type);
|
||||
if (status) p.set('status', status);
|
||||
if (days) p.set('days', String(days));
|
||||
p.set('limit', String(limit));
|
||||
p.set('offset', String(offset));
|
||||
return apiGet(`/api/agent-office/activity?${p.toString()}`);
|
||||
};
|
||||
export const getAgentTokenUsage = (id, days=1) => apiGet(`/api/agent-office/agents/${id}/token-usage?days=${days}`);
|
||||
|
||||
// --- Lotto Briefing ---
|
||||
|
||||
Reference in New Issue
Block a user