Comment Comment by jehna1 I'm using both a custom Babel plugin and LLMs to achieve this.Babel first parses the code to AST, and for each variable the tool:1. Gets the variable name and surrounding scope as code2. Asks the LLM to come up with a good name for the given variable name, by looking at the scope where the variable is3. Uses Babel to make the context-aware rename to AST based on the LLM's response parent jehna1 2 years ago
Babel first parses the code to AST, and for each variable the tool:
1. Gets the variable name and surrounding scope as code
2. Asks the LLM to come up with a good name for the given variable name, by looking at the scope where the variable is
3. Uses Babel to make the context-aware rename to AST based on the LLM's response