Skip to content

Commit b1b69f4

Browse files
committed
chore: handling more client name enums.
1 parent 9a47b65 commit b1b69f4

4 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/daemon/daemon.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {VERSION} from '../version.js';
2121

2222
import type {DaemonMessage} from './types.js';
2323
import {
24+
DAEMON_CLIENT_NAME,
2425
getDaemonPid,
2526
getPidFilePath,
2627
getSocketPath,
@@ -65,7 +66,7 @@ async function setupMCPClient() {
6566
});
6667
mcpClient = new Client(
6768
{
68-
name: 'chrome-devtools-cli-daemon',
69+
name: DAEMON_CLIENT_NAME,
6970
version: VERSION,
7071
},
7172
{

src/daemon/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const INDEX_SCRIPT_PATH = path.join(
2121
);
2222

2323
const APP_NAME = 'chrome-devtools-mcp';
24+
export const DAEMON_CLIENT_NAME = 'chrome-devtools-cli-daemon';
2425

2526
// Using these paths due to strict limits on the POSIX socket path length.
2627
export function getSocketPath(): string {

src/telemetry/ClearcutLogger.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import process from 'node:process';
88

9+
import {DAEMON_CLIENT_NAME} from '../daemon/utils.js';
910
import {logger} from '../logger.js';
1011

1112
import type {LocalState, Persistence} from './persistence.js';
@@ -68,6 +69,10 @@ export class ClearcutLogger {
6869
this.#mcpClient = McpClient.MCP_CLIENT_CLAUDE_CODE;
6970
} else if (lowerName.includes('gemini')) {
7071
this.#mcpClient = McpClient.MCP_CLIENT_GEMINI_CLI;
72+
} else if (clientName === DAEMON_CLIENT_NAME) {
73+
this.#mcpClient = McpClient.MCP_CLIENT_DT_MCP_CLI;
74+
} else if (lowerName.includes('openclaw')) {
75+
this.#mcpClient = McpClient.MCP_CLIENT_OPENCLAW;
7176
} else {
7277
this.#mcpClient = McpClient.MCP_CLIENT_OTHER;
7378
}

src/telemetry/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export enum McpClient {
7575
MCP_CLIENT_UNSPECIFIED = 0,
7676
MCP_CLIENT_CLAUDE_CODE = 1,
7777
MCP_CLIENT_GEMINI_CLI = 2,
78+
MCP_CLIENT_DT_MCP_CLI = 4,
79+
MCP_CLIENT_OPENCLAW = 5,
7880
MCP_CLIENT_OTHER = 3,
7981
}
8082

0 commit comments

Comments
 (0)