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

Function getBranchFromSession

src/utils/teleport/api.ts:334–342  ·  view source on GitHub ↗
(
  session: SessionResource,
)

Source from the content-addressed store, hash-verified

332 * @returns The first branch name, or undefined if none found
333 */
334export function getBranchFromSession(
335 session: SessionResource,
336): string | undefined {
337 const gitOutcome = session.session_context.outcomes?.find(
338 (outcome): outcome is GitRepositoryOutcome =>
339 outcome.type === 'git_repository',
340 )
341 return gitOutcome?.git_info?.branches[0]
342}
343
344/**
345 * Content for a remote session message.

Callers 2

teleportFromSessionsAPIFunction · 0.85
pollRemoteSessionEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected