Quote a source range into an existing field - #76
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A draft holds no command that writes an existing field from the source.
question add,part addandquestion solutioncreate a field from a range;field replacechanges wording inside a field and takes its new text from the command line. So whenvalidatereportsq4.text (lines 32-33) is emptybecause the spec matched the label lineQ4alone, the only repair a caller has isfield replace q4.text '^$' TEXT --regex, which types TEXT out at layer 4 with no range. The agent's fix loop did that on UCL_MechEng/Worksheet_2.pdf and typed a sentence the source does not hold.Add
in2lambda draft field set KEY --text RANGE [--by NAME]in in2lambda.draft: it quotes RANGE (block id,s5,s5:8, or2/b3for a second source) into the existing field KEY at layer 3 withrangesset andeditedfalse, the same waypart add --textquotes a range, and refuses a KEY that is not a field of the draft. It is logged and replayed like every other command, the overlap check counts its range, and--literal TEXTis not an option here:field replaceis the command for typed text. Add it to the command table in docs/source/drafts.md and the CLI reference, and a test in tests/test_draft.py that sets an empty question text from a paragraph block and replays.Done when
in2lambda draft field set q4.text b12fills an empty field with the block's text and the ranges of that block, the replay test passes, and the docs list the command.Workbench ticket t50.