microsoft / azure-devops-extension-sdk

Client SDK for developing Azure DevOps extensions
MIT License
122 stars 38 forks source link

ms.vss-code-web.content-renderer-collection gets binary rawContent passed as UTF-8 - Data loss #65

Open SennAlna opened 1 year ago

SennAlna commented 1 year ago

I registered an extension to the Repos/File/Preview-Pane to display some binary filecontent using this extensionpoint:

"type": "ms.vss-code-web.content-renderer",
            "description": "MyBinHexDisplay",
            "targets": [
                "ms.vss-code-web.content-renderer-collection"
            ],

Everything works ok, but the callback-method renderContent(rawContent, options) is being called by havin rawContent containing a string and UTF-8 encoded, which causes in data loss, because higher binarydata is just being skipped by encoder.

How can I retreive the git-file´s correct binary content? When being called my extension does not know the path or current selection of that item. Just the rawItem.

Thanks for help