mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-04 18:59:08 +01:00
fix issues are main merge
This commit is contained in:
parent
8ea22c4c1f
commit
d177fab6e3
@ -178,7 +178,7 @@ class AIChat extends React.Component<{}, {}> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
submitChatMessage(messageStr: string) {
|
submitChatMessage(messageStr: string) {
|
||||||
const curLine = GlobalModel.inputModel.getCurLine();
|
const curLine = GlobalModel.inputModel.curLine;
|
||||||
const prtn = GlobalModel.submitChatInfoCommand(messageStr, curLine, false);
|
const prtn = GlobalModel.submitChatInfoCommand(messageStr, curLine, false);
|
||||||
prtn.then((rtn) => {
|
prtn.then((rtn) => {
|
||||||
if (!rtn.success) {
|
if (!rtn.success) {
|
||||||
@ -193,13 +193,13 @@ class AIChat extends React.Component<{}, {}> {
|
|||||||
return { numLines, linePos };
|
return { numLines, linePos };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mobx.action.bound
|
||||||
onTextAreaFocused(e: any) {
|
onTextAreaFocused(e: any) {
|
||||||
console.log("focused=====");
|
GlobalModel.inputModel.setAuxViewFocus(true);
|
||||||
mobx.action(() => {
|
this.onTextAreaChange(e);
|
||||||
GlobalModel.inputModel.setAuxViewFocus(true);
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mobx.action.bound
|
||||||
onTextAreaBlur(e: any) {
|
onTextAreaBlur(e: any) {
|
||||||
mobx.action(() => {
|
mobx.action(() => {
|
||||||
GlobalModel.inputModel.setAuxViewFocus(false);
|
GlobalModel.inputModel.setAuxViewFocus(false);
|
||||||
@ -235,7 +235,10 @@ class AIChat extends React.Component<{}, {}> {
|
|||||||
this.submitChatMessage(messageStr);
|
this.submitChatMessage(messageStr);
|
||||||
currentRef.value = "";
|
currentRef.value = "";
|
||||||
} else {
|
} else {
|
||||||
inputModel.grabCodeSelectSelection();
|
mobx.action(() => {
|
||||||
|
inputModel.grabCodeSelectSelection();
|
||||||
|
inputModel.setAuxViewFocus(false);
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +306,7 @@ class AIChat extends React.Component<{}, {}> {
|
|||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
id="chat-cmd-input"
|
id="chat-cmd-input"
|
||||||
onChange={this.onTextAreaChange.bind(this)}
|
onChange={this.onTextAreaChange}
|
||||||
onKeyDown={this.onKeyDown}
|
onKeyDown={this.onKeyDown}
|
||||||
style={{ fontSize: this.termFontSize }}
|
style={{ fontSize: this.termFontSize }}
|
||||||
className="chat-textarea"
|
className="chat-textarea"
|
||||||
|
Loading…
Reference in New Issue
Block a user