@@ -22,13 +22,6 @@ import {
2222 RepoPerWorkspaceCheckpointService ,
2323} from "../services/checkpoints"
2424import { findToolName , formatContentBlockToMarkdown } from "../integrations/misc/export-markdown"
25- import {
26- extractTextFromFile ,
27- addLineNumbers ,
28- stripLineNumbers ,
29- everyLineHasLineNumbers ,
30- } from "../integrations/misc/extract-text"
31- import { countFileLines } from "../integrations/misc/line-counter"
3225import { fetchInstructionsTool } from "./tools/fetchInstructionsTool"
3326import { listFilesTool } from "./tools/listFilesTool"
3427import { readFileTool } from "./tools/readFileTool"
@@ -37,25 +30,17 @@ import { Terminal } from "../integrations/terminal/Terminal"
3730import { TerminalRegistry } from "../integrations/terminal/TerminalRegistry"
3831import { UrlContentFetcher } from "../services/browser/UrlContentFetcher"
3932import { listFiles } from "../services/glob/list-files"
40- import { regexSearchFiles } from "../services/ripgrep"
41- import { parseSourceCodeDefinitionsForFile , parseSourceCodeForDefinitionsTopLevel } from "../services/tree-sitter"
4233import { CheckpointStorage } from "../shared/checkpoints"
4334import { ApiConfiguration } from "../shared/api"
4435import { findLastIndex } from "../shared/array"
4536import { combineApiRequests } from "../shared/combineApiRequests"
4637import { combineCommandSequences } from "../shared/combineCommandSequences"
4738import {
48- BrowserAction ,
49- BrowserActionResult ,
50- browserActions ,
5139 ClineApiReqCancelReason ,
5240 ClineApiReqInfo ,
5341 ClineAsk ,
54- ClineAskUseMcpServer ,
5542 ClineMessage ,
5643 ClineSay ,
57- ClineSayBrowserAction ,
58- ClineSayTool ,
5944 ToolProgressStatus ,
6045} from "../shared/ExtensionMessage"
6146import { getApiMetrics } from "../shared/getApiMetrics"
@@ -66,24 +51,20 @@ import { defaultModeSlug, getModeBySlug, getFullModeDetails } from "../shared/mo
6651import { EXPERIMENT_IDS , experiments as Experiments , ExperimentId } from "../shared/experiments"
6752import { calculateApiCostAnthropic } from "../utils/cost"
6853import { fileExistsAtPath } from "../utils/fs"
69- import { isPathOutsideWorkspace } from "../utils/pathUtils"
70- import { arePathsEqual , getReadablePath } from "../utils/path"
54+ import { arePathsEqual } from "../utils/path"
7155import { parseMentions } from "./mentions"
7256import { RooIgnoreController } from "./ignore/RooIgnoreController"
7357import { AssistantMessageContent , parseAssistantMessage , ToolParamName , ToolUseName } from "./assistant-message"
7458import { formatResponse } from "./prompts/responses"
7559import { SYSTEM_PROMPT } from "./prompts/system"
7660import { truncateConversationIfNeeded } from "./sliding-window"
7761import { ClineProvider } from "./webview/ClineProvider"
78- import { detectCodeOmission } from "../integrations/editor/detect-omission"
7962import { BrowserSession } from "../services/browser/BrowserSession"
8063import { formatLanguage } from "../shared/language"
8164import { McpHub } from "../services/mcp/McpHub"
8265import { DiffStrategy , getDiffStrategy } from "./diff/DiffStrategy"
83- import { insertGroups } from "./diff/insert-groups"
8466import { telemetryService } from "../services/telemetry/TelemetryService"
8567import { validateToolUse , isToolAllowedForMode , ToolName } from "./mode-validator"
86- import { parseXml } from "../utils/xml"
8768import { getWorkspacePath } from "../utils/path"
8869import { writeToFileTool } from "./tools/writeToFileTool"
8970import { applyDiffTool } from "./tools/applyDiffTool"
@@ -1616,15 +1597,13 @@ export class Cline extends EventEmitter<ClineEvents> {
16161597 removeClosingTag ,
16171598 )
16181599 break
1619- case "search_files" : {
1600+ case "search_files" :
16201601 await searchFilesTool ( this , block , askApproval , handleError , pushToolResult , removeClosingTag )
16211602 break
1622- }
1623- case "browser_action" : {
1603+ case "browser_action" :
16241604 await browserActionTool ( this , block , askApproval , handleError , pushToolResult , removeClosingTag )
16251605 break
1626- }
1627- case "execute_command" : {
1606+ case "execute_command" :
16281607 await executeCommandTool (
16291608 this ,
16301609 block ,
@@ -1634,12 +1613,10 @@ export class Cline extends EventEmitter<ClineEvents> {
16341613 removeClosingTag ,
16351614 )
16361615 break
1637- }
1638- case "use_mcp_tool" : {
1616+ case "use_mcp_tool" :
16391617 await useMcpToolTool ( this , block , askApproval , handleError , pushToolResult , removeClosingTag )
16401618 break
1641- }
1642- case "access_mcp_resource" : {
1619+ case "access_mcp_resource" :
16431620 await accessMcpResourceTool (
16441621 this ,
16451622 block ,
@@ -1649,8 +1626,7 @@ export class Cline extends EventEmitter<ClineEvents> {
16491626 removeClosingTag ,
16501627 )
16511628 break
1652- }
1653- case "ask_followup_question" : {
1629+ case "ask_followup_question" :
16541630 await askFollowupQuestionTool (
16551631 this ,
16561632 block ,
@@ -1660,18 +1636,13 @@ export class Cline extends EventEmitter<ClineEvents> {
16601636 removeClosingTag ,
16611637 )
16621638 break
1663- }
1664- case "switch_mode" : {
1639+ case "switch_mode" :
16651640 await switchModeTool ( this , block , askApproval , handleError , pushToolResult , removeClosingTag )
16661641 break
1667- }
1668-
1669- case "new_task" : {
1642+ case "new_task" :
16701643 await newTaskTool ( this , block , askApproval , handleError , pushToolResult , removeClosingTag )
16711644 break
1672- }
1673-
1674- case "attempt_completion" : {
1645+ case "attempt_completion" :
16751646 await attemptCompletionTool (
16761647 this ,
16771648 block ,
@@ -1683,7 +1654,6 @@ export class Cline extends EventEmitter<ClineEvents> {
16831654 askFinishSubTaskApproval ,
16841655 )
16851656 break
1686- }
16871657 }
16881658
16891659 break
0 commit comments