From d4fdb42b9fd8b00592a60732648bb4df233abf06 Mon Sep 17 00:00:00 2001 From: Deokhaeng Lee Date: Sun, 24 Aug 2025 23:50:32 -0700 Subject: [PATCH 1/6] added hyprcloud posthog check --- apps/desktop/src/components/editor-area/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/components/editor-area/index.tsx b/apps/desktop/src/components/editor-area/index.tsx index 0dab6bc90d..b6fb633e48 100644 --- a/apps/desktop/src/components/editor-area/index.tsx +++ b/apps/desktop/src/components/editor-area/index.tsx @@ -402,7 +402,7 @@ export function useEnhanceMutation({ await new Promise(resolve => setTimeout(resolve, 100)); const getWordsFunc = sessionId === onboardingSessionId ? dbCommands.getWordsOnboarding : dbCommands.getWords; - const [{ type }, config, words] = await Promise.all([ + const [{ type, connection }, config, words] = await Promise.all([ connectorCommands.getLlmConnection(), dbCommands.getConfig(), getWordsFunc(sessionId), @@ -477,8 +477,8 @@ export function useEnhanceMutation({ ? provider.languageModel("onboardingModel") : provider.languageModel("defaultModel"); - console.log("model: ", model); - console.log("provider: ", provider); + const isHyprCloud = connection.api_base.includes("pro.hyprnote.com"); + if (sessionId !== onboardingSessionId) { analyticsCommands.event({ @@ -486,6 +486,7 @@ export function useEnhanceMutation({ distinct_id: userId, session_id: sessionId, connection_type: type, + is_hypr_cloud: isHyprCloud, }); } From ffada0c7ad303292152e960fe278a67bc10d2ddc Mon Sep 17 00:00:00 2001 From: Deokhaeng Lee Date: Mon, 25 Aug 2025 00:25:36 -0700 Subject: [PATCH 2/6] changed onboarding words --- .../src/components/welcome-modal/custom-endpoint-view.tsx | 2 +- .../desktop/src/components/welcome-modal/llm-selection-view.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/welcome-modal/custom-endpoint-view.tsx b/apps/desktop/src/components/welcome-modal/custom-endpoint-view.tsx index 4919f38e70..cac7ff4d13 100644 --- a/apps/desktop/src/components/welcome-modal/custom-endpoint-view.tsx +++ b/apps/desktop/src/components/welcome-modal/custom-endpoint-view.tsx @@ -211,7 +211,7 @@ export function CustomEndpointView({ return (

- Configure Your LLM + Set up Your AI Provider

diff --git a/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx b/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx index c26ebf41d1..d046503ad0 100644 --- a/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx +++ b/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx @@ -29,7 +29,7 @@ export function LLMSelectionView({ onContinue }: LLMSelectionViewProps) { { id: "byom", title: "Bring Your Own Model", - subtitle: "I want first-in-class meeting summarization", + subtitle: "Connect custom APIs, from public providers to private servers", icon: Network, }, ] as const; From 5eeb901a0d14e0ad46e43aa6ba60111935469a5e Mon Sep 17 00:00:00 2001 From: Deokhaeng Lee Date: Mon, 25 Aug 2025 00:36:08 -0700 Subject: [PATCH 3/6] minor fixes --- apps/desktop/src/components/editor-area/index.tsx | 1 - .../src/components/welcome-modal/llm-selection-view.tsx | 4 ++-- apps/desktop/src/locales/en/messages.po | 8 ++++++-- apps/desktop/src/locales/ko/messages.po | 8 ++++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/desktop/src/components/editor-area/index.tsx b/apps/desktop/src/components/editor-area/index.tsx index b6fb633e48..b83cb9c85e 100644 --- a/apps/desktop/src/components/editor-area/index.tsx +++ b/apps/desktop/src/components/editor-area/index.tsx @@ -479,7 +479,6 @@ export function useEnhanceMutation({ const isHyprCloud = connection.api_base.includes("pro.hyprnote.com"); - if (sessionId !== onboardingSessionId) { analyticsCommands.event({ event: "normal_enhance_start", diff --git a/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx b/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx index d046503ad0..4a03519a74 100644 --- a/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx +++ b/apps/desktop/src/components/welcome-modal/llm-selection-view.tsx @@ -1,5 +1,5 @@ import { Trans } from "@lingui/react/macro"; -import { Network, ShieldIcon } from "lucide-react"; +import { ShieldIcon, Unplug } from "lucide-react"; import { Card, CardContent } from "@hypr/ui/components/ui/card"; import PushableButton from "@hypr/ui/components/ui/pushable-button"; @@ -30,7 +30,7 @@ export function LLMSelectionView({ onContinue }: LLMSelectionViewProps) { id: "byom", title: "Bring Your Own Model", subtitle: "Connect custom APIs, from public providers to private servers", - icon: Network, + icon: Unplug, }, ] as const; diff --git a/apps/desktop/src/locales/en/messages.po b/apps/desktop/src/locales/en/messages.po index dd79803156..f9496a16a3 100644 --- a/apps/desktop/src/locales/en/messages.po +++ b/apps/desktop/src/locales/en/messages.po @@ -558,8 +558,8 @@ msgid "Complete the configuration to continue" msgstr "Complete the configuration to continue" #: src/components/welcome-modal/custom-endpoint-view.tsx:214 -msgid "Configure Your LLM" -msgstr "Configure Your LLM" +#~ msgid "Configure Your LLM" +#~ msgstr "Configure Your LLM" #: src/components/settings/components/calendar/cloud-calendar-integration-details.tsx:63 #~ msgid "Connect" @@ -1412,6 +1412,10 @@ msgstr "Select Your Languages" msgid "Send invite" msgstr "Send invite" +#: src/components/welcome-modal/custom-endpoint-view.tsx:214 +msgid "Set up Your AI Provider" +msgstr "Set up Your AI Provider" + #: src/components/left-sidebar/top-area/settings-button.tsx:101 msgid "Settings" msgstr "Settings" diff --git a/apps/desktop/src/locales/ko/messages.po b/apps/desktop/src/locales/ko/messages.po index 749ba6c66b..fd394dcdd1 100644 --- a/apps/desktop/src/locales/ko/messages.po +++ b/apps/desktop/src/locales/ko/messages.po @@ -558,8 +558,8 @@ msgid "Complete the configuration to continue" msgstr "" #: src/components/welcome-modal/custom-endpoint-view.tsx:214 -msgid "Configure Your LLM" -msgstr "" +#~ msgid "Configure Your LLM" +#~ msgstr "" #: src/components/settings/components/calendar/cloud-calendar-integration-details.tsx:63 #~ msgid "Connect" @@ -1412,6 +1412,10 @@ msgstr "" msgid "Send invite" msgstr "" +#: src/components/welcome-modal/custom-endpoint-view.tsx:214 +msgid "Set up Your AI Provider" +msgstr "" + #: src/components/left-sidebar/top-area/settings-button.tsx:101 msgid "Settings" msgstr "" From b64964f7d3c30edb307729b2b7abfe77b34fa1cf Mon Sep 17 00:00:00 2001 From: Deokhaeng Lee Date: Mon, 25 Aug 2025 21:02:14 -0700 Subject: [PATCH 4/6] fixed logs --- .../src/components/editor-area/index.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/desktop/src/components/editor-area/index.tsx b/apps/desktop/src/components/editor-area/index.tsx index b83cb9c85e..4b8913b2d9 100644 --- a/apps/desktop/src/components/editor-area/index.tsx +++ b/apps/desktop/src/components/editor-area/index.tsx @@ -433,13 +433,15 @@ export function useEnhanceMutation({ const selectedTemplate = await TemplateService.getTemplate(effectiveTemplateId ?? ""); - const eventName = selectedTemplate?.tags.includes("builtin") - ? "builtin_template_enhancement_started" - : "custom_template_enhancement_started"; - analyticsCommands.event({ - event: eventName, - distinct_id: userId, - }); + if(selectedTemplate !== null) { + const eventName = selectedTemplate?.tags.includes("builtin") + ? "builtin_template_enhancement_started" + : "custom_template_enhancement_started"; + analyticsCommands.event({ + event: eventName, + distinct_id: userId, + }); + } const shouldUseH1Headers = !effectiveTemplateId && h1Headers.length > 0; const grammarSections = selectedTemplate?.sections.map(s => s.title) || null; @@ -477,7 +479,7 @@ export function useEnhanceMutation({ ? provider.languageModel("onboardingModel") : provider.languageModel("defaultModel"); - const isHyprCloud = connection.api_base.includes("pro.hyprnote.com"); + const isHyprCloud = type !== "HyprLocal" && connection && connection.api_base.includes("pro.hyprnote.com"); if (sessionId !== onboardingSessionId) { analyticsCommands.event({ From 088548f5ff103f0bc3b9269e0094241107089de8 Mon Sep 17 00:00:00 2001 From: Deokhaeng Lee Date: Mon, 25 Aug 2025 21:06:51 -0700 Subject: [PATCH 5/6] tool call log --- .../src/components/right-panel/hooks/useChatLogic.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts b/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts index 35a298fca9..720ed80a34 100644 --- a/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts +++ b/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts @@ -457,6 +457,12 @@ export function useChatLogic({ content: toolStartMessage.content, type: "tool-start", }); + + // log if user is using tools in chat + analyticsCommands.event({ + event: "chat_tool_call", + distinct_id: userId || "", + }); } if (chunk.type === "tool-result" && !(chunk.toolName === "update_progress" && type === "HyprLocal")) { From d6bd8dea31cc96e7269629dd4490cadafa5aaa7b Mon Sep 17 00:00:00 2001 From: Deokhaeng Lee Date: Mon, 25 Aug 2025 21:07:35 -0700 Subject: [PATCH 6/6] ran tests --- apps/desktop/src/components/editor-area/index.tsx | 2 +- apps/desktop/src/components/right-panel/hooks/useChatLogic.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/editor-area/index.tsx b/apps/desktop/src/components/editor-area/index.tsx index 4b8913b2d9..887ba95dab 100644 --- a/apps/desktop/src/components/editor-area/index.tsx +++ b/apps/desktop/src/components/editor-area/index.tsx @@ -433,7 +433,7 @@ export function useEnhanceMutation({ const selectedTemplate = await TemplateService.getTemplate(effectiveTemplateId ?? ""); - if(selectedTemplate !== null) { + if (selectedTemplate !== null) { const eventName = selectedTemplate?.tags.includes("builtin") ? "builtin_template_enhancement_started" : "custom_template_enhancement_started"; diff --git a/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts b/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts index 4763ada7ab..f9afb07e6e 100644 --- a/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts +++ b/apps/desktop/src/components/right-panel/hooks/useChatLogic.ts @@ -462,7 +462,7 @@ export function useChatLogic({ tool_details: JSON.stringify(chunk.input), }); - // log if user is using tools in chat + // log if user is using tools in chat analyticsCommands.event({ event: "chat_tool_call", distinct_id: userId || "",