MCPcopy Create free account
hub / github.com/cortexkit/magic-context / readSessionMetaStatus

Function readSessionMetaStatus

packages/pi-plugin/src/status-line.ts:107–120  ·  view source on GitHub ↗
(
	db: ContextDatabase,
	sessionId: string,
)

Source from the content-addressed store, hash-verified

105}
106
107function readSessionMetaStatus(
108 db: ContextDatabase,
109 sessionId: string,
110): SessionMetaStatus | undefined {
111 try {
112 return db
113 .prepare<[string], SessionMetaStatus>(
114 "SELECT compartment_in_progress, historian_failure_count, historian_last_failure_at FROM session_meta WHERE session_id = ?",
115 )
116 .get(sessionId);
117 } catch {
118 return undefined;
119 }
120}
121
122function resolveSessionId(ctx: ExtensionContext): string | undefined {
123 const getSessionId = (

Callers 1

renderStatusTextFunction · 0.85

Calls 2

getMethod · 0.80
prepareMethod · 0.45

Tested by

no test coverage detected