Skip to content

Add Prompt text with bullet layout and clipboard detection - #127

Merged
marcosqlbi merged 2 commits into
mainfrom
codex/prompt-text
Sep 16, 2026
Merged

marcosqlbi merged 2 commits into
mainfrom
codex/prompt-text

Conversation

@Alberto-Ferrari

Copy link
Copy Markdown
Collaborator

Summary

Add a Prompt text type for AI instructions so list items remain easy to read when they wrap, without changing the text that is copied, edited, or saved.

  • Display lines starting with - as bullets with hanging indentation, including space-indented lists. Keep the original markers editable and preserve the source text.
  • Carry the list layout into editable PowerPoint and vector PDF exports.
  • Automatically choose Prompt when pasted text is accompanied by SQLBI.PromptAssistant.Metadata.v1 containing UTF-8 {"type":"Prompt","version":1}. The explicit tag takes priority over snippet detection and accompanying images; missing, malformed, or unsupported metadata preserves ordinary paste behavior.
  • Keep the language unchanged when pasting into an existing editor, and document the new behavior.

Validation

  • Release solution build passed with zero warnings and errors.
  • Core smoke tests passed, including Prompt parsing and persistence.
  • WPF smoke tests passed, including wrapped-list layout, editor source preservation, export layout, and valid/invalid clipboard metadata representations.

Remaining manual check

Copy a prompt directly from Prompt Assistant and paste it onto the canvas to verify the cross-application clipboard transfer. Automated clipboard tests use WPF data objects without replacing the system clipboard. Prompt supports bullet-list layout, not full Markdown rendering.

@marcosqlbi
marcosqlbi merged commit eb1276f into main Sep 16, 2026
5 checks passed
@marcosqlbi
marcosqlbi deleted the codex/prompt-text branch September 16, 2026 16:07
marcosqlbi added a commit that referenced this pull request Sep 16, 2026
## Why

A `.wimport` that names a file with a space in it — `![short alt](./test
- Copy.svg)` — did not import the picture. Both the image and the link
pattern ended a destination at the first whitespace, so the section
matched neither and fell through to the last resort in `Recognize`: a
plain text container showing the raw Markdown. The file was never
opened, so it did not even appear in the missing-files dialog.

Strict CommonMark does require `<...>` around a destination with spaces,
and that form already worked. But a recipe names files on a Windows
disk, where a space in a name is ordinary, so the parser should accept
what the author typed.

## What changed

Both patterns now share one `Destination` fragment: the path runs to the
closing parenthesis, an optional `"title"` is recognized so it cannot be
swallowed into the path, and newlines are excluded so an unclosed
parenthesis cannot match across lines. A name containing `)` still needs
angle brackets, and `docs/wimport.md` now says so.

`![alt](./a.svg "Title")` works as a side effect; it previously fell
through to plain text as well.

This also bumps the version to 1.5.2. Its notes carry two entries,
because the Prompt text type merged in #127 without a version bump of
its own.

## Validation

- `dotnet build Whiteboard.sln -c Release` — 0 warnings, 0 errors
- Both smoke suites pass, with new coverage for a spaced name, the
angle-bracket form, and a link title
- The reported sample, `Test with space.wimport`, now resolves `test -
Copy.svg` (6126 bytes) as an image container, with no missing files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants