Skip to content

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。

TypeScript

fix: bypass shadcn resizable wrapper, use react-resizable-panels directly

nash_suf5f853dfd9fb
diff --git a/src/components/layout/app-layout.tsx b/src/components/layout/app-layout.tsx
index 769feff7..3ca3cd78 100644
--- a/src/components/layout/app-layout.tsx
+++ b/src/components/layout/app-layout.tsx
@@ -1,11 +1,7 @@
import { useCallback, useEffect } from "react"
+import { Group, Panel, Separator } from "react-resizable-panels"
import { useWikiStore } from "@/stores/wiki-store"
import { listDirectory } from "@/commands/fs"
-import {
- ResizablePanelGroup,
- ResizablePanel,
- ResizableHandle,
-} from "@/components/ui/resizable"
import { IconSidebar } from "./icon-sidebar"
import { FileTree } from "./file-tree"
import { ContentArea } from "./content-area"
@@ -31,15 +27,15 @@ export function AppLayout() {
return (
<div className="flex h-screen bg-background text-foreground">
<IconSidebar />
- <ResizablePanelGroup direction="horizontal" className="flex-1">
- <ResizablePanel defaultSize={25} minSize={15} maxSize={40}>
+ <Group orientation="horizontal" className="flex-1">
+ <Panel defaultSize={25} minSize={15} maxSize={40}>
<FileTree />
- </ResizablePanel>
- <ResizableHandle withHandle />
- <ResizablePanel defaultSize={80}>
+ </Panel>
+ <Separator className="w-1.5 cursor-col-resize bg-border/40 transition-colors hover:bg-primary/30" />
+ <Panel defaultSize={75}>
<ContentArea />
- </ResizablePanel>
- </ResizablePanelGroup>
+ </Panel>
+ </Group>
</div>
)
}
diff --git a/src/components/layout/content-area.tsx b/src/components/layout/content-area.tsx
index 6cb2ec34..44e5257d 100644
--- a/src/components/layout/content-area.tsx
+++ b/src/components/layout/content-area.tsx
@@ -1,12 +1,8 @@
import { useEffect, useCallback, useRef } from "react"
+import { Group, Panel, Separator } from "react-resizable-panels"
import { useWikiStore } from "@/stores/wiki-store"
import { readFile, writeFile } from "@/commands/fs"
import { WikiEditor } from "@/components/editor/wiki-editor"
-import {
- ResizablePanelGroup,
- ResizablePanel,
- ResizableHandle,
-} from "@/components/ui/resizable"
import { ChatBar } from "./chat-bar"
import { SettingsView } from "@/components/settings/settings-view"
@@ -86,16 +82,14 @@ export function ContentArea() {
}
return (
- <div className="flex h-full flex-col">
- <ResizablePanelGroup direction="vertical" className="flex-1">
- <ResizablePanel defaultSize={60} minSize={30}>
- {editorContent}
- </ResizablePanel>
- <ResizableHandle withHandle />
- <ResizablePanel defaultSize={40} minSize={20}>
- <ChatBar />
- </ResizablePanel>
- </ResizablePanelGroup>
- </div>
+ <Group orientation="vertical" className="h-full">
+ <Panel defaultSize={60} minSize={30}>
+ {editorContent}
+ </Panel>
+ <Separator className="h-1.5 cursor-row-resize bg-border/40 transition-colors hover:bg-primary/30" />
+ <Panel defaultSize={40} minSize={20}>
+ <ChatBar />
+ </Panel>
+ </Group>
)
}