25 lines · 720 B · TypeScript
RawDownload
import type { ScopedThreadRef } from "@t3tools/contracts"; import { useRightPanelStore } from "./rightPanelStore";import { resolvePathLinkTarget } from "./terminal-links"; interface OpenDiffFilePrimaryActionInput {  readonly threadRef: ScopedThreadRef | null;  readonly filePath: string;  readonly activeCwd: string | undefined;  readonly openInEditor: (targetPath: string) => void;} export function openDiffFilePrimaryAction({  threadRef,  filePath,  activeCwd,  openInEditor,}: OpenDiffFilePrimaryActionInput): void {  if (threadRef) {    useRightPanelStore.getState().openFile(threadRef, filePath);    return;  }   openInEditor(activeCwd ? resolvePathLinkTarget(filePath, activeCwd) : filePath);}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t