fix(auto-slash-command): use event-ID dedup, align precedence, enforce skill agent gate

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
This commit is contained in:
YeonGyu-Kim
2026-03-16 13:53:12 +09:00
parent 67bb9ec1e2
commit 32a296bf1e
6 changed files with 231 additions and 40 deletions
@@ -24,7 +24,7 @@ function removeSessionEntries(entries: Map<string, number>, sessionID: string):
export interface ProcessedCommandStore {
has(commandKey: string): boolean
add(commandKey: string): void
add(commandKey: string, ttlMs?: number): void
cleanupSession(sessionID: string): void
clear(): void
}
@@ -38,11 +38,11 @@ export function createProcessedCommandStore(): ProcessedCommandStore {
entries = pruneExpiredEntries(entries, now)
return entries.has(commandKey)
},
add(commandKey: string): void {
add(commandKey: string, ttlMs = PROCESSED_COMMAND_TTL_MS): void {
const now = Date.now()
entries = pruneExpiredEntries(entries, now)
entries.delete(commandKey)
entries.set(commandKey, now + PROCESSED_COMMAND_TTL_MS)
entries.set(commandKey, now + ttlMs)
entries = trimProcessedEntries(entries)
},
cleanupSession(sessionID: string): void {