Skip to content
Closed
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
2 changes: 1 addition & 1 deletion src/components/Draft/useResponsePanelCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function useResponsePanelCopy({
const handleCopy = useCallback(async () => {
if (!response) return;
const mode = confidenceMode ?? "answer";
const hasCitations = sourcesCount > 0;
const hasCitations = sourcesCount >= 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require citations before allowing direct copy

When an answer draft has sourcesCount === 0, sourcesCount >= 0 makes hasCitations true, so handleCopy writes the draft to the clipboard instead of opening the override modal. ResponsePanel passes sources.length into this hook, so a no-source/no-citation support answer now bypasses the required reason and auditResponseCopyOverride path, weakening the grounding audit gate for ungrounded drafts.

Useful? React with 👍 / 👎.

const copyAllowed = mode === "answer" && hasCitations;

if (!copyAllowed) {
Expand Down
Loading