Skip to content

Commit

Permalink
fix: PSL-BUG-1850-Fixed (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
Prasanjeet-Microsoft authored May 24, 2024
1 parent 8f5ea28 commit a7c8274
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/frontend/src/components/Answer/Answer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export const Answer = ({
if (citation.filepath && citation.chunk_id != null) {
if (truncate && citation.filepath.length > filePathTruncationLimit) {
const citationLength = citation.filepath.length;
citationFilename = `${citation.filepath.substring(0, 20)}...${citation.filepath.substring(citationLength -20)} - Part ${parseInt(citation.chunk_id) + 1}`;
citationFilename = `${citation.filepath.substring(0, 20)}...${citation.filepath.substring(citationLength -20)} - Part ${citation.chunk_id}`;
}
else {
citationFilename = `${citation.filepath} - Part ${parseInt(citation.chunk_id) + 1}`;
citationFilename = `${citation.filepath} - Part ${citation.chunk_id}`;
}
}
else {
Expand Down Expand Up @@ -97,13 +97,13 @@ export const Answer = ({
onClick={handleChevronClick} iconName={chevronIsExpanded ? 'ChevronDown' : 'ChevronRight'}
/>
</Stack>

</Stack>
</Stack.Item>
)}

</Stack>
{chevronIsExpanded &&
{chevronIsExpanded &&
<div style={{ marginTop: 8, display: "flex", flexDirection: "column", height: "100%", gap: "4px", maxWidth: "100%" }}>
{parsedAnswer.citations.map((citation, idx) => {
return (
Expand Down

0 comments on commit a7c8274

Please sign in to comment.