initialize Electron desktop app and remove unused files
Build / build (push) Canceled after 0s
Playwright / browser (push) Canceled after 0s

This commit is contained in:
2026-10-25 01:09:01 +08:00
commit 01d9e301fc
877 changed files with 262513 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
import { describe, expect, it } from 'vitest'
import { buildWorkflowSkillOptions, workflowAgentToSkillTarget } from '@/utils/hermes/workflow-skills'
describe('workflow skill helpers', () => {
it('maps workflow agents to skill API targets', () => {
expect(workflowAgentToSkillTarget('hermes')).toBe('hermes')
expect(workflowAgentToSkillTarget('claude-code')).toBe('claude')
expect(workflowAgentToSkillTarget('codex')).toBe('codex')
expect(workflowAgentToSkillTarget('unknown-agent')).toBe('hermes')
})
it('builds sorted enabled skill options without duplicate names', () => {
expect(buildWorkflowSkillOptions({
archived: [],
categories: [
{
name: 'beta',
description: '',
skills: [
{ name: 'write-report', description: '', enabled: true },
{ name: 'disabled-skill', description: '', enabled: false },
],
},
{
name: 'alpha',
description: '',
skills: [
{ name: 'analyze-data', description: '' },
{ name: 'write-report', description: '' },
],
},
],
})).toEqual([
{ label: 'analyze-data', value: 'analyze-data' },
{ label: 'write-report', value: 'write-report' },
])
})
})