Skip to content

Commit 58c93eb

Browse files
committed
fix: locale JSON syntax; prevent focus grab on follow-up; platform-aware key hints
1 parent 0d538a9 commit 58c93eb

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
784784
case "action":
785785
switch (message.action!) {
786786
case "didBecomeVisible":
787-
if (!isHidden && !sendingDisabled && !enableButtons) {
787+
// Do not grab focus during follow-up questions
788+
if (!isHidden && !sendingDisabled && !enableButtons && clineAsk !== "followup") {
788789
textAreaRef.current?.focus()
789790
}
790791
break
@@ -845,6 +846,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
845846
handleSetChatBoxMessage,
846847
handlePrimaryButtonClick,
847848
handleSecondaryButtonClick,
849+
clineAsk,
848850
],
849851
)
850852

@@ -966,12 +968,13 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
966968

967969
useDebounceEffect(
968970
() => {
969-
if (!isHidden && !sendingDisabled && !enableButtons) {
971+
// Do not grab focus during follow-up questions
972+
if (!isHidden && !sendingDisabled && !enableButtons && clineAsk !== "followup") {
970973
textAreaRef.current?.focus()
971974
}
972975
},
973976
50,
974-
[isHidden, sendingDisabled, enableButtons],
977+
[isHidden, sendingDisabled, enableButtons, clineAsk],
975978
)
976979

977980
const isReadOnlyToolAction = useCallback((message: ClineMessage | undefined) => {

webview-ui/src/components/chat/CheckpointWarning.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { Trans } from "react-i18next"
22
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
33

4-
export const CheckpointWarning = () => {
4+
export interface CheckpointWarningProps {
5+
// Optional prop to satisfy external type expectations; not used in rendering
6+
warning?: string
7+
}
8+
9+
export const CheckpointWarning = (_props: CheckpointWarningProps) => {
510
return (
611
<div className="flex items-center p-3 my-3 bg-vscode-inputValidation-warningBackground border border-vscode-inputValidation-warningBorder rounded">
712
<span className="codicon codicon-loading codicon-modifier-spin mr-2" />

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/settings.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/it/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)