Skip to content

Commit 152194b

Browse files
authored
chore: set output channel names for client and server (#266)
This PR sets the names of the output channels for the client and the server so that they are distingushable in VSCode. ## Test plan: ![image.png](https://app.graphite.dev/user-attachments/assets/8375a824-e2d2-43df-99e9-b17ff7d55ad2.png) PR checklist: - [x] Purpose of the code is [evident to future readers](https://semgrep.dev/docs/contributing/contributing-code/#explaining-code) - [x] Tests included or PR comment includes a reproducible test plan - [x] Documentation is up-to-date - [ ] A changelog entry was for any user-facing change - [x] Change has no security implications (otherwise, ping security team) If you're unsure about any of this, please see: - [Contribution guidelines](https://semgrep.dev/docs/contributing/contributing-code)! - [One of the more specific guides located here](https://semgrep.dev/docs/contributing/contributing/)
1 parent 57d7d23 commit 152194b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class Environment {
204204

205205
static async create(context: ExtensionContext): Promise<Environment> {
206206
const config = await Environment.loadConfig(context);
207-
const channel = window.createOutputChannel(VSCODE_EXT_NAME);
207+
const channel = window.createOutputChannel(VSCODE_EXT_NAME + " (Client)");
208208
const logger = new Logger(config.trace, channel);
209209
return new Environment(context, channel, logger, config);
210210
}

src/lsp.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
DIAGNOSTIC_COLLECTION_NAME,
2424
DIST_BINARY_PATH,
2525
VERSION_PATH,
26+
VSCODE_EXT_NAME,
2627
} from "./constants";
2728
import type { Environment } from "./env";
2829
import { type LspErrorParams, rulesRefreshed } from "./lspExtensions";
@@ -191,6 +192,7 @@ async function lspOptions(
191192
diagnosticCollectionName: DIAGNOSTIC_COLLECTION_NAME,
192193
// TODO: should we limit to support languages and keep the list manually updated?
193194
documentSelector: [{ language: "*", scheme: "file" }],
195+
outputChannelName: VSCODE_EXT_NAME + " (Server)",
194196
traceOutputChannel: env.channel,
195197
initializationOptions: initializationOptions,
196198
// OLD: This used to be a Sentry error handler.

0 commit comments

Comments
 (0)