Skip to content

Comments

Context History Tracking#155

Merged
rcosta358 merged 5 commits intomainfrom
context-history
Feb 23, 2026
Merged

Context History Tracking#155
rcosta358 merged 5 commits intomainfrom
context-history

Conversation

@rcosta358
Copy link
Collaborator

@rcosta358 rcosta358 commented Feb 19, 2026

This PR adds context history tracking for the autocomplete, context debugger, and hover information of the VS Code extension. It works by taking a snapshot of the variables in scope before exiting the context (in methods, constructors, ifs and elses), and then everything else (global vars, instance vars, ghosts, states and aliases).

@rcosta358 rcosta358 self-assigned this Feb 19, 2026
@rcosta358 rcosta358 added the ide Together with the VS Code extension label Feb 19, 2026
Copy link
Collaborator

@CatarinaGamboa CatarinaGamboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Minor nits

private List<GhostFunction> ghosts;
private Map<String, List<GhostState>> classStates;
private List<AliasWrapper> alias;
private Map<String, List<GhostState>> states;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not keep classStates? since it is a map from class to state i think it could stay

public class ContextHistory {
private static ContextHistory instance;

private Map<String, Map<String, Set<RefinedVariable>>> vars; // file -> (scope -> variables in scope)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like in here this var could be fileScopeVars to indicate what they mean

@rcosta358 rcosta358 merged commit 9eb34e5 into main Feb 23, 2026
1 check passed
@rcosta358 rcosta358 deleted the context-history branch February 23, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ide Together with the VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants