in either case, the wrap size for code inside an area with prompts should not have the same width as text wrapped elsewhere in the document - this is special to prompts.

Changing the cell style should not affect wrap_size. Instead, the wrap call inside the code cell should change based on prompt width, e.g.:

    cell.input | wrap(wrap_size - prompt_size)

So this entire if/elif block should be removed.