Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Daishan Peng <[email protected]>
  • Loading branch information
StrongMonkey committed Oct 21, 2024
1 parent aec42ac commit 6a23daf
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 32 deletions.
16 changes: 10 additions & 6 deletions ui/admin/app/components/knowledge/notion/NotionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,16 @@ export const NotionModal: FC<NotionModalProps> = ({
</Button>
</div>
</DialogContent>
<RemoteSourceSettingModal
agentId={agentId}
isOpen={isSettingModalOpen}
onOpenChange={setIsSettingModalOpen}
remoteKnowledgeSource={notionSource!}
/>
{notionSource && (
<>
<RemoteSourceSettingModal
agentId={agentId}
isOpen={isSettingModalOpen}
onOpenChange={setIsSettingModalOpen}
remoteKnowledgeSource={notionSource}
/>
</>
)}
</Dialog>
);
};
30 changes: 17 additions & 13 deletions ui/admin/app/components/knowledge/onedrive/OneDriveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,23 @@ export const OnedriveModal: FC<OnedriveModalProps> = ({
Close
</Button>
</div>
<RemoteSourceSettingModal
agentId={agentId}
isOpen={isSettingModalOpen}
onOpenChange={setIsSettingModalOpen}
remoteKnowledgeSource={onedriveSource!}
/>
<AddLinkModal
agentId={agentId}
onedriveSource={onedriveSource!}
startPolling={startPolling}
isOpen={isAddLinkModalOpen}
onOpenChange={setIsAddLinkModalOpen}
/>
{onedriveSource && (
<>
<RemoteSourceSettingModal
agentId={agentId}
isOpen={isSettingModalOpen}
onOpenChange={setIsSettingModalOpen}
remoteKnowledgeSource={onedriveSource}
/>
<AddLinkModal
agentId={agentId}
onedriveSource={onedriveSource}
startPolling={startPolling}
isOpen={isAddLinkModalOpen}
onOpenChange={setIsAddLinkModalOpen}
/>
</>
)}
</DialogContent>
</Dialog>
);
Expand Down
30 changes: 17 additions & 13 deletions ui/admin/app/components/knowledge/website/WebsiteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,23 @@ export const WebsiteModal: FC<WebsiteModalProps> = ({
Close
</Button>
</div>
<RemoteSourceSettingModal
agentId={agentId}
isOpen={isSettingModalOpen}
onOpenChange={setIsSettingModalOpen}
remoteKnowledgeSource={websiteSource!}
/>
<AddWebsiteModal
agentId={agentId}
websiteSource={websiteSource!}
startPolling={startPolling}
isOpen={isAddWebsiteModalOpen}
onOpenChange={setIsAddWebsiteModalOpen}
/>
{websiteSource && (
<>
<RemoteSourceSettingModal
agentId={agentId}
isOpen={isSettingModalOpen}
onOpenChange={setIsSettingModalOpen}
remoteKnowledgeSource={websiteSource}
/>
<AddWebsiteModal
agentId={agentId}
websiteSource={websiteSource}
startPolling={startPolling}
isOpen={isAddWebsiteModalOpen}
onOpenChange={setIsAddWebsiteModalOpen}
/>
</>
)}
</DialogContent>
</Dialog>
);
Expand Down

0 comments on commit 6a23daf

Please sign in to comment.