mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-13 22:20:58 +00:00
feat: add KnowledgeRetriever supports in plugin market
This commit is contained in:
@@ -11,7 +11,14 @@ import {
|
|||||||
SelectValue,
|
SelectValue,
|
||||||
} from '@/components/ui/select';
|
} from '@/components/ui/select';
|
||||||
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
|
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
|
||||||
import { Search, Loader2, Wrench, AudioWaveform, Hash } from 'lucide-react';
|
import {
|
||||||
|
Search,
|
||||||
|
Loader2,
|
||||||
|
Wrench,
|
||||||
|
AudioWaveform,
|
||||||
|
Hash,
|
||||||
|
Book,
|
||||||
|
} from 'lucide-react';
|
||||||
import PluginMarketCardComponent from './plugin-market-card/PluginMarketCardComponent';
|
import PluginMarketCardComponent from './plugin-market-card/PluginMarketCardComponent';
|
||||||
import { PluginMarketCardVO } from './plugin-market-card/PluginMarketCardVO';
|
import { PluginMarketCardVO } from './plugin-market-card/PluginMarketCardVO';
|
||||||
import { getCloudServiceClientSync } from '@/app/infra/http';
|
import { getCloudServiceClientSync } from '@/app/infra/http';
|
||||||
@@ -377,14 +384,14 @@ function MarketPageContent({
|
|||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
value="all"
|
value="all"
|
||||||
aria-label="All components"
|
aria-label="All components"
|
||||||
className="text-xs sm:text-sm"
|
className="text-xs sm:text-sm cursor-pointer"
|
||||||
>
|
>
|
||||||
{t('market.allComponents')}
|
{t('market.allComponents')}
|
||||||
</ToggleGroupItem>
|
</ToggleGroupItem>
|
||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
value="Tool"
|
value="Tool"
|
||||||
aria-label="Tool"
|
aria-label="Tool"
|
||||||
className="text-xs sm:text-sm"
|
className="text-xs sm:text-sm cursor-pointer"
|
||||||
>
|
>
|
||||||
<Wrench className="h-4 w-4 mr-1" />
|
<Wrench className="h-4 w-4 mr-1" />
|
||||||
{t('plugins.componentName.Tool')}
|
{t('plugins.componentName.Tool')}
|
||||||
@@ -392,7 +399,7 @@ function MarketPageContent({
|
|||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
value="Command"
|
value="Command"
|
||||||
aria-label="Command"
|
aria-label="Command"
|
||||||
className="text-xs sm:text-sm"
|
className="text-xs sm:text-sm cursor-pointer"
|
||||||
>
|
>
|
||||||
<Hash className="h-4 w-4 mr-1" />
|
<Hash className="h-4 w-4 mr-1" />
|
||||||
{t('plugins.componentName.Command')}
|
{t('plugins.componentName.Command')}
|
||||||
@@ -400,11 +407,19 @@ function MarketPageContent({
|
|||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
value="EventListener"
|
value="EventListener"
|
||||||
aria-label="EventListener"
|
aria-label="EventListener"
|
||||||
className="text-xs sm:text-sm"
|
className="text-xs sm:text-sm cursor-pointer"
|
||||||
>
|
>
|
||||||
<AudioWaveform className="h-4 w-4 mr-1" />
|
<AudioWaveform className="h-4 w-4 mr-1" />
|
||||||
{t('plugins.componentName.EventListener')}
|
{t('plugins.componentName.EventListener')}
|
||||||
</ToggleGroupItem>
|
</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem
|
||||||
|
value="KnowledgeRetriever"
|
||||||
|
aria-label="KnowledgeRetriever"
|
||||||
|
className="text-xs sm:text-sm cursor-pointer"
|
||||||
|
>
|
||||||
|
<Book className="h-4 w-4 mr-1" />
|
||||||
|
{t('plugins.componentName.KnowledgeRetriever')}
|
||||||
|
</ToggleGroupItem>
|
||||||
</ToggleGroup>
|
</ToggleGroup>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+3
@@ -7,6 +7,7 @@ import {
|
|||||||
Hash,
|
Hash,
|
||||||
Download,
|
Download,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
|
Book,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
@@ -38,12 +39,14 @@ export default function PluginMarketCardComponent({
|
|||||||
Tool: <Wrench className="w-4 h-4" />,
|
Tool: <Wrench className="w-4 h-4" />,
|
||||||
EventListener: <AudioWaveform className="w-4 h-4" />,
|
EventListener: <AudioWaveform className="w-4 h-4" />,
|
||||||
Command: <Hash className="w-4 h-4" />,
|
Command: <Hash className="w-4 h-4" />,
|
||||||
|
KnowledgeRetriever: <Book className="w-4 h-4" />,
|
||||||
};
|
};
|
||||||
|
|
||||||
const componentKindNameMap: Record<string, string> = {
|
const componentKindNameMap: Record<string, string> = {
|
||||||
Tool: t('plugins.componentName.Tool'),
|
Tool: t('plugins.componentName.Tool'),
|
||||||
EventListener: t('plugins.componentName.EventListener'),
|
EventListener: t('plugins.componentName.EventListener'),
|
||||||
Command: t('plugins.componentName.Command'),
|
Command: t('plugins.componentName.Command'),
|
||||||
|
KnowledgeRetriever: t('plugins.componentName.KnowledgeRetriever'),
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user