MCPcopy Create free account
hub / github.com/echoVic/blade-code / getMemoryInfo

Method getMemoryInfo

src/context/storage/MemoryStore.ts:133–154  ·  view source on GitHub ↗

* 获取内存使用情况

()

Source from the content-addressed store, hash-verified

131 * 获取内存使用情况
132 */
133 getMemoryInfo(): {
134 hasData: boolean;
135 messageCount: number;
136 toolCallCount: number;
137 lastUpdated: number | null;
138 } {
139 if (!this.contextData) {
140 return {
141 hasData: false,
142 messageCount: 0,
143 toolCallCount: 0,
144 lastUpdated: null,
145 };
146 }
147
148 return {
149 hasData: true,
150 messageCount: this.contextData.layers.conversation.messages.length,
151 toolCallCount: this.contextData.layers.tool.recentCalls.length,
152 lastUpdated: this.contextData.metadata.lastUpdated,
153 };
154 }
155
156 /**
157 * 记录访问日志

Callers 1

getStatsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected