Support for analyzing relationships between variables
Hi, thank you for this amazing project! I was wondering if it would be possible to add support for analyzing the relationships between variables?
Could you elaborate a bit more? Are you suggesting that we should add each variable as an individual node so that we can establish relationships between variables—such as when one variable is used to define another or passed as a parameter in a function?
Could you elaborate a bit more? Are you suggesting that we should add each variable as an individual node so that we can establish relationships between variables—such as when one variable is used to define another or passed as a parameter in a function?
yes,its useful,do you have any plan or any suggestion.
Mmm if the LSP have the references, and I think they usually have, it's totally doable. Respecting on if it is useful or not, I think it depends what you want to achieve. But in general terms it is, I would be worried about not over complicate things for the LLM tho.
@v4rgas feel free to comment
A use case occurs when a function uses a global variable from another file. In this scenario, the relationship between FUNCTION (or LOCAL_VARIABLE) and GLOBAL_VARIABLE would be helpful.
That is an interesting use case. Let me check
Mmm if the LSP have the references, and I think they usually have, it's totally doable. Respecting on if it is useful or not, I think it depends what you want to achieve. But in general terms it is, I would be worried about not over complicate things for the LLM tho.
@v4rgas feel free to comment
lsp have the references, but before we lookup the ref through lsp server ,we should create and append the variable node in the create node stage.