mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Refactor out of utils
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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,(.+)$/)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
|
||||||
Reference in New Issue
Block a user