feat(storage): add comprehensive database management interface

- Add new storage commands module with full CRUD operations
- Implement SQLite database viewer with table browsing, search, and pagination
- Add row editing, insertion, and deletion capabilities
- Include SQL query editor for advanced operations
- Add database reset functionality with confirmation dialogs
- Export storage API methods for frontend integration
- Add storage tab to settings with modern UI components
- Implement comprehensive error handling and loading states
- Add tooltips for truncated content and responsive design
- Include proper TypeScript interfaces for all data structures

This enables users to directly interact with the SQLite database through a
user-friendly interface, providing transparency and control over stored data.
This commit is contained in:
Mufeed VH
2025-07-04 20:02:37 +05:30
parent 680ec451cd
commit 85dce56e04
6 changed files with 1630 additions and 2 deletions

View File

@@ -10,7 +10,8 @@ import {
Code,
Settings2,
Terminal,
Loader2
Loader2,
Database
} from "lucide-react";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
@@ -26,6 +27,7 @@ import {
import { cn } from "@/lib/utils";
import { Toast, ToastContainer } from "@/components/ui/toast";
import { ClaudeVersionSelector } from "./ClaudeVersionSelector";
import { StorageTab } from "./StorageTab";
interface SettingsProps {
/**
@@ -369,6 +371,10 @@ export const Settings: React.FC<SettingsProps> = ({
<Code className="h-4 w-4 text-purple-500" />
Advanced
</TabsTrigger>
<TabsTrigger value="storage" className="gap-2">
<Database className="h-4 w-4 text-green-500" />
Storage
</TabsTrigger>
</TabsList>
{/* General Settings */}
@@ -683,6 +689,11 @@ export const Settings: React.FC<SettingsProps> = ({
</div>
</Card>
</TabsContent>
{/* Storage Tab */}
<TabsContent value="storage">
<StorageTab />
</TabsContent>
</Tabs>
</div>
)}