-
Notifications
You must be signed in to change notification settings - Fork 1
fix(CODEWIKI-004): CU-86akbhhru 6 review findings across 6 files #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6471191
0a83247
c395e2d
21ffc57
413d51b
07977fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| """Agent tool for reading the source code of specific CodeWiki components by id.""" | ||
|
|
||
| from pydantic_ai import RunContext, Tool | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π read_code_components.py tool module missing module-level docstring Added a module-level docstring at the top of π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| from codewiki.src.be.agent_tools.deps import CodeWikiDeps | ||
|
|
||
|
|
@@ -19,4 +21,4 @@ async def read_code_components(ctx: RunContext[CodeWikiDeps], component_ids: lis | |
|
|
||
| return "\n".join(results) | ||
|
|
||
| read_code_components_tool = Tool(function=read_code_components, name="read_code_components", description="Read the code of a given list of component ids", takes_ctx=True) | ||
| read_code_components_tool = Tool(function=read_code_components, name="read_code_components", description="Read the code of a given list of component ids", takes_ctx=True) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,12 @@ | ||
| """C++ dependency analyzer using tree-sitter. | ||
|
|
||
| This module parses C++ source files with tree-sitter-cpp and extracts | ||
| structural nodes (classes, structs, functions, methods, namespaces, global | ||
| variables) along with call/inheritance/usage relationships between them. | ||
| The extracted `Node` and `CallRelationship` objects feed into the broader | ||
| dependency analysis pipeline via the `analyze_cpp_file` entry point. | ||
| """ | ||
|
|
||
| import logging | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π cpp.py analyzer module missing module-level docstring Added a module-level docstring at the top of π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| from typing import List, Optional, Tuple | ||
| from pathlib import Path | ||
|
|
@@ -366,3 +375,4 @@ def _class_has_method(self, class_node, method_name): | |
| def analyze_cpp_file(file_path: str, content: str, repo_path: str = None) -> Tuple[List[Node], List[CallRelationship]]: | ||
| analyzer = TreeSitterCppAnalyzer(file_path, content, repo_path) | ||
| return analyzer.nodes, analyzer.call_relationships | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| """Tree-sitter based dependency analyzer for C# source files. | ||
|
|
||
| This module parses C# files using tree-sitter-c-sharp to extract top-level | ||
| components (classes, interfaces, structs, enums, records, delegates) as | ||
| Node objects and infers CallRelationship edges (e.g. class inheritance, | ||
| property/field/parameter type usage) between them. | ||
| """ | ||
|
|
||
| import logging | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π csharp.py analyzer module missing module-level docstring Added a module-level docstring at the top of π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| from typing import List, Optional, Tuple | ||
| from pathlib import Path | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,14 @@ | ||
| """Tree-sitter based analyzer for JavaScript/TypeScript source files. | ||
|
|
||
| This module implements the dependency-analysis pipeline component responsible | ||
| for parsing JavaScript and TypeScript files using tree-sitter grammars, | ||
| extracting top-level and class-member declarations (functions, classes, | ||
| methods, arrow functions, etc.) as `Node` objects, and inferring | ||
| `CallRelationship` edges between them (function calls, class inheritance, | ||
| and JSDoc-derived type dependencies). The extracted nodes and relationships | ||
| feed into the broader dependency graph built by the dependency analyzer. | ||
| """ | ||
|
|
||
| import logging | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π javascript.py analyzer module lacks a module-level docstring Added a triple-quoted module-level docstring at the very top of π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| import os | ||
| import traceback | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,14 @@ | ||
| """TypeScript/JavaScript dependency analyzer based on tree-sitter parsing. | ||
|
|
||
| This module implements TreeSitterTSAnalyzer, which parses TypeScript and | ||
| JavaScript source files using tree-sitter to extract top-level code entities | ||
| (functions, classes, interfaces, type aliases, enums, variables, exports, | ||
| etc.) as `Node` objects and the call/inheritance/type relationships between | ||
| them as `CallRelationship` objects. It is a structurally central part of the | ||
| dependency analyzer pipeline, feeding the extracted nodes and relationships | ||
| into downstream dependency graph construction. | ||
| """ | ||
|
|
||
| import logging | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π typescript.py analyzer module lacks a module-level docstring Added a module-level docstring at the top of π€ Prompt for AI agentsfix confidence: π’ 95 high β react π/π to teach the reviewer |
||
| import os | ||
| import traceback | ||
|
|
@@ -979,4 +990,4 @@ def analyze_typescript_file_treesitter( | |
| return analyzer.nodes, analyzer.call_relationships | ||
| except Exception as e: | ||
| logger.error(f"Error in tree-sitter TS analysis for {file_path}: {e}", exc_info=True) | ||
| return [], [] | ||
| return [], [] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π Missing module-level docstring in deps.py
Added a module-level docstring at the top of codewiki/src/be/agent_tools/deps.py, before the imports, describing CodeWikiDeps and its role in the agent pipeline, satisfying CODEWIKI-004. No other code was changed.
π€ Prompt for AI agents
fix confidence: π‘ 85 medium β react π/π to teach the reviewer