feat: add view:// protocol for read-only file viewing#2
Merged
Conversation
Implemented a new view:// protocol that acts as a liberal wrapper for file viewing with the following features: - Opens text files in VSCode with preview mode (read-only) - Opens binary files (PDFs, images, videos, etc.) with system default viewer - Shows error if file doesn't exist (doesn't create files like edit://) - Supports both standard markdown [text](view://path) and wiki-style [[view:path]] syntax - Handles paths flexibly with spaces, special characters, URL encoding - Works across all platforms (macOS, Windows, Linux) Binary file extensions supported: PDF, PNG, JPG, GIF, SVG, MP4, MP3, ZIP, and more. Updated documentation: - README.md with protocol comparison table and usage examples - CHANGELOG.md with new features - AGENTS.md with manual testing guidelines - Added TEST-RESULTS.md with implementation details and test plan - Added test-view-protocol.md with comprehensive test cases - Added test files for validation https://claude.ai/code/session_015oy2Dj4RFQhfTwVKBPRFch
- Set active editor to read-only via setActiveEditorReadonlyInSession (VS Code 1.79+) with graceful fallback for older versions - Add tests for view:// link detection (standard and wiki-style syntax) - Add test for view:// hover provider support - Remove committed test artifacts (TEST-RESULTS.md, test-view-protocol.md, test-files/) Co-Authored-By: Claude Opus 4.6 <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.
Implemented a new view:// protocol that acts as a liberal wrapper for file
viewing with the following features:
Binary file extensions supported: PDF, PNG, JPG, GIF, SVG, MP4, MP3, ZIP, and more.
Updated documentation:
https://claude.ai/code/session_015oy2Dj4RFQhfTwVKBPRFch