Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/frontend/src/components/Answer/Answer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ export const Answer = ({
title={t("tooltips.showThoughtProcess")}
ariaLabel={t("tooltips.showThoughtProcess")}
onClick={() => onThoughtProcessClicked()}
disabled={!answer.context.thoughts?.length}
disabled={!answer.context.thoughts?.length || isStreaming}
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider extracting the disable condition into a descriptive variable (e.g., isThoughtProcessDisabled) to improve readability and maintainability.

Suggested change
disabled={!answer.context.thoughts?.length || isStreaming}
disabled={isThoughtProcessDisabled}

Copilot uses AI. Check for mistakes.

/>
<IconButton
style={{ color: "black" }}
iconProps={{ iconName: "ClipboardList" }}
title={t("tooltips.showSupportingContent")}
ariaLabel={t("tooltips.showSupportingContent")}
onClick={() => onSupportingContentClicked()}
disabled={!answer.context.data_points}
disabled={!answer.context.data_points || isStreaming}
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider extracting the disable condition into a descriptive variable (e.g., isSupportingContentDisabled) to enhance clarity and simplify future modifications.

Suggested change
disabled={!answer.context.data_points || isStreaming}
disabled={isSupportingContentDisabled}

Copilot uses AI. Check for mistakes.

/>
{showSpeechOutputAzure && (
<SpeechOutputAzure answer={sanitizedAnswerHtml} index={index} speechConfig={speechConfig} isStreaming={isStreaming} />
Expand Down