[ANN] Dialog IDE 0.5.1

Source code: GitHub - hlship/dialog-ide: A full-featured IDE for the Dialog interactive fiction language · GitHub

So, interesting story here.

I got frustrated at how hard getting dialog-tool working on Windows and Linux was. I mean, I love the command line, and I had a lot of fun building, and rebuilding, and re-re-building dialog-tool and the Skein.

But I want to share it with others.

So I fired up Claude Code w/ Sonnet, on my own dime, and went to town over the last few days.

And now we have a first cut at Dialog IDE: it’s the Skein running inside Visual Studio Code.

It’s an extension, you can install it with a couple of clicks. Is it fully cross-platform? It’s supposed to be.

Does it do everything dialog-tool does? Nearly, especially in terms of the Skein. It does some things better. It has a few gaps I’ll fill.

It’s now dialog.json instead of dialog.edn … it’s all written in JavaScript and TypeScript, so that makes sense, and is easier to manage for both users and code.

What’s already present:

  • Run project in debugger
  • Create a new Skein
  • Run an existing Skein
  • All the Skein functionality present in dialog-tool

Not yet present:

  • Running unit tests
  • Creating a new project
  • Compiling or exporting the project
  • dfrotz engine for the Skein
  • Documentation

Those will come together pretty quickly, I think.

Visual Studio Code provides all the code editing, find-and-replace, Git operations, etc., etc., etc. Add the Skein and you are looking at nearly all the functionality that Inform 7 has. Add in the Skein’s dynamic state tracking and the trace view, and you go way beyond what Inform 7 provides.

Does it offer syntax highlighting and an outline of the file structure showing where each rule appears? The Skein is nice, but that’s something I’ve really wanted in an IDE.

Not yet. Those features can be added quickly, since they are more standard to VSC, which makes it easier for Sonnet to do the work.

Syntax highlighting comes from the Dialog Language Support that is a dependency of Dialog IDE.

I was envisioning “jump to topic” as well as that’s what I normally care about, since mostly rules are grouped under a topic.

Right now, I’d love it if some windows and linux folks could install it and verify that it works.

Also, I haven’t checked out the dark mode yet! It’s funny, I use dark mode for my terminals, but light mode for everything else.

I am a Visual Studio end user and have been for 30 years. If you could make an extension for Visual Studio I’d gladly try it out. Visual Studio code does not do everything I need in my IDE. I’m currently using WinForms and am looking at Avalonia for cross platform UI. Avalonia works very nicely in Visual Studio from the parts I’ve experimented with, which really is building the samples to ensure the packages are all installed.

That’s not something I’m likely to take on for a bit. Perhaps I’ll see if Claude can do that translation, but I have no knowledge at all of Visual Studio’s extension mechanism.

Version 0.0.2

  • Rewrote README.md for end users, covering the Skein workflow, keyboard shortcuts, and project setup
  • Moved developer-facing content into technical-design.md
  • Nav graph connectors now use an orthogonal elbow instead of a bezier curve
  • Nav graph’s expand/collapse control is now a larger boxed +/- icon with an opaque interior
  • Outline view (and breadcrumbs, Ctrl+Shift+O) for .dg source files
  • Workspace-wide “Go to Symbol” (Ctrl+T/Cmd+T) across all .dg source files
  • Editing/adding/deleting .dg sources or dialog.json now restarts dgdebug on the next command
  • Warn when a newly created .dg file isn’t covered by any dialog.json source
  • Vendored .dg syntax highlighting/folding/indentation, dropped the sideburns3000.dialog-language-support dependency
  • A custom .dg file icon

This is a more credible release, especially with the outline view and Go to Symbol support.

I think next I’ll be working on a new project wizard of some kind, and export support.

I’m also going to look into packaging the necessary tools (dgdebug, dialogc, aambundle, and dfrotz) with the plugin so no outside install will be necessary.

Version 0.1.0

Changes:

  • Bundle the Dialog toolchain (dgdebug/dialogc) and AAmachine (aambundle) with the extension on Windows, Apple Silicon Macs, and Linux (x64), so most users no longer need to install either separately; other platforms still resolve via PATH or dialog.json’s binDir, which always takes priority
  • “Initialize Dialog Project” command: scaffolds dialog.json, main/lib/debug/test directories, a starter main/main.dg, bundled copies of the standard libraries (stdlib.dg/stddebug.dg/unit.dg), a placeholder cover.png, and the two “how to play IF” PDFs used by “Export Web Page…” into an open, empty workspace folder
  • “Configure Exports…” and “Export Dialog Project…” commands: define named export configurations (output format, whether to include debug sources, output path, extra dialogc options such as --heap/–aux) in dialog.json, then compile a .zblorb/.z8/.aa game file via dialogc; a zblorb export bakes in the project’s cover.png, if present. “Configure Exports…” also sets a project-wide default set of dialogc options, used by any export configuration that doesn’t specify its own, and by “Export Web Page…”
  • “Export Web Page…” command: builds every one of the project’s targets plus an AAmachine in-browser player, and assembles a downloadable web page (cover thumbnail, story file downloads, “how to play IF” PDFs, an optional walkthrough from default.skein) into out/web/ plus a zip; deleting a PDF (or cover.png) from the project root simply omits it from the exported page rather than erroring
  • “Run Tests” command: runs dgdebug in a terminal with the main/debug/test source categories all active, so test’s own lib/unit.dg overrides (program entry point) and runs the project’s (test *)-trait objects; dgdebug drops into its own debug prompt once the tests finish (rather than quitting immediately), so the pass/fail output stays visible; re-running the command replaces the previous run’s terminal instead of opening a new tab each time

