Merge remote-tracking branch 'origin/main' into pr-77

This commit is contained in:
sanio 2025-07-07 21:52:43 +09:00
commit 516b1ae61e
2 changed files with 14 additions and 7 deletions

View File

@ -43,7 +43,6 @@ win:
arch: x64 arch: x64
- target: portable - target: portable
arch: x64 arch: x64
publisherName: Pickle Team
requestedExecutionLevel: asInvoker requestedExecutionLevel: asInvoker
# NSIS installer configuration for Windows # NSIS installer configuration for Windows

View File

@ -857,12 +857,7 @@ export class AskView extends LitElement {
ipcRenderer.on('window-blur', this.handleWindowBlur); ipcRenderer.on('window-blur', this.handleWindowBlur);
ipcRenderer.on('window-did-show', () => { ipcRenderer.on('window-did-show', () => {
if (!this.currentResponse && !this.isLoading && !this.isStreaming) { if (!this.currentResponse && !this.isLoading && !this.isStreaming) {
setTimeout(() => { this.focusTextInput();
const textInput = this.shadowRoot?.getElementById('textInput');
if (textInput) {
textInput.focus();
}
}, 100);
} }
}); });
@ -1291,6 +1286,19 @@ export class AskView extends LitElement {
if (changedProperties.has('showTextInput') || changedProperties.has('isLoading')) { if (changedProperties.has('showTextInput') || changedProperties.has('isLoading')) {
this.adjustWindowHeightThrottled(); this.adjustWindowHeightThrottled();
} }
if (changedProperties.has('showTextInput') && this.showTextInput) {
this.focusTextInput();
}
}
focusTextInput(){
requestAnimationFrame(() => {
const textInput = this.shadowRoot?.getElementById('textInput');
if (textInput){
textInput.focus();
}
});
} }
firstUpdated() { firstUpdated() {