дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
Adds the Git Log Refresh action (Vcs.Log.Refresh) for Git Log and File History, bound to the Refresh shortcut (Ctrl+F5 on Windows/Linux, Cmd+R on macOS) and scoped to the log so other bindings keep the key elsewhere. The toolbar button and the action share one refresh path that keeps the current log while reloading, invalidates commit-detail caches for the visible repositories and is ignored while the log is already loading. Co-authored-by: muutot <[email protected]>
12 рядки
518 B
TypeScript
12 рядки
518 B
TypeScript
import { refreshLogDetails } from "./logDetails";
|
|
import { logState, reloadLog, useGitLog } from "./logStore";
|
|
import { useVcs } from "./store";
|
|
|
|
export function refreshLogView(id = useGitLog.getState().shownLog) {
|
|
if (logState(id).loading) return;
|
|
const tab = useGitLog.getState().logTabs.find((entry) => entry.id === id);
|
|
const roots = tab?.repositories?.length ? tab.repositories : tab?.repo ? [tab.repo] : useVcs.getState().roots;
|
|
void reloadLog({ preserve: true }, id);
|
|
void refreshLogDetails(roots);
|
|
}
|