Skip to content

Conversation

ianthomas23
Copy link
Member

This PR identifies when there is a theme change in JupyterLite and passes that information on to cockle so that it can modify the prompt color, etc, in response. There are two possible sources of theme change, the first is the terminal theme and the second is the app theme, which only causes a change in the terminal if the terminal theme is set to 'inherit'.

Uses cockle 0.1.3 as that is the first release to support IShell.themeChange.

Upon the next cockle release we will also be able to pass the optional isDarkMode boolean flag in LiteTerminalAPIClient.themeChange that was introduced in jupyterlite/cockle#232.

Have updated the typescript version as otherwise see a compilation error in lib0.

cockle does not do much with this information yet, only changing the color of the prompt and of shell error messages. But once the framework is in place for this, it will be simple to expand in future.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Jul 29, 2025
Copy link

vercel bot commented Jul 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jupyterlite-terminal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 3:37pm

@ianthomas23 ianthomas23 merged commit 7d75192 into main Jul 30, 2025
10 checks passed
@ianthomas23 ianthomas23 deleted the cockle-0.1.3-themeChange branch July 30, 2025 08:15
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