Ai chat select fix (#622)

This commit is contained in:
Cole Lashley 2024-04-30 17:16:03 -07:00 committed by GitHub
parent 345356d8d4
commit f6881cf380
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -113,7 +113,7 @@ class AIChat extends React.Component<{}, {}> {
@mobx.action.bound
onTextAreaBlur(e: any) {
GlobalModel.inputModel.setAuxViewFocus(false);
//GlobalModel.inputModel.setAuxViewFocus(false);
}
// Adjust the height of the textarea to fit the text
@ -132,6 +132,9 @@ class AIChat extends React.Component<{}, {}> {
// Set the new height of the text area, bounded by the min and max height.
const newHeight = Math.min(Math.max(scrollHeight, textAreaMinHeight), textAreaMaxHeight);
this.textAreaRef.current.style.height = newHeight + "px";
}
onTextAreaInput(e: any) {
GlobalModel.inputModel.codeSelectDeselectAll();
}
@ -264,6 +267,7 @@ class AIChat extends React.Component<{}, {}> {
onFocus={this.onTextAreaFocused}
onBlur={this.onTextAreaBlur}
onChange={this.onTextAreaChange}
onInput={this.onTextAreaInput}
onKeyDown={this.onKeyDown}
style={{ fontSize: this.termFontSize }}
className="chat-textarea"

View File

@ -591,7 +591,8 @@ class InputModel {
}
}
this.codeSelectBlockRefArray = [];
this.setAIChatFocus();
this.setActiveAuxView(appconst.InputAuxView_AIChat);
this.setAuxViewFocus(true);
}
@mobx.action