Skip to content

[Bug]: AI TODO solver receives empty context #177

Description

@MarcusMa06-code

Bug description

PieInfoHook in src/pie-interpreter/typechecker/utils.ts (lines 20–41) passes an empty Map to the LLM-based TODO solver instead of the actual type-checking context. As a result, the AI has no knowledge of any in-scope variables or definitions when attempting to fill holes.

Steps to reproduce

  1. Write a Pie program with a TODO hole inside a definition that uses local bindings.
  2. Trigger the AI hole-filler (via the web UI or LSP).
  3. Observe that the suggestion ignores all in-scope variables.

Expected behaviour

The TODO solver should receive the full serialized context so it can suggest valid terms using available variables and definitions.

Environment

No response

Additional info.

The comment in the source reads: // TODO: Properly deserialize SerializableContext to Context. A proper fix requires implementing context deserialization before passing it to the solver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions