From 6bd6cbd635e48fca30fc64bb12196972fe641407 Mon Sep 17 00:00:00 2001 From: gahusb Date: Mon, 27 Apr 2026 08:35:00 +0900 Subject: [PATCH] feat(agent-office): add SidePanel container with 4-tab layout --- .../agent-office/components/SidePanel.jsx | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/pages/agent-office/components/SidePanel.jsx diff --git a/src/pages/agent-office/components/SidePanel.jsx b/src/pages/agent-office/components/SidePanel.jsx new file mode 100644 index 0000000..ffbc7e5 --- /dev/null +++ b/src/pages/agent-office/components/SidePanel.jsx @@ -0,0 +1,73 @@ +// src/pages/agent-office/components/SidePanel.jsx +import { useState } from 'react'; +import CommandTab from './CommandTab.jsx'; +import TaskTab from './TaskTab.jsx'; +import TokenTab from './TokenTab.jsx'; +import LogTab from './LogTab.jsx'; + +const AGENT_META = { + stock: { displayName: '주식 트레이더', emoji: '📈', color: '#4488cc' }, + music: { displayName: '음악 프로듀서', emoji: '🎵', color: '#44aa88' }, + blog: { displayName: '블로그 마케터', emoji: '✍️', color: '#d97706' }, + realestate: { displayName: '청약 애널리스트', emoji: '🏢', color: '#c026d3' }, + lotto: { displayName: '로또 큐레이터', emoji: '🎱', color: '#ef4444' } +}; + +const TABS = ['Commands', 'Tasks', 'Tokens', 'Logs']; + +export default function SidePanel({ agentId, agentState, pendingTask, onClose, refreshTrigger }) { + const [activeTab, setActiveTab] = useState('Commands'); + const meta = AGENT_META[agentId]; + if (!meta) return null; + + const stateText = agentState?.detail + ? `${agentState.state} - ${agentState.detail}` + : agentState?.state || 'unknown'; + + return ( +
+ {/* Header */} +
+
+
+ {meta.emoji} +
+
+
{meta.displayName}
+
● {stateText}
+
+
+ +
+ + {/* Tabs */} +
+ {TABS.map(tab => ( + + ))} +
+ + {/* Tab Content */} +
+ {activeTab === 'Commands' && ( + + )} + {activeTab === 'Tasks' && ( + + )} + {activeTab === 'Tokens' && ( + + )} + {activeTab === 'Logs' && ( + + )} +
+
+ ); +}