5 min read
Code Editor
The Explorer: a Monaco code editor in the browser that runs Python and JavaScript, with a terminal, live training metrics, search and built-in git.
The workbench
The Explorer is built on Monaco, the editor behind VS Code. Its header names the project and where it is kept (in a folder on your computer, or in this browser) and holds what a run needs: the dataset, the runtime and Run. Files are on the left, the editor in the middle (it splits in two from the end of the tab strip), and the dock underneath.
Running code
Run (Ctrl Shift R, ⌘R on a Mac) runs the open file:
- JavaScript and TypeScript that use TensorFlow.js run in a TF.js worker, on WebGPU when the browser offers it. Other scripts run in a sandboxed worker.
- Python files and Jupyter notebooks run in Pyodide, a CPython build compiled to WebAssembly, or on a Jupyter kernel you attach.
The runtime pill in the header says which runtime the open file goes to and whether it is ready, and for TF.js which GPU the browser gave it. The dataset pill picks the Data Hub dataset a run receives as hubData (one object per row), with dataHeaders and dataName. It follows the project's active dataset, as the Model Builder does, and is read when a run starts. With a dataset chosen, hubData in the editor's path bar inserts a snippet that reads it, in JavaScript or Python.
The dock
Under the editor, one line says what the runner is doing: the epoch and loss while a model trains, how the last run ended, or what Run will do next. Its tabs hold:
- Terminal: a shell for the project.
nodeandpythonrun a file,pythonalone starts a REPL,pip installinstalls a package, andls,catandnpmwork as you'd expect.helplists everything. - Output: the last run's output, with the figures it draws (matplotlib). When a Python run can't import a package, Output offers to install it.
- Metrics: loss and accuracy by epoch, from what the script prints (
Epoch 3/20 … loss: 0.41) or reports withdlway.reportMetrics(). - Problems: what the editor finds in the open files, plus the browser's Python syntax check. Click one to go to it.
- Resources: the page's memory, TF.js tensors and GPU memory, the GPU adapter, and what the open file's model needs.
- Packages: Python packages installed with pip, into Pyodide or the attached kernel. npm packages are recorded but not downloaded: the browser sandbox gives
require()TensorFlow.js and the project's own files.
Working with files
The Files panel shows the project's tree. A dot marks unsaved changes and a letter marks what git sees since the last commit. You can filter the tree, make files and folders, rename with F2, and delete (it asks first). Open a folder from your computer and saving writes back to it. A project kept in the browser can move to a folder with Keep in a folder…, and from then on saving writes there and trained models go to its models/ folder. DLWAY mirrors the project to a .dlway/project.json manifest so its state survives a refresh.
Search, source control and Copilot
While the Explorer is open, the sidebar shows its own tools: search across files, source control, and the AI Copilot.
Themes and file icons
The palette button in the Explorer's header opens Appearance, with two lists. A choice applies as you make it, and the arrow keys move through a list, so the Explorer itself is the preview.
- Colour theme: Dracula, One Dark, Tokyo Night, Nord, GitHub Dark and Light, Monokai, Catppuccin Mocha and Latte, Night Owl, Gruvbox Dark, Solarized Light, and DLWAY's own dark and light. A theme colours the code and everything around it in the Explorer: the panels, tabs, dock, menus and Copilot. The rest of the Studio keeps its own light or dark mode, and Match Studio, the default, makes the Explorer follow it.
- File icons: DLWAY's language badges, plain line icons, or one of three icon packs from VS Code: Material Icon Theme, Catppuccin Icons and Symbols. A pack gives files and named folders (
src,data,tests…) their own icons in the tree, on tabs, and wherever else a file is named.
The same lists are in Settings → Appearance, and in the command palette as Explorer: Color Theme… and Explorer: File Icon Theme…. The choice is kept in this browser. The icon packs are their authors' work, used under the MIT licence.
More
See Keyboard shortcuts for every key binding, and Remote compute to run Python on a Jupyter or Kaggle kernel instead of in the browser.