Show error message when url scraping fails; update mention regex to allow trailing punctuation

This commit is contained in:
Saoud Rizwan
2024-09-18 22:06:27 -04:00
parent 250882c4a2
commit 554da736d4
2 changed files with 46 additions and 6 deletions

View File

@@ -53,6 +53,7 @@ export async function parseMentions(text: string, cwd: string, urlScraper?: UrlS
const markdown = await urlScraper.urlToMarkdown(mention)
parsedText += `\n\n<url_content url="${mention}">\n${markdown}\n</url_content>`
} catch (error) {
vscode.window.showErrorMessage(`Error fetching content for ${mention}: ${JSON.stringify(error)}`)
parsedText += `\n\n<url_content url="${mention}">\nError fetching content: ${error.message}\n</url_content>`
}
} else if (mention.startsWith("/")) {