chore: update nanobot to 0.1.4.post6
This commit is contained in:
@@ -100,6 +100,16 @@ interface Skill {
|
||||
type: string;
|
||||
}
|
||||
|
||||
const dedupeSkillsById = (skills: Skill[]): Skill[] => {
|
||||
const map = new Map<string, Skill>();
|
||||
for (const skill of skills) {
|
||||
const id = (skill.id || "").trim();
|
||||
if (!id || map.has(id)) continue;
|
||||
map.set(id, skill);
|
||||
}
|
||||
return Array.from(map.values());
|
||||
};
|
||||
|
||||
interface SessionData {
|
||||
key: string;
|
||||
metadata?: {
|
||||
@@ -537,7 +547,7 @@ export function ChatInterface() {
|
||||
url += `?project_id=${currentProject.id}`;
|
||||
}
|
||||
const skills = await api.get<Skill[]>(url);
|
||||
setAvailableSkills(skills);
|
||||
setAvailableSkills(dedupeSkillsById(skills || []));
|
||||
} catch (err) {
|
||||
console.error("Failed to fetch skills:", err);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { Menu, LayoutDashboard, Plus, MoreVertical, User, Search, Settings, Brain, Trash2, Pencil, Pin, Archive, Database, CheckSquare, Square, ListChecks, RotateCcw, Wand2, Folder, Globe } from "lucide-react";
|
||||
import { Menu, LayoutDashboard, Plus, MoreVertical, User, Search, Settings, Brain, Trash2, Pencil, Pin, Archive, Database, CheckSquare, Square, ListChecks, RotateCcw, Wand2, Folder, Globe, Bot } from "lucide-react";
|
||||
import { useState, useRef, useEffect } from "react";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -821,6 +821,21 @@ function SidebarBody() {
|
||||
{t('projectManagement')}
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 hover:bg-zinc-100 transition-colors"
|
||||
onClick={() => {
|
||||
if (currentProject?.id) {
|
||||
navigate(`/projects/${currentProject.id}/subagents`);
|
||||
} else {
|
||||
navigate("/projects");
|
||||
}
|
||||
setShowUserMenu(false);
|
||||
}}
|
||||
>
|
||||
<Bot className="h-4 w-4 text-zinc-500" />
|
||||
{t('subagents', 'Subagents')}
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-700 hover:bg-zinc-100 transition-colors"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user