Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/renderer/src/lib/icons/icon-collections.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ export const lucideIconCollection = {
copy: {
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g>'
},
'copy-plus': {
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 12v6m-3-3h6"/><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g>'
},
'corner-down-left': {
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M20 4v7a4 4 0 0 1-4 4H4"/><path d="m9 10l-5 5l5 5"/></g>'
},
Expand Down Expand Up @@ -254,6 +257,9 @@ export const lucideIconCollection = {
file: {
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/></g>'
},
'file-archive': {
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5"/><path d="M14 2v5a1 1 0 0 0 1 1h5M8 12v-1m0 7v-2m0-9V6"/><circle cx="8" cy="20" r="2"/></g>'
},
'file-code': {
body: '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5m-10 4.5L8 15l2 2.5m4-5l2 2.5l-2 2.5"/></g>'
},
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/lib/icons/icon-whitelist.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const GENERATED_ICON_WHITELIST: Record<GeneratedIconCollectionKey, readon
'command',
'compass',
'copy',
'copy-plus',
'corner-down-left',
'corner-up-left',
'database',
Expand All @@ -91,6 +92,7 @@ export const GENERATED_ICON_WHITELIST: Record<GeneratedIconCollectionKey, readon
'eye',
'eye-off',
'file',
'file-archive',
'file-code',
'file-cog',
'file-diff',
Expand Down
53 changes: 44 additions & 9 deletions src/renderer/src/pages/plugins/SkillsPluginsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import { Separator } from '@shadcn/components/ui/separator'
import { Skeleton } from '@shadcn/components/ui/skeleton'
import { ScrollArea } from '@shadcn/components/ui/scroll-area'
import { Switch } from '@shadcn/components/ui/switch'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuTrigger
} from '@shadcn/components/ui/dropdown-menu'
import { DcButton } from '@dc-ui/components/button'
import { DcEmpty } from '@dc-ui/components/empty'
import { DcDropdownActionItem } from '@dc-ui/components/dropdown-action-item'
import { createConfigClient } from '@api/ConfigClient'
import { createSkillClient } from '@api/SkillClient'
import type { Agent } from '@shared/types/agent-interface'
Expand All @@ -24,9 +30,11 @@ import {
import { resolveGuidedOnboardingStepTarget } from '@shared/guidedOnboarding'
import GuidedOnboardingOverlay from '@/components/onboarding/GuidedOnboardingOverlay.vue'
import ImportSkillsFromAgentDialog from './skills/ImportSkillsFromAgentDialog.vue'
import InstallFromGitDialog from './skills/InstallFromGitDialog.vue'
import SkillCard from './skills/SkillCard.vue'
import SkillDetailDialog from './skills/SkillDetailDialog.vue'
import SkillImportExportTab from './skills/SkillImportExportTab.vue'
import SkillInstallDialog from './skills/SkillInstallDialog.vue'

type SkillsView = 'skills' | 'syncDirectory'

Expand All @@ -45,6 +53,8 @@ const agentUpdatePendingId = ref<string | null>(null)
const activeView = ref<SkillsView>('skills')
const searchQuery = ref('')
const externalImportOpen = ref(false)
const installDialogOpen = ref(false)
const gitDialogOpen = ref(false)
const detailDialogOpen = ref(false)
const selectedSkill = ref<UnifiedSkillItem | null>(null)
const skillDetail = ref<SkillDetail | null>(null)
Expand Down Expand Up @@ -366,15 +376,38 @@ onUnmounted(() => {
{{ t('settings.skills.syncDirectory.action') }}
</DcButton>

<DcButton
data-testid="skills-import-action"
size="sm"
:disabled="operationPending"
@click="externalImportOpen = true"
>
<Icon icon="lucide:download" class="mr-1 size-4" />
{{ t('settings.skills.agentImport.menuItem') }}
</DcButton>
<DropdownMenu>
<DropdownMenuTrigger as-child>
<DcButton
data-testid="skills-import-action"
size="sm"
:disabled="operationPending"
>
<Icon icon="lucide:plus" class="mr-1 size-4" />
{{ t('settings.skills.addSkill') }}
</DcButton>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" class="w-56">
<DcDropdownActionItem
data-testid="skills-import-from-agent"
icon="lucide:copy-plus"
:label="t('settings.skills.agentImport.menuItem')"
@select="externalImportOpen = true"
/>
<DcDropdownActionItem
data-testid="skills-import-basic"
icon="lucide:folder-plus"
:label="t('settings.skills.install.basicTitle')"
@select="installDialogOpen = true"
/>
<DcDropdownActionItem
data-testid="skills-import-git"
icon="lucide:git-branch"
:label="t('settings.skills.git.menuItem')"
@select="gitDialogOpen = true"
/>
</DropdownMenuContent>
</DropdownMenu>
</div>
</div>
</template>
Expand Down Expand Up @@ -453,6 +486,8 @@ onUnmounted(() => {
:agents="agents"
@imported="loadPage(true)"
/>
<SkillInstallDialog v-model:open="installDialogOpen" />
<InstallFromGitDialog v-model:open="gitDialogOpen" />
<SkillDetailDialog
ref="detailDialogRef"
:open="detailDialogOpen"
Expand Down
Loading