focus entry on opening sideleft

This commit is contained in:
end-4
2024-03-24 09:09:19 +07:00
parent 29a067a492
commit 3e7fe73543
3 changed files with 6 additions and 2 deletions
@@ -75,6 +75,11 @@ export const chatEntry = TextView({
acceptsTab: false,
className: 'sidebar-chat-entry txt txt-smallie',
setup: (self) => self
.hook(App, (self, currentName, visible) => {
if (visible && currentName === 'sideleft') {
self.grab_focus();
}
})
.hook(GPTService, (self) => {
if (APIS[currentApiId].name != 'Assistant (GPTs)') return;
self.placeholderText = (GPTService.key.length > 0 ? 'Message the model...' : 'Enter API Key...');