OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
Adding OSS and IBM toggled components
Mrunal Salunkee55f4ab1eb7b
diff --git a/frontend/app/knowledge/page.tsx b/frontend/app/knowledge/page.tsxindex 76e7a4b54..7f7b8eaaf 100644--- a/frontend/app/knowledge/page.tsx+++ b/frontend/app/knowledge/page.tsx@@ -455,7 +455,10 @@ function SearchPage() {if (showOpenragRefreshCue) {return (<div className="inline-flex items-center justify-center h-5 w-5">- <RefreshCw className="h-4 w-4 text-primary animate-spin" />+ <RefreshCw+ className="h-4 w-4 text-primary animate-spin"+ aria-label="OpenRAG doc is refreshing"+ /></div>);}@@ -592,112 +595,101 @@ function SearchPage() {<><div className="flex flex-col h-full"><div className="flex items-center justify-between mb-6">- <h4- className={cn(- "text-lg font-semibold",- isCloudBrand && "ibm-section-title",- )}- >- Project knowledge- </h4>+ <h2 className="text-lg font-semibold">Project Knowledge</h2></div>+ {isCloudBrand ? (+ <KnowledgeSearchBar />+ ) : (+ /* Search Input Area */+ <div className="flex-1 flex items-center flex-shrink-0 flex-wrap-reverse gap-3 mb-6">+ <KnowledgeSearchInput />- {/* Search Input Area */}- <div className="flex items-center gap-3 mb-6">- <div className="flex-1 flex items-center gap-3">- {isCloudBrand ? (- <KnowledgeSearchBar />- ) : (- <>- <KnowledgeSearchInput />- <KnowledgeDropdown />- </>- )}- </div>-- {selectedRows.length > 0 && (<Buttontype="button"- variant="destructive"+ variant="outline"className="rounded-lg flex-shrink-0"- onClick={() => setShowBulkDeleteDialog(true)}+ disabled={syncAllConnectorsMutation.isPending}+ onClick={async () => {+ try {+ toast.info("Syncing all cloud connectors...");+ const result = await syncAllConnectorsMutation.mutateAsync();+ if (result.status === "no_files") {+ toast.info(+ result.message ||+ "No cloud files to sync. Add files from cloud connectors first.",+ );+ } else if (+ result.synced_connectors &&+ result.synced_connectors.length > 0+ ) {+ toast.success(+ `Sync started for ${result.synced_connectors.join(", ")}. Check task notifications for progress.`,+ );+ } else if (result.errors && result.errors.length > 0) {+ toast.error("Some connectors failed to sync");+ }+ } catch (error) {+ toast.error(+ error instanceof Error+ ? error.message+ : "Failed to sync connectors",+ );+ }+ }}>- Delete+ {syncAllConnectorsMutation.isPending ? (+ <>+ <RefreshCw className="h-4 w-4 mr-2 animate-spin" />+ Syncing...+ </>+ ) : (+ <>+ <RefreshCw className="h-4 w-4 mr-2" />+ Sync+ </>+ )}</Button>- )}-- <Button- type="button"- variant="outline"- className="rounded-lg flex-shrink-0"- disabled={syncAllConnectorsMutation.isPending}- onClick={async () => {- try {- toast.info("Syncing all cloud connectors...");- const result = await syncAllConnectorsMutation.mutateAsync();- if (result.status === "no_files") {- toast.info(- result.message ||- "No cloud files to sync. Add files from cloud connectors first.",- );- } else if (- result.synced_connectors &&- result.synced_connectors.length > 0- ) {- toast.success(- `Sync started for ${result.synced_connectors.join(", ")}. Check task notifications for progress.`,+ <Button+ type="button"+ variant="outline"+ className="rounded-lg flex-shrink-0"+ disabled={refreshOpenragDocsMutation.isPending}+ onClick={async () => {+ try {+ toast.info("Refreshing OpenRAG docs...");+ const result = await refreshOpenragDocsMutation.mutateAsync();+ toast.success(result.message);+ } catch (error) {+ toast.error(+ error instanceof Error+ ? error.message+ : "Failed to refresh OpenRAG docs",);- } else if (result.errors && result.errors.length > 0) {- toast.error("Some connectors failed to sync");}- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : "Failed to sync connectors",- );- }- }}- >- {syncAllConnectorsMutation.isPending ? (- <>- <RefreshCw className="h-4 w-4 mr-2 animate-spin" />- Syncing...- </>- ) : (- <>- <RefreshCw className="h-4 w-4 mr-2" />- Sync- </>- )}- </Button>-- <Button- type="button"- variant="outline"- className="rounded-lg flex-shrink-0"- disabled={refreshOpenragDocsMutation.isPending}- onClick={async () => {- try {- toast.info("Refreshing OpenRAG docs...");- const result = await refreshOpenragDocsMutation.mutateAsync();- toast.success(result.message);- } catch (error) {- toast.error(- error instanceof Error- ? error.message- : "Failed to refresh OpenRAG docs",- );- }- }}- >- {refreshOpenragDocsMutation.isPending ? (- <>Refreshing docs...</>- ) : (- <>Fetch latest docs</>+ }}+ >+ {refreshOpenragDocsMutation.isPending ? (+ <>Refreshing docs...</>+ ) : (+ <>Fetch latest docs</>+ )}+ </Button>+ {selectedRows.length > 0 && (+ <Button+ type="button"+ variant="destructive"+ className="rounded-lg flex-shrink-0"+ onClick={() => setShowBulkDeleteDialog(true)}+ >+ Delete+ </Button>)}- </Button>- </div>+ <div className="ml-auto">+ <KnowledgeDropdown />+ </div>+ </div>+ )}+<AgGridReactclassName="w-full overflow-auto"columnDefs={columnDefs as ColDef<File>[]}