feat(removed): sub_section_writer

- Its bad and not needed.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-10-27 20:30:10 -07:00
parent 5ac6ebf199
commit 81ddc81026
57 changed files with 2213 additions and 4023 deletions

View file

@ -1,8 +1,8 @@
"use client";
import { Trash2 } from "lucide-react";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useTranslations } from "next-intl";
import { useCallback, useEffect, useMemo, useState } from "react";
import { AppSidebar } from "@/components/sidebar/app-sidebar";
import { Button } from "@/components/ui/button";
import {
@ -56,8 +56,8 @@ export function AppSidebarProvider({
navSecondary,
navMain,
}: AppSidebarProviderProps) {
const t = useTranslations('dashboard');
const tCommon = useTranslations('common');
const t = useTranslations("dashboard");
const tCommon = useTranslations("common");
const [recentChats, setRecentChats] = useState<
{
name: string;
@ -199,14 +199,14 @@ export function AppSidebarProvider({
if (chatError) {
return [
{
name: t('error_loading_chats'),
name: t("error_loading_chats"),
url: "#",
icon: "AlertCircle",
id: 0,
search_space_id: Number(searchSpaceId),
actions: [
{
name: tCommon('retry'),
name: tCommon("retry"),
icon: "RefreshCw",
onClick: retryFetch,
},
@ -218,7 +218,7 @@ export function AppSidebarProvider({
if (!isLoadingChats && recentChats.length === 0) {
return [
{
name: t('no_recent_chats'),
name: t("no_recent_chats"),
url: "#",
icon: "MessageCircleMore",
id: 0,
@ -243,14 +243,22 @@ export function AppSidebarProvider({
title:
searchSpace?.name ||
(isLoadingSearchSpace
? tCommon('loading')
? tCommon("loading")
: searchSpaceError
? t('error_loading_space')
: t('unknown_search_space')),
? t("error_loading_space")
: t("unknown_search_space")),
};
}
return updated;
}, [navSecondary, isClient, searchSpace?.name, isLoadingSearchSpace, searchSpaceError, t, tCommon]);
}, [
navSecondary,
isClient,
searchSpace?.name,
isLoadingSearchSpace,
searchSpaceError,
t,
tCommon,
]);
// Show loading state if not client-side
if (!isClient) {
@ -267,11 +275,11 @@ export function AppSidebarProvider({
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
<Trash2 className="h-5 w-5 text-destructive" />
<span>{t('delete_chat')}</span>
<span>{t("delete_chat")}</span>
</DialogTitle>
<DialogDescription>
{t('delete_chat_confirm')}{" "}
<span className="font-medium">{chatToDelete?.name}</span>? {t('action_cannot_undone')}
{t("delete_chat_confirm")} <span className="font-medium">{chatToDelete?.name}</span>?{" "}
{t("action_cannot_undone")}
</DialogDescription>
</DialogHeader>
<DialogFooter className="flex gap-2 sm:justify-end">
@ -280,7 +288,7 @@ export function AppSidebarProvider({
onClick={() => setShowDeleteDialog(false)}
disabled={isDeleting}
>
{tCommon('cancel')}
{tCommon("cancel")}
</Button>
<Button
variant="destructive"
@ -291,12 +299,12 @@ export function AppSidebarProvider({
{isDeleting ? (
<>
<span className="h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
{t('deleting')}
{t("deleting")}
</>
) : (
<>
<Trash2 className="h-4 w-4" />
{tCommon('delete')}
{tCommon("delete")}
</>
)}
</Button>