mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(ai): register execute_sql tool in Electron tool registry
sqlQueryTool (execute_sql) was listed in BUILTIN_TOOL_CATALOG and available in the CLI AGENT_TOOL_REGISTRY, but was never imported or registered in the Electron-specific TOOL_REGISTRY. Users who enabled the tool via the assistant config panel would trigger a missing-tool error at inference time. Add sqlQueryTool to the Electron registry following the same adaptSharedTool pattern used by all other analysis tools. Add a catalog/registry drift guard test (name + category) covering all BUILTIN_TOOL_CATALOG entries, enabled via --experimental-test-module-mocks to mock Electron runtime deps. Document the general-over-specific assertion rule in AGENTS.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7af7fb1f10
commit
f5e83748ff
5 files changed
+40
-2
No files matched your search
@@ -61,7 +61,7 @@ export function collectDefaultTestFiles(rootDir = process.cwd()) {
|
||||
}
|
||||
|
||||
export function buildNodeTestArgs(testArgs) {
|
||||
return ['--import', 'tsx', '--test', ...testArgs]
|
||||
return ['--experimental-test-module-mocks', '--import', 'tsx', '--test', ...testArgs]
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
||||
@@ -23,6 +23,7 @@ test('default test collection excludes e2e, smoke, and real external tests', ()
|
||||
|
||||
test('explicit test arguments are passed through without default exclusions', () => {
|
||||
assert.deepEqual(buildNodeTestArgs(['tests/e2e/helpers/app-launcher.test.js']), [
|
||||
'--experimental-test-module-mocks',
|
||||
'--import',
|
||||
'tsx',
|
||||
'--test',
|
||||
|
||||
Reference in new issue
Block a user