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:
yiliang114
2025-12-04 12:47:18 +08:00
parent d56923b657
commit 4145f45c7c
2 changed files with 3 additions and 1 deletions

View File

@@ -624,6 +624,7 @@ export const App: React.FC = () => {
inputText={inputText}
inputFieldRef={inputFieldRef}
isStreaming={messageHandling.isStreaming}
isWaitingForResponse={messageHandling.isWaitingForResponse}
isComposing={isComposing}
editMode={editMode}
thinkingEnabled={thinkingEnabled}

View File

@@ -27,6 +27,7 @@ interface InputFormProps {
// generic should be `HTMLDivElement` (not `HTMLDivElement | null`).
inputFieldRef: React.RefObject<HTMLDivElement>;
isStreaming: boolean;
isWaitingForResponse: boolean;
isComposing: boolean;
editMode: EditMode;
thinkingEnabled: boolean;
@@ -235,7 +236,7 @@ export const InputForm: React.FC<InputFormProps> = ({
</button>
{/* Send/Stop button */}
{isStreaming ? (
{isStreaming || isWaitingForResponse ? (
<button
type="button"
className="btn-send-compact [&>svg]:w-5 [&>svg]:h-5"