Skip to content

Navigation Menu

Sign in
Sign up

Enable Launch Protein Viewer from File(s) for terminal-opened/remote files - #44

Draft
a-r-j with Copilot wants to merge 3 commits into
main from
copilot/open-local-files-terminal
Draft

Enable Launch Protein Viewer from File(s) for terminal-opened/remote files #44
a-r-j with Copilot wants to merge 3 commits into
main from
copilot/open-local-files-terminal

Conversation

Copilot AI commented May 22, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Launch Protein Viewer from File(s) previously depended on Explorer context selection, so it could not reliably open files that were opened via integrated terminal workflows (including remote files outside watched workspace paths). This update makes command-palette invocation work against the active editor file when no Explorer selection is present.

  • Command fallback behavior

    • Updated protein-viewer.activateFromFiles to resolve inputs in this order:
      1. selectedFiles (Explorer multi/single selection)
      2. file_uri (single URI invocation)
      3. vscode.window.activeTextEditor.document.uri (command-palette/terminal-opened file flow)
    • Shows a user-facing error when no resolvable file exists, instead of attempting to render with empty input.
  • Documentation

    • Added README guidance for opening files from integrated terminal (including remote sessions) and then invoking Launch Protein Viewer from File(s) from the command palette.
  • Code hygiene in touched path

    • Removed debug logging from the file activation command path.
const filesToOpen = selectedFiles && selectedFiles.length > 0
 ? selectedFiles
 : file_uri
 ? [file_uri]
 : vscode.window.activeTextEditor
 ? [vscode.window.activeTextEditor.document.uri]
 : [];
if (filesToOpen.length === 0) {
 void vscode.window.showErrorMessage("No structure file selected or active.");
 return;
}
ProteinViewerPanel.renderFromFiles(context.extensionUri, filesToOpen);

0ut0fcontrol reacted with eyes emoji
Copilot AI linked an issue May 22, 2026 that may be closed by this pull request
Copilot AI changed the title (削除) [WIP] Add ability to open remote files using terminal (削除ここまで) (追記) Enable Launch Protein Viewer from File(s) for terminal-opened/remote files (追記ここまで) May 22, 2026
Copilot AI requested a review from a-r-j May 22, 2026 20:26
Copilot finished work on behalf of a-r-j May 22, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@a-r-j a-r-j Awaiting requested review from a-r-j

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Open local files using terminal

2 participants

AltStyle によって変換されたページ (->オリジナル) /