MCPcopy Create free account
hub / github.com/coderoad/coderoad-vscode / createOrShow

Function createOrShow

src/services/webview/create.ts:79–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 return {
78 state,
79 createOrShow() {
80 vscode.commands.executeCommand('vscode.setEditorLayout', {
81 orientation: 0,
82 groups: [{ size: 0.6 }, { size: 0.4 }],
83 })
84 // If we already have a panel, show it.
85 // Otherwise, create a new panel.
86
87 if (panel && panel.webview) {
88 if (Date.now() - lastWebviewOpenedAt.getTime() > 5000) {
89 vscode.window.showInformationMessage('CodeRoad already open')
90 }
91 panel.reveal(vscode.ViewColumn.Two)
92 } else {
93 panel = createWebViewPanel()
94 }
95 lastWebviewOpenedAt = new Date()
96 },
97 send,
98 receive,
99 }

Callers

nothing calls this directly

Calls 1

createWebViewPanelFunction · 0.85

Tested by

no test coverage detected