ruvector 0.1.73 → 0.1.74
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/bin/cli.js +17 -11
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -2842,26 +2842,32 @@ hooksCmd.command('init')
|
|
|
2842
2842
|
// Windows: PowerShell statusline
|
|
2843
2843
|
const statuslineScript = path.join(settingsDir, 'statusline-command.ps1');
|
|
2844
2844
|
const statuslineContent = `# RuVector Intelligence Statusline for Windows PowerShell
|
|
2845
|
+
# Compatible with PowerShell 5.1+ and PowerShell Core
|
|
2845
2846
|
$ErrorActionPreference = "SilentlyContinue"
|
|
2847
|
+
$e = [char]27
|
|
2846
2848
|
$inputData = [Console]::In.ReadToEnd()
|
|
2847
2849
|
$data = $inputData | ConvertFrom-Json
|
|
2848
2850
|
$Model = if ($data.model.display_name) { $data.model.display_name } else { "Claude" }
|
|
2849
2851
|
$CWD = if ($data.workspace.current_dir) { $data.workspace.current_dir } else { $data.cwd }
|
|
2850
2852
|
$Dir = Split-Path -Leaf $CWD
|
|
2851
|
-
$Branch = $null
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
Write-Host $Line1
|
|
2856
|
-
$IntelFile = "$CWD\.ruvector\intelligence.json"
|
|
2853
|
+
$Branch = $null
|
|
2854
|
+
try { Push-Location $CWD -ErrorAction Stop; $Branch = git branch --show-current 2>$null; Pop-Location } catch {}
|
|
2855
|
+
Write-Host "$e[1m$Model$e[0m in $e[36m$Dir$e[0m$(if($Branch){" on $e[33m$Branch$e[0m"})"
|
|
2856
|
+
$IntelFile = Join-Path $CWD ".ruvector\intelligence.json"
|
|
2857
2857
|
if (Test-Path $IntelFile) {
|
|
2858
2858
|
$Intel = Get-Content $IntelFile -Raw | ConvertFrom-Json
|
|
2859
|
-
$
|
|
2860
|
-
$
|
|
2861
|
-
$
|
|
2862
|
-
|
|
2859
|
+
$Mem = if ($Intel.memories) { $Intel.memories.Count } else { 0 }
|
|
2860
|
+
$Traj = if ($Intel.trajectories) { $Intel.trajectories.Count } else { 0 }
|
|
2861
|
+
$Sess = if ($Intel.stats -and $Intel.stats.session_count) { $Intel.stats.session_count } else { 0 }
|
|
2862
|
+
$Pat = if ($Intel.patterns) { ($Intel.patterns | Get-Member -MemberType NoteProperty).Count } else { 0 }
|
|
2863
|
+
$Line2 = "$e[35m RuVector$e[0m"
|
|
2864
|
+
if ($Pat -gt 0) { $Line2 += " $e[32m$Pat patterns$e[0m" } else { $Line2 += " $e[2mlearning$e[0m" }
|
|
2865
|
+
if ($Mem -gt 0) { $Line2 += " $e[34m$Mem mem$e[0m" }
|
|
2866
|
+
if ($Traj -gt 0) { $Line2 += " $e[33m$Traj traj$e[0m" }
|
|
2867
|
+
if ($Sess -gt 0) { $Line2 += " $e[2m#$Sess$e[0m" }
|
|
2868
|
+
Write-Host $Line2
|
|
2863
2869
|
} else {
|
|
2864
|
-
Write-Host "$
|
|
2870
|
+
Write-Host "$e[2m RuVector: run 'npx ruvector hooks session-start'$e[0m"
|
|
2865
2871
|
}
|
|
2866
2872
|
`;
|
|
2867
2873
|
fs.writeFileSync(statuslineScript, statuslineContent);
|