Skip to main content

dialoghelper

Helper functions for solveit dialogs

Usage

Installation

Install from pypi

$ pip install dialoghelper

Documentation

Documentation can be found hosted on this GitHub repository’s pages.

Dialog identity and filenames

In a gateway kernel, dialoghelper reaches rustygate through a rustygate comm, so it needs no URL or token. Outside one, it sends plain HTTP to JUPYGATE_URL. Current-session reads, edits, and execution use dh_settings['kid'], initialized from JUPYGATE_KERNEL_ID. The gateway owns the notebook binding, and renames and restarts keep the kernel id.

Dialog names include .ipynb (added when omitted), and a trailing slash names a folder instead. Relative inputs such as lesson.ipynb resolve against the current dialog’s folder via the gateway; a leading slash, as in /project/lesson.ipynb, addresses the gateway root rather than the disk root. list_dialogs() defaults to the current notebook’s folder, retaining notebook extensions and marking folders with a trailing slash.

Folder-local skills

Solveit activates pyskills from the dialog’s opening folder before loading its tool layer. Put a public .py module or package in a _pyskills/ directory there or in an ancestor. Give it a module docstring. list_pyskills() discovers it and ordinary imports load it without an install or entry-point declaration. The nearest local folder wins. Changing cwd or moving a live dialog does not change the selected scope; restart its kernel to use the new location. Function permissions remain separate from discovery.

Development

The source notebooks contain the API explanations and examples. Their dialog operations require a disposable Solveit dialog. Rustygate’s suite tests message selection, conversion, import and mutation behavior.