feat(editor): Keyboard shortcuts for the log view (#15378)

This commit is contained in:
Suguru Inoue
2025-05-16 13:54:25 +02:00
committed by GitHub
parent de4c5fc716
commit 1935e62adf
40 changed files with 649 additions and 435 deletions

View File

@@ -580,6 +580,16 @@ export function flattenLogEntries(
return ret;
}
export function getEntryAtRelativeIndex(
entries: LogEntry[],
id: string,
relativeIndex: number,
): LogEntry | undefined {
const offset = entries.findIndex((e) => e.id === id);
return offset === -1 ? undefined : entries[offset + relativeIndex];
}
function sortLogEntries<T extends { runData: ITaskData }>(a: T, b: T) {
// We rely on execution index only when startTime is different
// Because it is reset to 0 when execution is waited, and therefore not necessarily unique