-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
47 lines (43 loc) · 1.66 KB
/
Copy pathinstall.ps1
File metadata and controls
47 lines (43 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# One-click: copy the article-editor preset, then add this bundle to a DSH profile.
# Usage:
# .\install.ps1
# .\install.ps1 -Profile headless
# .\install.ps1 -Harness C:\path\to\deepseek-harness
param(
[string]$Profile = 'web',
[string]$Harness = ''
)
$ErrorActionPreference = 'Stop'
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$presetSrc = Join-Path $Root 'presets\article-editor'
$presetDst = Join-Path $env:USERPROFILE '.dsh\.agent-presets\article-editor'
New-Item -ItemType Directory -Force -Path (Split-Path $presetDst) | Out-Null
Copy-Item -Recurse -Force $presetSrc $presetDst
Write-Host "Preset copied to $presetDst"
$addArgs = @('plugin', '--profile', $Profile, 'add', $Root)
if ($Harness -and (Test-Path (Join-Path $Harness 'package.json'))) {
Push-Location $Harness
try {
pnpm dsh @addArgs
} finally {
Pop-Location
}
} elseif (Get-Command dsh -ErrorAction SilentlyContinue) {
& dsh @addArgs
} else {
Write-Host ""
Write-Host "dsh is not on PATH. Either:"
Write-Host " 1. Install the DeepSeek Harness CLI, then rerun this script"
Write-Host " 2. From a harness checkout: .\install.ps1 -Harness C:\path\to\deepseek-harness"
Write-Host ""
Write-Host "Manual equivalent:"
Write-Host " dsh plugin --profile $Profile add `"$Root`""
exit 2
}
Write-Host ""
Write-Host "Installed into profile '$Profile'."
Write-Host "Web: dsh --profile web then pick preset article-editor"
Write-Host "Headless: dsh --profile headless --preset article-editor `"your topic`""
Write-Host ""
Write-Host "If the editor still runs as ReAct, the host is missing the AgentLoop"
Write-Host "driver hook. See patches/agent-loop-prepare.snippet.ts"