repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/feedback.ts
src/core/prompts/system-prompt/components/feedback.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const FEEDBACK_TEMPLATE_TEXT = ` If the user asks for help or wants to give feedback inform them of the following: - To give f...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/system_info.ts
src/core/prompts/system-prompt/components/system_info.ts
import osModule from "node:os" import { getShell } from "@utils/shell" import osName from "os-name" import { getWorkspacePaths } from "@/hosts/vscode/hostbridge/workspace/getWorkspacePaths" import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" impor...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/act_vs_plan_mode.ts
src/core/prompts/system-prompt/components/act_vs_plan_mode.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const getActVsPlanModeTemplateText = (context: SystemPromptContext) => `ACT MODE V.S. PLAN MODE In each user message, the envi...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/capabilities.ts
src/core/prompts/system-prompt/components/capabilities.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const getCapabilitiesTemplateText = (context: SystemPromptContext) => `CAPABILITIES - You have access to tools that let you ex...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/cli_subagents.ts
src/core/prompts/system-prompt/components/cli_subagents.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const getCliSubagentsTemplateText = (_context: SystemPromptContext) => `USING THE CLINE CLI TOOL The Cline CLI tool can be use...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/rules.ts
src/core/prompts/system-prompt/components/rules.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const BROWSER_RULES = `- The user may ask generic non-development tasks, such as "what\\'s the latest news" or "look up the wea...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/objective.ts
src/core/prompts/system-prompt/components/objective.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const getObjectiveTemplateText = (context: SystemPromptContext) => `OBJECTIVE You accomplish a given task iteratively, breakin...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/task_progress.ts
src/core/prompts/system-prompt/components/task_progress.ts
import { ModelFamily } from "@/shared/prompts" import { PromptVariant, SystemPromptContext, SystemPromptSection, TemplateEngine } from ".." const UPDATING_TASK_PROGRESS = `UPDATING TASK PROGRESS You can track and communicate your progress on the overall task using the task_progress parameter supported by every tool c...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/mcp.ts
src/core/prompts/system-prompt/components/mcp.ts
import type { McpServer } from "@/shared/mcp" import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" /** * Checks if there are any enabled MCP servers in the context. * This is a u...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/agent_role.ts
src/core/prompts/system-prompt/components/agent_role.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const AGENT_ROLE = [ "You are Cline,", "a highly skilled software engineer", "with extensive knowledge in many programming l...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/index.ts
src/core/prompts/system-prompt/components/index.ts
import { SystemPromptSection } from "../templates/placeholders" import { getActVsPlanModeSection } from "./act_vs_plan_mode" import { getAgentRoleSection } from "./agent_role" import { getCapabilitiesSection } from "./capabilities" import { getCliSubagentsSection } from "./cli_subagents" import { getEditingFilesSection...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/editing_files.ts
src/core/prompts/system-prompt/components/editing_files.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const EDITING_FILES_TEMPLATE_TEXT = `EDITING FILES You have access to two tools for working with files: **write_to_file** and ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/user_instructions.ts
src/core/prompts/system-prompt/components/user_instructions.ts
import { SystemPromptSection } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../types" const USER_CUSTOM_INSTRUCTIONS_TEMPLATE_TEXT = `USER'S CUSTOM INSTRUCTIONS The following additional instructions are provided ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/tool_use/examples.ts
src/core/prompts/system-prompt/components/tool_use/examples.ts
import { TemplateEngine } from "../../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../../types" const FOCUS_CHAIN_EXAMPLE_BASH = `<task_progress> - [x] Set up project structure - [x] Install dependencies - [ ] Run command to start server - [ ] Test application </task_progress> ` ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/tool_use/tools.ts
src/core/prompts/system-prompt/components/tool_use/tools.ts
import { PromptBuilder } from "../../registry/PromptBuilder" import { TemplateEngine } from "../../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../../types" export async function getToolUseToolsSection(variant: PromptVariant, context: SystemPromptContext): Promise<string> { const...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/tool_use/index.ts
src/core/prompts/system-prompt/components/tool_use/index.ts
import { SystemPromptSection } from "../../templates/placeholders" import { TemplateEngine } from "../../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../../types" import { getToolUseExamplesSection } from "./examples" import { getToolUseFormattingSection } from "./formatting" impor...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/tool_use/guidelines.ts
src/core/prompts/system-prompt/components/tool_use/guidelines.ts
import { TemplateEngine } from "../../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../../types" export const TOOL_USE_GUIDELINES_TEMPLATE_TEXT = `# Tool Use Guidelines 1. In <thinking> tags, assess what information you already have and what information you need to proceed with th...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/components/tool_use/formatting.ts
src/core/prompts/system-prompt/components/tool_use/formatting.ts
import { TemplateEngine } from "../../templates/TemplateEngine" import type { PromptVariant, SystemPromptContext } from "../../types" export async function getToolUseFormattingSection(_variant: PromptVariant, context: SystemPromptContext): Promise<string> { // Return the placeholder that will be replaced with actual ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/__tests__/integration.test.ts
src/core/prompts/system-prompt/__tests__/integration.test.ts
/** * System Prompt Integration Tests with Snapshot Testing * * This test suite validates that system prompts remain consistent across different * model families and context configurations using snapshot testing. * * Usage: * - Run tests normally: `npm run test:unit` * Tests will fail if generated prompts don...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/__tests__/PromptRegistry.test.ts
src/core/prompts/system-prompt/__tests__/PromptRegistry.test.ts
import { expect } from "chai" import type { McpHub } from "@/services/mcp/McpHub" import { ModelFamily } from "@/shared/prompts" import { PromptRegistry } from "../registry/PromptRegistry" import type { SystemPromptContext } from "../types" import { mockProviderInfo } from "./integration.test" describe("PromptRegistry...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/__tests__/matcher-test.ts
src/core/prompts/system-prompt/__tests__/matcher-test.ts
/** * Test to verify the new matcher-based variant selection works correctly */ import { ApiProviderInfo } from "@/core/api" import { McpHub } from "@/services/mcp/McpHub" import { ModelFamily } from "@/shared/prompts" import { SystemPromptContext } from "../types" import { VARIANT_CONFIGS } from "../variants" // M...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/__tests__/PromptBuilder.test.ts
src/core/prompts/system-prompt/__tests__/PromptBuilder.test.ts
import { expect } from "chai" import type { McpHub } from "@/services/mcp/McpHub" import { ModelFamily } from "@/shared/prompts" import { PromptBuilder } from "../registry/PromptBuilder" import { SystemPromptSection } from "../templates/placeholders" import type { ComponentRegistry, PromptVariant, SystemPromptContext }...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/__tests__/TemplateEngine.test.ts
src/core/prompts/system-prompt/__tests__/TemplateEngine.test.ts
import { expect } from "chai" import type { McpHub } from "@/services/mcp/McpHub" import { TemplateEngine } from "../templates/TemplateEngine" import type { SystemPromptContext } from "../types" import { mockProviderInfo } from "./integration.test" describe("TemplateEngine", () => { let templateEngine: TemplateEngine...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/templates/TemplateEngine.ts
src/core/prompts/system-prompt/templates/TemplateEngine.ts
import type { SystemPromptContext } from "../types" export class TemplateEngine { /** * Resolves template placeholders in the format {{PLACEHOLDER}} with provided values */ resolve( template: string | ((context: SystemPromptContext) => string), context: SystemPromptContext, placeholders: Record<string, unk...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/templates/placeholders.ts
src/core/prompts/system-prompt/templates/placeholders.ts
export enum SystemPromptSection { AGENT_ROLE = "AGENT_ROLE_SECTION", TOOL_USE = "TOOL_USE_SECTION", TOOLS = "TOOLS_SECTION", MCP = "MCP_SECTION", EDITING_FILES = "EDITING_FILES_SECTION", ACT_VS_PLAN = "ACT_VS_PLAN_SECTION", CLI_SUBAGENTS = "CLI_SUBAGENTS_SECTION", TODO = "TODO_SECTION", CAPABILITIES = "CAPABIL...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/registry/PromptRegistry.ts
src/core/prompts/system-prompt/registry/PromptRegistry.ts
import { ModelFamily } from "@/shared/prompts" import type { ClineTool } from "@/shared/tools" import { ClineToolSet } from ".." import { getSystemPromptComponents } from "../components" import { registerClineToolSets } from "../tools" import type { ComponentFunction, ComponentRegistry, PromptVariant, SystemPromptConte...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/registry/ClineToolSet.ts
src/core/prompts/system-prompt/registry/ClineToolSet.ts
import { CLINE_MCP_TOOL_IDENTIFIER, McpServer } from "@/shared/mcp" import { ModelFamily } from "@/shared/prompts" import { ClineDefaultTool } from "@/shared/tools" import { type ClineToolSpec, toolSpecFunctionDeclarations, toolSpecFunctionDefinition, toolSpecInputSchema } from "../spec" import { PromptVariant, SystemP...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt/registry/PromptBuilder.ts
src/core/prompts/system-prompt/registry/PromptBuilder.ts
import type { ClineDefaultTool } from "@/shared/tools" import { ClineToolSet } from "../registry/ClineToolSet" import { type ClineToolSpec, resolveInstruction } from "../spec" import { STANDARD_PLACEHOLDERS } from "../templates/placeholders" import { TemplateEngine } from "../templates/TemplateEngine" import type { Com...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt-legacy/families/local-models/compact-system-prompt.ts
src/core/prompts/system-prompt-legacy/families/local-models/compact-system-prompt.ts
import type { McpHub } from "@services/mcp/McpHub" import { BrowserSettings } from "@shared/BrowserSettings" import { FocusChainSettings } from "@shared/FocusChainSettings" import { getShell } from "@utils/shell" import os from "os" import osName from "os-name" export const SYSTEM_PROMPT_COMPACT = async ( cwd: string...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/system-prompt-legacy/families/next-gen-models/gpt-5.ts
src/core/prompts/system-prompt-legacy/families/next-gen-models/gpt-5.ts
import { McpHub } from "@services/mcp/McpHub" import { BrowserSettings } from "@shared/BrowserSettings" import { FocusChainSettings } from "@shared/FocusChainSettings" import { getShell } from "@utils/shell" import os from "os" import osName from "os-name" export const SYSTEM_PROMPT_GPT_5 = async ( cwd: string, supp...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
true
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/ToolExecutor.ts
src/core/task/ToolExecutor.ts
import { ApiHandler } from "@core/api" import { FileContextTracker } from "@core/context/context-tracking/FileContextTracker" import { ClineIgnoreController } from "@core/ignore/ClineIgnoreController" import { DiffViewProvider } from "@integrations/editor/DiffViewProvider" import { BrowserSession } from "@services/brow...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/TaskLockUtils.ts
src/core/task/TaskLockUtils.ts
import { releaseFolderLock, tryAcquireFolderLockWithRetry } from "@/core/locks/FolderLockUtils" import type { FolderLockOptions, FolderLockWithRetryResult } from "@/core/locks/types" /** * Base path for task folders */ const TASKS_BASE_PATH = "~/.cline/data/tasks" /** * Attempt to acquire task folder lock with ret...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/multifile-diff.ts
src/core/task/multifile-diff.ts
import { HostProvider } from "@/hosts/host-provider" import CheckpointTracker from "@/integrations/checkpoints/CheckpointTracker" import { findLast } from "@/shared/array" import { ShowMessageType } from "@/shared/proto/index.host" import { MessageStateHandler } from "./message-state" export async function showChanged...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/multifile-diff.test.ts
src/core/task/multifile-diff.test.ts
import { MessageStateHandler } from "@core/task/message-state" import { showChangedFilesDiff } from "@core/task/multifile-diff" import { expect } from "chai" import { afterEach, beforeEach, describe, it } from "mocha" import sinon from "sinon" import { HostProvider } from "@/hosts/host-provider" import CheckpointTracke...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/utils.ts
src/core/task/utils.ts
import { ApiHandler } from "@core/api" import { execSync } from "child_process" import { showSystemNotification } from "@/integrations/notifications" import { ClineApiReqCancelReason, ClineApiReqInfo } from "@/shared/ExtensionMessage" import { calculateApiCostAnthropic } from "@/utils/cost" import { MessageStateHandler...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/StreamResponseHandler.ts
src/core/task/StreamResponseHandler.ts
import type { ToolUse } from "@core/assistant-message" import { JSONParser } from "@streamparser/json" import { McpHub } from "@/services/mcp/McpHub" import { CLINE_MCP_TOOL_IDENTIFIER } from "@/shared/mcp" import { ClineAssistantRedactedThinkingBlock, ClineAssistantThinkingBlock, ClineAssistantToolUseBlock, ClineR...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/message-state.ts
src/core/task/message-state.ts
import CheckpointTracker from "@integrations/checkpoints/CheckpointTracker" import getFolderSize from "get-folder-size" import Mutex from "p-mutex" import { findLastIndex } from "@/shared/array" import { combineApiRequests } from "@/shared/combineApiRequests" import { combineCommandSequences } from "@/shared/combineCom...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/TaskState.ts
src/core/task/TaskState.ts
import { Anthropic } from "@anthropic-ai/sdk" import { AssistantMessageContent } from "@core/assistant-message" import { ClineAskResponse } from "@shared/WebviewMessage" import type { HookExecution } from "./types/HookExecution" export class TaskState { // Streaming flags isStreaming = false isWaitingForFirstChunk ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/index.ts
src/core/task/index.ts
import { setTimeout as setTimeoutPromise } from "node:timers/promises" import { ApiHandler, ApiProviderInfo, buildApiHandler } from "@core/api" import { ApiStream } from "@core/api/transform/stream" import { AssistantMessageContent, parseAssistantMessageV2, ToolUse } from "@core/assistant-message" import { ContextManag...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
true
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/ToolExecutorCoordinator.ts
src/core/task/tools/ToolExecutorCoordinator.ts
import type { ToolUse } from "@core/assistant-message" import { CLINE_MCP_TOOL_IDENTIFIER } from "@/shared/mcp" import { ClineDefaultTool } from "@/shared/tools" import type { ToolResponse } from "../index" import type { TaskConfig } from "./types/TaskConfig" import type { StronglyTypedUIHelpers } from "./types/UIHelpe...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/ToolValidator.ts
src/core/task/tools/ToolValidator.ts
import type { ToolParamName, ToolUse } from "@core/assistant-message" import type { ClineIgnoreController } from "@core/ignore/ClineIgnoreController" export type ValidationResult = { ok: true } | { ok: false; error: string } /** * Lightweight validator used by new tool handlers. * The legacy ToolExecutor switch rem...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/autoApprove.ts
src/core/task/tools/autoApprove.ts
import { resolveWorkspacePath } from "@core/workspace" import { isMultiRootEnabled } from "@core/workspace/multi-root-utils" import { ClineDefaultTool } from "@shared/tools" import { StateManager } from "@/core/storage/StateManager" import { HostProvider } from "@/hosts/host-provider" import { getCwd, getDesktopDir, is...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/ToolDisplayUtils.ts
src/core/task/tools/utils/ToolDisplayUtils.ts
import { ToolParamName, ToolUse } from "@core/assistant-message" import type { ToolExecutorCoordinator } from "../ToolExecutorCoordinator" import { removeClosingTag } from "./ToolConstants" /** * Utility functions for tool display and formatting */ export class ToolDisplayUtils { /** * Generate a descriptive stri...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/PathResolver.ts
src/core/task/tools/utils/PathResolver.ts
import { resolveWorkspacePath } from "@/core/workspace" import type { ToolValidator } from "../ToolValidator" import type { TaskConfig } from "../types/TaskConfig" /** * Utility class for resolving and validating file paths within a task context */ export class PathResolver { constructor( private config: TaskConf...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/ToolHookUtils.ts
src/core/task/tools/utils/ToolHookUtils.ts
import type { ToolUse } from "@core/assistant-message" import { PreToolUseHookCancellationError } from "@core/hooks/PreToolUseHookCancellationError" import type { TaskConfig } from "../types/TaskConfig" /** * Utility functions for tool hook execution. */ export class ToolHookUtils { /** * Runs the PreToolUse hook...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/ModelContentProcessor.ts
src/core/task/tools/utils/ModelContentProcessor.ts
import { fixModelHtmlEscaping, removeInvalidChars } from "@utils/string" /** * File extensions that use escaped characters (&lt; &gt; &amp;) as valid syntax. * Add more extensions as needed (e.g., ".svg", ".xsd", ".xslt") */ const ESCAPED_CHARACTER_EXTENSIONS = [".xml"] as const /** * Applies model-specific conte...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/PatchParser.ts
src/core/task/tools/utils/PatchParser.ts
import { DiffError, PATCH_MARKERS, type Patch, type PatchAction, PatchActionType, type PatchChunk, type PatchWarning, } from "@/shared/Patch" import { canonicalize } from "@/shared/string" /** * Parser for Apply Patch content */ export class PatchParser { private patch: Patch = { actions: {}, warnings: [] } ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/ToolResultUtils.ts
src/core/task/tools/utils/ToolResultUtils.ts
import { ApiHandler } from "@core/api" import { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { ToolResponse } from "@core/task" import { processFilesIntoText } from "@/integrations/misc/extract-text" import { Logger } from "@/services/logging/Logger" import { ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/index.ts
src/core/task/tools/utils/index.ts
export * from "./ToolConstants" export { ToolDisplayUtils } from "./ToolDisplayUtils" export { ToolResultUtils } from "./ToolResultUtils"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/FileProviderOperations.ts
src/core/task/tools/utils/FileProviderOperations.ts
import type { DiffViewProvider } from "@/integrations/editor/DiffViewProvider" export interface FileOpsResult { finalContent?: string deleted?: boolean newProblemsMessage?: string userEdits?: string autoFormattingEdits?: string } /** * Utility class for file operations via a DiffViewProvider */ export class Fi...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/ToolConstants.ts
src/core/task/tools/utils/ToolConstants.ts
import type { ToolParamName, ToolUse } from "@core/assistant-message" /** * Shared constants for tool validation and configuration * This file serves as a single source of truth for tool-related constants */ /** * Expected keys for TaskConfig interface validation * Keep this in sync with the TaskConfig interface...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/__tests__/PatchParser.test.ts
src/core/task/tools/utils/__tests__/PatchParser.test.ts
import { expect } from "chai" import { DiffError, type PatchAction, PatchActionType } from "@/shared/Patch" import { PatchParser } from "../PatchParser" describe("PatchParser", () => { describe("Parsing Logic", () => { interface TestCase { name: string patchLines: string[] currentFiles: Record<string, stri...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/utils/__tests__/ModelContentProcessor.test.ts
src/core/task/tools/utils/__tests__/ModelContentProcessor.test.ts
import { expect } from "chai" import { applyModelContentFixes } from "../ModelContentProcessor" describe("ModelContentProcessor", () => { // Test data constants const MODELS = { CLAUDE: "claude-3-5-sonnet-20241022", CLAUDE_OPUS: "claude-opus", CLAUDE_V2: "anthropic.claude-v2", GEMINI: "gemini-pro", GEMINI_...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/types/TaskConfig.ts
src/core/task/tools/types/TaskConfig.ts
import type { ApiHandler } from "@core/api" import type { FileContextTracker } from "@core/context/context-tracking/FileContextTracker" import type { ClineIgnoreController } from "@core/ignore/ClineIgnoreController" import type { DiffViewProvider } from "@integrations/editor/DiffViewProvider" import type { BrowserSessi...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/types/UIHelpers.ts
src/core/task/tools/types/UIHelpers.ts
import type { ClineAsk, ClineSay } from "@shared/ExtensionMessage" import type { ClineDefaultTool } from "@shared/tools" import type { ClineAskResponse } from "@shared/WebviewMessage" import { telemetryService } from "@/services/telemetry" import type { ToolParamName, ToolUse } from "../../../assistant-message" import ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/CondenseHandler.ts
src/core/task/tools/handlers/CondenseHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { ensureTaskDirectoryExists } from "@core/storage/disk" import { processFilesIntoText } from "@integrations/misc/extract-text" import { showSystemNotification } from "@integrations/notifications" impor...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/LoadMcpDocumentationHandler.ts
src/core/task/tools/handlers/LoadMcpDocumentationHandler.ts
import type { ToolUse } from "@core/assistant-message" import { loadMcpDocumentation } from "@core/prompts/loadMcpDocumentation" import { ClineDefaultTool } from "@/shared/tools" import type { ToolResponse } from "../../index" import type { IPartialBlockHandler, IToolHandler } from "../ToolExecutorCoordinator" import t...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ReadFileToolHandler.ts
src/core/task/tools/handlers/ReadFileToolHandler.ts
import path from "node:path" import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { getWorkspaceBasename, resolveWorkspacePath } from "@core/workspace" import { extractFileContent } from "@integrations/misc/extract-file-content" import { arePathsEqual, g...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/BrowserToolHandler.ts
src/core/task/tools/handlers/BrowserToolHandler.ts
import { BrowserAction, BrowserActionResult, browserActions, ClineSayBrowserAction } from "@shared/ExtensionMessage" import { ClineDefaultTool } from "@/shared/tools" import { ToolUse } from "../../../assistant-message" import { formatResponse } from "../../../prompts/responses" import { ToolResponse } from "../.." imp...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ReportBugHandler.ts
src/core/task/tools/handlers/ReportBugHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { processFilesIntoText } from "@integrations/misc/extract-text" import { showSystemNotification } from "@integrations/notifications" import { createAndOpenGitHubIssue } from "@utils/github-url-utils" i...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/WebSearchToolHandler.ts
src/core/task/tools/handlers/WebSearchToolHandler.ts
import { ClineAsk, ClineSayTool } from "@shared/ExtensionMessage" import { ClineDefaultTool } from "@shared/tools" import axios from "axios" import { ClineEnv } from "@/config" import { AuthService } from "@/services/auth/AuthService" import { buildClineExtraHeaders } from "@/services/EnvUtils" import { featureFlagsSer...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/WriteToFileToolHandler.ts
src/core/task/tools/handlers/WriteToFileToolHandler.ts
import path from "node:path" import { setTimeout as setTimeoutPromise } from "node:timers/promises" import type { ToolUse } from "@core/assistant-message" import { constructNewFileContent } from "@core/assistant-message/diff" import { formatResponse } from "@core/prompts/responses" import { getWorkspaceBasename, resolv...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/GenerateExplanationToolHandler.ts
src/core/task/tools/handlers/GenerateExplanationToolHandler.ts
import type { ToolUse } from "@core/assistant-message" import { buildDiffContent, type ChangedFile, detectBinaryFile, openDiffView, setupCommentController, streamAIExplanationComments, stringifyConversationHistory, } from "@core/controller/task/explainChangesShared" import { formatResponse } from "@core/prompts/...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/PlanModeRespondHandler.ts
src/core/task/tools/handlers/PlanModeRespondHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { findLast, parsePartialArrayString } from "@shared/array" import { telemetryService } from "@/services/telemetry" import { ClinePlanModeResponse } from "@/shared/ExtensionMessage" import { ClineDefaul...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/WebFetchToolHandler.ts
src/core/task/tools/handlers/WebFetchToolHandler.ts
import { ClineAsk, ClineSayTool } from "@shared/ExtensionMessage" import { ClineDefaultTool } from "@shared/tools" import axios from "axios" import { ClineEnv } from "@/config" import { AuthService } from "@/services/auth/AuthService" import { buildClineExtraHeaders } from "@/services/EnvUtils" import { featureFlagsSer...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ActModeRespondHandler.ts
src/core/task/tools/handlers/ActModeRespondHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { ClineDefaultTool } from "@shared/tools" import type { ToolResponse } from "../../index" import type { IPartialBlockHandler, IToolHandler } from "../ToolExecutorCoordinator" import type { TaskConfig }...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ListFilesToolHandler.ts
src/core/task/tools/handlers/ListFilesToolHandler.ts
import path from "node:path" import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { getWorkspaceBasename, resolveWorkspacePath } from "@core/workspace" import { listFiles } from "@services/glob/list-files" import { arePathsEqual, getReadablePath, isLocat...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ApplyPatchHandler.ts
src/core/task/tools/handlers/ApplyPatchHandler.ts
import { readFile } from "node:fs/promises" import type { ToolUse } from "@core/assistant-message" import { resolveWorkspacePath } from "@core/workspace" import { processFilesIntoText } from "@integrations/misc/extract-text" import type { ClineSayTool } from "@shared/ExtensionMessage" import { fileExistsAtPath } from "...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/SearchFilesToolHandler.ts
src/core/task/tools/handlers/SearchFilesToolHandler.ts
import type { ToolUse } from "@core/assistant-message" import { regexSearchFiles } from "@services/ripgrep" import { arePathsEqual, getReadablePath, isLocatedInWorkspace } from "@utils/path" import * as path from "path" import { formatResponse } from "@/core/prompts/responses" import { parseWorkspaceInlinePath } from "...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/AskFollowupQuestionToolHandler.ts
src/core/task/tools/handlers/AskFollowupQuestionToolHandler.ts
import { processFilesIntoText } from "@integrations/misc/extract-text" import { showSystemNotification } from "@integrations/notifications" import { findLast, parsePartialArrayString } from "@shared/array" import { ClineAsk, ClineAskQuestion } from "@shared/ExtensionMessage" import { ClineDefaultTool } from "@shared/to...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/UseMcpToolHandler.ts
src/core/task/tools/handlers/UseMcpToolHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { ClineAsk, ClineAskUseMcpServer } from "@shared/ExtensionMessage" import { telemetryService } from "@/services/telemetry" import { ClineDefaultTool } from "@/shared/tools" import type { ToolResponse }...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ExecuteCommandToolHandler.ts
src/core/task/tools/handlers/ExecuteCommandToolHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { WorkspacePathAdapter } from "@core/workspace/WorkspacePathAdapter" import { showSystemNotification } from "@integrations/notifications" import { COMMAND_REQ_APP_STRING } from "@shared/combineCommandS...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/SummarizeTaskHandler.ts
src/core/task/tools/handlers/SummarizeTaskHandler.ts
import type { ToolUse } from "@core/assistant-message" import { executePreCompactHookWithCleanup, HookCancellationError } from "@core/hooks/precompact-executor" import { continuationPrompt } from "@core/prompts/contextManagement" import { formatResponse } from "@core/prompts/responses" import { ensureTaskDirectoryExist...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/ListCodeDefinitionNamesToolHandler.ts
src/core/task/tools/handlers/ListCodeDefinitionNamesToolHandler.ts
import type { ToolUse } from "@core/assistant-message" import { getWorkspaceBasename, resolveWorkspacePath } from "@core/workspace" import { parseSourceCodeForDefinitionsTopLevel } from "@services/tree-sitter" import { getReadablePath, isLocatedInWorkspace } from "@utils/path" import { formatResponse } from "@/core/pro...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/NewTaskHandler.ts
src/core/task/tools/handlers/NewTaskHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { processFilesIntoText } from "@integrations/misc/extract-text" import { showSystemNotification } from "@integrations/notifications" import { ClineDefaultTool } from "@/shared/tools" import type { Tool...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/AttemptCompletionHandler.ts
src/core/task/tools/handlers/AttemptCompletionHandler.ts
import type Anthropic from "@anthropic-ai/sdk" import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { processFilesIntoText } from "@integrations/misc/extract-text" import { showSystemNotification } from "@integrations/notifications" import { telemetrySer...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/tools/handlers/AccessMcpResourceHandler.ts
src/core/task/tools/handlers/AccessMcpResourceHandler.ts
import type { ToolUse } from "@core/assistant-message" import { formatResponse } from "@core/prompts/responses" import { ClineAsk, ClineAskUseMcpServer } from "@shared/ExtensionMessage" import { telemetryService } from "@/services/telemetry" import { ClineDefaultTool } from "@/shared/tools" import type { ToolResponse }...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/focus-chain/utils.ts
src/core/task/focus-chain/utils.ts
import { isCompletedFocusChainItem, isFocusChainItem } from "@shared/focus-chain-utils" export interface TodoListCounts { totalItems: number completedItems: number } /** * Parses a focus chain list string and returns counts of total and completed items * @param todoList The focus chain list string to parse * @re...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/focus-chain/file-utils.ts
src/core/task/focus-chain/file-utils.ts
import { isFocusChainItem } from "@shared/focus-chain-utils" import * as fs from "fs/promises" import * as path from "path" import { ensureTaskDirectoryExists } from "../../storage/disk" /** * Generate the standard file path for a task's focusChain markdown file */ export function getFocusChainFilePath(taskDir: stri...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/focus-chain/prompts.ts
src/core/task/focus-chain/prompts.ts
// Prompt for initial list creation const initial = ` # task_progress CREATION REQUIRED - ACT MODE ACTIVATED **You've just switched from PLAN MODE to ACT MODE!** ** IMMEDIATE ACTION REQUIRED:** 1. Create a comprehensive todo list in your NEXT tool call 2. Use the task_progress parameter to provide the list 3. Format ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/focus-chain/index.ts
src/core/task/focus-chain/index.ts
import { FocusChainSettings } from "@shared/FocusChainSettings" import * as chokidar from "chokidar" import * as fs from "fs/promises" import { telemetryService } from "@/services/telemetry" import { ClineSay } from "../../../shared/ExtensionMessage" import { Mode } from "../../../shared/storage/types" import { writeFi...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/utils/buildUserFeedbackContent.ts
src/core/task/utils/buildUserFeedbackContent.ts
import { formatResponse } from "@core/prompts/responses" import { processFilesIntoText } from "@integrations/misc/extract-text" import type { ClineContent } from "@shared/messages/content" /** * Builds an array of ClineContent blocks from user feedback inputs. * This ensures consistent formatting across all user fee...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/utils/extractUserPromptFromContent.ts
src/core/task/utils/extractUserPromptFromContent.ts
import { SYSTEM_CONTENT_MARKERS, USER_CONTENT_TAGS } from "@shared/messages/constants" import type { ClineContent } from "@shared/messages/content" /** * Extracts the actual user input from content blocks, stripping system-added wrappers * and metadata. This ensures consistent prompt values across different scenario...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/__tests__/ToolExecutor.test.ts
src/core/task/__tests__/ToolExecutor.test.ts
import { afterEach, beforeEach, describe, it } from "mocha" import "should" import sinon from "sinon" describe("ToolExecutor Hook Integration", () => { let sandbox: sinon.SinonSandbox beforeEach(() => { sandbox = sinon.createSandbox() }) afterEach(() => { sandbox.restore() }) describe("addHookContextToCon...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/task/types/HookExecution.ts
src/core/task/types/HookExecution.ts
/** * Represents an active hook execution that can be cancelled. * This is tracked in TaskState to allow cancellation via UI or programmatic triggers. */ export interface HookExecution { /** The name of the hook being executed (e.g., "PreToolUse", "PostToolUse") */ hookName: string /** The name of the tool that t...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/webview/WebviewProvider.ts
src/core/webview/WebviewProvider.ts
import path from "node:path" import { Controller } from "@core/controller/index" import axios from "axios" import { readFile } from "fs/promises" import * as vscode from "vscode" import { HostProvider } from "@/hosts/host-provider" import { ShowMessageType } from "@/shared/proto/host/window" import { getNonce } from "....
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/webview/getNonce.ts
src/core/webview/getNonce.ts
/** * A helper function that returns a unique alphanumeric identifier called a nonce. * * @remarks This function is primarily used to help enforce content security * policies for resources/scripts being executed in a webview context. * * @returns A nonce */ export function getNonce() { let text = "" const poss...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/webview/index.ts
src/core/webview/index.ts
export { WebviewProvider } from "./WebviewProvider"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-tracking/ModelContextTracker.test.ts
src/core/context/context-tracking/ModelContextTracker.test.ts
import * as diskModule from "@core/storage/disk" import { expect } from "chai" import { afterEach, beforeEach, describe, it } from "mocha" import * as sinon from "sinon" import type { TaskMetadata } from "./ContextTrackerTypes" import { ModelContextTracker } from "./ModelContextTracker" describe("ModelContextTracker",...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-tracking/FileContextTracker.test.ts
src/core/context/context-tracking/FileContextTracker.test.ts
import * as diskModule from "@core/storage/disk" import { expect } from "chai" import chokidar from "chokidar" import { afterEach, beforeEach, describe, it } from "mocha" import * as path from "path" import * as sinon from "sinon" import * as vscode from "vscode" import { Controller } from "@/core/controller" import { ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-tracking/FileContextTracker.ts
src/core/context/context-tracking/FileContextTracker.ts
import { getTaskMetadata, readTaskHistoryFromState, saveTaskMetadata } from "@core/storage/disk" import type { ClineMessage } from "@shared/ExtensionMessage" import chokidar, { FSWatcher } from "chokidar" import * as path from "path" import * as vscode from "vscode" import { Controller } from "@/core/controller" import...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-tracking/EnvironmentContextTracker.ts
src/core/context/context-tracking/EnvironmentContextTracker.ts
import { collectEnvironmentMetadata, getTaskMetadata, saveTaskMetadata } from "@core/storage/disk" import type { EnvironmentMetadataEntry } from "./ContextTrackerTypes" export class EnvironmentContextTracker { readonly taskId: string constructor(taskId: string) { this.taskId = taskId } async recordEnvironment(...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-tracking/ContextTrackerTypes.ts
src/core/context/context-tracking/ContextTrackerTypes.ts
// Type definitions for FileContextTracker export interface FileMetadataEntry { path: string record_state: "active" | "stale" record_source: "read_tool" | "user_edited" | "cline_edited" | "file_mentioned" cline_read_date: number | null cline_edit_date: number | null user_edit_date?: number | null } export interf...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-tracking/ModelContextTracker.ts
src/core/context/context-tracking/ModelContextTracker.ts
import { getTaskMetadata, saveTaskMetadata } from "@core/storage/disk" export class ModelContextTracker { readonly taskId: string constructor(taskId: string) { this.taskId = taskId } async recordModelUsage(apiProviderId: string, modelId: string, mode: string) { const metadata = await getTaskMetadata(this.tas...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/instructions/user-instructions/rule-helpers.ts
src/core/context/instructions/user-instructions/rule-helpers.ts
import { ensureRulesDirectoryExists, ensureWorkflowsDirectoryExists, GlobalFileNames } from "@core/storage/disk" import { ClineRulesToggles } from "@shared/cline-rules" import { GlobalInstructionsFile } from "@shared/remote-config/schema" import { fileExistsAtPath, isDirectory, readDirectory } from "@utils/fs" import f...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/instructions/user-instructions/workflows.ts
src/core/context/instructions/user-instructions/workflows.ts
import { synchronizeRuleToggles } from "@core/context/instructions/user-instructions/rule-helpers" import { ensureWorkflowsDirectoryExists, GlobalFileNames } from "@core/storage/disk" import { ClineRulesToggles } from "@shared/cline-rules" import path from "path" import { Controller } from "@/core/controller" /** * R...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/instructions/user-instructions/external-rules.ts
src/core/context/instructions/user-instructions/external-rules.ts
import { combineRuleToggles, getRuleFilesTotalContent, readDirectoryRecursive, synchronizeRuleToggles, } from "@core/context/instructions/user-instructions/rule-helpers" import { formatResponse } from "@core/prompts/responses" import { GlobalFileNames } from "@core/storage/disk" import { listFiles } from "@services...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/instructions/user-instructions/cline-rules.ts
src/core/context/instructions/user-instructions/cline-rules.ts
import { getRuleFilesTotalContent, synchronizeRuleToggles } from "@core/context/instructions/user-instructions/rule-helpers" import { formatResponse } from "@core/prompts/responses" import { ensureRulesDirectoryExists, GlobalFileNames } from "@core/storage/disk" import { StateManager } from "@core/storage/StateManager"...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-management/context-error-handling.ts
src/core/context/context-management/context-error-handling.ts
import LengthFinishReasonError, { APIError } from "openai" export function checkContextWindowExceededError(error: unknown): boolean { return ( checkIsOpenAIContextWindowError(error) || checkIsOpenRouterContextWindowError(error) || checkIsAnthropicContextWindowError(error) || checkIsCerebrasContextWindowError(...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/context/context-management/ContextManager.ts
src/core/context/context-management/ContextManager.ts
import { Anthropic } from "@anthropic-ai/sdk" import { ApiHandler } from "@core/api" import { formatResponse } from "@core/prompts/responses" import { GlobalFileNames } from "@core/storage/disk" import { ClineApiReqInfo, ClineMessage } from "@shared/ExtensionMessage" import { fileExistsAtPath } from "@utils/fs" import ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
true