From 24bad56785d84ba6bd868ddc169452a57d041bc4 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:15:24 -0400 Subject: [PATCH] Refactor services --- src/core/ClaudeDev.ts | 4 ++-- src/{utils => services/browser}/UrlContentFetcher.ts | 0 src/{utils/ripgrep.ts => services/ripgrep/index.ts} | 0 src/utils/context-mentions.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/{utils => services/browser}/UrlContentFetcher.ts (100%) rename src/{utils/ripgrep.ts => services/ripgrep/index.ts} (100%) diff --git a/src/core/ClaudeDev.ts b/src/core/ClaudeDev.ts index fb1baa2..a5a55ee 100644 --- a/src/core/ClaudeDev.ts +++ b/src/core/ClaudeDev.ts @@ -25,9 +25,9 @@ import { ClaudeAskResponse } from "../shared/WebviewMessage" import { findLast, findLastIndex, formatContentBlockToMarkdown } from "../utils" import { truncateHalfConversation } from "../utils/context-management" import { extractTextFromFile } from "../utils/extract-text" -import { regexSearchFiles } from "../utils/ripgrep" +import { regexSearchFiles } from "../services/ripgrep" import { parseMentions } from "../utils/context-mentions" -import { UrlContentFetcher } from "../utils/UrlContentFetcher" +import { UrlContentFetcher } from "../services/browser/UrlContentFetcher" import { diagnosticsToProblemsString, getNewDiagnostics } from "../utils/diagnostics" import { arePathsEqual } from "../utils/path-helpers" diff --git a/src/utils/UrlContentFetcher.ts b/src/services/browser/UrlContentFetcher.ts similarity index 100% rename from src/utils/UrlContentFetcher.ts rename to src/services/browser/UrlContentFetcher.ts diff --git a/src/utils/ripgrep.ts b/src/services/ripgrep/index.ts similarity index 100% rename from src/utils/ripgrep.ts rename to src/services/ripgrep/index.ts diff --git a/src/utils/context-mentions.ts b/src/utils/context-mentions.ts index 8c7e199..0085225 100644 --- a/src/utils/context-mentions.ts +++ b/src/utils/context-mentions.ts @@ -1,7 +1,7 @@ import * as vscode from "vscode" import * as path from "path" import { openFile } from "./open-file" -import { UrlContentFetcher } from "./UrlContentFetcher" +import { UrlContentFetcher } from "../services/browser/UrlContentFetcher" import { mentionRegexGlobal } from "../shared/context-mentions" import fs from "fs/promises" import { extractTextFromFile } from "./extract-text"