@oadank/dsh-input-tools 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/patches/apply-voice-patch.ps1 +15 -17
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oadank/dsh-input-tools",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/oadank/dsh-input-tools.git"
|
|
10
|
+
},
|
|
7
11
|
"exports": {
|
|
8
12
|
".": { "default": "./lib/index.js" },
|
|
9
13
|
"./client": { "default": "./lib/client.js" },
|
|
@@ -20,7 +20,7 @@ $Marker = "本地改造 2026-08-14" # 补丁内的指纹标记(api-request-t
|
|
|
20
20
|
function Find-Repo {
|
|
21
21
|
# 1. 显式指定
|
|
22
22
|
if ($RepoPath -ne "" -and (Test-Path (Join-Path $RepoPath ".git"))) { return $RepoPath }
|
|
23
|
-
# 2. 当前目录及向上 6
|
|
23
|
+
# 2. 当前目录及向上 6 层(脚本可能放在源码仓库里/附近)
|
|
24
24
|
$cur = (Get-Location).Path
|
|
25
25
|
for ($i = 0; $i -le 6; $i++) {
|
|
26
26
|
if (Test-Path (Join-Path $cur ".git")) { return $cur }
|
|
@@ -28,18 +28,7 @@ function Find-Repo {
|
|
|
28
28
|
if ($parent -eq $cur) { break }
|
|
29
29
|
$cur = $parent
|
|
30
30
|
}
|
|
31
|
-
# 3.
|
|
32
|
-
$candidates = @(
|
|
33
|
-
"D:\opt\deepseek-harness\deepseek-harness",
|
|
34
|
-
"C:\D\opt\deepseek-harness\deepseek-harness",
|
|
35
|
-
"D:\deepseek-harness\deepseek-harness",
|
|
36
|
-
"C:\deepseek-harness\deepseek-harness",
|
|
37
|
-
"D:\opt\deepseek-harness",
|
|
38
|
-
"C:\D\opt\deepseek-harness"
|
|
39
|
-
)
|
|
40
|
-
foreach ($c in $candidates) {
|
|
41
|
-
if (Test-Path (Join-Path $c ".git")) { return $c }
|
|
42
|
-
}
|
|
31
|
+
# 3. 找不到了——不猜固定路径(客户源码位置可能在任何盘符),返回空让用户输入
|
|
43
32
|
return $null
|
|
44
33
|
}
|
|
45
34
|
|
|
@@ -50,10 +39,19 @@ if ($RepoPath -eq "") {
|
|
|
50
39
|
$RepoPath = $found
|
|
51
40
|
Write-Host "自动检测到源码仓库: $RepoPath" -ForegroundColor Green
|
|
52
41
|
} else {
|
|
53
|
-
|
|
54
|
-
Write-Host "
|
|
55
|
-
Write-Host "
|
|
56
|
-
|
|
42
|
+
# 找不到 → 交互式让用户输入源码路径(不限定任何盘符/位置)
|
|
43
|
+
Write-Host "`n未自动检测到源码仓库。" -ForegroundColor Yellow
|
|
44
|
+
Write-Host "请把源码仓库根目录(git clone 出来的 deepseek-harness 文件夹)路径告诉我:"
|
|
45
|
+
$input = Read-Host "dsh 源码仓库路径"
|
|
46
|
+
if ($input -ne "" -and (Test-Path (Join-Path $input ".git"))) {
|
|
47
|
+
$RepoPath = $input.Trim().Trim('"').Trim("'")
|
|
48
|
+
Write-Host "已使用: $RepoPath" -ForegroundColor Green
|
|
49
|
+
} else {
|
|
50
|
+
Write-Host "路径无效或不是 git 仓库(需要包含 .git 目录)。" -ForegroundColor Red
|
|
51
|
+
Write-Host "可用 -RepoPath 参数直接指定:" -ForegroundColor Yellow
|
|
52
|
+
Write-Host " powershell -ExecutionPolicy Bypass -File apply-voice-patch.ps1 -RepoPath D:\anywhere\deepseek-harness" -ForegroundColor Yellow
|
|
53
|
+
exit 1
|
|
54
|
+
}
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
Write-Host "源码目录: $RepoPath"
|