change Agents to Tasks tab

This commit is contained in:
tusharmagar 2026-01-20 10:07:29 +05:30
parent e44664cb17
commit ff24494b77
4 changed files with 21 additions and 64 deletions

View file

@ -3,7 +3,6 @@
import * as React from "react"
import { useState } from "react"
import {
CalendarDays,
ChevronRight,
ChevronsDownUp,
ChevronsUpDown,
@ -12,11 +11,9 @@ import {
FilePlus,
Folder,
FolderPlus,
Mail,
Microscope,
Network,
Pencil,
Plus,
SquarePen,
Trash2,
} from "lucide-react"
@ -83,28 +80,9 @@ type SidebarContentPanelProps = {
const sectionTitles = {
knowledge: "Knowledge",
agents: "Agents",
tasks: "Tasks",
}
const agentPresets = [
{
name: "Email Assistant",
description: "Draft replies, summarize threads.",
icon: Mail,
},
{
name: "Meeting Prep",
description: "Build briefs and talking points.",
icon: CalendarDays,
},
{
name: "Research",
description: "Gather sources, outline findings.",
icon: Microscope,
},
]
export function SidebarContentPanel({
tree,
selectedPath,
@ -132,8 +110,8 @@ export function SidebarContentPanel({
actions={knowledgeActions}
/>
)}
{activeSection === "agents" && (
<AgentsSection />
{activeSection === "tasks" && (
<TasksSection />
)}
</SidebarContent>
<SidebarRail />
@ -425,40 +403,19 @@ function Tree({
)
}
// Agents Section
function AgentsSection() {
// Tasks Section
function TasksSection() {
return (
<>
{/* Agent Presets */}
<SidebarGroup>
<SidebarGroupLabel className="flex items-center justify-between">
<span>Agent Presets</span>
<Tooltip>
<TooltipTrigger asChild>
<button className="text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent rounded p-1 transition-colors">
<Plus className="size-4" />
</button>
</TooltipTrigger>
<TooltipContent side="right">New Agent</TooltipContent>
</Tooltip>
</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{agentPresets.map((agent) => (
<SidebarMenuItem key={agent.name}>
<SidebarMenuButton className="h-auto items-start gap-2 py-2">
<agent.icon className="mt-0.5 size-4" />
<div className="flex flex-col gap-1">
<span className="text-sm font-medium">{agent.name}</span>
<span className="text-xs text-muted-foreground">{agent.description}</span>
</div>
</SidebarMenuButton>
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
</>
<SidebarGroup>
<SidebarGroupContent>
<div className="px-2 py-2">
<button className="flex items-center gap-2 text-sidebar-foreground hover:bg-sidebar-accent rounded-lg px-3 py-2 transition-colors w-full">
<SquarePen className="size-4" />
<span className="text-sm">New chat</span>
</button>
</div>
</SidebarGroupContent>
</SidebarGroup>
)
}