import { Archive, GitFork, Plus } from 'lucide-react';
import { closeDialogOnEscape } from '../../app/dialogs';
import type { AgentBackgroundSubmitMode } from '../../app/types';
import {
AgentGoalStatusPanel,
AgentRuntimeStatusPanel,
formatAgentConversationSessionMeta,
} from '../agent-runtime';
import {
taskGroupLabels,
taskStatusLabels,
} from '../project-summary/projectSummary';
import type { DeveloperAgentPanelController } from './useDeveloperAgentPanel';
export function DeveloperAgentPanel({
controller,
onRuntimeConfigOpen,
}: {
controller: DeveloperAgentPanelController;
onRuntimeConfigOpen: () => void;
}) {
const {
agentChatActiveSessionId,
agentChatBackgroundBusy,
agentChatBusy,
agentChatConversationPath,
agentChatGoal,
agentChatGoalError,
agentChatInput,
agentChatInteractionMode,
agentChatLegacySessionMode,
agentChatLlmStatus,
agentChatLoadVersionRef,
agentChatMessages,
agentChatMessagesRef,
agentChatProjectPath,
agentChatResumeConfirmation,
agentChatRunSubmitMode,
agentChatRuntime,
agentChatRuntimeError,
agentChatRuntimeResumeProjectPathRef,
agentChatSelectedAgentId,
agentChatSelectedSessionId,
agentChatSessionStatus,
agentChatSessions,
agentChatStatus,
cancelAgentChatRuntimeResume,
confirmAgentChatRuntimeResume,
currentAgentChatActiveSessions,
currentAgentChatAgent,
currentAgentChatArchivedSessions,
currentAgentChatGoalDialogMode,
currentAgentChatGoalStatus,
currentAgentChatLlmWarning,
currentAgentChatNeedsUserInput,
currentAgentChatSession,
currentAgentChatSessionArchived,
currentAgentChatSessionMutationBlocked,
currentAgentChatSteerRuntime,
currentAgentChatWaiting,
currentAgentChatWaitingDetail,
currentAgentChatWaitingStatus,
handleAgentChatArchiveSession,
handleAgentChatCancelRuntimeTask,
handleAgentChatCompactContext,
handleAgentChatConfirmRuntimeTask,
handleAgentChatCreateSession,
handleAgentChatForkSession,
handleAgentChatGoalControl,
handleAgentChatMessagesScroll,
handleAgentChatPickProjectDirectory,
handleAgentChatRejectRuntimeTask,
handleAgentChatRetryRuntimeTask,
handleAgentChatSelectSession,
handleAgentChatStartBackgroundTask,
handleAgentChatSubmit,
handleAgentChatSubmitUserInput,
handleOpenProjectSupervisorChatWindow,
launcherAgentChatAgents,
loadAgentChatConversation,
loadAgentChatLlmStatus,
openAgentChatGoalDialog,
resetAgentChatSessionView,
setAgentChatInput,
setAgentChatInteractionMode,
setAgentChatProjectPath,
setAgentChatResumeConfirmation,
setAgentChatRunSubmitMode,
setAgentChatSelectedAgentId,
setAgentChatStatus,
} = controller;
return (
{agentChatStatus} {`${taskGroupLabels[currentAgentChatAgent.group]} / ${currentAgentChatAgent.role} · ${taskStatusLabels[currentAgentChatAgent.status]}`} {agentChatLlmStatus}
{message.content}
暂无对话Agent 聊天
{currentAgentChatAgent?.title ?? '未选择 Agent'}
{currentAgentChatAgent ? (