Skip to content

Add terminalDisposed Signal to ILiteTerminalAPIClient#74

Merged
ianthomas23 merged 1 commit intomainfrom
terminal-disposed-signal
Oct 9, 2025
Merged

Add terminalDisposed Signal to ILiteTerminalAPIClient#74
ianthomas23 merged 1 commit intomainfrom
terminal-disposed-signal

Conversation

@ianthomas23
Copy link
Member

Add terminalDisposed Signal to ILiteTerminalAPIClient, which is emitted when a terminal/shell is disposed and it passes the terminal name which is the same as the cockle.Shell shellId. Can be used something like this:

liteTerminalAPIClient.terminalDisposed.connect((_, name) => console.log(`${name} disposed!`));

The use case for this is a JupyterLite extension that contains a cockle external command. The same command would be used for all opened terminals but it is possible that the command would want to cache some information on a per-terminal basis, and this signal can be used to identify when cached information for a particular terminal can be deleted.

It is possible that it might also be useful to have another new signal for a terminal being created, but I don't yet have a real use case for this so it is not included here.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Oct 9, 2025
@github-actions
Copy link

github-actions bot commented Oct 9, 2025

@ianthomas23 ianthomas23 merged commit d8f4b1c into main Oct 9, 2025
13 checks passed
@ianthomas23 ianthomas23 deleted the terminal-disposed-signal branch October 9, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant