Skip to content

Commit 400819c

Browse files
committed
feat: add tool for permission request
1 parent 214bc51 commit 400819c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,13 @@ export const NtfyNotifyPlugin: Plugin = async ({ client, directory, project }) =
190190

191191
case "permission.asked":
192192
if (config.events.permission) {
193+
const { permission, patterns } = event.properties as {
194+
permission: string
195+
patterns: string[]
196+
}
197+
const patternsText = patterns.length > 0 ? patterns.join(", ") : "unknown"
193198
await notify({
194-
message: `Permission required\n${directory}`,
199+
message: `${permission}: ${patternsText}\n${directory}`,
195200
title: `${projectName}: Permission needed`,
196201
priority: Math.min(config.priority + 1, 5),
197202
tags: ["warning", "lock", "opencode"],

0 commit comments

Comments
 (0)