chore: history page support sharedworker.js

This commit is contained in:
duorameng
2026-05-09 08:42:15 +08:00
parent 95a7de599e
commit 9c174d8db2
10 changed files with 92 additions and 25 deletions
+5 -4
View File
@@ -1,4 +1,5 @@
import type { RepoConfig, Task } from '@/api'
import { PATHS } from '@/constants'
/**
* 仓库命令解析结果
@@ -64,10 +65,10 @@ export function parseBaihuCommand(command: string): ParsedRepoResult | null {
}
break
case '--target-path':
// 处理 $SCRIPTS_DIR$ 占位符
if (value.startsWith('$SCRIPTS_DIR$/')) {
repoConfig.target_path = value.replace('$SCRIPTS_DIR$/', '')
} else if (value === '$SCRIPTS_DIR$') {
// 处理脚本目录占位符
if (value.startsWith(`${PATHS.SCRIPTS_DIR_PLACEHOLDER}/`)) {
repoConfig.target_path = value.replace(`${PATHS.SCRIPTS_DIR_PLACEHOLDER}/`, '')
} else if (value === PATHS.SCRIPTS_DIR_PLACEHOLDER) {
repoConfig.target_path = ''
} else {
repoConfig.target_path = value