mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 05:06:15 +08:00
154 lines
3.0 KiB
TypeScript
154 lines
3.0 KiB
TypeScript
import type { ResourceItem } from './type'
|
|
import { ResourceKind, SKILL_ROOT_ID } from './type'
|
|
|
|
export const mockSkillItems: ResourceItem[] = [
|
|
{
|
|
id: 'skills',
|
|
name: 'skills',
|
|
parent_id: SKILL_ROOT_ID,
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'skills/_schemas',
|
|
name: '_schemas',
|
|
parent_id: 'skills',
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'skills/_schemas/email-writer',
|
|
name: 'email-writer',
|
|
parent_id: 'skills/_schemas',
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'skills/_schemas/email-writer/skill',
|
|
name: 'SKILL.md',
|
|
parent_id: 'skills/_schemas/email-writer',
|
|
kind: ResourceKind.file,
|
|
ext: 'md',
|
|
size: 1820,
|
|
},
|
|
{
|
|
id: 'skills/_schemas/email-writer/prompt',
|
|
name: 'prompt.md',
|
|
parent_id: 'skills/_schemas/email-writer',
|
|
kind: ResourceKind.file,
|
|
ext: 'md',
|
|
size: 964,
|
|
},
|
|
{
|
|
id: 'skills/_schemas/email-writer/output-schema',
|
|
name: 'output.schema.json',
|
|
parent_id: 'skills/_schemas/email-writer',
|
|
kind: ResourceKind.file,
|
|
ext: 'json',
|
|
size: 742,
|
|
},
|
|
{
|
|
id: 'skills/_schemas/email-writer/toolmap',
|
|
name: 'toolmap.yaml',
|
|
parent_id: 'skills/_schemas/email-writer',
|
|
kind: ResourceKind.file,
|
|
ext: 'yaml',
|
|
size: 540,
|
|
},
|
|
{
|
|
id: 'skills/_schemas/email-writer/examples',
|
|
name: 'examples.jsonl',
|
|
parent_id: 'skills/_schemas/email-writer',
|
|
kind: ResourceKind.file,
|
|
ext: 'jsonl',
|
|
size: 1205,
|
|
},
|
|
{
|
|
id: 'skills/_index',
|
|
name: '_index.json',
|
|
parent_id: 'skills',
|
|
kind: ResourceKind.file,
|
|
ext: 'json',
|
|
size: 356,
|
|
},
|
|
{
|
|
id: 'skills/_tags',
|
|
name: '_tags.json',
|
|
parent_id: 'skills',
|
|
kind: ResourceKind.file,
|
|
ext: 'json',
|
|
size: 212,
|
|
},
|
|
{
|
|
id: 'skills/web-research',
|
|
name: 'web-research',
|
|
parent_id: 'skills',
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'skills/support-triage',
|
|
name: 'support-triage',
|
|
parent_id: 'skills',
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'knowledge',
|
|
name: 'knowledge',
|
|
parent_id: SKILL_ROOT_ID,
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'tools',
|
|
name: 'tools',
|
|
parent_id: SKILL_ROOT_ID,
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'templates',
|
|
name: 'templates',
|
|
parent_id: SKILL_ROOT_ID,
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'evals',
|
|
name: 'evals',
|
|
parent_id: SKILL_ROOT_ID,
|
|
kind: ResourceKind.folder,
|
|
},
|
|
{
|
|
id: 'dist',
|
|
name: 'dist',
|
|
parent_id: SKILL_ROOT_ID,
|
|
kind: ResourceKind.folder,
|
|
},
|
|
]
|
|
|
|
export type SkillTabType = 'start' | 'file'
|
|
export type SkillTabItem = {
|
|
id: string
|
|
type: SkillTabType
|
|
name: string
|
|
active?: boolean
|
|
}
|
|
|
|
export const mockSkillTabs: SkillTabItem[] = [
|
|
{
|
|
id: 'tab-start',
|
|
type: 'start',
|
|
name: 'Start',
|
|
},
|
|
{
|
|
id: 'tab-skill',
|
|
type: 'file',
|
|
name: 'SKILL.md',
|
|
active: true,
|
|
},
|
|
{
|
|
id: 'tab-output',
|
|
type: 'file',
|
|
name: 'output.schema.json',
|
|
},
|
|
{
|
|
id: 'tab-prompt',
|
|
type: 'file',
|
|
name: 'prompt.md',
|
|
},
|
|
]
|