diff --git a/src/pages/agent-office/AgentOffice.jsx b/src/pages/agent-office/AgentOffice.jsx index f7c01fe..edce480 100644 --- a/src/pages/agent-office/AgentOffice.jsx +++ b/src/pages/agent-office/AgentOffice.jsx @@ -8,8 +8,12 @@ import './AgentOffice.css'; const AGENT_META = { stock: { name: '주식 트레이더', color: '#4488cc' }, music: { name: '음악 프로듀서', color: '#44aa88' }, + blog: { name: '블로그 마케터', color: '#d97706' }, + realestate: { name: '청약 애널리스트', color: '#c026d3' }, }; +const AGENT_IDS = ['stock', 'music', 'blog', 'realestate']; + export function Component() { const canvasContainerRef = useRef(null); @@ -54,7 +58,7 @@ export function Component() {
- {['stock', 'music'].map(id => ( + {AGENT_IDS.map(id => ( { @@ -73,7 +81,10 @@ const AgentColumn = ({ agentId, meta, agentState, notification, onCommand, onApp const handleSend = () => { if (!input.trim() || !activeCommand) return; - onCommand(agentId, activeCommand, activeCommand === 'compose' ? { prompt: input } : { message: input }); + const params = activeCommand === 'compose' ? { prompt: input } + : activeCommand === 'research' ? { keyword: input } + : { message: input }; + onCommand(agentId, activeCommand, params); setInput(''); setActiveCommand(null); }; diff --git a/src/pages/agent-office/components/ChatPanel.jsx b/src/pages/agent-office/components/ChatPanel.jsx index 9aedc87..d9e5642 100644 --- a/src/pages/agent-office/components/ChatPanel.jsx +++ b/src/pages/agent-office/components/ChatPanel.jsx @@ -10,6 +10,21 @@ const AGENT_COMMANDS = { { action: 'compose', label: '작곡 시작', icon: '🎵', needsInput: true }, { action: 'credits', label: '크레딧 확인', icon: '💳' }, ], + blog: [ + { action: 'research', label: '키워드 리서치', icon: '🔍', needsInput: true }, + { action: 'list_trend_keywords', label: '트렌드 목록', icon: '📋' }, + ], + realestate: [ + { action: 'fetch_matches', label: '매칭 리포트', icon: '🏢' }, + { action: 'dashboard', label: '대시보드', icon: '📊' }, + ], +}; + +const AGENT_NAMES = { + stock: '주식 트레이더', + music: '음악 프로듀서', + blog: '블로그 마케터', + realestate: '청약 애널리스트', }; const ChatPanel = ({ agentId, agentState, onCommand, onApproval, onClose }) => { @@ -21,8 +36,8 @@ const ChatPanel = ({ agentId, agentState, onCommand, onApproval, onClose }) => { const handleSend = () => { if (!input.trim() || !activeCommand) return; - const params = activeCommand === 'compose' - ? { prompt: input } + const params = activeCommand === 'compose' ? { prompt: input } + : activeCommand === 'research' ? { keyword: input } : { message: input }; onCommand(agentId, activeCommand, params); setInput(''); @@ -41,8 +56,7 @@ const ChatPanel = ({ agentId, agentState, onCommand, onApproval, onClose }) => {
- {agentId === 'stock' ? '주식 트레이더' : - agentId === 'music' ? '음악 프로듀서' : agentId} + {AGENT_NAMES[agentId] || agentId} {state.state || 'idle'} @@ -87,7 +101,11 @@ const ChatPanel = ({ agentId, agentState, onCommand, onApproval, onClose }) => { value={input} onChange={e => setInput(e.target.value)} onKeyDown={e => e.key === 'Enter' && handleSend()} - placeholder={activeCommand === 'compose' ? '프롬프트 입력...' : '메시지 입력...'} + placeholder={ + activeCommand === 'compose' ? '프롬프트 입력...' + : activeCommand === 'research' ? '키워드 입력...' + : '메시지 입력...' + } autoFocus /> diff --git a/src/pages/agent-office/components/CommandColumn.jsx b/src/pages/agent-office/components/CommandColumn.jsx index a183d19..647edbe 100644 --- a/src/pages/agent-office/components/CommandColumn.jsx +++ b/src/pages/agent-office/components/CommandColumn.jsx @@ -3,12 +3,24 @@ import React, { useState } from 'react'; const TARGETS = [ { id: 'stock', name: '주식 트레이더' }, { id: 'music', name: '음악 프로듀서' }, + { id: 'blog', name: '블로그 마케터' }, + { id: 'realestate', name: '청약 애널리스트' }, ]; +const TARGET_ICONS = { + stock: '📈', + music: '🎵', + blog: '✍️', + realestate: '🏢', +}; + const QUICK_COMMANDS = [ { target: 'stock', action: 'fetch_news', label: '뉴스 수집' }, { target: 'stock', action: 'test_telegram', label: 'TG 테스트' }, { target: 'music', action: 'credits', label: '크레딧 확인' }, + { target: 'blog', action: 'list_trend_keywords', label: '트렌드 목록' }, + { target: 'realestate', action: 'fetch_matches', label: '매칭 리포트' }, + { target: 'realestate', action: 'dashboard', label: '청약 대시보드' }, ]; const CommandColumn = ({ agents, onCommand }) => { @@ -79,7 +91,7 @@ const CommandColumn = ({ agents, onCommand }) => {
{QUICK_COMMANDS.map((cmd, i) => ( ))}
diff --git a/src/pages/agent-office/components/DocumentPanel.jsx b/src/pages/agent-office/components/DocumentPanel.jsx index e5033e6..e9c0ff3 100644 --- a/src/pages/agent-office/components/DocumentPanel.jsx +++ b/src/pages/agent-office/components/DocumentPanel.jsx @@ -110,11 +110,16 @@ const DocumentPanel = ({ onClose }) => { {tab === 'detail' && (
- {['stock', 'music'].map(id => ( - + {[ + { id: 'stock', name: '주식 트레이더' }, + { id: 'music', name: '음악 프로듀서' }, + { id: 'blog', name: '블로그 마케터' }, + { id: 'realestate', name: '청약 애널리스트' }, + ].map(a => ( + ))}