Fix: enable chat input resizing (#12998)

## Summary
- add resizable support to shared textarea component
- enable vertical resizing for chat inputs in chat and share surfaces
- preserve autosize behavior while honoring manual resize height

## Test plan
- not run (not requested)

Fixes #12803

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Neel Harsola
2026-02-09 17:03:05 +05:30
committed by GitHub
parent 4bc622b409
commit a2dda8fb70
7 changed files with 50 additions and 6 deletions

View File

@@ -56,6 +56,7 @@ interface NextMessageInputProps {
removeFile?(file: File): void;
showReasoning?: boolean;
showInternet?: boolean;
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
}
export function NextMessageInput({
@@ -65,6 +66,7 @@ export function NextMessageInput({
sendLoading,
disabled,
showUploadIcon = true,
resize = 'none',
onUpload,
onInputChange,
stopOutputMessage,
@@ -211,6 +213,7 @@ export function NextMessageInput({
disabled={isUploading || disabled || sendLoading}
onKeyDown={handleKeyDown}
autoSize={{ minRows: 1, maxRows: 8 }}
resize={resize}
/>
<div className={cn('flex items-center justify-between gap-1.5')}>
<div className="flex items-center gap-3">