Skip to content

feat: add view:// protocol for read-only file viewing#2

Merged
nautat merged 2 commits intomainfrom
claude/add-view-protocol-KgRtQ
Feb 6, 2026
Merged

feat: add view:// protocol for read-only file viewing#2
nautat merged 2 commits intomainfrom
claude/add-view-protocol-KgRtQ

Conversation

@nautat
Copy link
Owner

@nautat nautat commented Jan 23, 2026

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 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

claude and others added 2 commits January 23, 2026 23:13
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>
@nautat nautat merged commit a1e3edd into main Feb 6, 2026
6 checks passed
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