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

Function setSessionTitle

src/bridge/bridgeUI.ts:504–517  ·  view source on GitHub ↗
(sessionId: string, title: string)

Source from the content-addressed store, hash-verified

502 },
503
504 setSessionTitle(sessionId: string, title: string): void {
505 const info = sessionDisplayInfo.get(sessionId)
506 if (!info) return
507 info.title = title
508 // Guard against reconnecting/failed — renderStatusLine clears then returns
509 // early for those states, which would erase the spinner/error.
510 if (currentState === 'reconnecting' || currentState === 'failed') return
511 if (sessionMax === 1) {
512 // Single-session: show title in the main status line too.
513 currentState = 'titled'
514 currentStateText = truncatePrompt(title, 40)
515 }
516 renderStatusLine()
517 },
518
519 removeSession(sessionId: string): void {
520 sessionDisplayInfo.delete(sessionId)

Callers

nothing calls this directly

Calls 2

renderStatusLineFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected