-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix issue #3309 #3322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #3309 #3322
Conversation
- In ChatTextArea, modified input handling to prevent trimming of values when setting state, ensuring that user input is preserved. - Updated PromptsView to avoid trimming role definitions and custom instructions when updating modes, allowing for more flexible input handling. - Adjusted AutosizeTextarea to ensure that the trigger for resizing is set without trimming the value, improving user experience when interacting with the text area.
|
|
Hi @Githubguy132010, thank you for your contribution! I've reviewed this pull request and noticed that it contains two distinct groups of changes that could benefit from being separated into individual PRs:
Splitting these changes would make the review process more focused and manageable. The whitespace preservation fix could be merged quickly, while the more extensive ChatTextArea rewrite could receive the detailed review it deserves. Would you consider separating these changes into two pull requests? This would align with our best practices for code review and make it easier to track the specific fixes for issue #3309. Thank you! |
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Fix syntax error in ChatTextArea.tsx
|
I think issue #3309 was already resolved by a revert. Beyond that issue, how important is it to stop trimming the inputs? I hadn't heard any complaints previously. |
Yea, it's fixed. I will close it. |
This pull request modifies how input values are handled in the
PromptsViewandAutosizeTextareacomponents to prevent automatic trimming of whitespace. The changes ensure that user-provided values are preserved as-is, improving flexibility and accuracy in handling text inputs.Changes in
PromptsViewComponent (webview-ui/src/components/prompts/PromptsView.tsx):value.trim()was used to simply usevalue, ensuring that leading and trailing whitespace in user input is preserved. This adjustment affects updates toroleDefinition,customInstructions, andsupportPrompt. [1] [2] [3] [4]Changes in
AutosizeTextareaComponent (webview-ui/src/components/ui/autosize-textarea.tsx):setTriggerAutoSizefunction to avoid trimming thevaluewhen updating the autosize behavior. This ensures that the full input, including whitespace, is reflected in the textarea.onChangehandler to explicitly preserve the input value without trimming.Important
Preserve whitespace in user inputs for
PromptsView,AutosizeTextarea, andChatTextAreacomponents.PromptsView.tsx: Removedtrim()fromroleDefinition,customInstructions, andsupportPromptupdates to preserve whitespace.autosize-textarea.tsx: ModifiedsetTriggerAutoSizeto avoid trimmingvalue.ChatTextArea.tsx: UpdatedsetInputValueto preserve whitespace in user input.unescapeSpacesimport fromChatTextArea.tsx.This description was created by
for ef10350. You can customize this summary. It will automatically update as commits are pushed.