fix: avoid relative completion backend execution

This commit is contained in:
Kai (Tam Nhu) Tran authored and Tam Nhu Tran committed 2026-05-30 15:19:59 -04:00
1 parent 62a4d44b58
commit 4f2dd70b8c
5 files changed
+21 -46

No files matched your search

-10
View File
@@ -6,16 +6,6 @@ function Invoke-CcsCompletionBackend {
[string[]]$TokensBeforeCurrent
)
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path
$repoCli = Join-Path $repoRoot 'dist\ccs.js'
if (-not (Test-Path $repoCli)) {
$repoCli = Join-Path $repoRoot 'bin\ccs.js'
}
if (Test-Path $repoCli) {
& node $repoCli __complete --shell powershell --current $CurrentWord -- @TokensBeforeCurrent 2>$null
return
}
if (Get-Command ccs -ErrorAction SilentlyContinue) {
& ccs __complete --shell powershell --current $CurrentWord -- @TokensBeforeCurrent 2>$null
}