+
{open && (
-
-
-
+
+ {MENU_ITEMS.map((item, idx) => (
+
+ ))}
)}
);
-}
\ No newline at end of file
+}
diff --git a/src/application/components/rag/PipelineToggle.tsx b/src/application/components/rag/PipelineToggle.tsx
index aef851a..2302065 100644
--- a/src/application/components/rag/PipelineToggle.tsx
+++ b/src/application/components/rag/PipelineToggle.tsx
@@ -1,35 +1,26 @@
+import SegmentedToggle from "@/application/components/shared/SegmentedToggle";
+
+type Pipeline = "lightrag" | "classical";
+
interface PipelineToggleProps {
- value: "lightrag" | "classical";
- onChange: (value: "lightrag" | "classical") => void;
+ value: Pipeline;
+ onChange: (value: Pipeline) => void;
}
+const PIPELINE_OPTIONS = [
+ { value: "lightrag" as const, label: "LightRAG" },
+ { value: "classical" as const, label: "Classical" },
+];
+
export default function PipelineToggle({ value, onChange }: Readonly
) {
return (
-
-
-
-
+
);
-}
\ No newline at end of file
+}
diff --git a/src/application/components/rag/QueryOptions.tsx b/src/application/components/rag/QueryOptions.tsx
index fea6035..731cb8b 100644
--- a/src/application/components/rag/QueryOptions.tsx
+++ b/src/application/components/rag/QueryOptions.tsx
@@ -59,10 +59,7 @@ export default function QueryOptions({
onClick={() => setExpanded(!expanded)}
className="flex items-center gap-2 text-on-surface-variant font-headline text-sm hover:text-on-surface transition-colors"
>
-
+
{expanded ? "expand_less" : "expand_more"}
{"Advanced Options"}
@@ -71,7 +68,10 @@ export default function QueryOptions({
{expanded && (
-
{/* Dialogs */}
-
+
{viewerAgent && (
- Select a thread from the sidebar or start a new conversation to
- begin orchestrating your agents.
+ Select a thread from the sidebar or start a new conversation to begin orchestrating
+ your agents.
diff --git a/src/application/pages/RagPage.tsx b/src/application/pages/RagPage.tsx
index 6164079..fef57ae 100644
--- a/src/application/pages/RagPage.tsx
+++ b/src/application/pages/RagPage.tsx
@@ -42,10 +42,7 @@ export default function RagPage() {
const classicalIndexFolder = useClassicalIndexFolder();
const readFile = useReadFile();
- const segments = useMemo(
- () => prefixToSegments(currentPrefix),
- [currentPrefix],
- );
+ const segments = useMemo(() => prefixToSegments(currentPrefix), [currentPrefix]);
const foldersQuery = useFolders(currentPrefix);
const filesQuery = useFiles(currentPrefix, false);
@@ -83,7 +80,12 @@ export default function RagPage() {
const handleFileIndexClassical = (objectName: string) => {
const dir = workingDir || currentPrefix;
if (!dir) return;
- classicalIndexFile.mutate({ fileName: objectName, workingDir: dir, chunkSize: DEFAULT_CHUNK_SIZE, chunkOverlap: DEFAULT_CHUNK_OVERLAP });
+ classicalIndexFile.mutate({
+ fileName: objectName,
+ workingDir: dir,
+ chunkSize: DEFAULT_CHUNK_SIZE,
+ chunkOverlap: DEFAULT_CHUNK_OVERLAP,
+ });
};
const handleFolderIndexLightRAG = (prefix: string) => {
@@ -95,15 +97,18 @@ export default function RagPage() {
const handleFolderIndexClassical = (prefix: string) => {
const dir = workingDir || prefix;
if (!dir) return;
- classicalIndexFolder.mutate({ workingDir: dir, recursive: true, chunkSize: DEFAULT_CHUNK_SIZE, chunkOverlap: DEFAULT_CHUNK_OVERLAP });
+ classicalIndexFolder.mutate({
+ workingDir: dir,
+ recursive: true,
+ chunkSize: DEFAULT_CHUNK_SIZE,
+ chunkOverlap: DEFAULT_CHUNK_OVERLAP,
+ });
};
const isLoading = foldersQuery.isLoading || filesQuery.isLoading;
const error = foldersQuery.error || filesQuery.error;
- const folderSuggestions = (workspaceFoldersQuery.data ?? []).map(
- (f) => f.prefix,
- );
+ const folderSuggestions = (workspaceFoldersQuery.data ?? []).map((f) => f.prefix);
return (
@@ -111,18 +116,13 @@ export default function RagPage() {
-
- RAG Storage
-
+
RAG Storage
Browse and manage your RAG knowledge base.
{activeTab === "browse" && (
-
+
)}
@@ -173,13 +173,11 @@ export default function RagPage() {
onChange={setWorkingDir}
folders={folderSuggestions}
/>
-
+
>
)}
);
-}
\ No newline at end of file
+}
diff --git a/src/application/stores/useChatStore.ts b/src/application/stores/useChatStore.ts
index c15ab69..75d225d 100644
--- a/src/application/stores/useChatStore.ts
+++ b/src/application/stores/useChatStore.ts
@@ -52,11 +52,7 @@ export const useChatStore = create