Skip to content

Commit 4381370

Browse files
committed
Fix prompt_filter.py: read 'prompt' key from UserPromptSubmit payload (#26)
1 parent b11b29c commit 4381370

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/cortex-code/scripts/router/prompt_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def main():
9696
prompt = ""
9797
if isinstance(data, dict):
9898
# The hook receives the full message object
99-
prompt = data.get("message", "")
99+
prompt = data.get("prompt", data.get("message", ""))
100100
if isinstance(prompt, dict):
101101
prompt = prompt.get("content", "")
102102
if isinstance(prompt, list):

0 commit comments

Comments
 (0)