feat: AI套图分层方案 + Gemini集成 - 4种图案类型处理 + 正片叠底 + 宽高比 + 模型选择
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -78,6 +78,13 @@ export class CEP {
|
||||
this.writeDebug()
|
||||
this.copyJson2()
|
||||
|
||||
// 确保 CEP 扩展目录存在
|
||||
const cepExtDir = getAdobeCepDir()
|
||||
if (!fs.existsSync(cepExtDir)) {
|
||||
fs.mkdirSync(cepExtDir, { recursive: true })
|
||||
console.log('[CEP] 已创建 CEP 扩展目录:', cepExtDir)
|
||||
}
|
||||
|
||||
// 创建符号链接或直接复制
|
||||
if (!fs.existsSync(this.cepLink)) {
|
||||
try {
|
||||
@@ -85,8 +92,8 @@ export class CEP {
|
||||
console.log('[CEP] 符号链接已创建')
|
||||
} catch (error: any) {
|
||||
// 权限不足时,改用复制
|
||||
if (error.code === 'EPERM') {
|
||||
console.warn('[CEP] 符号链接权限不足,改用复制方式')
|
||||
if (error.code === 'EPERM' || error.code === 'ENOENT') {
|
||||
console.warn('[CEP] 符号链接创建失败,改用复制方式')
|
||||
this.copyToCepDir()
|
||||
} else {
|
||||
throw error
|
||||
@@ -160,7 +167,7 @@ export class CEP {
|
||||
}
|
||||
|
||||
// 3. 复制并修正 HTML 路径
|
||||
const builtHtmlPath = path.join(this.dist, 'src/launcher/index.html')
|
||||
const builtHtmlPath = path.join(this.dist, 'index.html')
|
||||
const targetHtmlPath = path.join(this.cepOutput, 'index.html')
|
||||
|
||||
if (fs.existsSync(builtHtmlPath)) {
|
||||
|
||||
Reference in New Issue
Block a user