diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 57ee611..27ac222 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -12,6 +12,7 @@ $root = Split-Path $PSScriptRoot -Parent . (Join-Path $PSScriptRoot 'lib/install-targets.ps1') . (Join-Path $PSScriptRoot 'lib/selection-state.ps1') . (Join-Path $PSScriptRoot 'lib/install-options.ps1') +. (Join-Path $PSScriptRoot 'lib/semantic-retrieval.ps1') $Shell = Read-InstallShell -Shell $Shell $shell = $Shell.ToLowerInvariant() @@ -43,6 +44,7 @@ foreach ($item in (Get-InstallTargets -Generated $generated -HomePath $homePath } Sync-ConfiguredPlugins -RepositoryRoot $root -HomePath $homePath -Client $Client -DryRun:$DryRun -Summary:$Summary -Entries $plugins.Selected -if (-not $DryRun) { Save-UpdateSelection -HomePath $homePath -RepositoryRoot $root -Shell $Shell -Client $Client -Plugins $plugins -UpdateAgents $options.update_agents -Flashbang $options.flashbang } +Sync-SemanticRetrieval -RepositoryRoot $root -HomePath $homePath -Client $Client -Enabled $options.semantic_retrieval -DryRun:$DryRun -Summary:$Summary +if (-not $DryRun) { Save-UpdateSelection -HomePath $homePath -RepositoryRoot $root -Shell $Shell -Client $Client -Plugins $plugins -UpdateAgents $options.update_agents -Flashbang $options.flashbang -SemanticRetrieval $options.semantic_retrieval } if ($Summary) { Write-Output "Install: PASS | $Client, $Shell$(if ($DryRun) { ', dry-run' })" } else { Write-Output ($(if ($DryRun) { 'PASS install dry-run' } else { 'PASS install' })) } exit 0 diff --git a/scripts/install.sh b/scripts/install.sh index 5eb946d..0ca2752 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -21,6 +21,7 @@ root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) . "$root/scripts/lib/install-targets.sh" . "$root/scripts/lib/selection-state.sh" . "$root/scripts/lib/install-options.sh" +. "$root/scripts/lib/semantic-retrieval.sh" shell=$(read_install_shell "$shell") client=$(read_install_client "$client") @@ -60,6 +61,7 @@ while IFS='|' read -r source destination; do done < <(get_install_targets "$generated" "$home_path" "$shell" "$client") sync_configured_plugins "$root" "$client" "$home_path" "$dry_run" false selected_plugins "$summary" +sync_semantic_retrieval "$root" "$client" "$home_path" "$semantic_retrieval" "$dry_run" false if [ "$dry_run" = false ]; then save_update_selection; fi if [ "$summary" = true ]; then diff --git a/scripts/update.ps1 b/scripts/update.ps1 index 230c02d..2860974 100644 --- a/scripts/update.ps1 +++ b/scripts/update.ps1 @@ -13,6 +13,7 @@ $root = Split-Path $PSScriptRoot -Parent . (Join-Path $PSScriptRoot 'lib/install-targets.ps1') . (Join-Path $PSScriptRoot 'lib/selection-state.ps1') . (Join-Path $PSScriptRoot 'lib/install-options.ps1') +. (Join-Path $PSScriptRoot 'lib/semantic-retrieval.ps1') $homePath = [Environment]::GetFolderPath('UserProfile') if ($Quick) { @@ -65,6 +66,7 @@ try { $script:PluginNonInteractive = $previousPluginNonInteractive $env:CI = $previousCI } -if (-not $DryRun) { Save-UpdateSelection -HomePath $homePath -RepositoryRoot $root -Shell $Shell -Client $Client -Plugins $plugins -UpdateAgents $options.update_agents -Flashbang $options.flashbang } +Sync-SemanticRetrieval -RepositoryRoot $root -HomePath $homePath -Client $Client -Enabled $options.semantic_retrieval -DryRun:$DryRun -Update -Summary:$Summary +if (-not $DryRun) { Save-UpdateSelection -HomePath $homePath -RepositoryRoot $root -Shell $Shell -Client $Client -Plugins $plugins -UpdateAgents $options.update_agents -Flashbang $options.flashbang -SemanticRetrieval $options.semantic_retrieval } if ($Summary) { Write-Output "Update: PASS | $Client, $Shell$(if ($DryRun) { ', dry-run' })" } else { Write-Output ($(if ($DryRun) { 'PASS update dry-run' } else { 'PASS update' })) } exit 0 diff --git a/scripts/update.sh b/scripts/update.sh index bf2d68c..6d9fdeb 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -23,6 +23,7 @@ root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) . "$root/scripts/lib/install-targets.sh" . "$root/scripts/lib/selection-state.sh" . "$root/scripts/lib/install-options.sh" +. "$root/scripts/lib/semantic-retrieval.sh" home_path=${HOME:?HOME is required} selected_plugins=() @@ -71,6 +72,7 @@ if [ "$quick" = true ]; then else sync_configured_plugins "$root" "$client" "$home_path" "$dry_run" true selected_plugins "$summary" fi +sync_semantic_retrieval "$root" "$client" "$home_path" "$semantic_retrieval" "$dry_run" true if [ "$dry_run" = false ]; then save_update_selection; fi if [ "$summary" = true ]; then