MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / addWorkspaceFolder

Method addWorkspaceFolder

src/cm/lsp/workspace.ts:272–287  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

270 }
271
272 addWorkspaceFolder(uri: string): boolean {
273 if (this.#workspaceFolders.has(uri)) {
274 return false;
275 }
276
277 this.#workspaceFolders.add(uri);
278 this.#sendNotification("workspace/didChangeWorkspaceFolders", {
279 event: {
280 added: [{ uri, name: this.#getFolderName(uri) }],
281 removed: [],
282 },
283 });
284 console.info(`[LSP:Workspace] Added workspace folder: ${uri}`);
285 this.#log("info", `Workspace folder added: ${uri}`);
286 return true;
287 }
288
289 removeWorkspaceFolder(uri: string): boolean {
290 if (!this.#workspaceFolders.has(uri)) {

Callers 1

#ensureClientMethod · 0.80

Calls 4

#sendNotificationMethod · 0.95
#getFolderNameMethod · 0.95
#logMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected