MCPcopy
hub / github.com/langchain-ai/deepagents / _show_whats_new

Method _show_whats_new

libs/code/deepagents_code/app.py:4395–4426  ·  view source on GitHub ↗

Show a 'what's new' banner on the first launch after an upgrade.

(self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

_mount_messageMethod · 0.95
AppMessageClass · 0.90
_build_whats_new_messageFunction · 0.85

Tested by

no test coverage detected