[codex] Add markdown preview content type#4475
Draft
TrueCrimeDev wants to merge 5 commits into
Draft
Conversation
Pass null for the optional SHParseDisplayName attribute output pointer so the CsWin32 signature compiles with current generated bindings. Co-authored-by: Codex <noreply@openai.com>
Expose an opt-in PreviewContentType.Markdown value on Result.PreviewInfo and render markdown descriptions through MdXaml in the default preview pane while preserving text previews by default. Co-authored-by: Codex <noreply@openai.com>
Render markdown previews as the primary preview-pane content, resolve the MdXaml AvalonEdit code-block style at runtime, and normalize MdXaml's emphasized code-span output so valid markdown like **\code\** does not leak raw markers. Co-authored-by: Codex <noreply@openai.com>
Use explicit markdown visibility bindings for the standard preview icon, title, and description surfaces so markdown content is not rendered behind the old preview chrome. Disable the outer markdown horizontal scrollbar so code blocks own horizontal scrolling instead of the full preview pane. Co-authored-by: Codex <noreply@openai.com>
Wrap embedded AvalonEdit in a rounded Border (CornerRadius=6, SeparatorForeground 1px) and retint its syntax palette to softer Catppuccin Macchiato-inspired tones — cornflower methods, mauve keywords, mint strings, peach numbers, cream types. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PreviewContentTypetoResult.PreviewInfo, defaulting toTextfor existing plugins.PreviewContentType.Markdowndescriptions in the default preview pane with MdXaml and Flow theme resources.contentType: "markdown"deserialization.SHParseDisplayNameso the current generated bindings compile.Validation
dotnet build .\Flow.Launcher\Flow.Launcher.csproj --no-restore$env:DOTNET_ROLL_FORWARD='LatestMajor'; dotnet test .\Flow.Launcher.Test\Flow.Launcher.Test.csproj --no-restore --filter "FullyQualifiedName~ResultPreviewTest|FullyQualifiedName~JsonRPCPluginTest.GivenMarkdownPreviewContentType"$env:DOTNET_ROLL_FORWARD='LatestMajor'; dotnet test .\Flow.Launcher.Test\Flow.Launcher.Test.csproj --no-builddotnet build .\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj --no-restoreSummary by cubic
Adds a markdown preview option for result descriptions and renders it in the preview pane using
MdXaml. Hides the old preview chrome when markdown is active, polishes code-block visuals, and fixes emphasis/code rendering; text previews remain the default.Summary of changes
MdXamlbased onContentType; hide icon/title/description chrome when markdown.MdXamloutput to remove stray emphasis markers around code spans and apply bold/italic correctly.MdXaml/ICSharpCode.AvalonEditcode blocks at runtime; wrap editors in a rounded frame and retint syntax colors to a softer palette.SHParseDisplayNameout param.PreviewContentTypeenum (text,markdown) with JSON string serialization.Result.PreviewInfo.ContentType(defaults toText) and VM flagIsMarkdownPreview.PreviewMarkdownScrollViewerthat post-processes theFlowDocument.PreviewMarkdownStyle(headings, lists, links, code spans/blocks viaICSharpCode.AvalonEdit).AvalonEditpackage reference.FlowDocumenttraversal. No persistent allocations.ResultPreviewTest(defaults, lowercase enum serialization) andJsonRPCPluginTest(JSON-RPCcontentType: "markdown"deserialization).Release Note
You can now view rich, formatted markdown in the preview panel, with improved code block styling; regular text previews still work as before.
Written for commit e0201cb. Summary will update on new commits. Review in cubic