Commit Graph

1 Commits

  • [apply-patch] Fix lark grammar (#2651)
    ## Summary
    Fixes an issue with the lark grammar definition for the apply_patch
    freeform tool. This does NOT change the defaults, merely patches the
    root cause of the issue we were seeing with empty lines, and an issue
    with config flowing through correctly.
    
    Specifically, the following requires that a line is non-empty:
    ```
    add_line: "+" /(.+)/ LF -> line
    ```
    but many changes _should_ involve creating/updating empty lines. The new
    definition is:
    ```
    add_line: "+" /(.*)/ LF -> line
    ```
    
    ## Testing
    - [x] Tested locally, reproduced the issue without the update and
    confirmed that the model will produce empty lines wiht the new lark
    grammar