()
| 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 | } |
nothing calls this directly
no test coverage detected