MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / formatRuntimeSection

Function formatRuntimeSection

src/utils/autonomyStatus.ts:114–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114async function formatRuntimeSection(): Promise<string> {
115 const daemon = queryDaemonStatus()
116 const sessions = await listLiveSessions()
117 const lines = [
118 `Daemon: ${daemon.status}${daemon.state ? ` pid=${daemon.state.pid} workers=${daemon.state.workerKinds.join(',')}` : ''}`,
119 `Background sessions: ${sessions.length}`,
120 ]
121 for (const session of sessions.slice(0, 8)) {
122 lines.push(
123 ` pid=${session.pid} kind=${session.kind} status=${session.status ?? 'unknown'} cwd=${session.cwd}`,
124 )
125 }
126 if (sessions.length > 8) {
127 lines.push(` ... ${sessions.length - 8} more session(s)`)
128 }
129 return lines.join('\n')
130}
131
132function formatAutoModeSection(): string {
133 let available = false

Callers 1

Calls 3

queryDaemonStatusFunction · 0.85
listLiveSessionsFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected