Show a 'what's new' banner on the first launch after an upgrade.
(self)
| 4393 | ) |
| 4394 | |
| 4395 | async def _show_whats_new(self) -> None: |
| 4396 | """Show a 'what's new' banner on the first launch after an upgrade.""" |
| 4397 | try: |
| 4398 | from deepagents_code.update_check import should_show_whats_new |
| 4399 | |
| 4400 | if not await asyncio.to_thread(should_show_whats_new): |
| 4401 | return |
| 4402 | except Exception: |
| 4403 | logger.debug("What's new check failed", exc_info=True) |
| 4404 | return |
| 4405 | |
| 4406 | try: |
| 4407 | from deepagents_code._version import __version__ as cli_version |
| 4408 | from deepagents_code.config import _is_editable_install |
| 4409 | |
| 4410 | if await asyncio.to_thread(_is_editable_install): |
| 4411 | heading = f"Now running v{cli_version}" |
| 4412 | else: |
| 4413 | heading = f"Updated to v{cli_version}" |
| 4414 | |
| 4415 | await self._mount_message(AppMessage(_build_whats_new_message(heading))) |
| 4416 | except Exception: |
| 4417 | logger.debug("What's new banner display failed", exc_info=True) |
| 4418 | return |
| 4419 | |
| 4420 | try: |
| 4421 | from deepagents_code._version import __version__ as cli_version |
| 4422 | from deepagents_code.update_check import mark_version_seen |
| 4423 | |
| 4424 | await asyncio.to_thread(mark_version_seen, cli_version) |
| 4425 | except Exception: |
| 4426 | logger.warning("Failed to persist seen-version marker", exc_info=True) |
| 4427 | |
| 4428 | async def _handle_update_command(self, command: str = "/update") -> None: |
| 4429 | """Handle the `/update` slash command — check for and install updates. |
nothing calls this directly
no test coverage detected