mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-21 21:31:12 +02:00
change Agents to Tasks tab
This commit is contained in:
parent
e44664cb17
commit
ff24494b77
4 changed files with 21 additions and 64 deletions
|
|
@ -734,9 +734,9 @@ function App() {
|
||||||
setExpandedPaths(newExpanded)
|
setExpandedPaths(newExpanded)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle sidebar section changes - switch to chat view for agents
|
// Handle sidebar section changes - switch to chat view for tasks
|
||||||
const handleSectionChange = useCallback((section: ActiveSection) => {
|
const handleSectionChange = useCallback((section: ActiveSection) => {
|
||||||
if (section === 'agents') {
|
if (section === 'tasks') {
|
||||||
setSelectedPath(null)
|
setSelectedPath(null)
|
||||||
setIsGraphOpen(false)
|
setIsGraphOpen(false)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import {
|
import {
|
||||||
CalendarDays,
|
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
ChevronsDownUp,
|
ChevronsDownUp,
|
||||||
ChevronsUpDown,
|
ChevronsUpDown,
|
||||||
|
|
@ -12,11 +11,9 @@ import {
|
||||||
FilePlus,
|
FilePlus,
|
||||||
Folder,
|
Folder,
|
||||||
FolderPlus,
|
FolderPlus,
|
||||||
Mail,
|
|
||||||
Microscope,
|
|
||||||
Network,
|
Network,
|
||||||
Pencil,
|
Pencil,
|
||||||
Plus,
|
SquarePen,
|
||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
||||||
|
|
@ -83,28 +80,9 @@ type SidebarContentPanelProps = {
|
||||||
|
|
||||||
const sectionTitles = {
|
const sectionTitles = {
|
||||||
knowledge: "Knowledge",
|
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({
|
export function SidebarContentPanel({
|
||||||
tree,
|
tree,
|
||||||
selectedPath,
|
selectedPath,
|
||||||
|
|
@ -132,8 +110,8 @@ export function SidebarContentPanel({
|
||||||
actions={knowledgeActions}
|
actions={knowledgeActions}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{activeSection === "agents" && (
|
{activeSection === "tasks" && (
|
||||||
<AgentsSection />
|
<TasksSection />
|
||||||
)}
|
)}
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
<SidebarRail />
|
<SidebarRail />
|
||||||
|
|
@ -425,40 +403,19 @@ function Tree({
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Agents Section
|
// Tasks Section
|
||||||
function AgentsSection() {
|
function TasksSection() {
|
||||||
return (
|
return (
|
||||||
<>
|
<SidebarGroup>
|
||||||
{/* Agent Presets */}
|
<SidebarGroupContent>
|
||||||
<SidebarGroup>
|
<div className="px-2 py-2">
|
||||||
<SidebarGroupLabel className="flex items-center justify-between">
|
<button className="flex items-center gap-2 text-sidebar-foreground hover:bg-sidebar-accent rounded-lg px-3 py-2 transition-colors w-full">
|
||||||
<span>Agent Presets</span>
|
<SquarePen className="size-4" />
|
||||||
<Tooltip>
|
<span className="text-sm">New chat</span>
|
||||||
<TooltipTrigger asChild>
|
</button>
|
||||||
<button className="text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent rounded p-1 transition-colors">
|
</div>
|
||||||
<Plus className="size-4" />
|
</SidebarGroupContent>
|
||||||
</button>
|
</SidebarGroup>
|
||||||
</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>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import {
|
import {
|
||||||
Bot,
|
|
||||||
Brain,
|
Brain,
|
||||||
HelpCircle,
|
HelpCircle,
|
||||||
|
ListTodo,
|
||||||
Plug,
|
Plug,
|
||||||
Settings,
|
Settings,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
|
|
@ -27,7 +27,7 @@ type NavItem = {
|
||||||
|
|
||||||
const navItems: NavItem[] = [
|
const navItems: NavItem[] = [
|
||||||
{ id: "knowledge", title: "Knowledge", icon: Brain },
|
{ id: "knowledge", title: "Knowledge", icon: Brain },
|
||||||
{ id: "agents", title: "Agents", icon: Bot },
|
{ id: "tasks", title: "Tasks", icon: ListTodo },
|
||||||
]
|
]
|
||||||
|
|
||||||
export function SidebarIcon() {
|
export function SidebarIcon() {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
|
|
||||||
export type ActiveSection = "knowledge" | "agents"
|
export type ActiveSection = "knowledge" | "tasks"
|
||||||
|
|
||||||
type SidebarSectionContextProps = {
|
type SidebarSectionContextProps = {
|
||||||
activeSection: ActiveSection
|
activeSection: ActiveSection
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue