fix(install): drop semantic-search leftovers when local search is off
CI / CI configuration security checks (push) Successful in 2s
CI / Capabilities and shell quality (push) Successful in 17s
CI / Python tests and compilation (push) Successful in 30s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 17s
CI / PowerShell tests on Ubuntu (push) Successful in 1m25s
CI / Installed client configuration smoke tests (push) Successful in 48s
CI / Bash integration and installation guards (push) Successful in 1m10s
CI / CI configuration security checks (push) Successful in 2s
CI / Capabilities and shell quality (push) Successful in 17s
CI / Python tests and compilation (push) Successful in 30s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 17s
CI / PowerShell tests on Ubuntu (push) Successful in 1m25s
CI / Installed client configuration smoke tests (push) Successful in 48s
CI / Bash integration and installation guards (push) Successful in 1m10s
Disabling local QMD search now removes the qmd-search sandbox exclusion, also from existing settings on update. Agent instructions mention semantic search only as available when installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
477e792f97
commit
53511937b0
6 files changed
+28
-3
No files matched your search
@@ -58,6 +58,12 @@ def filter_options(path, flashbang_enabled=True, statusline_enabled=True, semant
|
||||
settings['hooks']['SessionStart'] = remaining
|
||||
else:
|
||||
settings.get('hooks', {}).pop('SessionStart', None)
|
||||
sandbox = settings.get('sandbox', {})
|
||||
excluded = [command for command in sandbox.get('excludedCommands', []) if 'qmd-search.mjs' not in command]
|
||||
if excluded:
|
||||
sandbox['excludedCommands'] = excluded
|
||||
else:
|
||||
sandbox.pop('excludedCommands', None)
|
||||
if not statusline_enabled:
|
||||
settings.pop('statusLine', None)
|
||||
return json.dumps(settings, indent=2, ensure_ascii=False) + '\n'
|
||||
@@ -109,6 +115,11 @@ def merge_json(current, managed):
|
||||
result = dict(current)
|
||||
if 'statusLine' not in managed:
|
||||
result.pop('statusLine', None)
|
||||
sandbox = result.get('sandbox')
|
||||
if isinstance(sandbox, dict) and isinstance(sandbox.get('excludedCommands'), list):
|
||||
# The QMD exclusion is owned; managed settings re-add it only while semantic retrieval is enabled.
|
||||
excluded = [command for command in sandbox['excludedCommands'] if 'qmd-search.mjs' not in str(command)]
|
||||
result['sandbox'] = dict(sandbox, excludedCommands=excluded) if excluded else {k: v for k, v in sandbox.items() if k != 'excludedCommands'}
|
||||
for key, value in managed.items():
|
||||
if key == 'hooks' and isinstance(value, dict) and isinstance(result.get(key), dict):
|
||||
hooks = dict(result[key])
|
||||
|
||||
Reference in new issue
Block a user