We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d01317 commit 6c37995Copy full SHA for 6c37995
src/APIClient.ts
@@ -9,6 +9,7 @@ import type {
9
APISimStartParams,
10
PinReadResponse,
11
} from "./APITypes.js";
12
+import { readVersion } from "./readVersion.js";
13
14
const DEFAULT_SERVER =
15
process.env.WOKWI_CLI_SERVER ?? "wss://wokwi.com/api/ws/beta";
@@ -38,8 +39,12 @@ export class APIClient {
38
39
}
40
41
private createSocket(token: string, server: string) {
42
+ const { sha, version } = readVersion();
43
return new WebSocket(server, {
- headers: { Authorization: `Bearer ${token}` },
44
+ headers: {
45
+ Authorization: `Bearer ${token}`,
46
+ "User-Agent": `wokwi-cli/${version} (${sha})`,
47
+ },
48
});
49
50
0 commit comments