Version 0.2.0

  • Run the Skein using frotz/frotz-release (dfrotz) as the engine - requires dfrotz on PATH or binDir (not yet bundled)
  • “Initialize Dialog Project” no longer asks for target format(s); removed dialog.json’s target field
  • “Export Web Page…” now asks which export configuration builds the downloadable story file, instead of building every target
  • ⌘⇧A / Ctrl+Shift+A now opens the Command Palette while the Skein or Trace panel has focus
  • A labeled knot is now treated as locked (can’t be deleted) even if never explicitly locked
  • Export commands’ post-export notification now says “Reveal in Finder” on macOS instead of “Reveal in Explorer”
  • Fixed the nav graph’s expand/collapse icon drifting off its connector line for a small/narrow skein

Version 0.3.0

  • “Export Web Page…”'s attachments (“feelies”, e.g. the “how to play IF” PDFs) are now configurable via dialog.json’s feelies array, instead of a hardcoded pair of filenames; “Add Feelie…” (also available via right-click in the Explorer) and “Remove Feelie…” commands manage them. A configured feelie whose file is missing is now an export error, not a silent omission
  • Command input (new commands and “Edit Command…”) now lowercases and collapses consecutive whitespace, not just trims
  • “Edit Command…” and “Insert Parent…” no longer reject a command that collides with an existing sibling - the two knots merge instead (recursively, through matching descendants), keeping the merged knot locked/labeled if either side was
  • Warn when dialog.json declares the same source file in more than one category (or twice in one), since Dialog would compile it twice - new dialog-ide.warnOnDuplicateSource setting

I’m curious about who has used Dialog IDE and what kind of results have you gotten?

Version 0.4.0

  • Nav graph: zoom in/out via mouse wheel (centered on the cursor) or new bottom-right +/- buttons
  • Knots can carry one of four color markers (actions menu), shown next to the label chip and persisted in the .skein file; navbar filter buttons show only knots with a chosen marker (or a marked descendant)
  • Prompt to reload the active session’s .skein file when it changes on disk outside Dialog IDE
  • “Export Web Page…”'s story-metadata query (title/author/IFID/etc.) now also respects .dgdebug.dg/..dg source-suffix filtering, matching every other dgdebug launch - a source meant only for a specific export format could previously leak into it

This code is open source:

I was able to install it and create a new skein. I get the first page of the game’s output appear in the rightmost panel, and I can type a command into the text entry area at the bottom, but when I press enter, nothing happens: no new game text is generated, no knot is added in the area to the left, the text doesn’t even disappear from the text entry window. I assume this is not the intended behaviour?

Nope, you should be seeing the game play in the transcript, much as you would if running in dgdebug, with the navigation graph growing on the left side. I just did a quick sanity check to make sure that it’s working … even though Sonnet has written like 900 tests!

What platform are you on?

You can get a lot of information about what’s going on by running the command “Developer: Open Webview Developer Tools”, including the dialogc commands running, each individual command you type, and so forth.

i have installed and played around with it but haven’t gotten very far. honestly, it’s because i’m not a programmer and know nothing about json and the documentation seems more addressed to programmers rather than to folks like my self who just make IF. so the whole thing is over my head. for instance, i could never successfully set up my initial setup scaffold. examples would be helpful.

Thanks for trying! I’ve been waiting for the functionality to settle down before making the big effort on documentation … gathering screen shots and organizing the documentation is a lot of work.

If you are starting with an existing project, you need to know a little bit to get started and organize things. If you are starting fresh, it should be easier, as the defaults are baked into Dialog IDE.

It is absolutely my intention to lower the barrier to entry for non-programmers to use Dialog … but Dialog is still much more of a programmer’s tool than Inform 7 is — most noticeably when first getting started (in my opinion, Inform 7 becomes very difficult when you graduate from tutorials to trying to get actual work done in it, whereas Dialog stays pretty level for most things).

In any case, I’m eager to help, but information I’ll always need is your environment (Windows vs. OS X vs. Linux).

I’m installing windows into a VM to try and diagnose these problems. Maybe I’ll try Linux later.

… and I’m finding some actual bugs. I’ve duplicated your failure (type in the text field, nothing happens).

Version 0.4.1

  • Fix dialog.json’s binDir being ignored when set to a relative path (e.g. “bin”) - it’s now resolved against the project root like source entries, instead of the extension host’s own working directory
  • Fix a script-load race that could break the Skein/Trace webview on startup (“sk is not defined”) - each page now loads a single skein-loader.js/trace-loader.js entry point whose static imports guarantee main.js/trace.js finish before datastar.js runs, instead of relying on <script> tag order

0.5.0 is coming soon; it adds the ability to install a dgbuild command that can emit the list of sources, run unit tests, and run skeins … basically, a subset of what dgt does. This is intended for expert users and/or GitHub actions and the like.

Currently, I’m just hung up straightening out an authentication issue for npmjs.com.

All of this Dialog IDE stuff has been interesting, mostly vibe coding (I don’t really look at the code and tests), but also really leveraging my experience when things are broken and Sonnet (the LLM model) can’t figure it out. It’s a strange world we live in.