mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix(vscode-ide-companion): fix send/stop button state timing issue
- Show stop button immediately when request is submitted (isWaitingForResponse=true) - Prevent confusing state where send button appears disabled instead of stop button - Improve UX by providing immediate visual feedback on request submission 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -624,6 +624,7 @@ export const App: React.FC = () => {
|
|||||||
inputText={inputText}
|
inputText={inputText}
|
||||||
inputFieldRef={inputFieldRef}
|
inputFieldRef={inputFieldRef}
|
||||||
isStreaming={messageHandling.isStreaming}
|
isStreaming={messageHandling.isStreaming}
|
||||||
|
isWaitingForResponse={messageHandling.isWaitingForResponse}
|
||||||
isComposing={isComposing}
|
isComposing={isComposing}
|
||||||
editMode={editMode}
|
editMode={editMode}
|
||||||
thinkingEnabled={thinkingEnabled}
|
thinkingEnabled={thinkingEnabled}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ interface InputFormProps {
|
|||||||
// generic should be `HTMLDivElement` (not `HTMLDivElement | null`).
|
// generic should be `HTMLDivElement` (not `HTMLDivElement | null`).
|
||||||
inputFieldRef: React.RefObject<HTMLDivElement>;
|
inputFieldRef: React.RefObject<HTMLDivElement>;
|
||||||
isStreaming: boolean;
|
isStreaming: boolean;
|
||||||
|
isWaitingForResponse: boolean;
|
||||||
isComposing: boolean;
|
isComposing: boolean;
|
||||||
editMode: EditMode;
|
editMode: EditMode;
|
||||||
thinkingEnabled: boolean;
|
thinkingEnabled: boolean;
|
||||||
@@ -235,7 +236,7 @@ export const InputForm: React.FC<InputFormProps> = ({
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Send/Stop button */}
|
{/* Send/Stop button */}
|
||||||
{isStreaming ? (
|
{isStreaming || isWaitingForResponse ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn-send-compact [&>svg]:w-5 [&>svg]:h-5"
|
className="btn-send-compact [&>svg]:w-5 [&>svg]:h-5"
|
||||||
|
|||||||
Reference in New Issue
Block a user