release v1.4.5

This commit is contained in:
Bohdan Triapitsyn
2026-01-09 00:01:22 +02:00
parent e134f0f14e
commit 2382c6e82a
11 changed files with 32 additions and 23 deletions
@@ -1,7 +1,7 @@
import React from 'react';
import { cn, fuzzyMatch } from '@/lib/utils';
import { useConfigStore } from '@/stores/useConfigStore';
import { useAgentsStore } from '@/stores/useAgentsStore';
import { useAgentsStore, isAgentBuiltIn, type AgentWithExtras } from '@/stores/useAgentsStore';
import { ScrollableOverlay } from '@/components/ui/ScrollableOverlay';
interface AgentInfo {
@@ -52,13 +52,13 @@ export const AgentMentionAutocomplete = React.forwardRef<AgentMentionAutocomplet
const filtered = visibleAgents
.filter((agent) => isMentionable(agent.mode))
.map((agent) => {
const metadata = agentsWithMetadata.find(a => a.name === agent.name);
const metadata = agentsWithMetadata.find(a => a.name === agent.name) as (AgentWithExtras & { scope?: string }) | undefined;
return {
name: agent.name,
description: agent.description,
mode: agent.mode ?? undefined,
scope: (metadata as any)?.scope,
isBuiltIn: (metadata as any)?.native || (metadata as any)?.builtIn,
scope: metadata?.scope,
isBuiltIn: metadata ? isAgentBuiltIn(metadata) : false,
};
});
@@ -71,7 +71,7 @@ export const AgentMentionAutocomplete = React.forwardRef<AgentMentionAutocomplet
setAgents(matches);
setSelectedIndex(0);
}, [getVisibleAgents, searchQuery]);
}, [getVisibleAgents, searchQuery, agentsWithMetadata]);
React.useEffect(() => {
itemRefs.current[selectedIndex]?.scrollIntoView({
@@ -84,12 +84,6 @@ export const McpDropdown: React.FC<McpDropdownProps> = ({ headerIconButtonClass
setTooltipOpen(isOpen);
}, []);
const directoryKey = React.useMemo(() => {
const normalized = typeof directory === 'string' ? directory.replace(/\\/g, '/').replace(/\/+$/, '') : '';
return normalized.length > 0 ? normalized : '__global__';
}, [directory]);
const isLoading = useMcpStore((state) => Boolean(state.loadingKeys[directoryKey]));
const [isSpinning, setIsSpinning] = React.useState(false);
const [busyName, setBusyName] = React.useState<string | null>(null);
+18 -5
View File
@@ -65,6 +65,19 @@ export interface DiscoveredSkill {
description?: string;
}
// Raw skill response from API before transformation
interface RawSkillResponse {
name: string;
path: string;
scope?: SkillScope;
source?: SkillSource;
sources?: {
md?: {
description?: string;
};
};
}
export interface SkillConfig {
name: string;
description: string;
@@ -155,14 +168,14 @@ export const useSkillsStore = create<SkillsStore>()(
}
const data = await response.json();
const rawSkills = data.skills || [];
const skills = rawSkills.map((s: any) => ({
const rawSkills: RawSkillResponse[] = data.skills || [];
const skills: DiscoveredSkill[] = rawSkills.map((s) => ({
name: s.name,
path: s.path,
scope: s.scope,
source: s.source,
scope: s.scope ?? 'user',
source: s.source ?? 'opencode',
description: s.sources?.md?.description || '',
})) as DiscoveredSkill[];
}));
set({ skills, isLoading: false });
return true;