gitnexus 1.6.6-rc.140 → 1.6.6-rc.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,11 +43,13 @@ function findEnclosingTypeDeclaration(node) {
43
43
  function typeName(typeNode) {
44
44
  return typeNode.childForFieldName('name')?.text ?? null;
45
45
  }
46
- /** First entry in the type's `base_list`, read as raw text. C# allows
47
- * generic and qualified bases (`Foo<T>`, `N.M.Base`); we keep the raw
48
- * form so downstream interpret layer can strip generics/qualifiers
49
- * the same way as other type-binding captures. Returns null when the
50
- * type has no base (or an empty base_list). */
46
+ /** First entry in the type's `base_list`, read as raw type text. C#
47
+ * allows generic and qualified bases (`Foo<T>`, `N.M.Base`); we keep
48
+ * that form so downstream interpretation can strip generics and
49
+ * qualifiers consistently. A record primary-constructor base wraps
50
+ * its type and constructor arguments in `primary_constructor_base_type`,
51
+ * so read its `type` field instead of leaking `(args)` into the binding.
52
+ * Returns null when the type has no base (or an empty base_list). */
51
53
  function firstBaseText(typeNode) {
52
54
  for (let i = 0; i < typeNode.namedChildCount; i++) {
53
55
  const child = typeNode.namedChild(i);
@@ -56,7 +58,9 @@ function firstBaseText(typeNode) {
56
58
  const firstBase = child.namedChild(0);
57
59
  if (firstBase === null)
58
60
  return null;
59
- return firstBase.text;
61
+ return firstBase.type === 'primary_constructor_base_type'
62
+ ? (firstBase.childForFieldName('type')?.text ?? firstBase.text)
63
+ : firstBase.text;
60
64
  }
61
65
  return null;
62
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.6-rc.140",
3
+ "version": "1.6.6-rc.141",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",