loadLogEntries function exported ✓ 100.0%
Last updated: 2026-03-01T23:25:47.125Z
Location
Metrics
LOC: 14
Complexity: 4
Params: 0
Coverage: 100.0% (7/7 lines, 3x executed)
Signature
loadLogEntries(): : Promise<LogEntry[]>
Summary
Loads entries from chrome.storage.session (useful for late-opening UIs).
Source Code
export async function loadLogEntries(): Promise<LogEntry[]> {
if (!hasSessionStorage()) return localEntries;
try {
const result = await chrome.storage.session.get(STORAGE_KEY);
const stored = result[STORAGE_KEY] as LogEntry[] | undefined;
if (Array.isArray(stored)) {
localEntries = stored.slice(-maxEntries);
}
} catch {
// Ignore — use local entries
}
return localEntries;
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| hasSessionStorage | calls |
| STORAGE_KEY | dynamic_call |
Impact (Incoming)
| Source | Type |
|---|---|
| LogViewerVariant | uses |
| refresh | calls |