44 lines
2.1 KiB
Markdown
44 lines
2.1 KiB
Markdown
# agent-workspace
|
|
|
|
## 목적 / 책임
|
|
|
|
Agent Chat 화면, agent sidebar 대화 목록, 현재 작업 context를 담당한다. 현재는 local mock 상태이며 실제 task 실행 연동 전까지 사용자 요청과 context 전달 흐름을 명확하게 유지한다.
|
|
|
|
## 포함 경로
|
|
|
|
- `src/routes/AgentPage.tsx` : Agent page composition
|
|
- `src/components/agent/` : context card, message list, input form
|
|
- `src/stores/agentStore.ts` : agent message와 current context 상태
|
|
|
|
## 제외 경로
|
|
|
|
- `src/api/tasks.ts` : nomadcode-core task API 경계는 backend-integration
|
|
- `src/layout/AgentSidebar.tsx` : shell 배치는 ui-shell, 내부 agent component 사용만 이 도메인과 연결
|
|
- `src/components/projects/` : project-workspace
|
|
|
|
## 주요 구성 요소
|
|
|
|
- `AgentInput` : 사용자 agent 요청 입력
|
|
- `AgentMessageList` : 대화 메시지 렌더링
|
|
- `AgentContextCard` : 현재 page/project/workspace context 표시
|
|
- `useAgentStore` : message append와 current context 관리
|
|
- `AgentPage` : 최근 session, conversation preview, task status scaffold
|
|
|
|
## 유지할 패턴
|
|
|
|
- agent message 생성은 `useAgentStore.sendMessage`를 통해 한 곳에서 처리한다.
|
|
- context는 `AppShell`에서 route/project 상태를 조합해 store에 반영한다.
|
|
- 실제 agent/task API 연결 시 mock 응답 생성과 서버 요청 상태를 분리한다.
|
|
- 입력 컴포넌트는 trim과 empty submit 방지를 유지한다.
|
|
|
|
## 다른 도메인과의 경계
|
|
|
|
- **ui-shell**: sidebar 열림/닫힘과 화면 배치는 ui-shell, 대화 내용과 context 의미는 agent-workspace.
|
|
- **project-workspace**: 선택 프로젝트와 active workspace의 원천 상태는 project-workspace, agent-workspace는 표시와 요청 context로만 사용한다.
|
|
- **backend-integration**: task 생성, enqueue, 조회 API는 backend-integration을 통해 호출한다.
|
|
|
|
## 금지 사항
|
|
|
|
- agent store에 프로젝트 목록이나 integration 설정 원천 데이터를 복제하지 않는다.
|
|
- mock 응답을 실제 서버 성공처럼 취급하는 UI를 추가하지 않는다.
|
|
- agent component 내부에서 직접 route state를 읽어 context를 재구성하지 않는다.
|