mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 10:14:51 +00:00
fix(skills): treat sibling .py files as local modules in dep scanner
The scanner only tracked subdirectories as local modules, so cross-file imports like `from extract_form_field_info import ...` were incorrectly reported as missing pip packages, causing install failures.
This commit is contained in:
1 parent
7f1f126091
commit
60995ff956
1 file changed
+5
@@ -59,6 +59,11 @@ func scanScriptsDir(scriptsDir string) *SkillManifest {
|
||||
}
|
||||
continue
|
||||
}
|
||||
// Track sibling .py files as local modules so cross-file imports
|
||||
// (e.g. "from extract_form_field_info import ...") are not reported as pip deps.
|
||||
if strings.HasSuffix(e.Name(), ".py") {
|
||||
localModules[strings.TrimSuffix(e.Name(), ".py")] = true
|
||||
}
|
||||
scanFile(filepath.Join(scriptsDir, e.Name()), pyImports, nodeImports, binaries)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user