Skip to content

tutorial() opens an empty window #156

Description

@DasOhmoff

Hey, I think tutorial() has conflicting prompt instructions right now.

Steps to reproduce

  1. Use 99 and trigger tutorial()
  2. Give it a normal prompt that should produce a Markdown tutorial
  3. The request completes, but the tutorial window is empty

Expected behavior

tutorial() should write a Markdown tutorial to TEMP_FILE, and the opened tutorial window should show that content.

Actual behavior

Sometimes TEMP_FILE ends up empty, and tutorial() still opens a blank window.

Cause

tutorial() asks for a tutorial in Markdown, but 99 also reuses the generic temp-file rule that says things like:

  • Return only the code.
  • ONLY provide requested changes by writing the change to TEMP_FILE
    never provide the requested changes as conversational output. Return only the code.

That seems fine for visual/search-style code edits, but not for tutorials. A tutorial is not code, so the instructions conflict.

What fixed it for me

I patched my local config so that tutorial() uses a tutorial-specific temp-file rule instead, f.e.:

NEVER alter any file other than TEMP_FILE.
never provide the tutorial as conversational output.
ONLY provide the tutorial by writing valid Markdown to TEMP_FILE.

After that, tutorial() stopped opening empty windows on my machine.

Suggested fix

Use a tutorial-specific temp-file rule instead of the shared code-edit rule.

Thanks for this nice plugin.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions