diff --git a/src/components/chat/conversation-shell.tsx b/src/components/chat/conversation-shell.tsx index 455adc1..45e4663 100644 --- a/src/components/chat/conversation-shell.tsx +++ b/src/components/chat/conversation-shell.tsx @@ -32,6 +32,7 @@ interface ConversationShellProps { availableCommands?: AvailableCommandInfo[] | null attachmentTabId?: string | null draftStorageKey?: string | null + hideInput?: boolean } export function ConversationShell({ @@ -55,6 +56,7 @@ export function ConversationShell({ availableCommands, attachmentTabId, draftStorageKey, + hideInput = false, }: ConversationShellProps) { return (
@@ -65,24 +67,26 @@ export function ConversationShell({ onRespond={onRespondPermission} /> - + {!hideInput && ( + + )} {error && (
diff --git a/src/components/conversations/conversation-detail-panel.tsx b/src/components/conversations/conversation-detail-panel.tsx index 196cc3c..3454c73 100644 --- a/src/components/conversations/conversation-detail-panel.tsx +++ b/src/components/conversations/conversation-detail-panel.tsx @@ -11,6 +11,7 @@ import { useConnectionLifecycle } from "@/hooks/use-connection-lifecycle" import { MessageListView } from "@/components/message/message-list-view" import { ConversationShell } from "@/components/chat/conversation-shell" import { AgentSelector } from "@/components/chat/agent-selector" +import { ChatInput } from "@/components/chat/chat-input" import { createConversation, openSettingsWindow, @@ -151,6 +152,7 @@ const ConversationTabView = memo(function ConversationTabView({ const [agentConnectError, setAgentConnectError] = useState( null ) + const [hasSentMessage, setHasSentMessage] = useState(false) const hasPersistedConversation = dbConversationId != null const canAutoConnect = @@ -425,6 +427,7 @@ const ConversationTabView = memo(function ConversationTabView({ ) setSendSignal((prev) => prev + 1) setSyncState(effectiveConversationId, "awaiting_persist") + setHasSentMessage(true) lifecycleSend(draft, selectedModeIdArg) const persistedId = dbConvIdRef.current @@ -534,6 +537,9 @@ const ConversationTabView = memo(function ConversationTabView({ [connConnect, connDisconnect, workingDirForConnection] ) + const showDraftHeader = !hasPersistedConversation + const isWelcomeMode = showDraftHeader && !hasSentMessage + const messageListNode = ( ) - const showDraftHeader = !hasPersistedConversation - return ( - {showDraftHeader ? ( + {isWelcomeMode ? ( +
+
+ { + setAgentsLoaded(true) + setUsableAgentCount( + agents.filter((agent) => agent.enabled && agent.available) + .length + ) + }} + onOpenAgentsSettings={handleOpenAgentsSettings} + disabled={isConnecting || dbConversationId != null} + /> + {autoConnectError || agentConnectError ? ( + + ) : null} + +
+
+ ) : showDraftHeader ? (
( -
-

- {t("emptyConversation")} -

-
- ), - [t] + () => + hideEmptyState ? null : ( +
+

+ {t("emptyConversation")} +

+
+ ), + [hideEmptyState, t] ) const agentPlanOverlayKey = liveMessage?.id ?? `history-${conversationId}`