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
2 changes: 1 addition & 1 deletion codetide/agents/tide/agent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from codetide import CodeTide
from codetide.search.code_search import SmartCodeSearch
from ...mcp.tools.patch_code import file_exists, open_file, process_patch, remove_file, write_file, parse_patch_blocks
from ...core.defaults import DEFAULT_ENCODING, DEFAULT_STORAGE_PATH
from ...search.code_search import SmartCodeSearch
from ...parsers import SUPPORTED_LANGUAGES
from ...autocomplete import AutoComplete
from .models import Steps
Expand Down
6 changes: 6 additions & 0 deletions codetide/parsers/typescript_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,16 +396,22 @@ def _process_variable_declarator(cls, node: Node, code: bytes, codeFile: CodeFil
value = None
next_is_value = False
raw = cls._get_content(code, node)
previous_child = None
for child in node.children:
if child.type == "identifier" and name is None:
name = cls._get_content(code, child)
elif child.type == "type_annotation":
type_hint = cls._get_content(code, child)
elif child.type == "=":
next_is_value = True
if previous_child is not None and name is None:
name = cls._get_content(code, previous_child)
elif next_is_value:
value = cls._get_content(code, child)
next_is_value = False

previous_child = child

codeFile.add_variable(VariableDeclaration(
name=name,
type_hint=type_hint,
Expand Down