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