Skip to content

Glossary and references

源码版本v4.0.10

This page is the terminology index and source-code map for the Cline architecture site. Each entry gives the English term, a one-line explanation, and points to a specific location in the source, so other pages can cross-reference it.

Core terms

TermEnglishNotes
TaskTaskThe per-turn agent state machine; holds message history, the tool coordinator, and the checkpoint manager. apps/vscode/src/core/task/index.ts:188 export class Task
Tool calltool_useA tool-call block in the Anthropic message protocol; parsed from LLM output into tool name + input and dispatched by ToolExecutor to the matching handler
Recursive requestrecursivelyMakeClineRequestsThe Task's main loop driver: send API → parse → feed tools → recurse to the next round. apps/vscode/src/core/task/index.ts:2790
Present assistant messagepresentAssistantMessageFlushes parsed assistant blocks to the webview one by one, with a lock guarding against concurrent refresh. apps/vscode/src/core/task/index.ts:2630
API requestattemptApiRequestAn async generator that packs user content and hands it to the ApiHandler, yielding streamed tokens. apps/vscode/src/core/task/index.ts:2175
Message parsingparseAssistantMessageV2Slices the LLM text stream into text / tool_use / reasoning blocks and recognizes SEARCH/REPLACE diff boundaries. apps/vscode/src/core/assistant-message/parse-assistant-message.ts:28
Search/replace diffSEARCH/REPLACEThe multi-file edit format Cline uses: three markers ------- SEARCH / ======= / +++++++ REPLACE. apps/vscode/src/core/assistant-message/diff.ts:1-3
Plan/act modeplan / act modeplan mode only plans and does not write files; act mode actually executes tools. apps/vscode/src/shared/storage/types.ts:14 export type Mode = "plan" | "act"
Context managementContextManagerMonitors conversation token usage and triggers truncation / compression / cleanup. apps/vscode/src/core/context/context-management/ContextManager.ts:44
MCP hubMcpHubConnects to external MCP servers and exposes their tools / resources / prompts to Cline. apps/vscode/src/services/mcp/McpHub.ts:51
Sub-agentSubagentRunnerRuns sub-tasks in an isolated sub-session with its own message history and tool set. apps/vscode/src/core/task/tools/subagent/SubagentRunner.ts:254
Provider handlerApiHandlerThe LLM vendor adapter interface; buildApiHandler routes by config to Anthropic / OpenAI and so on. apps/vscode/src/core/api/index.ts:517
Prompt builderPromptBuilderAssembles the system prompt and tool definitions by model variant. apps/vscode/src/core/prompts/system-prompt/registry/PromptBuilder.ts:12
Tool setClineToolSetA set of tools registered by ModelFamily; one variant maps to one set of available tools. apps/vscode/src/core/prompts/system-prompt/registry/ClineToolSet.ts:8
State managerStateManagerPersists and reads global config, settings, and task history. apps/vscode/src/core/storage/StateManager.ts:58
CheckpointCheckpointA task replay unit — one commit in the shadow git — attached to a checkpoint_created message. apps/vscode/src/integrations/checkpoints/CheckpointTracker.ts:50

Directory conventions

  • Source repo: cline/cline, tag v4.0.10.
  • Main code locations: apps/vscode/src/ — the VS Code extension itself; sdk/ is the cross-platform SDK; evals/ holds evaluations; packages/ holds shared sub-packages.
  • Extension entry: apps/vscode/src/extension.ts.
  • Task core: apps/vscode/src/core/task/index.ts — the Task class, the recursion loop, attemptApiRequest, and presentAssistantMessage all live here.
  • Tool implementations: apps/vscode/src/core/task/tools/ — the handlers directory splits tools by file; subagent/ holds the sub-agent implementation.
  • Checkpoints: apps/vscode/src/integrations/checkpoints/ — the full shadow-git stack lives here.
  • Prompts: apps/vscode/src/core/prompts/system-prompt/ — system prompt templates organized by variant.
  • User data: VS Code globalState / workspaceState plus local files under globalStorage (checkpoint shadow git, task history, rule files, etc.).

Official resources

Source versions on this site are pinned to v4.0.10; line numbers refer to that tag.