返回 oh-my-ppt
paths.ts
根目录 / src / main / product-skills / paths.ts
1 import { app } from 'electron'
2 import { is } from '@electron-toolkit/utils'
3 import path from 'node:path'
4 import { SYSTEM_SKILLS_SOURCE_PATH } from './contract'
5
6 export const resolveBuiltinSkillsSourcePath = (): string =>
7 is.dev
8 ? path.join(process.cwd(), 'resources', 'skills')
9 : path.join(process.resourcesPath, 'app.asar.unpacked', 'resources', 'skills')
10
11 export const resolveInstalledSkillsPath = (): string =>
12 path.join(app.getPath('userData'), is.dev ? 'skills-dev' : 'skills')
13
14 export const getSystemSkillsSourcePath = (): string => SYSTEM_SKILLS_SOURCE_PATH
15
15 lines TYPESCRIPT