From 5969e2f52fe8c6d75e0435eee9e19e941e9cad32 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 11:45:29 +0000 Subject: [PATCH] debug: add logging to diagnose chat protocol issue Add console logging to: - chat command argParser to see input args and parsed result - ChatViewer to see received props This will help diagnose why 'undefined protocol' error appears when opening chat via command or event menu. --- src/components/ChatViewer.tsx | 4 ++++ src/types/man.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/components/ChatViewer.tsx b/src/components/ChatViewer.tsx index 15f1320..8d5c160 100644 --- a/src/components/ChatViewer.tsx +++ b/src/components/ChatViewer.tsx @@ -437,6 +437,10 @@ export function ChatViewer({ customTitle, headerPrefix, }: ChatViewerProps) { + console.log("[ChatViewer] Received props:", { + protocol, + identifier: identifier?.type, + }); const { addWindow } = useGrimoire(); // Get active account with signing capability diff --git a/src/types/man.ts b/src/types/man.ts index 9031732..218c516 100644 --- a/src/types/man.ts +++ b/src/types/man.ts @@ -580,7 +580,12 @@ export const manPages: Record = { appId: "chat", category: "Nostr", argParser: async (args: string[]) => { + console.log("[chat argParser] Input args:", args); const result = parseChatCommand(args); + console.log("[chat argParser] Parsed result:", { + protocol: result.protocol, + identifier: result.identifier, + }); return { protocol: result.protocol, identifier: result.identifier,