MCPcopy Index your code
hub / github.com/codeaashu/claude-code / loadSameRepoMessageLogsProgressive

Function loadSameRepoMessageLogsProgressive

src/utils/sessionStorage.ts:4086–4108  ·  view source on GitHub ↗
(
  worktreePaths: string[],
  limit?: number,
  initialEnrichCount: number = INITIAL_ENRICH_COUNT,
)

Source from the content-addressed store, hash-verified

4084}
4085
4086export async function loadSameRepoMessageLogsProgressive(
4087 worktreePaths: string[],
4088 limit?: number,
4089 initialEnrichCount: number = INITIAL_ENRICH_COUNT,
4090): Promise<SessionLogResult> {
4091 logForDebugging(
4092 `/resume: loading sessions for cwd=${getOriginalCwd()}, worktrees=[${worktreePaths.join(', ')}]`,
4093 )
4094 const allStatLogs = await getStatOnlyLogsForWorktrees(worktreePaths, limit)
4095 logForDebugging(`/resume: found ${allStatLogs.length} session files on disk`)
4096
4097 const { logs, nextIndex } = await enrichLogs(
4098 allStatLogs,
4099 0,
4100 initialEnrichCount,
4101 )
4102
4103 // enrichLogs returns fresh unshared objects — safe to mutate in place
4104 logs.forEach((log, i) => {
4105 log.value = i
4106 })
4107 return { logs, allStatLogs, nextIndex }
4108}
4109
4110/**
4111 * Gets stat-only logs for worktree paths (no file reads).

Callers 2

loadSameRepoMessageLogsFunction · 0.85
ResumeConversationFunction · 0.85

Calls 5

logForDebuggingFunction · 0.85
getOriginalCwdFunction · 0.85
enrichLogsFunction · 0.85
forEachMethod · 0.80

Tested by

no test coverage detected