MCPcopy Index your code
hub / github.com/conwnet/github1s / commandDiffChangedFile

Function commandDiffChangedFile

extensions/github1s/src/commands/editor.ts:28–37  ·  view source on GitHub ↗
(fileUri: vscode.Uri)

Source from the content-addressed store, hash-verified

26// open the diff editor of a file, such as click it in source-control-panel,
27// only work when we can found the corresponding file in source-control-panel
28const commandDiffChangedFile = async (fileUri: vscode.Uri) => {
29 const changedFile = await getChangedFileFromSourceControl(fileUri);
30
31 if (!changedFile) {
32 return;
33 }
34
35 const command = await getChangedFileDiffCommand(changedFile);
36 vscode.commands.executeCommand(command.command, ...(command.arguments || []));
37};
38
39const openFileToEditor = async (fileUri) => {
40 const isCurrentAuthority = fileUri.authority === (await router.getAuthority());

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected