From c837378c2ef591cd0ef3da1b4bede3141b36d535 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 15 Jan 2025 09:07:53 -0800 Subject: [PATCH] cleanup --- core/indexing/docs/DocsCrawler.ts | 8 -------- core/indexing/docs/crawlers/GithubCrawler.test.ts | 0 gui/src/components/mainInput/MentionExtension.ts | 1 - gui/src/components/mainInput/resolveInput.ts | 3 --- 4 files changed, 12 deletions(-) delete mode 100644 core/indexing/docs/crawlers/GithubCrawler.test.ts diff --git a/core/indexing/docs/DocsCrawler.ts b/core/indexing/docs/DocsCrawler.ts index d8a13e80f..24f937019 100644 --- a/core/indexing/docs/DocsCrawler.ts +++ b/core/indexing/docs/DocsCrawler.ts @@ -39,13 +39,11 @@ class DocsCrawler { maxRequestsPerCrawl: number = this.MAX_REQUESTS_PER_CRAWL, ): AsyncGenerator { if (startUrl.host === this.GITHUB_HOST) { - console.log("GITHUB DETECTED: Using Github"); yield* new GitHubCrawler(startUrl).crawl(); return; } try { - console.log(`Crawling ${startUrl.toString()}: Trying default crawler`); const pageData = await new DefaultCrawler(startUrl).crawl(); if (pageData.length > 0) { yield* pageData; @@ -56,11 +54,9 @@ class DocsCrawler { } if (this.shouldUseChromium()) { - console.log(`Crawling ${startUrl.toString()}: Trying chromium crawler`); yield* new ChromiumCrawler(startUrl, maxRequestsPerCrawl).crawl(); } else { let didCrawlSinglePage = false; - console.log(`Crawling ${startUrl.toString()}: Trying cheerio crawler`); for await (const pageData of new CheerioCrawler( startUrl, @@ -77,10 +73,6 @@ class DocsCrawler { this.chromiumInstaller.shouldProposeUseChromiumOnCrawlFailure(); if (shouldProposeUseChromium) { - console.log( - `Crawling ${startUrl.toString()}: Cheerio failed: proposing chromium crawler`, - ); - const didInstall = await this.chromiumInstaller.proposeAndAttemptInstall( startUrl.toString(), diff --git a/core/indexing/docs/crawlers/GithubCrawler.test.ts b/core/indexing/docs/crawlers/GithubCrawler.test.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/gui/src/components/mainInput/MentionExtension.ts b/gui/src/components/mainInput/MentionExtension.ts index b17f2ee76..364b241ee 100644 --- a/gui/src/components/mainInput/MentionExtension.ts +++ b/gui/src/components/mainInput/MentionExtension.ts @@ -31,7 +31,6 @@ export const Mention = Node.create({ char: "@", pluginKey: MentionPluginKey, command: ({ editor, range, props }) => { - console.log(props); // increase range.to by one when the next node is of type "text" // and starts with a space character const nodeAfter = editor.view.state.selection.$to.nodeAfter; diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index ae1a97cea..c9e1b698a 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -52,7 +52,6 @@ async function resolveEditorContent({ for (const p of editorState.content) { if (p.type === "paragraph") { const [text, ctxItems, foundSlashCommand] = resolveParagraph(p); - console.log("PARAGRAPH RESOLVE", ctxItems); // Only take the first slash command\ if (foundSlashCommand && typeof slashCommand === "undefined") { slashCommand = foundSlashCommand; @@ -137,7 +136,6 @@ async function resolveEditorContent({ } } - console.log(stripImages(parts), contextItems); // cmd+enter to use codebase if (modifiers.useCodebase) { const result = await ideMessenger.request("context/getContextItems", { @@ -218,7 +216,6 @@ function resolveParagraph( if (child.type === "text") { text += text === "" ? child.text?.trimStart() : child.text; } else if (child.type === "mention") { - console.log("CHILD", child); text += typeof child.attrs?.renderInlineAs === "string" ? child.attrs.renderInlineAs