add screen only ask, retrieve loading dot

This commit is contained in:
sanio 2025-07-14 03:16:29 +09:00
parent aa14a1d0b6
commit bcc8a59882
4 changed files with 24 additions and 10 deletions

View File

@ -145,9 +145,16 @@ class AskService {
}
}
async toggleAskButton() {
async toggleAskButton(inputScreenOnly = false) {
const askWindow = getWindowPool()?.get('ask');
let shouldSendScreenOnly = false;
if (inputScreenOnly && this.state.showTextInput && askWindow && askWindow.isVisible()) {
shouldSendScreenOnly = true;
await this.sendMessage('', []);
return;
}
const hasContent = this.state.isLoading || this.state.isStreaming || (this.state.currentResponse && this.state.currentResponse.length > 0);
if (askWindow && askWindow.isVisible() && hasContent) {
@ -218,10 +225,12 @@ class AskService {
this.abortController = new AbortController();
const { signal } = this.abortController;
if (!userPrompt || userPrompt.trim().length === 0) {
console.warn('[AskService] Cannot process empty message');
return { success: false, error: 'Empty message' };
}
// if (!userPrompt || userPrompt.trim().length === 0) {
// console.warn('[AskService] Cannot process empty message');
// return { success: false, error: 'Empty message' };
// }
let sessionId;

View File

@ -211,7 +211,7 @@ class ShortcutsService {
callback = () => this.toggleAllWindowsVisibility(this.windowPool);
break;
case 'nextStep':
callback = () => askService.toggleAskButton();
callback = () => askService.toggleAskButton(true);
break;
case 'scrollUp':
callback = () => {

View File

@ -987,7 +987,12 @@ export class AskView extends LitElement {
// ✨ 로딩 상태를 먼저 확인
if (this.isLoading) {
responseContainer.innerHTML = `<div class="loading-dots">...</div>`;
responseContainer.innerHTML = `
<div class="loading-dots">
<div class="loading-dot"></div>
<div class="loading-dot"></div>
<div class="loading-dot"></div>
</div>`;
return;
}
@ -1232,7 +1237,7 @@ export class AskView extends LitElement {
async handleSendText(e, overridingText = '') {
const textInput = this.shadowRoot?.getElementById('textInput');
const text = (overridingText || textInput?.value || '').trim();
if (!text) return;
// if (!text) return;
textInput.value = '';