Skip to content

Commit 0b7b3c7

Browse files
BenTaylorDevclaude
andcommitted
refactor(docs): drop command body and unused product param from copy tracking
Address review feedback on CopilotKit#4643: install_type and location already answer the funnel questions, so persisting raw clipboard contents adds privacy surface without analytic value (the global writeText hook fires on every programmatic copy, not just CLI buttons). Also remove the never-passed product param. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 68561c0 commit 0b7b3c7

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

docs/lib/track-command-copy.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ const KNOWN_INSTALL_TYPES = [
1818

1919
export type InstallType = (typeof KNOWN_INSTALL_TYPES)[number] | "code";
2020

21-
const MAX_COMMAND_LENGTH = 240;
22-
2321
function inferInstallType(command: string): InstallType {
2422
const firstToken = command.trim().split(/\s+/)[0]?.toLowerCase();
2523
if (!firstToken) return "code";
@@ -30,25 +28,18 @@ function inferInstallType(command: string): InstallType {
3028

3129
export type TrackCommandCopyArgs = {
3230
command: string;
33-
product?: string;
3431
location?: string;
3532
};
3633

3734
export function trackCommandCopy(
3835
posthog: PostHog | undefined,
39-
{ command, product, location }: TrackCommandCopyArgs,
36+
{ command, location }: TrackCommandCopyArgs,
4037
) {
4138
if (!posthog) return;
4239
const trimmed = command.trim();
4340
if (!trimmed) return;
44-
const truncated =
45-
trimmed.length > MAX_COMMAND_LENGTH
46-
? trimmed.slice(0, MAX_COMMAND_LENGTH) + "…"
47-
: trimmed;
4841
posthog.capture("cli_command_copied", {
49-
command: truncated,
5042
install_type: inferInstallType(trimmed),
51-
...(product ? { product } : {}),
5243
...(location ? { location } : {}),
5344
});
5445
}

0 commit comments

Comments
 (0)