Skip to content

Commit 5876f92

Browse files
format changes
1 parent 8d46475 commit 5876f92

File tree

13 files changed

+74
-54
lines changed

13 files changed

+74
-54
lines changed

frontend/src/components/ChatBot/ChatInfoModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,12 @@ const ChatInfoModal: React.FC<chatInfoMessage> = ({
261261
To generate this response, the process took <span className='font-bold'>{response_time} seconds,</span>
262262
utilizing <span className='font-bold'>{total_tokens}</span> tokens with the model{' '}
263263
<span className='font-bold'>{model}</span> in{' '}
264-
<span className='font-bold'>{chatModeReadableLables[mode] !== 'vector' ? chatModeReadableLables[mode].replace(/\+/g, ' & ') : chatModeReadableLables[mode]}</span> mode.
264+
<span className='font-bold'>
265+
{chatModeReadableLables[mode] !== 'vector'
266+
? chatModeReadableLables[mode].replace(/\+/g, ' & ')
267+
: chatModeReadableLables[mode]}
268+
</span>{' '}
269+
mode.
265270
</Typography>
266271
</Box>
267272
</Box>

frontend/src/components/ChatBot/ChatModeToggle.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useCredentials } from '../../context/UserCredentials';
99

1010
export default function ChatModeToggle({
1111
menuAnchor,
12-
closeHandler = () => { },
12+
closeHandler = () => {},
1313
open,
1414
anchorPortal = true,
1515
disableBackdrop = false,
@@ -37,7 +37,9 @@ export default function ChatModeToggle({
3737
return memoizedChatModes?.map((m) => {
3838
const handleModeChange = () => {
3939
if (chatModes.includes(m.mode)) {
40-
if (chatModes.length === 1) return;
40+
if (chatModes.length === 1) {
41+
return;
42+
}
4143
setchatModes((prev) => prev.filter((i) => i !== m.mode));
4244
} else {
4345
setchatModes((prev) => [...prev, m.mode]);
@@ -81,4 +83,4 @@ export default function ChatModeToggle({
8183
items={menuItems}
8284
/>
8385
);
84-
}
86+
}

frontend/src/components/ChatBot/ChatModesSwitch.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export default function ChatModesSwitch({
1717
currentMode: string;
1818
isFullScreen: boolean;
1919
}) {
20-
const chatmodetoshow =chatModeReadableLables[currentMode].includes('+') ? capitalizeWithPlus(chatModeReadableLables[currentMode]) : capitalize(chatModeReadableLables[currentMode]);
20+
const chatmodetoshow = chatModeReadableLables[currentMode].includes('+')
21+
? capitalizeWithPlus(chatModeReadableLables[currentMode])
22+
: capitalize(chatModeReadableLables[currentMode]);
2123
return (
2224
<Flex flexDirection='row' gap='1' alignItems='center'>
2325
<IconButton

frontend/src/components/ChatBot/ChunkInfo.tsx

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
7474
label='Graph view'
7575
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
7676
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
77-
>{'View Graph'}
77+
>
78+
{'View Graph'}
7879
</TextLink>
7980
</div>
8081
</>
@@ -98,11 +99,12 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
9899
<Typography variant='subheading-small'>Similarity Score: {chunk?.score}</Typography>
99100
<div>
100101
<TextLink
101-
as='small'
102-
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
102+
as='small'
103+
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
103104
label='Graph view'
104105
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
105-
>{'View Graph'}
106+
>
107+
{'View Graph'}
106108
</TextLink>
107109
</div>
108110
</>
@@ -121,10 +123,11 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
121123
<Typography variant='subheading-small'>Similarity Score: {chunk?.score}</Typography>
122124
<div>
123125
<TextLink
124-
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
126+
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
125127
label='Graph view'
126128
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
127-
>{'View Graph'}
129+
>
130+
{'View Graph'}
128131
</TextLink>
129132
</div>
130133
</>
@@ -143,10 +146,11 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
143146
<Typography variant='subheading-small'>Similarity Score: {chunk?.score}</Typography>
144147
<div>
145148
<TextLink
146-
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
149+
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
147150
label='Graph view'
148151
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
149-
>{'View Graph'}
152+
>
153+
{'View Graph'}
150154
</TextLink>
151155
</div>
152156
</>
@@ -165,10 +169,11 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
165169
<Typography variant='subheading-small'>Similarity Score: {chunk?.score}</Typography>
166170
<div>
167171
<TextLink
168-
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
172+
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
169173
label='Graph view'
170174
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
171-
>{'View Graph'}
175+
>
176+
{'View Graph'}
172177
</TextLink>
173178
</div>
174179
</>
@@ -191,10 +196,11 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
191196
<Typography variant='subheading-small'>Similarity Score: {chunk?.score}</Typography>
192197
<div>
193198
<TextLink
194-
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
199+
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
195200
label='Graph view'
196201
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
197-
>{'View Graph'}
202+
>
203+
{'View Graph'}
198204
</TextLink>
199205
</div>
200206
</>
@@ -222,10 +228,11 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
222228
</Typography>
223229
<div>
224230
<TextLink
225-
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
231+
className={`${loadingGraphView ? 'cursor-wait' : 'cursor-pointer'}`}
226232
label='Graph view'
227233
onClick={() => handleChunkClick(chunk.element_id, 'Chunk')}
228-
>{'View Graph'}
234+
>
235+
{'View Graph'}
229236
</TextLink>
230237
</div>
231238
</>

frontend/src/components/Content.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,9 @@ const Content: React.FC<ContentProps> = ({
522522
const handleOpenGraphClick = () => {
523523
const bloomUrl = process.env.VITE_BLOOM_URL;
524524
const uriCoded = userCredentials?.uri.replace(/:\d+$/, '');
525-
const connectURL = `${uriCoded?.split('//')[0]}//${userCredentials?.userName}@${uriCoded?.split('//')[1]}:${userCredentials?.port ?? '7687'
526-
}`;
525+
const connectURL = `${uriCoded?.split('//')[0]}//${userCredentials?.userName}@${uriCoded?.split('//')[1]}:${
526+
userCredentials?.port ?? '7687'
527+
}`;
527528
const encodedURL = encodeURIComponent(connectURL);
528529
const replacedUrl = bloomUrl?.replace('{CONNECT_URL}', encodedURL);
529530
window.open(replacedUrl, '_blank');
@@ -533,10 +534,10 @@ const Content: React.FC<ContentProps> = ({
533534
isLeftExpanded && isRightExpanded
534535
? 'contentWithExpansion'
535536
: isRightExpanded
536-
? 'contentWithChatBot'
537-
: !isLeftExpanded && !isRightExpanded
538-
? 'w-[calc(100%-128px)]'
539-
: 'contentWithDropzoneExpansion';
537+
? 'contentWithChatBot'
538+
: !isLeftExpanded && !isRightExpanded
539+
? 'w-[calc(100%-128px)]'
540+
: 'contentWithDropzoneExpansion';
540541

541542
const handleGraphView = () => {
542543
setOpenGraphView(true);
@@ -568,12 +569,12 @@ const Content: React.FC<ContentProps> = ({
568569
return prev.map((f) => {
569570
return f.name === filename
570571
? {
571-
...f,
572-
status: 'Reprocess',
573-
processingProgress: isStartFromBegining ? 0 : f.processingProgress,
574-
nodesCount: isStartFromBegining ? 0 : f.nodesCount,
575-
relationshipCount: isStartFromBegining ? 0 : f.relationshipsCount,
576-
}
572+
...f,
573+
status: 'Reprocess',
574+
processingProgress: isStartFromBegining ? 0 : f.processingProgress,
575+
nodesCount: isStartFromBegining ? 0 : f.nodesCount,
576+
relationshipCount: isStartFromBegining ? 0 : f.relationshipsCount,
577+
}
577578
: f;
578579
});
579580
});
@@ -862,8 +863,9 @@ const Content: React.FC<ContentProps> = ({
862863
handleGenerateGraph={processWaitingFilesOnRefresh}
863864
></FileTable>
864865
<Flex
865-
className={`${!isLeftExpanded && !isRightExpanded ? 'w-[calc(100%-128px)]' : 'w-full'
866-
} p-2.5 absolute bottom-4 mt-1.5 self-start`}
866+
className={`${
867+
!isLeftExpanded && !isRightExpanded ? 'w-[calc(100%-128px)]' : 'w-full'
868+
} p-2.5 absolute bottom-4 mt-1.5 self-start`}
867869
justifyContent='space-between'
868870
flexDirection={isTablet ? 'column' : 'row'}
869871
>

frontend/src/components/DataSources/AWS/S3Modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const S3Modal: React.FC<S3ModalProps> = ({ hideModal, open }) => {
8282
name: item.fileName,
8383
size: item.fileSize,
8484
sourceUrl: item.url,
85-
uploadProgress:100,
85+
uploadProgress: 100,
8686
// total_pages: 'N/A',
8787
id: uuidv4(),
8888
...defaultValues,
@@ -99,7 +99,7 @@ const S3Modal: React.FC<S3ModalProps> = ({ hideModal, open }) => {
9999
model: defaultValues.model,
100100
fileSource: defaultValues.fileSource,
101101
processingProgress: defaultValues.processingProgress,
102-
uploadProgress:100,
102+
uploadProgress: 100,
103103
});
104104
}
105105
});

frontend/src/components/DataSources/GCS/GCSModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const GCSModal: React.FC<GCSModalProps> = ({ hideModal, open, openGCSModal }) =>
105105
id: uuidv4(),
106106
accessToken: codeResponse.access_token,
107107
...defaultValues,
108-
uploadProgress:100
108+
uploadProgress: 100,
109109
});
110110
} else {
111111
const tempFileData = copiedFilesData[filedataIndex];
@@ -120,7 +120,7 @@ const GCSModal: React.FC<GCSModalProps> = ({ hideModal, open, openGCSModal }) =>
120120
fileSource: defaultValues.fileSource,
121121
processingProgress: defaultValues.processingProgress,
122122
accessToken: codeResponse.access_token,
123-
uploadProgress:100
123+
uploadProgress: 100,
124124
});
125125
}
126126
}

frontend/src/components/FileTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ const FileTable = forwardRef<ChildRef, FileTableProps>((props, ref) => {
522522
disabled={info.getValue() === 'Uploading'}
523523
clean
524524
onClick={() => {
525-
const copied={...info.row.original};
525+
const copied = { ...info.row.original };
526526
delete copied.accessToken;
527527
handleCopy(copied);
528528
}}

frontend/src/components/Popups/GraphEnhancementDialog/Deduplication/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ export default function DeduplicationTab() {
5656
}
5757
if (duplicateNodesData.data.data.length) {
5858
setDuplicateNodes(duplicateNodesData.data.data);
59-
//@ts-ignore
60-
setNodesCount(duplicateNodesData.data.message.total)
59+
// @ts-ignore
60+
setNodesCount(duplicateNodesData.data.message.total);
6161
} else {
6262
setDuplicateNodes([]);
6363
}

frontend/src/components/Popups/GraphEnhancementDialog/EnitityExtraction/EntityExtractionSetting.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,9 @@ export default function EntityExtractionSetting({
317317
options: nodeLabelOptions,
318318
onChange: onChangenodes,
319319
value: selectedNodes,
320-
classNamePrefix: `${isTablet ? 'tablet_entity_extraction_Tab_node_label' : 'entity_extraction_Tab_node_label'
321-
}`,
320+
classNamePrefix: `${
321+
isTablet ? 'tablet_entity_extraction_Tab_node_label' : 'entity_extraction_Tab_node_label'
322+
}`,
322323
}}
323324
type='creatable'
324325
/>
@@ -332,8 +333,9 @@ export default function EntityExtractionSetting({
332333
options: relationshipTypeOptions,
333334
onChange: onChangerels,
334335
value: selectedRels,
335-
classNamePrefix: `${isTablet ? 'tablet_entity_extraction_Tab_relationship_label' : 'entity_extraction_Tab_relationship_label'
336-
}`,
336+
classNamePrefix: `${
337+
isTablet ? 'tablet_entity_extraction_Tab_relationship_label' : 'entity_extraction_Tab_relationship_label'
338+
}`,
337339
}}
338340
type='creatable'
339341
/>

0 commit comments

Comments
 (0)