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

Method getRecentMessages

src/context/storage/MemoryStore.ts:54–62  ·  view source on GitHub ↗

* 获取最近的消息

(count: number = 10)

Source from the content-addressed store, hash-verified

52 * 获取最近的消息
53 */
54 getRecentMessages(count: number = 10): ContextMessage[] {
55 if (!this.contextData) {
56 return [];
57 }
58
59 const messages = this.contextData.layers.conversation.messages;
60 this.recordAccess('messages');
61 return messages.slice(-count);
62 }
63
64 /**
65 * 添加工具调用记录

Callers

nothing calls this directly

Calls 1

recordAccessMethod · 0.95

Tested by

no test coverage detected