Skip to content

Commit cbd979a

Browse files
authored
better remote connection stats (#2690)
1 parent 5a16413 commit cbd979a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

frontend/app/view/term/termwrap.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ import { getFileSubject } from "@/app/store/wps";
55
import { sendWSCommand } from "@/app/store/ws";
66
import { RpcApi } from "@/app/store/wshclientapi";
77
import { TabRpcClient } from "@/app/store/wshrpcutil";
8-
import { WOS, atoms, fetchWaveFile, getApi, getSettingsKeyAtom, globalStore, openLink } from "@/store/global";
8+
import {
9+
WOS,
10+
atoms,
11+
fetchWaveFile,
12+
getApi,
13+
getSettingsKeyAtom,
14+
globalStore,
15+
openLink,
16+
recordTEvent,
17+
} from "@/store/global";
918
import * as services from "@/store/services";
1019
import { PLATFORM, PlatformMacOS } from "@/util/platformutil";
1120
import { base64ToArray, base64ToString, fireAndForget } from "@/util/util";
@@ -265,6 +274,9 @@ function handleOsc16162Command(data: string, blockId: string, loaded: boolean, t
265274
const decodedCmd = base64ToString(cmd.data.cmd64);
266275
rtInfo["shell:lastcmd"] = decodedCmd;
267276
globalStore.set(termWrap.lastCommandAtom, decodedCmd);
277+
if (decodedCmd?.startsWith("ssh ")) {
278+
recordTEvent("conn:connect", { "conn:conntype": "ssh-manual" });
279+
}
268280
} catch (e) {
269281
console.error("Error decoding cmd64:", e);
270282
rtInfo["shell:lastcmd"] = null;

0 commit comments

Comments
 (0)