Control when cell output is cleared - is it possible with extension?

Is it possible to create extension that will change when cell output is cleared during execution?

I would like to change how cell output is cleared when execute is called on CodeCell. I would like to clear output just before the first new output is available.

I see that OutputAreaModel has clear(wait: boolean = false) method, can I set wait somehow? Link to code jupyterlab/packages/outputarea/src/model.ts at eff7d42d5437a1f7eef6ab88d96406c5eb5ec2c5 · jupyterlab/jupyterlab · GitHub

you might need subclassing outputarea and override methods

1 Like