From 2580d3a1cd86ad3818f72227ed42d865fa1482f9 Mon Sep 17 00:00:00 2001 From: sawka Date: Tue, 16 Dec 2025 17:55:19 -0800 Subject: [PATCH] better remote connection stats --- frontend/app/view/term/termwrap.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/app/view/term/termwrap.ts b/frontend/app/view/term/termwrap.ts index 8ecaef08cd..0ad7fa7495 100644 --- a/frontend/app/view/term/termwrap.ts +++ b/frontend/app/view/term/termwrap.ts @@ -5,7 +5,16 @@ import { getFileSubject } from "@/app/store/wps"; import { sendWSCommand } from "@/app/store/ws"; import { RpcApi } from "@/app/store/wshclientapi"; import { TabRpcClient } from "@/app/store/wshrpcutil"; -import { WOS, atoms, fetchWaveFile, getApi, getSettingsKeyAtom, globalStore, openLink } from "@/store/global"; +import { + WOS, + atoms, + fetchWaveFile, + getApi, + getSettingsKeyAtom, + globalStore, + openLink, + recordTEvent, +} from "@/store/global"; import * as services from "@/store/services"; import { PLATFORM, PlatformMacOS } from "@/util/platformutil"; import { base64ToArray, base64ToString, fireAndForget } from "@/util/util"; @@ -265,6 +274,9 @@ function handleOsc16162Command(data: string, blockId: string, loaded: boolean, t const decodedCmd = base64ToString(cmd.data.cmd64); rtInfo["shell:lastcmd"] = decodedCmd; globalStore.set(termWrap.lastCommandAtom, decodedCmd); + if (decodedCmd?.startsWith("ssh ")) { + recordTEvent("conn:connect", { "conn:conntype": "ssh-manual" }); + } } catch (e) { console.error("Error decoding cmd64:", e); rtInfo["shell:lastcmd"] = null;