feat: preserve Jupyter MIME output in Streamlit

This commit is contained in:
lda
2026-08-31 00:52:34 +07:00 Verified
parent 6a8546cb0f
commit 0754cb2508
16 changed files with 1315 additions and 75 deletions
+3 -2
View File
@@ -6,8 +6,9 @@ from uuid import uuid4
from ..models import AppInfo, ShellInfo
from ..registry import ShellRegistry
from ..utils import generate_call_id
from .messages import ParsedJupyterMessage
from .shell import JupyterShell
from .transport import InputRequest, KernelMessage
from .transport import InputRequest
class JupyterApp:
@@ -74,7 +75,7 @@ class JupyterApp:
self,
code: str,
shell_name: str = "last",
) -> AsyncIterator[KernelMessage | InputRequest]:
) -> AsyncIterator[ParsedJupyterMessage | InputRequest]:
"""Execute code and yield its subprocess messages."""
_, shell = self._select_shell(shell_name)
call_id = self._new_call_id()