fix(keyword-detector): show ultrawork toast on every activation

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2026-01-05 02:46:01 +09:00
parent 4bf853fc91
commit 6fd9734337

View File

@@ -6,8 +6,6 @@ export * from "./detector"
export * from "./constants"
export * from "./types"
const sessionUltraworkNotified = new Set<string>()
export function createKeywordDetectorHook(ctx: PluginInput) {
return {
"chat.message": async (
@@ -30,8 +28,7 @@ export function createKeywordDetectorHook(ctx: PluginInput) {
}
const hasUltrawork = detectedKeywords.some((k) => k.type === "ultrawork")
if (hasUltrawork && !sessionUltraworkNotified.has(input.sessionID)) {
sessionUltraworkNotified.add(input.sessionID)
if (hasUltrawork) {
log(`[keyword-detector] Ultrawork mode activated`, { sessionID: input.sessionID })
ctx.client.tui