(chunks: vscode.Range[])
| 249 | } |
| 250 | |
| 251 | export async function runChunksInTerm(chunks: vscode.Range[]): Promise<void> { |
| 252 | const textEditor = vscode.window.activeTextEditor; |
| 253 | if (!textEditor) { |
| 254 | return; |
| 255 | } |
| 256 | const text = chunks |
| 257 | .map((chunk) => textEditor.document.getText(chunk).trim()) |
| 258 | .filter((chunk) => chunk.length > 0) |
| 259 | .join('\n'); |
| 260 | if (text.length > 0) { |
| 261 | return runTextInTerm(text); |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | export async function runTextInTerm(text: string, execute: boolean = true): Promise<void> { |
| 266 | if (isGuestSession) { |
no test coverage detected