[codex] Add markdown preview content type#4475
Draft
TrueCrimeDev wants to merge 6 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>
Preview pipeline: Result/ResultViewModel/ResultsViewModel/MainViewModel plumbing, PreviewMarkdownScrollViewer + CodeHighlightTheme rendering, and Themes/MainWindow XAML for the pane. Image loading: ImageLoader, UWPPackage, Win32, and ShellLinkHelper icon/logo handling plus the mainsearch.png asset. Tests: preview, image loader, results VM, and UWP/Win32 program coverage. Co-Authored-By: Claude Opus 4.8 (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 pane with code highlighting and images, plus smarter preview suppression and icon/logo fallbacks for more reliable visuals. Default text previews remain unchanged.
Summary of changes
MdXaml; hides old chrome for markdown and lets code blocks own horizontal scrolling.hiddencontent); restores when selecting a normal result..lnkparsing handle COM/missing-path cases without noisy logs.PreviewContentTypenow supportstext,markdown, andhidden;Result.PreviewInfodefaults totext.PreviewMarkdownScrollViewerandCodeHighlightThemeto render markdown withAvalonEdithighlighting; normalized emphasis around code spans and rounded code-block frames.PreviewMarkdownStyleand a directAvalonEditpackage reference.contentType: "markdown"deserialization, image loading/fallbacks, UWP/Win32 logo resolution, and results collection updates.Release Note
You can now view rich Markdown (with code highlighting and images) in the preview panel; icons and app logos load more reliably, and text previews still work as before.
Written for commit b8cf3fa. Summary will update on new commits.