fix: align discussion workspace and tool schemas

This commit is contained in:
zhi
2026-04-02 11:52:20 +00:00
parent 7bccb660df
commit 895cfe3bab
8 changed files with 88 additions and 10 deletions

View File

@@ -16,6 +16,18 @@ export const sessionChannelId = new Map<string, string>();
export const sessionAccountId = new Map<string, string>();
export const sessionTurnHandled = new Set<string>();
export const forceNoReplySessions = new Set<string>();
export const discussionChannelSessions = new Map<string, Set<string>>();
export function recordDiscussionSession(channelId: string, sessionKey: string): void {
if (!channelId || !sessionKey) return;
const current = discussionChannelSessions.get(channelId) || new Set<string>();
current.add(sessionKey);
discussionChannelSessions.set(channelId, current);
}
export function getDiscussionSessionKeys(channelId: string): string[] {
return [...(discussionChannelSessions.get(channelId) || new Set<string>())];
}
export function pruneDecisionMap(now = Date.now()): void {
for (const [k, v] of sessionDecision.entries()) {