From b0a0a650bea367f4a142edf09efbb84b0877fa57 Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 17 Mar 2026 16:06:03 +0100 Subject: [PATCH] fix(vscode): disable send button while question tool is pending (#7181) * fix(vscode): disable send button while question tool is pending * feat(vscode): add tooltip explaining why send is disabled during pending question Show 'Answer or dismiss the pending question first' on the send button tooltip when a question or permission dock is active. Translated to all 16 supported locales. --- .../webview-ui/src/components/chat/ChatView.tsx | 2 +- .../src/components/chat/PromptInput.tsx | 15 +++++++++++---- packages/kilo-vscode/webview-ui/src/i18n/ar.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/br.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/bs.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/da.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/de.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/en.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/es.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/fr.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/ja.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/ko.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/no.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/pl.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/ru.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/th.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/zh.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/zht.ts | 1 + 18 files changed, 28 insertions(+), 5 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx b/packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx index 448f9e39d3a..6e6c106e162 100644 --- a/packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx @@ -134,7 +134,7 @@ export const ChatView: Component = (props) => { - + diff --git a/packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx b/packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx index 0a8332605d5..a9759a6c575 100644 --- a/packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx @@ -41,7 +41,11 @@ function mergeReviewComments(current: ReviewComment[], incoming: ReviewComment[] return [...map.values()] } -export const PromptInput: Component = () => { +interface PromptInputProps { + blocked?: () => boolean +} + +export const PromptInput: Component = (props) => { const session = useSession() const server = useServer() const language = useLanguage() @@ -172,7 +176,7 @@ export const PromptInput: Component = () => { const isBusy = () => session.status() === "busy" const isDisabled = () => !server.isConnected() const hasInput = () => text().trim().length > 0 || imageAttach.images().length > 0 || reviewComments().length > 0 - const canSend = () => hasInput() && !isDisabled() + const canSend = () => hasInput() && !isDisabled() && !props.blocked?.() const showStop = () => isBusy() && !hasInput() const placeholder = () => { switch (server.connectionState()) { @@ -450,7 +454,7 @@ export const PromptInput: Component = () => { const pending = reviewComments() const review = pending.length > 0 ? formatReviewCommentsMarkdown(pending) : "" const message = draft && review ? `${review}\n\n${draft}` : draft || review - if ((!message && imgs.length === 0) || isDisabled()) return + if ((!message && imgs.length === 0) || isDisabled() || props.blocked?.()) return const mentionFiles = mention.parseFileAttachments(draft) const imgFiles = imgs.map((img) => ({ mime: img.mime, url: img.dataUrl, filename: img.filename })) @@ -639,7 +643,10 @@ export const PromptInput: Component = () => { +