Skip to content

Context History Improvements#159

Open
rcosta358 wants to merge 21 commits intomainfrom
context-history-improvements
Open

Context History Improvements#159
rcosta358 wants to merge 21 commits intomainfrom
context-history-improvements

Conversation

@rcosta358
Copy link
Collaborator

@rcosta358 rcosta358 commented Feb 26, 2026

This PR makes some changes to the context history to improve the autocomplete and the context debugger in the extension by:

  • Add file field to ghosts to only suggest those in the file
  • Adding two extra fields to RefinedVariable:
    • isParameter - to know whether a refined variable is a parameter or not so we can bypass the condition that filters variables that are declared after the current position
    • annPosition - to use the annotation position to be able to suggest the variable we are refining in the autocomplete

Other Changes

  • Remove the ErrorPosition class which is unnecessary since we can use Spoon's SourcePosition in diagnostics instead
  • In AuxStateHandler, always add failing instances and substitute this with instance variable

@rcosta358 rcosta358 self-assigned this Feb 26, 2026
@rcosta358 rcosta358 marked this pull request as draft February 26, 2026 11:00
@rcosta358 rcosta358 changed the title Context history Improvements Context History Improvements Feb 26, 2026
This is needed to use the annotation position to be able to suggested the variable we are refining in the autocomplete
@rcosta358 rcosta358 marked this pull request as ready for review February 28, 2026 18:49
@rcosta358 rcosta358 added the ide Together with the VS Code extension label Feb 28, 2026
This is because we want to show the failed variable instance in the context debugger and otherwise it is never added to the context. Not sure if this change is correct.
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.

1 participant