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/api/providers/types.ts | src/core/api/providers/types.ts | // For the following openrouter error type sources, see the docs here:
// https://openrouter.ai/docs/api-reference/errors
export interface LanguageModelChatSelector {
vendor?: string
family?: string
version?: string
id?: string
}
export type OpenRouterErrorResponse = {
error: {
message: string
code: number
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/mistral.ts | src/core/api/providers/mistral.ts | import { Mistral } from "@mistralai/mistralai"
import { HTTPClient } from "@mistralai/mistralai/lib/http"
import { Tool as MistralTool } from "@mistralai/mistralai/models/components/tool"
import { MistralModelId, ModelInfo, mistralDefaultModelId, mistralModels } from "@shared/api"
import type { ChatCompletionTool as Op... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/huggingface.ts | src/core/api/providers/huggingface.ts | import { HuggingFaceModelId, huggingFaceDefaultModelId, huggingFaceModels, ModelInfo } from "@shared/api"
import { calculateApiCostOpenAI } from "@utils/cost"
import OpenAI from "openai"
import type { ChatCompletionTool as OpenAITool } from "openai/resources/chat/completions"
import { ClineStorageMessage } from "@/shar... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/claude-code.ts | src/core/api/providers/claude-code.ts | import { filterMessagesForClaudeCode } from "@/integrations/claude-code/message-filter"
import { runClaudeCode } from "@/integrations/claude-code/run"
import { ClaudeCodeModelId, claudeCodeDefaultModelId, claudeCodeModels } from "@/shared/api"
import { ClineStorageMessage } from "@/shared/messages/content"
import { typ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/sapaicore.ts | src/core/api/providers/sapaicore.ts | import { Anthropic } from "@anthropic-ai/sdk"
import {
type ContentBlock as BedrockContentBlock,
ConversationRole as BedrockConversationRole,
type Message as BedrockMessage,
} from "@aws-sdk/client-bedrock-runtime"
import { ChatMessage, OrchestrationClient, OrchestrationModuleConfig } from "@sap-ai-sdk/orchestration... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/oca.ts | src/core/api/providers/oca.ts | import { LiteLLMModelInfo, liteLlmDefaultModelId, liteLlmModelInfoSaneDefaults } from "@shared/api"
import OpenAI, { APIError, OpenAIError } from "openai"
import type { ChatCompletionTool as OpenAITool } from "openai/resources/chat/completions"
import { OcaAuthService } from "@/services/auth/oca/OcaAuthService"
import ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/nousresearch.ts | src/core/api/providers/nousresearch.ts | import { ModelInfo, NousResearchModelId, nousResearchDefaultModelId, nousResearchModels } from "@shared/api"
import OpenAI from "openai"
import { ClineStorageMessage } from "@/shared/messages/content"
import { ApiHandler, CommonApiHandlerOptions } from "../index"
import { withRetry } from "../retry"
import { convertToO... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/__tests__/bedrock.test.ts | src/core/api/providers/__tests__/bedrock.test.ts | import "should"
import { ConverseStreamCommand } from "@aws-sdk/client-bedrock-runtime"
import { Readable } from "stream"
import type { AwsBedrockHandlerOptions } from "../bedrock"
import { AwsBedrockHandler } from "../bedrock"
describe("AwsBedrockHandler", () => {
// Helper function to create a mock stream
function... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/__tests__/litellm.test.ts | src/core/api/providers/__tests__/litellm.test.ts | import { LiteLlmHandler, type LiteLlmModelInfoResponse } from "@core/api/providers/litellm"
import { convertToOpenAiMessages } from "@core/api/transform/openai-format"
import { expect } from "chai"
import sinon from "sinon"
import { ClineStorageMessage } from "@/shared/messages/content"
import { mockFetchForTesting } f... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/__tests__/sapaicore.test.ts | src/core/api/providers/__tests__/sapaicore.test.ts | import "should"
import { Anthropic } from "@anthropic-ai/sdk"
import { SapAiCoreHandler } from "../sapaicore"
describe("SapAiCoreHandler", () => {
let handler: SapAiCoreHandler
beforeEach(() => {
const mockOptions = {
sapAiCoreClientId: "test-client-id",
sapAiCoreClientSecret: "test-client-secret",
sapAi... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/__tests__/claude-code.test.ts | src/core/api/providers/__tests__/claude-code.test.ts | import { afterEach, beforeEach, describe, it } from "mocha"
import sinon from "sinon"
import "should"
import { ClaudeCodeHandler } from "@core/api/providers/claude-code"
import { ClineStorageMessage } from "@/shared/messages/content"
describe("ClaudeCodeHandler", () => {
let handler: ClaudeCodeHandler
let sandbox: s... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/providers/__tests__/ollama.test.ts | src/core/api/providers/__tests__/ollama.test.ts | import { afterEach, before, beforeEach, describe, it } from "mocha"
import "should"
import { ApiHandlerOptions } from "@shared/api"
import axios from "axios"
import sinon from "sinon"
import { ClineStorageMessage } from "@/shared/messages/content"
import { OllamaHandler } from "../ollama"
describe("OllamaHandler", () ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/mistral-format.ts | src/core/api/transform/mistral-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import { AssistantMessage } from "@mistralai/mistralai/models/components/assistantmessage"
import { SystemMessage } from "@mistralai/mistralai/models/components/systemmessage"
import { ToolMessage } from "@mistralai/mistralai/models/components/toolmessage"
import { UserMess... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/openrouter-stream.ts | src/core/api/transform/openrouter-stream.ts | import { Anthropic } from "@anthropic-ai/sdk"
import {
CLAUDE_SONNET_1M_SUFFIX,
ModelInfo,
OPENROUTER_PROVIDER_PREFERENCES,
openRouterClaudeSonnet41mModelId,
openRouterClaudeSonnet451mModelId,
} from "@shared/api"
import { shouldSkipReasoningForModel } from "@utils/model-utils"
import OpenAI from "openai"
import {... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/gemini-format.ts | src/core/api/transform/gemini-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import { Content, GenerateContentResponse, Part } from "@google/genai"
import { ClineStorageMessage } from "@/shared/messages/content"
// Source: https://ai.google.dev/gemini-api/docs/thought-signatures#faqs
// While injecting custom function call blocks into the request i... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/tool-call-processor.ts | src/core/api/transform/tool-call-processor.ts | import type {
ChatCompletionChunk,
ChatCompletionToolChoiceOption,
ChatCompletionTool as OpenAITool,
} from "openai/resources/chat/completions"
import { Logger } from "@/services/logging/Logger"
import type { ApiStreamToolCallsChunk } from "./stream"
/**
* Helper class to process tool call deltas from OpenAI-compa... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/stream.ts | src/core/api/transform/stream.ts | export type ApiStream = AsyncGenerator<ApiStreamChunk> & { id?: string }
export type ApiStreamChunk = ApiStreamTextChunk | ApiStreamThinkingChunk | ApiStreamUsageChunk | ApiStreamToolCallsChunk
export interface ApiStreamTextChunk {
type: "text"
/**
* Text content generated by the model
*/
text: string
/**
* ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/openai-response-format.ts | src/core/api/transform/openai-response-format.ts | import { ResponseInput, ResponseInputMessageContentList, ResponseReasoningItem } from "openai/resources/responses/responses"
import { ClineStorageMessage } from "@/shared/messages/content"
/**
* Converts an array of ClineStorageMessage objects (extension of Anthropic format) to a ResponseInput array to use with OpenA... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/openai-format.ts | src/core/api/transform/openai-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import OpenAI from "openai"
import {
ClineAssistantRedactedThinkingBlock,
ClineAssistantThinkingBlock,
ClineAssistantToolUseBlock,
ClineImageContentBlock,
ClineStorageMessage,
ClineTextContentBlock,
ClineUserToolResultContentBlock,
} from "@/shared/messages/content"
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/vscode-lm-format.ts | src/core/api/transform/vscode-lm-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import * as vscode from "vscode"
/**
* Safely converts a value into a plain object.
*/
export function asObjectSafe(value: any): object {
// Handle null/undefined
if (!value) {
return {}
}
try {
// Handle strings that might be JSON
if (typeof value === "string... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/r1-format.ts | src/core/api/transform/r1-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import OpenAI from "openai"
/**
* Converts Anthropic messages to OpenAI format and merges consecutive messages with the same role.
* This is required for DeepSeek Reasoner which does not support successive messages with the same role.
* DeepSeek highly recommends using ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/vscode-lm-format.test.ts | src/core/api/transform/vscode-lm-format.test.ts | // This file contains `declare module "vscode"` so we must import it.
import "../providers/vscode-lm"
import { describe, it } from "mocha"
import "should"
import { Anthropic } from "@anthropic-ai/sdk"
import * as vscode from "vscode"
import { asObjectSafe, convertToAnthropicMessage, convertToAnthropicRole, convertToVsC... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/ollama-format.ts | src/core/api/transform/ollama-format.ts | import { Message } from "ollama"
import {
ClineAssistantToolUseBlock,
ClineImageContentBlock,
ClineStorageMessage,
ClineTextContentBlock,
ClineUserToolResultContentBlock,
} from "@/shared/messages/content"
export function convertToOllamaMessages(anthropicMessages: Omit<ClineStorageMessage, "modelInfo">[]): Messag... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/vercel-ai-gateway-stream.ts | src/core/api/transform/vercel-ai-gateway-stream.ts | import { Anthropic } from "@anthropic-ai/sdk"
import {
CLAUDE_SONNET_1M_SUFFIX,
ModelInfo,
openRouterClaudeSonnet41mModelId,
openRouterClaudeSonnet451mModelId,
} from "@shared/api"
import OpenAI from "openai"
import type { ChatCompletionTool as OpenAITool } from "openai/resources/chat/completions"
import { convertT... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/o1-format.ts | src/core/api/transform/o1-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import OpenAI from "openai"
const o1SystemPrompt = (systemPrompt: string) => `
# System Prompt
${systemPrompt}
# Instructions for Formulating Your Response
You must respond to the user's request by using at least one tool call. When formulating your response, follow the... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/transform/anthropic-format.ts | src/core/api/transform/anthropic-format.ts | import { Anthropic } from "@anthropic-ai/sdk"
import { ClineStorageMessage, convertClineStorageToAnthropicMessage } from "@/shared/messages/content"
/**
* Converts Cline storage messages to Anthropic API format with optional cache control.
* Adds ephemeral cache control to the last two user messages to prevent them ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/adapters/diff-editors.ts | src/core/api/adapters/diff-editors.ts | import { ClineStorageMessage } from "@/shared/messages/content"
const APPLY_PATCH_PATCH_REGEX = /\*\*\* Begin Patch\s+([\s\S]*?)\s+\*\*\* End Patch/m
/**
* Convert apply_patch tool calls to write_to_file and replace_in_file format
*/
export function convertApplyPatchToolCalls(messages: Array<ClineStorageMessage>): ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/adapters/index.ts | src/core/api/adapters/index.ts | import { ClineStorageMessage } from "@/shared/messages/content"
import { ClineDefaultTool } from "@/shared/tools"
import { convertApplyPatchToolCalls, convertWriteToFileToolCalls } from "./diff-editors"
/**
* Transforms tool call messages between different tool formats based on native tool support.
* Converts betwee... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/api/adapters/__tests__/adapters.test.ts | src/core/api/adapters/__tests__/adapters.test.ts | import { describe, it } from "mocha"
import "should"
import { Anthropic } from "@anthropic-ai/sdk"
import { ClineStorageMessage } from "@/shared/messages/content"
import { ClineDefaultTool } from "@/shared/tools"
import { transformToolCallMessages } from ".."
describe("transformToolCallMessages", () => {
describe("ap... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands.ts | src/core/prompts/commands.ts | import type { ApiProviderInfo } from "@/core/api"
import { getDeepPlanningPrompt } from "./commands/deep-planning"
export const newTaskToolResponse = (willUseNativeTools: boolean) => {
const xmlExample = `
Example:
<new_task>
<context>1. Current Work:
[Detailed description]
2. Key Technical Concepts:
- [Concep... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/responses.ts | src/core/prompts/responses.ts | import { Anthropic } from "@anthropic-ai/sdk"
import * as diff from "diff"
import * as path from "path"
import { Mode } from "@/shared/storage/types"
import { ClineIgnoreController, LOCK_TEXT_SYMBOL } from "../ignore/ClineIgnoreController"
export const formatResponse = {
duplicateFileReadNotice: () =>
`[[NOTE] This... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/loadMcpDocumentation.ts | src/core/prompts/loadMcpDocumentation.ts | import { McpHub } from "@services/mcp/McpHub"
export async function loadMcpDocumentation(mcpHub: McpHub) {
return `## Creating an MCP Server
When creating MCP servers, it's important to understand that they operate in a non-interactive environment. The server cannot initiate OAuth flows, open browser windows, or pro... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/contextManagement.ts | src/core/prompts/contextManagement.ts | export const summarizeTask = (focusChainSettings?: { enabled: boolean }, cwd?: string, isMultiRootEnabled?: boolean) => {
// Build CWD display text
const CWD = cwd ? cwd.toPosix() : ""
// Build MULTI_ROOT_HINT text (matches pattern in tools.ts)
const MULTI_ROOT_HINT = isMultiRootEnabled
? " Use @workspace:path s... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/registry.ts | src/core/prompts/commands/deep-planning/registry.ts | import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
import type { DeepPlanningVariant, DeepPlanningRegistry as IDeepPlanningRegistry } from "./types"
import {
createAnthropicVariant,
createGemini3Variant,
createGeminiVariant,
createGenericVariant,
createGPT51Variant,
} from "./variants"
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/types.ts | src/core/prompts/commands/deep-planning/types.ts | import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
/**
* Configuration for a deep-planning prompt variant
*/
export interface DeepPlanningVariant {
/** Unique identifier for this variant (e.g., "anthropic", "gemini", "gpt-5", "generic") */
id: string
/** Human-readable description of t... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/index.ts | src/core/prompts/commands/deep-planning/index.ts | import type { ApiProviderInfo } from "@/core/api"
import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
import { getDeepPlanningRegistry } from "./registry"
import { generateGemini3Template } from "./variants/gemini3"
import { generateGPT51Template } from "./variants/gpt51"
const focusChainIntr... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/variants/anthropic.ts | src/core/prompts/commands/deep-planning/variants/anthropic.ts | import { isAnthropicModelId } from "@utils/model-utils"
import { getShell } from "@utils/shell"
import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
import type { DeepPlanningVariant } from "../types"
/**
* Creates the Anthropic Claude variant for deep-planning prompt
* This variant is optim... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/variants/gemini.ts | src/core/prompts/commands/deep-planning/variants/gemini.ts | import { isGemini2dot5ModelFamily } from "@utils/model-utils"
import { getShell } from "@utils/shell"
import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
import type { DeepPlanningVariant } from "../types"
/**
* Creates the Google Gemini 2.5 variant for deep-planning prompt
* This variant i... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/variants/gemini3.ts | src/core/prompts/commands/deep-planning/variants/gemini3.ts | import { isGemini3ModelFamily } from "@utils/model-utils"
import { getShell } from "@utils/shell"
import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
import type { DeepPlanningVariant } from "../types"
/**
* Creates the Gemini 3 variant for deep-planning prompt
*/
export function createGemi... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/variants/gpt51.ts | src/core/prompts/commands/deep-planning/variants/gpt51.ts | import { isGPT51Model } from "@utils/model-utils"
import { getShell } from "@utils/shell"
import type { SystemPromptContext } from "@/core/prompts/system-prompt/types"
import type { DeepPlanningVariant } from "../types"
/**
* Creates the OpenAI GPT-5.1 variant for deep-planning prompt
*/
export function createGPT51V... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/variants/index.ts | src/core/prompts/commands/deep-planning/variants/index.ts | /**
* Export for all deep-planning prompt variants
*/
export { createAnthropicVariant } from "./anthropic"
export { createGeminiVariant } from "./gemini"
export { createGemini3Variant } from "./gemini3"
export { createGenericVariant } from "./generic"
export { createGPT51Variant } from "./gpt51"
| typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/core/prompts/commands/deep-planning/variants/generic.ts | src/core/prompts/commands/deep-planning/variants/generic.ts | import { getShell } from "@utils/shell"
import type { DeepPlanningVariant } from "../types"
/**
* Creates the generic fallback variant for deep-planning prompt
* This variant is used when no specific model family matcher applies
*/
export function createGenericVariant(): DeepPlanningVariant {
return {
id: "gener... | 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/types.ts | src/core/prompts/system-prompt/types.ts | /**
* Enhanced type definitions for better type safety and developer experience
*/
import { ApiProviderInfo } from "@/core/api"
import type { McpHub } from "@/services/mcp/McpHub"
import type { BrowserSettings } from "@/shared/BrowserSettings"
import type { FocusChainSettings } from "@/shared/FocusChainSettings"
imp... | 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/spec.ts | src/core/prompts/system-prompt/spec.ts | import { Tool as AnthropicTool } from "@anthropic-ai/sdk/resources/index"
import { FunctionDeclaration as GoogleTool, Type as GoogleToolParamType } from "@google/genai"
import { ChatCompletionTool as OpenAITool } from "openai/resources/chat/completions"
import { FunctionTool as OpenAIResponseFunctionTool, Tool as OpenA... | 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/index.ts | src/core/prompts/system-prompt/index.ts | import { PromptRegistry } from "./registry/PromptRegistry"
import type { SystemPromptContext } from "./types"
export { ClineToolSet } from "./registry/ClineToolSet"
export { PromptBuilder } from "./registry/PromptBuilder"
export { PromptRegistry } from "./registry/PromptRegistry"
export * from "./templates/placeholder... | 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/tools/load_mcp_documentation.ts | src/core/prompts/system-prompt/tools/load_mcp_documentation.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
/**
* ## load_mcp_documentation
Description: Load documentation about creating MCP servers. This tool should be used when the user requests to create or install an MCP server (... | 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/tools/access_mcp_resource.ts | src/core/prompts/system-prompt/tools/access_mcp_resource.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
/**
* ## access_mcp_resource
Description: Request to access a resource provided by a connected MCP server. Resources represen... | 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/tools/init.ts | src/core/prompts/system-prompt/tools/init.ts | // Import all tool variants
import { ClineToolSet } from "../registry/ClineToolSet"
import { access_mcp_resource_variants } from "./access_mcp_resource"
import { act_mode_respond_variants } from "./act_mode_respond"
import { apply_patch_variants } from "./apply_patch"
import { ask_followup_question_variants } from "./a... | 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/tools/ask_followup_question.ts | src/core/prompts/system-prompt/tools/ask_followup_question.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id: ClineDefaultTool.ASK,
name: "ask_followup_question",
de... | 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/tools/list_files.ts | src/core/prompts/system-prompt/tools/list_files.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const id = ClineDefaultTool.LIST_FILES
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "list_file... | 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/tools/plan_mode_respond.ts | src/core/prompts/system-prompt/tools/plan_mode_respond.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
/**
* ## plan_mode_respond
Description: Respond to the user's inquiry in an effort to plan a solution to the user's task. This tool should ONLY be used when you have already 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/tools/read_file.ts | src/core/prompts/system-prompt/tools/read_file.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const id = ClineDefaultTool.FILE_READ
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "read_file"... | 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/tools/execute_command.ts | src/core/prompts/system-prompt/tools/execute_command.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
const GENERIC: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id: ClineDefaultTool.BASH,
name: "execute_command",
description: `Request to execute a CLI command on the syst... | 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/tools/web_search.ts | src/core/prompts/system-prompt/tools/web_search.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const GENERIC: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id: ClineDefaultTool.WEB_SEARCH,
name: "web_search",
descri... | 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/tools/new_task.ts | src/core/prompts/system-prompt/tools/new_task.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
/**
* ## new_task
Description: Request to create a new task with preloaded context covering the conversation with the user up to this point and key information for continuing w... | 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/tools/replace_in_file.ts | src/core/prompts/system-prompt/tools/replace_in_file.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const id = ClineDefaultTool.FILE_EDIT
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "replace_in... | 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/tools/attempt_completion.ts | src/core/prompts/system-prompt/tools/attempt_completion.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
const id = ClineDefaultTool.ATTEMPT
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "attempt_completion",
description: `After each tool use, the us... | 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/tools/use_mcp_tool.ts | src/core/prompts/system-prompt/tools/use_mcp_tool.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
/**
## use_mcp_tool
Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multipl... | 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/tools/browser_action.ts | src/core/prompts/system-prompt/tools/browser_action.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
const id = ClineDefaultTool.BROWSER
const GENERIC: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "browser_action",
description: `Request to interact with a Pupp... | 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/tools/focus_chain.ts | src/core/prompts/system-prompt/tools/focus_chain.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
// HACK: Placeholder to act as tool dependency
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id: ClineDefaultTool.TODO,
name: "focus_chain",
description: ""... | 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/tools/act_mode_respond.ts | src/core/prompts/system-prompt/tools/act_mode_respond.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
/**
* ## act_mode_respond
Description: Provide a progress update or preamble to the user during ACT MODE execution. This tool allows you to communicate your thought process 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/tools/write_to_file.ts | src/core/prompts/system-prompt/tools/write_to_file.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
/**
* ## write_to_file
Description: Request to write content to a file at the specified path. If the file exists, it will be ... | 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/tools/list_code_definition_names.ts | src/core/prompts/system-prompt/tools/list_code_definition_names.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const id = ClineDefaultTool.LIST_CODE_DEF
const generic: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "list_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/tools/apply_patch.ts | src/core/prompts/system-prompt/tools/apply_patch.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
// {
// "name": "apply_patch",
// "description": APPLY_PATCH_TOOL_DESC,
// "parameters": {
// "type": "obj... | 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/tools/web_fetch.ts | src/core/prompts/system-prompt/tools/web_fetch.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
const GENERIC: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id: ClineDefaultTool.WEB_FETCH,
name: "web_fetch",
descript... | 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/tools/search_files.ts | src/core/prompts/system-prompt/tools/search_files.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
import { TASK_PROGRESS_PARAMETER } from "../types"
/**
* ## search_files
Description: Request to perform a regex search across files in a specified directory, providing context... | 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/tools/generate_explanation.ts | src/core/prompts/system-prompt/tools/generate_explanation.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import type { ClineToolSpec } from "../spec"
const id = ClineDefaultTool.GENERATE_EXPLANATION
const GENERIC: ClineToolSpec = {
variant: ModelFamily.GENERIC,
id,
name: "generate_explanation",
description:
"Opens a mu... | 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/tools/index.ts | src/core/prompts/system-prompt/tools/index.ts | export * from "./access_mcp_resource"
export * from "./act_mode_respond"
export * from "./apply_patch"
export * from "./ask_followup_question"
export * from "./attempt_completion"
export * from "./browser_action"
export * from "./execute_command"
export * from "./focus_chain"
export * from "./init"
export * from "./lis... | 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/variants/variant-builder.ts | src/core/prompts/system-prompt/variants/variant-builder.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../templates/placeholders"
import type { ConfigOverride, PromptVariant, SystemPromptContext } from "../types"
/**
* Type-safe builder for creating prompt variants
* Provides compile-t... | 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/variants/config.template.ts | src/core/prompts/system-prompt/variants/config.template.ts | /**
* Enhanced Type-Safe Variant Configuration Template
*
* This template provides a type-safe way to create new prompt variants
* with compile-time validation and IntelliSense support.
*
* Usage:
* 1. Copy this file to variants/{variant-name}/config.ts
* 2. Replace the placeholder values with your variant conf... | 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/variants/variant-validator.ts | src/core/prompts/system-prompt/variants/variant-validator.ts | import { STANDARD_PLACEHOLDERS, SystemPromptSection, validateRequiredPlaceholders } from "../templates/placeholders"
import { TemplateEngine } from "../templates/TemplateEngine"
import type { PromptVariant } from "../types"
export interface ValidationResult {
isValid: boolean
errors: string[]
warnings: 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/variants/index.ts | src/core/prompts/system-prompt/variants/index.ts | /**
* Variant Registry - Central hub for all prompt variants
*
* This file exports all variant configurations and provides a registry
* for dynamic loading. Each variant is optimized for specific model families
* and use cases.
*/
export { config as devstralConfig, type DevstralVariantConfig } from "./devstral/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/variants/native-next-gen/config.ts | src/core/prompts/system-prompt/variants/native-next-gen/config.ts | import { isGPT5ModelFamily, isNextGenModelFamily, isNextGenModelProvider } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
impo... | 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/variants/native-next-gen/template.ts | src/core/prompts/system-prompt/variants/native-next-gen/template.ts | import { hasEnabledMcpServers } from "../../components/mcp"
import { SystemPromptSection } from "../../templates/placeholders"
import type { SystemPromptContext } from "../../types"
/**
* Base template for GPT-5 variant with structured sections
*/
export const BASE = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${Syste... | 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/variants/gemini-3/config.ts | src/core/prompts/system-prompt/variants/gemini-3/config.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { isGemini3ModelFamily, isNextGenModelProvider } from "@/utils/model-utils"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVaria... | 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/variants/gemini-3/template.ts | src/core/prompts/system-prompt/variants/gemini-3/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
====
{{${SystemPromptSection.TODO}}}
====
{{${SystemPromptSection.CLI_SUBAGENTS}}}
====
{{${SystemPromptSection.ACT_VS_PLAN}}}
====
{{${Syst... | 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/variants/gemini-3/overrides.ts | src/core/prompts/system-prompt/variants/gemini-3/overrides.ts | import { SystemPromptSection } from "../../templates/placeholders"
import type { PromptVariant, SystemPromptContext } from "../../types"
const GEMINI_3_AGENT_ROLE_TEMPLATE = (_context: SystemPromptContext) =>
`You are Cline, a software engineering AI. Your mission is to execute precisely what is requested - implement... | 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/variants/generic/config.ts | src/core/prompts/system-prompt/variants/generic/config.ts | import { isGLMModelFamily, isLocalModel, isNextGenModelFamily, isNextGenModelProvider } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-... | 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/variants/generic/template.ts | src/core/prompts/system-prompt/variants/generic/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
====
{{${SystemPromptSection.TASK_PROGRESS}}}
====
{{${SystemPromptSection.MCP}}}
====
{{${SystemPromptSection.EDITING_FILES}}}
====
{{${Sys... | 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/variants/xs/config.ts | src/core/prompts/system-prompt/variants/xs/config.ts | import { isLocalModel } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVariant } from "../variant-validator"
... | 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/variants/xs/template.ts | src/core/prompts/system-prompt/variants/xs/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
## {{${SystemPromptSection.RULES}}}
## {{${SystemPromptSection.ACT_VS_PLAN}}}
## {{${SystemPromptSection.CLI_SUBAGENTS}}}
## {{${SystemPromptSection.CAPABILITIES}}}
## {{${SystemPr... | 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/variants/xs/overrides.ts | src/core/prompts/system-prompt/variants/xs/overrides.ts | import { SystemPromptSection } from "../../templates/placeholders"
import { PromptVariant } from "../../types"
const XS_EDITING_FILES = `FILE EDITING RULES
- Default: replace_in_file; write_to_file for new files or full rewrites.
- Match the file’s **final** (auto-formatted) state in SEARCH; use complete lines.
- 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/variants/native-gpt-5/config.ts | src/core/prompts/system-prompt/variants/native-gpt-5/config.ts | import { isGPT5ModelFamily, isGPT51Model, isGPT52Model, isNextGenModelProvider } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder... | 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/variants/native-gpt-5/template.ts | src/core/prompts/system-prompt/variants/native-gpt-5/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
import type { SystemPromptContext } from "../../types"
/**
* Base template for GPT-5 variant with structured sections
*/
export const BASE = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
====
{{${SystemPromptSection.TA... | 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/variants/native-gpt-5-1/config.ts | src/core/prompts/system-prompt/variants/native-gpt-5-1/config.ts | import { isGPT51Model, isGPT52Model, isNextGenModelProvider } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validate... | 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/variants/native-gpt-5-1/template.ts | src/core/prompts/system-prompt/variants/native-gpt-5-1/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
/**
* Base template for GPT-5 variant with structured sections
*/
export const BASE = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
====
{{${SystemPromptSection.TASK_PROGRESS}}}
====
{{${SystemPromptSection.ACT_VS_PL... | 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/variants/native-gpt-5-1/overrides.ts | src/core/prompts/system-prompt/variants/native-gpt-5-1/overrides.ts | import { SystemPromptSection } from "../../templates/placeholders"
import type { PromptVariant, SystemPromptContext } from "../../types"
const GPT5_1_AGENT_ROLE = (_context: SystemPromptContext) =>
`You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, d... | 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/variants/hermes/config.ts | src/core/prompts/system-prompt/variants/hermes/config.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { isHermesModelFamily } from "@/utils/model-utils"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVariant } from "../variant-val... | 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/variants/hermes/template.ts | src/core/prompts/system-prompt/variants/hermes/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
## {{${SystemPromptSection.TOOL_USE}}}
## {{${SystemPromptSection.RULES}}}
## {{${SystemPromptSection.ACT_VS_PLAN}}}
## {{${SystemPromptSection.CLI_SUBAGENTS}}}
## {{${SystemPrompt... | 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/variants/hermes/overrides.ts | src/core/prompts/system-prompt/variants/hermes/overrides.ts | import { SystemPromptSection } from "../../templates/placeholders"
import type { SystemPromptContext } from "../../types"
// Hermes-specific system prompt component overrides - Nous recommends the thinking component be added explicitly for hermes-4
const HERMES_AGENT_ROLE_TEMPLATE = [
"You are a deep thinking AI, you... | 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/variants/gpt-5/config.ts | src/core/prompts/system-prompt/variants/gpt-5/config.ts | import { isGPT5ModelFamily, isNextGenModelProvider } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVariant }... | 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/variants/gpt-5/template.ts | src/core/prompts/system-prompt/variants/gpt-5/template.ts | import { hasEnabledMcpServers } from "../../components/mcp"
import { SystemPromptSection } from "../../templates/placeholders"
import type { SystemPromptContext } from "../../types"
/**
* Base template for GPT-5 variant with structured sections
*/
export const BASE = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${Syste... | 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/variants/glm/config.ts | src/core/prompts/system-prompt/variants/glm/config.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { isGLMModelFamily } from "@/utils/model-utils"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVariant } from "../variant-valida... | 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/variants/glm/template.ts | src/core/prompts/system-prompt/variants/glm/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
## {{${SystemPromptSection.TASK_PROGRESS}}}
## {{${SystemPromptSection.RULES}}}
## {{${SystemPromptSection.ACT_VS_PLAN}}}
## {{${SystemPromptSec... | 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/variants/glm/overrides.ts | src/core/prompts/system-prompt/variants/glm/overrides.ts | import { hasEnabledMcpServers } from "../../components/mcp"
import { SystemPromptSection } from "../../templates/placeholders"
import type { SystemPromptContext } from "../../types"
const GLM_TOOL_USE_TEMPLATE = (context: SystemPromptContext) => {
const hasMcpServers = hasEnabledMcpServers(context)
return `Begin ev... | 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/variants/next-gen/config.ts | src/core/prompts/system-prompt/variants/next-gen/config.ts | import { isGPT5ModelFamily, isLocalModel, isNextGenModelFamily, isNextGenModelProvider } from "@utils/model-utils"
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant... | 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/variants/next-gen/template.ts | src/core/prompts/system-prompt/variants/next-gen/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
import type { SystemPromptContext } from "../../types"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
====
{{${SystemPromptSection.TASK_PROGRESS}}}
====
{{${SystemPromptSection.MCP}}}
====
... | 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/variants/devstral/config.ts | src/core/prompts/system-prompt/variants/devstral/config.ts | import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { isDevstralModelFamily } from "@/utils/model-utils"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVariant } from "../variant-v... | 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/variants/devstral/template.ts | src/core/prompts/system-prompt/variants/devstral/template.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const baseTemplate = `{{${SystemPromptSection.AGENT_ROLE}}}
{{${SystemPromptSection.TOOL_USE}}}
====
{{${SystemPromptSection.TASK_PROGRESS}}}
====
{{${SystemPromptSection.MCP}}}
====
{{${SystemPromptSection.EDITING_FILES}}}
====
{{${Sys... | 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/variants/devstral/overrides.ts | src/core/prompts/system-prompt/variants/devstral/overrides.ts | import { SystemPromptSection } from "../../templates/placeholders"
export const DEVSTRAL_AGENT_ROLE_TEMPLATE = `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
`
export const devstralComponentOverrides = {
[Sys... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.