Add files via upload

This commit is contained in:
公明 authored and GitHub committed 2026-08-15 01:59:13 +08:00
1 parent 01c0750d98
commit 964fbd6095
10 files changed
+1237

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package einomcp
import "sync"
// ConversationHolder 在每次 DeepAgent 运行前写入会话 ID,供 MCP 工具桥接使用。
type ConversationHolder struct {
mu sync.RWMutex
id string
}
func (h *ConversationHolder) Set(id string) {
h.mu.Lock()
h.id = id
h.mu.Unlock()
}
func (h *ConversationHolder) Get() string {
h.mu.RLock()
defer h.mu.RUnlock()
return h.id
}