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.
This commit is contained in:
Claude
2026-01-19 11:45:29 +00:00
parent 854871a5c1
commit 5969e2f52f
2 changed files with 9 additions and 0 deletions

View File

@@ -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

View File

@@ -580,7 +580,12 @@ export const manPages: Record<string, ManPageEntry> = {
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,