Refactor out of utils

This commit is contained in:
Saoud Rizwan
2024-09-24 11:45:12 -04:00
parent 7c21a4c833
commit 40f7942801
8 changed files with 7 additions and 11 deletions

View File

@@ -23,14 +23,15 @@ import { getApiMetrics } from "../shared/getApiMetrics"
import { HistoryItem } from "../shared/HistoryItem" import { HistoryItem } from "../shared/HistoryItem"
import { Tool, ToolName } from "../shared/Tool" import { Tool, ToolName } from "../shared/Tool"
import { ClaudeAskResponse } from "../shared/WebviewMessage" import { ClaudeAskResponse } from "../shared/WebviewMessage"
import { findLast, findLastIndex, formatContentBlockToMarkdown } from "../utils" import { findLast, findLastIndex } from "../utils/array"
import { truncateHalfConversation } from "../utils/context-management" import { formatContentBlockToMarkdown } from "../integrations/misc/export-markdown"
import { truncateHalfConversation } from "./sliding-window"
import { extractTextFromFile } from "../integrations/misc/extract-text" import { extractTextFromFile } from "../integrations/misc/extract-text"
import { regexSearchFiles } from "../services/ripgrep" import { regexSearchFiles } from "../services/ripgrep"
import { parseMentions } from "./mentions/context-mentions" import { parseMentions } from "./mentions/context-mentions"
import { UrlContentFetcher } from "../services/browser/UrlContentFetcher" import { UrlContentFetcher } from "../services/browser/UrlContentFetcher"
import { diagnosticsToProblemsString, getNewDiagnostics } from "../integrations/diagnostics" import { diagnosticsToProblemsString, getNewDiagnostics } from "../integrations/diagnostics"
import { arePathsEqual } from "../utils/path-helpers" import { arePathsEqual } from "../utils/path"
const SYSTEM_PROMPT = async ( const SYSTEM_PROMPT = async (
supportsImages: boolean supportsImages: boolean

View File

@@ -4,7 +4,7 @@ import * as vscode from "vscode"
import { ClaudeDevProvider } from "./core/webview/ClaudeDevProvider" import { ClaudeDevProvider } from "./core/webview/ClaudeDevProvider"
import delay from "delay" import delay from "delay"
import { createClaudeDevAPI } from "./exports" import { createClaudeDevAPI } from "./exports"
import "./utils/path-helpers" // necessary to have access to String.prototype.toPosix import "./utils/path" // necessary to have access to String.prototype.toPosix
/* /*
Built using https://github.com/microsoft/vscode-webview-ui-toolkit Built using https://github.com/microsoft/vscode-webview-ui-toolkit

View File

@@ -1,7 +1,7 @@
import * as path from "path" import * as path from "path"
import * as os from "os" import * as os from "os"
import * as vscode from "vscode" import * as vscode from "vscode"
import { arePathsEqual } from "../../utils/path-helpers" import { arePathsEqual } from "../../utils/path"
export async function openImage(dataUri: string) { export async function openImage(dataUri: string) {
const matches = dataUri.match(/^data:image\/([a-zA-Z]+);base64,(.+)$/) const matches = dataUri.match(/^data:image\/([a-zA-Z]+);base64,(.+)$/)

View File

@@ -1,7 +1,7 @@
import { globby, Options } from "globby" import { globby, Options } from "globby"
import os from "os" import os from "os"
import * as path from "path" import * as path from "path"
import { arePathsEqual } from "../../utils/path-helpers" import { arePathsEqual } from "../../utils/path"
export async function listFiles(dirPath: string, recursive: boolean, limit: number): Promise<[string[], boolean]> { export async function listFiles(dirPath: string, recursive: boolean, limit: number): Promise<[string[], boolean]> {
const absolutePath = path.resolve(dirPath) const absolutePath = path.resolve(dirPath)

View File

@@ -1,5 +0,0 @@
export * from "../core/webview/getNonce"
export * from "../core/webview/getUri"
export * from "../integrations/misc/process-images"
export * from "../integrations/misc/export-markdown"
export * from "./array-helpers"