This commit is contained in:
seb
2026-10-08 21:20:40 +02:00
parent f91c50ef69
commit 6578f7d1ac

View File

@@ -127,9 +127,9 @@ export default class ChatDrawer extends PureComponent {
this.updateGutterClass(this.state.isOpen);
if (this.state.isOpen) {
if (chatAutomat.state.pendingInput != null) {
this.focusInputAtEnd(150);
this.focusInputAtEnd(0);
} else {
this.focusInput(150);
this.focusInput(0);
}
}
void this.loadModelSettings();
@@ -169,9 +169,9 @@ export default class ChatDrawer extends PureComponent {
chatAutomat.setState({ pendingInput: null });
}
});
this.focusInputAtEnd(150);
this.focusInputAtEnd(0);
} else if (!wasOpen && willOpen) {
this.focusInput(150);
this.focusInput(0);
}
return patch;
});
@@ -1625,6 +1625,7 @@ export default class ChatDrawer extends PureComponent {
open={isOpen}
onClose={this.handleClose}
disableScrollLock
transitionDuration={0}
ModalProps={{
disableScrollLock: true,
disableEnforceFocus: true,
@@ -1633,6 +1634,7 @@ export default class ChatDrawer extends PureComponent {
zIndex: theme.zIndex.modal + 10,
'& .MuiBackdrop-root': {
backgroundColor: DIALOG_FOG,
transition: 'none !important',
},
'& .MuiDrawer-paper': {
width: { xs: '100vw', sm: `${totalWidth}px` },
@@ -1642,12 +1644,13 @@ export default class ChatDrawer extends PureComponent {
boxShadow: SHADOW_DRAWER,
position: 'fixed',
overflow: 'visible',
transition: isResizing ? 'none !important' : undefined,
transition: 'none !important',
},
})}
slotProps={{
transition: {
onEntered: () => this.focusInput(20),
timeout: 0,
onEntered: () => this.focusInput(0),
},
paper: {
sx: {
@@ -1658,7 +1661,7 @@ export default class ChatDrawer extends PureComponent {
boxShadow: SHADOW_DRAWER,
position: 'fixed',
overflow: 'visible',
transition: isResizing ? 'none !important' : undefined,
transition: 'none !important',
},
},
}}