优化新会话页面显示布局

This commit is contained in:
xintaofei
2026-03-10 23:49:28 +08:00
parent 380f430d5a
commit 5960ccebb9
3 changed files with 92 additions and 29 deletions

View File

@@ -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 (
<div className="flex h-full min-h-0 flex-col">
@@ -65,24 +67,26 @@ export function ConversationShell({
onRespond={onRespondPermission}
/>
<ChatInput
status={status}
promptCapabilities={promptCapabilities}
defaultPath={defaultPath}
onFocus={onFocus}
onSend={onSend}
onCancel={onCancel}
modes={modes}
configOptions={configOptions}
modeLoading={modeLoading}
configOptionsLoading={configOptionsLoading}
selectedModeId={selectedModeId}
onModeChange={onModeChange}
onConfigOptionChange={onConfigOptionChange}
availableCommands={availableCommands}
attachmentTabId={attachmentTabId}
draftStorageKey={draftStorageKey}
/>
{!hideInput && (
<ChatInput
status={status}
promptCapabilities={promptCapabilities}
defaultPath={defaultPath}
onFocus={onFocus}
onSend={onSend}
onCancel={onCancel}
modes={modes}
configOptions={configOptions}
modeLoading={modeLoading}
configOptionsLoading={configOptionsLoading}
selectedModeId={selectedModeId}
onModeChange={onModeChange}
onConfigOptionChange={onConfigOptionChange}
availableCommands={availableCommands}
attachmentTabId={attachmentTabId}
draftStorageKey={draftStorageKey}
/>
)}
{error && (
<div className="px-4 py-2 text-xs text-destructive bg-destructive/5 border-t border-destructive/20">