MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / shareTask

Method shareTask

packages/cloud/src/CloudShareService.ts:17–40  ·  view source on GitHub ↗
(taskId: string, visibility: ShareVisibility = "organization")

Source from the content-addressed store, hash-verified

15 }
16
17 async shareTask(taskId: string, visibility: ShareVisibility = "organization"): Promise<ShareResponse> {
18 try {
19 const response = await this.cloudAPI.shareTask(taskId, visibility)
20
21 if (response.success && response.shareUrl) {
22 const vscode = await importVscode()
23
24 if (vscode?.env?.clipboard?.writeText) {
25 try {
26 await vscode.env.clipboard.writeText(response.shareUrl)
27 } catch (copyErr) {
28 this.log("[ShareService] Clipboard write failed (non-fatal):", copyErr)
29 }
30 } else {
31 this.log("[ShareService] VS Code clipboard unavailable; running outside extension host.")
32 }
33 }
34
35 return response
36 } catch (error) {
37 this.log("[ShareService] Error sharing task:", error)
38 throw error
39 }
40 }
41
42 async canShareTask(): Promise<boolean> {
43 try {

Callers

nothing calls this directly

Calls 2

importVscodeFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected