Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion codewiki/src/be/agent_tools/deps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""Dependency container for CodeWiki agent tools.

Defines CodeWikiDeps, a dataclass holding the shared context and state
(paths, component registry, module tree position, configuration, etc.)
that is passed to agent tools during the CodeWiki documentation generation
pipeline.
"""
from dataclasses import dataclass

Copy link
Copy Markdown
Author

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
In codewiki/src/be/agent_tools/deps.py around line 1, review and complete this code-review fix: Missing module-level docstring in deps.py.
What the draft fix changed: 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.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟑 85 medium β€” react πŸ‘/πŸ‘Ž to teach the reviewer

from codewiki.src.be.dependency_analyzer.models.core import Node
from codewiki.src.config import Config
Expand All @@ -14,4 +21,4 @@ class CodeWikiDeps:
max_depth: int
current_depth: int
config: Config # LLM configuration
custom_instructions: str = None
custom_instructions: str = None
4 changes: 3 additions & 1 deletion codewiki/src/be/agent_tools/read_code_components.py
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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 codewiki/src/be/agent_tools/read_code_components.py, before the imports, briefly describing the module's purpose as an agent tool for reading source code of CodeWiki components by id.

πŸ€– Prompt for AI agents
In codewiki/src/be/agent_tools/read_code_components.py around line 1, review and complete this code-review fix: read_code_components.py tool module missing module-level docstring.
What the draft fix changed: Added a module-level docstring at the top of `codewiki/src/be/agent_tools/read_code_components.py`, before the imports, briefly describing the module's purpose as an agent tool for reading source code of CodeWiki components by id.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 90 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

from codewiki.src.be.agent_tools.deps import CodeWikiDeps

Expand All @@ -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)
10 changes: 10 additions & 0 deletions codewiki/src/be/dependency_analyzer/analyzers/cpp.py
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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 codewiki/src/be/dependency_analyzer/analyzers/cpp.py, before the existing imports, describing the module's role (C++ tree-sitter based dependency analysis, producing Node/CallRelationship objects for the pipeline via analyze_cpp_file). No other code was changed.

πŸ€– Prompt for AI agents
In codewiki/src/be/dependency_analyzer/analyzers/cpp.py around line 1, review and complete this code-review fix: cpp.py analyzer module missing module-level docstring.
What the draft fix changed: Added a module-level docstring at the top of `codewiki/src/be/dependency_analyzer/analyzers/cpp.py`, before the existing imports, describing the module's role (C++ tree-sitter based dependency analysis, producing Node/CallRelationship objects for the pipeline via `analyze_cpp_file`). No other code was changed.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 95 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

from typing import List, Optional, Tuple
from pathlib import Path
Expand Down Expand Up @@ -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

8 changes: 8 additions & 0 deletions codewiki/src/be/dependency_analyzer/analyzers/csharp.py
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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 codewiki/src/be/dependency_analyzer/analyzers/csharp.py, before the import logging line, describing the module's purpose (tree-sitter based C# dependency analysis, node/relationship extraction). No other code, imports, or formatting were altered.

πŸ€– Prompt for AI agents
In codewiki/src/be/dependency_analyzer/analyzers/csharp.py around line 1, review and complete this code-review fix: csharp.py analyzer module missing module-level docstring.
What the draft fix changed: Added a module-level docstring at the top of `codewiki/src/be/dependency_analyzer/analyzers/csharp.py`, before the `import logging` line, describing the module's purpose (tree-sitter based C# dependency analysis, node/relationship extraction). No other code, imports, or formatting were altered.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 95 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

from typing import List, Optional, Tuple
from pathlib import Path
Expand Down
11 changes: 11 additions & 0 deletions codewiki/src/be/dependency_analyzer/analyzers/javascript.py
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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 codewiki/src/be/dependency_analyzer/analyzers/javascript.py, before the existing imports, describing the module's role as a tree-sitter based JS/TS analyzer in the dependency-analysis pipeline (extracting nodes and call relationships). No other lines were changed.

πŸ€– Prompt for AI agents
In codewiki/src/be/dependency_analyzer/analyzers/javascript.py around line 1, review and complete this code-review fix: javascript.py analyzer module lacks a module-level docstring.
What the draft fix changed: Added a triple-quoted module-level docstring at the very top of `codewiki/src/be/dependency_analyzer/analyzers/javascript.py`, before the existing imports, describing the module's role as a tree-sitter based JS/TS analyzer in the dependency-analysis pipeline (extracting nodes and call relationships). No other lines were changed.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 95 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

import os
import traceback
Expand Down
13 changes: 12 additions & 1 deletion codewiki/src/be/dependency_analyzer/analyzers/typescript.py
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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 codewiki/src/be/dependency_analyzer/analyzers/typescript.py, before the existing imports, describing the module's purpose (tree-sitter based TypeScript/JavaScript dependency analysis via TreeSitterTSAnalyzer) and its role in the dependency analyzer pipeline. No other code was changed.

πŸ€– Prompt for AI agents
In codewiki/src/be/dependency_analyzer/analyzers/typescript.py around line 1, review and complete this code-review fix: typescript.py analyzer module lacks a module-level docstring.
What the draft fix changed: Added a module-level docstring at the top of `codewiki/src/be/dependency_analyzer/analyzers/typescript.py`, before the existing imports, describing the module's purpose (tree-sitter based TypeScript/JavaScript dependency analysis via TreeSitterTSAnalyzer) and its role in the dependency analyzer pipeline. No other code was changed.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟒 95 high β€” react πŸ‘/πŸ‘Ž to teach the reviewer

import os
import traceback
Expand Down Expand Up @@ -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 [], []