Файли
openidea/src/features/vcs/diffNavigator.ts
T
imacross 059fd8a69b feat(github): pull request tool window, timeline and review flow (#477)
Replaces the Pull Requests tool window with a full review workflow on top of gh's authentication.

- List with search, quick filters and paging; a tab per pull request and a New Pull Request tab.
- Details: commit picker, changes tree with viewed state, CI and reviewer status, merge, close and reopen.
- Timeline editor: comments, review threads, reactions and suggested changes.
- Review in the diff viewer and, for the checked-out branch, in the editor (review mode).
- New generic vcs extension points: registerDiffViewerProvider, lineInlays, reviewGutter, branch widget extensions; new vcs_merge_base and gh_api commands.
- CSP: img-src allows https://avatars.githubusercontent.com for avatars.

Fixed while testing against a real repository: remotes behind an SSH host alias, mergeability stuck on UNKNOWN, Apply Locally staying disabled after a checkout, relative links navigating the app's page, and review inlays wider than the pane.

Co-authored-by: imacross <[email protected]>
2026-10-31 07:50:43 +08:00

27 рядки
930 B
TypeScript

/** The focused diff editor's chunk navigation, for actions that must not load the diff editor. */
import type { DiffViewerHost } from "./diffViewerProviders";
export interface DiffNavigator {
next(): void;
prev(): void;
jumpToSource(): void;
/** Apply the change at the caret from the left side to the right (`a`) or back (`b`). */
applyChange(source: "a" | "b"): boolean;
/** Open the next / previous file of the diff chain (changes of a commit or change list). */
file(dir: 1 | -1): void;
/** The viewer's settings as a popup menu (⇧⌘D). */
showSettings(): void;
/** The built panes, for diff viewer contributions' actions (null while loading). */
viewer?(): DiffViewerHost | null;
}
let focused: DiffNavigator | null = null;
export function focusedDiffNavigator(): DiffNavigator | null {
return focused;
}
export function setFocusedDiffNavigator(nav: DiffNavigator | null) {
focused = nav;
}