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/context/context-management/context-window-utils.ts
src/core/context/context-management/context-window-utils.ts
import { ApiHandler } from "@core/api" import { OpenAiHandler } from "@core/api/providers/openai" /** * Gets context window information for the given API handler * * @param api The API handler to get context window information for * @returns An object containing the raw context window size and the effective max al...
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/__tests__/ContextManager.test.ts
src/core/context/context-management/__tests__/ContextManager.test.ts
import { Anthropic } from "@anthropic-ai/sdk" import { expect } from "chai" import { ContextManager } from "../ContextManager" describe("ContextManager", () => { function createMessages(count: number): Anthropic.Messages.MessageParam[] { const messages: Anthropic.Messages.MessageParam[] = [] messages.push({ r...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/audioProgramConstants.ts
src/shared/audioProgramConstants.ts
export const AUDIO_PROGRAM_CONFIG = { darwin: { command: "ffmpeg", fallbackPaths: ["/usr/local/bin/ffmpeg", "/opt/homebrew/bin/ffmpeg"], getArgs: (outputFile: string) => [ "-f", "avfoundation", "-i", ":default", "-c:a", "libopus", "-b:a", "32k", "-application", "voip", "-ar", ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/Languages.ts
src/shared/Languages.ts
export type LanguageKey = | "en" | "ar" | "pt-BR" | "cs" | "fr" | "de" | "hi" | "hu" | "it" | "ja" | "ko" | "pl" | "pt-PT" | "ru" | "zh-CN" | "es" | "zh-TW" | "tr" export type LanguageDisplay = | "English" | "Arabic - العربية" | "Portuguese - Português (Brasil)" | "Czech - Čeština" | "French - F...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/ClineFeatureSetting.ts
src/shared/ClineFeatureSetting.ts
export interface ClineFeatureSetting { // Setting is enabled or disabled by user user: boolean // Setting is enabled or disabled by feature flag featureFlag: boolean }
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/ChatContent.ts
src/shared/ChatContent.ts
export interface ChatContent { message?: string images?: string[] files?: string[] }
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/WebviewMessage.ts
src/shared/WebviewMessage.ts
export interface WebviewMessage { type: "grpc_request" | "grpc_request_cancel" grpc_request?: GrpcRequest grpc_request_cancel?: GrpcCancel } export type GrpcRequest = { service: string method: string message: any // JSON serialized protobuf message request_id: string // For correlating requests and responses i...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/UserInfo.ts
src/shared/UserInfo.ts
export interface UserInfo { displayName?: string email?: string photoUrl?: string apiBaseUrl?: string // Base URL for API requests }
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/ClineAccount.ts
src/shared/ClineAccount.ts
export interface UserResponse { id: string email: string displayName: string photoUrl: string createdAt: string updatedAt: string organizations: [ { active: boolean memberId: string name: string organizationId: string roles: ["admin" | "member" | "owner"] }, ] } export interface BalanceRespo...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/getApiMetrics.ts
src/shared/getApiMetrics.ts
import { ClineMessage } from "./ExtensionMessage" interface ApiMetrics { totalTokensIn: number totalTokensOut: number totalCacheWrites?: number totalCacheReads?: number totalCost: number } /** * Calculates API metrics from an array of ClineMessages. * * This function processes 'api_req_started' messages that ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/Patch.ts
src/shared/Patch.ts
/** * Apply Patch constants */ export const PATCH_MARKERS = { BEGIN: "*** Begin Patch", END: "*** End Patch", ADD: "*** Add File: ", UPDATE: "*** Update File: ", DELETE: "*** Delete File: ", MOVE: "*** Move to: ", SECTION: "@@", END_FILE: "*** End of File", } as const /** * Expected bash wrappers for apply ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/context-mentions.ts
src/shared/context-mentions.ts
/* Mention regex: - **Purpose**: - To identify and highlight specific mentions in text that start with '@'. - These mentions can be file paths, URLs, or the exact word 'problems'. - Ensures that trailing punctuation marks (like commas, periods, etc.) are not included in the match, allowing punctuation to follow...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/AutoApprovalSettings.ts
src/shared/AutoApprovalSettings.ts
export interface AutoApprovalSettings { // Version for race condition prevention (incremented on every change) version: number // Legacy field - kept for backward compatibility with older extension versions // Auto-approve is now always enabled by default enabled: boolean // Legacy field - kept for backward compa...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/HistoryItem.ts
src/shared/HistoryItem.ts
export type HistoryItem = { id: string ulid?: string // ULID for better tracking and metrics ts: number task: string tokensIn: number tokensOut: number cacheWrites?: number cacheReads?: number totalCost: number size?: number shadowGitConfigWorkTree?: string cwdOnTaskInitialization?: string conversationHis...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/McpDisplayMode.ts
src/shared/McpDisplayMode.ts
/** * Represents the different display modes available for MCP responses */ export type McpDisplayMode = "rich" | "plain" | "markdown" /** * Default display mode for MCP responses */ export const DEFAULT_MCP_DISPLAY_MODE: McpDisplayMode = "plain"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/ExtensionMessage.ts
src/shared/ExtensionMessage.ts
// type that represents json data that is sent from extension to webview, called ExtensionMessage and has 'type' enum which can be 'plusButtonClicked' or 'settingsButtonClicked' or 'hello' import { WorkspaceRoot } from "@shared/multi-root/types" import { RemoteConfigFields } from "@shared/storage/state-keys" import ty...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/combineHookSequences.ts
src/shared/combineHookSequences.ts
import { ClineMessage } from "./ExtensionMessage" /** * Hook metadata extracted from hook message text. * Mirrors the ClineSayHook interface but represents parsed data. */ interface HookMetadata { hookName: string toolName?: string status: string exitCode?: number hasJsonResponse?: boolean } // ==============...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/tools.ts
src/shared/tools.ts
import { Tool as AnthropicTool } from "@anthropic-ai/sdk/resources/index" import { FunctionDeclaration as GoogleTool } from "@google/genai" import { ChatCompletionTool as OpenAITool } from "openai/resources/chat/completions" export type ClineTool = OpenAITool | AnthropicTool | GoogleTool // Define available tool ids ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/vsCodeSelectorUtils.ts
src/shared/vsCodeSelectorUtils.ts
import { LanguageModelChatSelector } from "vscode" export const SELECTOR_SEPARATOR = "/" export function stringifyVsCodeLmModelSelector(selector: LanguageModelChatSelector): string { return [selector.vendor, selector.family, selector.version, selector.id].filter(Boolean).join(SELECTOR_SEPARATOR) }
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/array.ts
src/shared/array.ts
/** * Returns the index of the last element in the array where predicate is true, and -1 * otherwise. * @param array The source array to search in * @param predicate find calls predicate once for each element of the array, in descending * order, until it finds one where predicate returns true. If such an element i...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/DictationSettings.ts
src/shared/DictationSettings.ts
export interface DictationSettings { featureEnabled: boolean // Feature flag - whether dictation feature is available dictationEnabled: boolean // User preference - whether user has enabled dictation dictationLanguage: string } export const DEFAULT_DICTATION_SETTINGS: DictationSettings = { featureEnabled: false, /...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/string.ts
src/shared/string.ts
/** * Unicode punctuation normalisation helpers * Makes patch matching resilient to visually identical but different Unicode code-points */ const PUNCT_EQUIV: Record<string, string> = { // Hyphen / dash variants "-": "-", "\u2010": "-", // HYPHEN "\u2011": "-", // NO-BREAK HYPHEN "\u2012": "-", // FIGURE DASH ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/api.ts
src/shared/api.ts
import type { LanguageModelChatSelector } from "../core/api/providers/types" import { ApiFormat } from "./proto/cline/models" export type ApiProvider = | "anthropic" | "claude-code" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "lmstudio" | "gemini" | "openai-native" | "requesty" | "togethe...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
true
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/prompts.ts
src/shared/prompts.ts
export enum ModelFamily { CLAUDE = "claude", GPT = "gpt", GPT_5 = "gpt-5", NATIVE_GPT_5 = "gpt-5-native", // Uses native tool calling NATIVE_GPT_5_1 = "gpt-5-1-native", // Uses native tool calling GEMINI = "gemini", GEMINI_3 = "gemini3", // Uses native tool calling QWEN = "qwen", GLM = "glm", HERMES = "hermes...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/focus-chain-utils.ts
src/shared/focus-chain-utils.ts
/** * Shared utility functions for focus chain pattern matching * Used by both extension and webview * */ /** * Checks if a trimmed line matches focus chain item patterns * @param line The trimmed line to check * @returns true if the line is a focus chain item (- [ ], - [x], or - [X]) */ export function isFocu...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/BrowserSettings.ts
src/shared/BrowserSettings.ts
export interface BrowserSettings { // Viewport size settings viewport: { width: number height: number } // Chrome installation to use // chromeType: "chromium" | "system" remoteBrowserHost?: string remoteBrowserEnabled?: boolean chromeExecutablePath?: string disableToolUse?: boolean customArgs?: string } ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/TelemetrySetting.ts
src/shared/TelemetrySetting.ts
export type TelemetrySetting = "unset" | "enabled" | "disabled"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/mcp.ts
src/shared/mcp.ts
/** * Identifier for the MCP tools that are used in native tool calls, * where each tool name is the combination of the server name + identifier + tool name. * This enables to uniquely identify which MCP server a tool belongs to. */ export const CLINE_MCP_TOOL_IDENTIFIER = "0mcp0" export const DEFAULT_MCP_TIMEOUT_S...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/ClineBanner.ts
src/shared/ClineBanner.ts
/** * Banner message types for Cline extension */ export type BannerSeverity = "info" | "success" | "warning" export type BannerPlacement = "top" | "bottom" export interface Banner { id: string titleMd: string bodyMd: string severity: BannerSeverity placement: BannerPlacement rulesJson: string activeFrom?: s...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/string.test.ts
src/shared/string.test.ts
import { describe, it } from "mocha" import "should" import { canonicalize, preserveEscaping } from "./string" describe("String: canonicalize", () => { describe("Unicode normalization", () => { it("should normalize composed and decomposed unicode", () => { // é as single character vs e + combining acute const...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/array.test.ts
src/shared/array.test.ts
import { describe, it } from "mocha" import "should" import { findLast, findLastIndex } from "./array" describe("Array Utilities", () => { describe("findLastIndex", () => { it("should find last matching element's index", () => { const array = [1, 2, 3, 2, 1] const index = findLastIndex(array, (x) => x === 2) ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/combineCommandSequences.ts
src/shared/combineCommandSequences.ts
import { ClineMessage } from "./ExtensionMessage" /** * Combines sequences of command and command_output messages in an array of ClineMessages. * * This function processes an array of ClineMessages objects, looking for sequences * where a 'command' message is followed by one or more 'command_output' messages. * W...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/FocusChainSettings.ts
src/shared/FocusChainSettings.ts
export interface FocusChainSettings { // Enable/disable the focus chain feature enabled: boolean // Interval (in messages) to remind Cline about focus chain remindClineInterval: number } export const DEFAULT_FOCUS_CHAIN_SETTINGS: FocusChainSettings = { enabled: true, remindClineInterval: 6, }
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/combineErrorRetryMessages.ts
src/shared/combineErrorRetryMessages.ts
import { ClineMessage } from "./ExtensionMessage" /** * Consolidates error_retry messages in a retry sequence, keeping only the latest one. * * When an API request fails and auto-retry is enabled, multiple error_retry messages are created * (e.g., "Attempt 1 of 3", "Attempt 2 of 3", "Attempt 3 of 3"), interleaved ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/cline-rules.ts
src/shared/cline-rules.ts
export type ClineRulesToggles = Record<string, boolean> // filepath -> enabled/disabled
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/net.ts
src/shared/net.ts
/** * # Network Support for Cline * * ## Development Guidelines * * **Do** use `import { fetch } from '@/shared/net'` instead of global `fetch`. * * Global `fetch` will appear to work in VSCode, but proxy support will be * broken in JetBrains or CLI. * * If you use Axios, **do** call `getAxiosSettings()` and ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/slashCommands.ts
src/shared/slashCommands.ts
export interface SlashCommand { name: string description?: string section?: "default" | "custom" cliCompatible?: boolean } export const BASE_SLASH_COMMANDS: SlashCommand[] = [ { name: "newtask", description: "Create a new task with context from the current task", section: "default", cliCompatible: true, ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/combineApiRequests.ts
src/shared/combineApiRequests.ts
import { ClineMessage } from "./ExtensionMessage" /** * Combines API request start and finish messages in an array of ClineMessages. * * This function looks for pairs of 'api_req_started' and 'api_req_finished' messages. * When it finds a pair, it combines them into a single 'api_req_combined' message. * The JSON...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/storage/state-keys.ts
src/shared/storage/state-keys.ts
import { AutoApprovalSettings } from "@shared/AutoApprovalSettings" import { ApiProvider, ModelInfo, type OcaModelInfo } from "@shared/api" import { BrowserSettings } from "@shared/BrowserSettings" import { ClineRulesToggles } from "@shared/cline-rules" import { DictationSettings } from "@shared/DictationSettings" impo...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/storage/types.ts
src/shared/storage/types.ts
export type OpenaiReasoningEffort = "minimal" | "low" | "medium" | "high" export type Mode = "plan" | "act"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/services/feature-flags/feature-flags.ts
src/shared/services/feature-flags/feature-flags.ts
import type { FeatureFlagPayload } from "@/services/feature-flags/providers/IFeatureFlagsProvider" export enum FeatureFlag { CUSTOM_INSTRUCTIONS = "custom-instructions", DICTATION = "dictation", FOCUS_CHAIN_CHECKLIST = "focus_chain_checklist", DO_NOTHING = "do_nothing", HOOKS = "hooks", WEBTOOLS = "webtools", /...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/services/config/posthog-config.ts
src/shared/services/config/posthog-config.ts
export interface PostHogClientConfig { /** * The main API key for PostHog telemetry service. */ apiKey?: string | undefined /** * The API key for PostHog used only for error tracking service. */ errorTrackingApiKey?: string | undefined host: string uiHost: string } /** * Helper type for a valid PostHog ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/services/config/otel-config.ts
src/shared/services/config/otel-config.ts
import { RemoteConfigFields } from "@/shared/storage/state-keys" export interface OpenTelemetryClientConfig { /** * Whether telemetry is enabled via OTEL_TELEMETRY_ENABLED */ enabled: boolean /** * Metrics exporter type(s) - can be comma-separated for multiple exporters * Examples: "console", "otlp", "prom...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/messages/metrics.ts
src/shared/messages/metrics.ts
import { Mode } from "../storage/types" export interface ClineMessageModelInfo { modelId: string providerId: string mode: Mode } interface ClineTokensInfo { prompt: number // Total input tokens (includes cached + non-cached) completion: number // Total output tokens cached: number // Subset of prompt_tokens tha...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/messages/content.ts
src/shared/messages/content.ts
import { Anthropic } from "@anthropic-ai/sdk" import { ClineMessageMetricsInfo, ClineMessageModelInfo } from "./metrics" export type ClinePromptInputContent = string export type ClineMessageRole = "user" | "assistant" export interface ClineReasoningDetailParam { type: "reasoning.text" | string text: string signat...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/messages/constants.ts
src/shared/messages/constants.ts
/** * Constants for identifying user-generated content and system-generated markers * in task conversations. These are used to parse and filter content appropriately. */ /** * Tags that wrap user-generated content in the conversation. * Used to identify content that comes from the user vs system-generated content...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/messages/index.ts
src/shared/messages/index.ts
// Core content types export type { ClineAssistantContent, ClineAssistantRedactedThinkingBlock, ClineAssistantThinkingBlock, ClineAssistantToolUseBlock, ClineContent, ClineDocumentContentBlock, ClineImageContentBlock, ClineMessageRole, ClinePromptInputContent, ClineReasoningDetailParam, ClineStorageMessage, ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/__tests__/context-mentions.test.ts
src/shared/__tests__/context-mentions.test.ts
import { expect } from "chai" import { mentionRegex, mentionRegexGlobal } from "../context-mentions" interface TestResult { actual: string | null expected: string | null } function testMention(input: string, expected: string | null): TestResult { const match = mentionRegex.exec(input) return { actual: match ? ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/remote-config/schema.ts
src/shared/remote-config/schema.ts
/** * ═══════════════════════════════════════════════════════════════════════════ * ⚠️ CRITICAL WARNING ⚠️ * ═══════════════════════════════════════════════════════════════════════════ * * THE API SERVER MUST BE RE-DEPLOYED WHENEVER THIS SCHEMA IS UPDATED! * * This schema is used by both the extension and the A...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/remote-config/constants.ts
src/shared/remote-config/constants.ts
/** * URI scheme for opening remote rules/workflows in the editor. * Used to construct URIs like: remote://rule/{name} or remote://workflow/{name} */ export const REMOTE_URI_SCHEME = "remote://"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/remote-config/__tests__/schema.test.ts
src/shared/remote-config/__tests__/schema.test.ts
import { expect } from "chai" import { describe, it } from "mocha" import { AwsBedrockSettingsSchema, ClineSettingsSchema, OpenAiCompatibleSchema, type RemoteConfig, RemoteConfigSchema, } from "../schema" describe("Remote Config Schema", () => { describe("OpenAiCompatibleSchema", () => { it("should accept vali...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/multi-root/types.ts
src/shared/multi-root/types.ts
/** * Workspace root types and interfaces for multi-workspace support */ export enum VcsType { None = "none", Git = "git", Mercurial = "mercurial", } export interface WorkspaceRoot { path: string // Absolute path to the workspace root name?: string // Optional display name for the workspace (auto-derived from ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/internal/account.ts
src/shared/internal/account.ts
/** * List of email domains that are considered trusted testers for Cline. */ const CLINE_TRUSTED_TESTER_DOMAINS = ["fibilabs.tech"] /** * Checks if the given email belongs to a Cline bot user. * E.g. Emails ending with @cline.bot */ export function isClineBotUser(email: string): boolean { return email.endsWith(...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/cline/banner.ts
src/shared/cline/banner.ts
/** * Action types that can be triggered from banner buttons/links * Frontend maps these to actual handlers */ export enum BannerActionType { /** Open external URL */ Link = "link", /** Open API settings tab */ ShowApiSettings = "show-api-settings", /** Open feature settings tab */ ShowFeatureSettings = "show-...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/cline/api.ts
src/shared/cline/api.ts
enum CLINE_API_AUTH_ENDPOINTS { AUTH = "/api/v1/auth/authorize", REFRESH_TOKEN = "/api/v1/auth/refresh", } enum CLINE_API_ENDPOINT_V1 { TOKEN_EXCHANGE = "/api/v1/auth/token", USER_INFO = "/api/v1/users/me", ACTIVE_ACCOUNT = "/api/v1/users/active-account", REMOTE_CONFIG = "/api/v1/organizations/{id}/remote-config...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/cline/onboarding.ts
src/shared/cline/onboarding.ts
import type { OnboardingModel } from "../proto/cline/state" /** * The list of models available to new users during the onboarding flow. * NOTE: Can be overridden by feature flag onboarding models payload. */ export const CLINE_ONBOARDING_MODELS: OnboardingModel[] = [ { group: "free", id: "x-ai/grok-code-fast-1...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/clients/requesty.ts
src/shared/clients/requesty.ts
const REQUESTY_BASE_URL = "https://router.requesty.ai/v1" type URLType = "router" | "app" | "api" const replaceCname = (baseUrl: string, type: URLType): string => { if (type === "router") { return baseUrl } else { return baseUrl.replace("router", type).replace("v1", "") } } export const toRequestyServiceUrl =...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/cline-message.ts
src/shared/proto-conversions/cline-message.ts
import { ClineAsk as AppClineAsk, ClineMessage as AppClineMessage, ClineSay as AppClineSay } from "@shared/ExtensionMessage" import { ClineAsk, ClineMessageType, ClineSay, ClineMessage as ProtoClineMessage } from "@shared/proto/cline/ui" // Helper function to convert ClineAsk string to enum function convertClineAskTo...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/state/telemetry-setting-conversion.ts
src/shared/proto-conversions/state/telemetry-setting-conversion.ts
import { TelemetrySettingEnum } from "@shared/proto/cline/state" import { TelemetrySetting } from "../../TelemetrySetting" /** * Converts a domain TelemetrySetting string to a proto TelemetrySettingEnum */ export function convertDomainTelemetrySettingToProto(setting: TelemetrySetting): TelemetrySettingEnum { switch...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/file/search-result-conversion.ts
src/shared/proto-conversions/file/search-result-conversion.ts
import { FileInfo } from "@shared/proto/cline/file" /** * Converts domain search result objects to proto FileInfo objects */ export function convertSearchResultsToProtoFileInfos( results: { path: string; type: "file" | "folder"; label?: string; workspaceName?: string }[], ): FileInfo[] { return results.map((result...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/models/typeConversion.ts
src/shared/proto-conversions/models/typeConversion.ts
import { LiteLLMModelInfo, ModelInfo, OcaModelInfo, OpenAiCompatibleModelInfo } from "@shared/api" import { OpenRouterModelInfo, LiteLLMModelInfo as ProtoLiteLLMModelInfo, OcaModelInfo as ProtoOcaModelInfo, OpenAiCompatibleModelInfo as ProtoOpenAiCompatibleModelInfo, ThinkingConfig, } from "@shared/proto/cline/mod...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/models/api-configuration-conversion.ts
src/shared/proto-conversions/models/api-configuration-conversion.ts
import { LiteLLMModelInfo, OpenAiCompatibleModelInfo, OpenRouterModelInfo, ModelsApiConfiguration as ProtoApiConfiguration, ApiProvider as ProtoApiProvider, OcaModelInfo as ProtoOcaModelInfo, ThinkingConfig, } from "@shared/proto/cline/models" import { ApiConfiguration, ApiProvider, LiteLLMModelInfo as AppLit...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/models/vscode-lm-models-conversion.ts
src/shared/proto-conversions/models/vscode-lm-models-conversion.ts
import { LanguageModelChatSelector } from "@shared/proto/cline/models" /** * Represents a VS Code language model in the native VS Code format */ export interface VsCodeNativeModel { vendor?: string family?: string version?: string id?: string } /** * Converts VS Code native model format to protobuf format */ ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/mcp/mcp-server-conversion.ts
src/shared/proto-conversions/mcp/mcp-server-conversion.ts
import { McpServerStatus, McpResource as ProtoMcpResource, McpResourceTemplate as ProtoMcpResourceTemplate, McpServer as ProtoMcpServer, McpTool as ProtoMcpTool, } from "@shared/proto/cline/mcp" import { McpOAuthAuthStatus, McpResource, McpResourceTemplate, McpServer, McpTool } from "../../mcp" // Helper to conve...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/shared/proto-conversions/web/open-graph-conversion.ts
src/shared/proto-conversions/web/open-graph-conversion.ts
import { OpenGraphData as DomainOpenGraphData } from "@integrations/misc/link-preview" import { OpenGraphData as ProtoOpenGraphData } from "@shared/proto/cline/web" /** * Converts domain OpenGraphData objects to proto OpenGraphData objects * @param ogData Domain OpenGraphData object * @returns Proto OpenGraphData o...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/vscode-context-utils.ts
src/standalone/vscode-context-utils.ts
import * as fs from "fs" import type { EnvironmentVariableMutator, EnvironmentVariableMutatorOptions, EnvironmentVariableScope } from "vscode" import * as vscode from "vscode" export class SecretStore implements vscode.SecretStorage { private data: JsonKeyValueStore<string> private readonly _onDidChange = new EventEm...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/utils.ts
src/standalone/utils.ts
import * as protoLoader from "@grpc/proto-loader" import * as fs from "fs" import * as health from "grpc-health-check" import { StreamingCallbacks } from "@/hosts/host-provider-types" const log = (...args: unknown[]) => { const now = new Date() const year = now.getFullYear() const month = String(now.getMonth() + 1)...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/protobus-service.ts
src/standalone/protobus-service.ts
import { Controller } from "@core/controller" import { StreamingResponseHandler } from "@core/controller/grpc-handler" import { addProtobusServices } from "@generated/hosts/standalone/protobus-server-setup" import * as grpc from "@grpc/grpc-js" import { ReflectionService } from "@grpc/reflection" import { GrpcHandler,...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/hostbridge-client.ts
src/standalone/hostbridge-client.ts
import * as grpc from "@grpc/grpc-js" import * as protoLoader from "@grpc/proto-loader" import * as health from "grpc-health-check" import { log } from "./utils" export const HOSTBRIDGE_PORT = 26041 export async function waitForHostBridgeReady(timeoutMs = 60000, intervalMs = 500): Promise<string> { const address = p...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/vscode-context.ts
src/standalone/vscode-context.ts
import { mkdirSync } from "node:fs" import os from "os" import path from "path" import type { Extension, ExtensionContext } from "vscode" import { ExtensionKind, ExtensionMode } from "vscode" import { URI } from "vscode-uri" import { ExtensionRegistryInfo } from "@/registry" import { log } from "./utils" import { Envir...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/cline-core.ts
src/standalone/cline-core.ts
import { ExternalCommentReviewController } from "@hosts/external/ExternalCommentReviewController" import { ExternalDiffViewProvider } from "@hosts/external/ExternalDiffviewProvider" import { ExternalWebviewProvider } from "@hosts/external/ExternalWebviewProvider" import { ExternalHostBridgeClientManager } from "@hosts/...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/standalone/lock-manager.ts
src/standalone/lock-manager.ts
import type { SqliteLockManager } from "@/core/locks/SqliteLockManager" /** * Module-level reference to the SqliteLockManager instance. * This is set by cline-core and accessed by folder lock utilities. */ let lockManagerInstance: SqliteLockManager | undefined /** * Get the SqliteLockManager instance for use in s...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/packages/execa.ts
src/packages/execa.ts
export { execa } from "execa"
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/vite.config.ts
webview-ui/vite.config.ts
/// <reference types="vitest/config" /> import { writeFileSync } from "node:fs" import tailwindcss from "@tailwindcss/vite" import react from "@vitejs/plugin-react-swc" import { resolve } from "path" import { defineConfig, type Plugin, ViteDevServer } from "vite" // Custom plugin to write the server port to a file co...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/.storybook/preview.ts
webview-ui/.storybook/preview.ts
import type { Preview } from "@storybook/react-vite" import { StorybookWebview } from "../src/config/StorybookDecorator" const preview: Preview = { parameters: { viewport: { viewports: { "Editor Sidebar": { name: "Editor Sidebar", styles: { width: "700px", height: "800px" }, type: "desktop", ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/.storybook/themes.ts
webview-ui/.storybook/themes.ts
const mockVSCodeDarkTheme = { "--vscode-editor-background": "#1E1E1E", "--vscode-editor-foreground": "#D4D4D4", "--vscode-sideBar-background": "#252526", "--vscode-sideBar-foreground": "#CCCCCC", "--vscode-editorGroup-border": "#454545", "--vscode-descriptionForeground": "#CCCCCC99", "--vscode-foreground": "#D4D...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/.storybook/main.ts
webview-ui/.storybook/main.ts
import type { StorybookConfig } from "@storybook/react-vite" const config: StorybookConfig = { stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], addons: [], framework: "@storybook/react-vite", viteFinal: async (config) => { // Define environment variables for Storybook config.define = {...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/App.tsx
webview-ui/src/App.tsx
import type { Boolean, EmptyRequest } from "@shared/proto/cline/common" import { useEffect } from "react" import AccountView from "./components/account/AccountView" import ChatView from "./components/chat/ChatView" import HistoryView from "./components/history/HistoryView" import McpView from "./components/mcp/configur...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/App.stories.tsx
webview-ui/src/App.stories.tsx
import { HeroUIProvider } from "@heroui/react" import { DEFAULT_AUTO_APPROVAL_SETTINGS } from "@shared/AutoApprovalSettings" import { type ApiConfiguration, bedrockModels } from "@shared/api" import { CLINE_ONBOARDING_MODELS } from "@shared/cline/onboarding" import type { ClineMessage, ClineSayTool } from "@shared/Exte...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
true
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/setupTests.ts
webview-ui/src/setupTests.ts
import "@testing-library/jest-dom" import { vi } from "vitest" // "Official" jest workaround for mocking window.matchMedia() // https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom Object.defineProperty(window, "matchMedia", { writable: true, value: vi.fn().mockImplementation((quer...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/CustomPostHogProvider.tsx
webview-ui/src/CustomPostHogProvider.tsx
import { posthogConfig } from "@shared/services/config/posthog-config" import posthog from "posthog-js" import { PostHogProvider } from "posthog-js/react" import { type ReactNode, useEffect, useState } from "react" import { useExtensionState } from "./context/ExtensionStateContext" export function CustomPostHogProvide...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/main.tsx
webview-ui/src/main.tsx
import { StrictMode } from "react" import { createRoot } from "react-dom/client" import "./main.css" import "./index.css" import App from "./App.tsx" createRoot(document.getElementById("root")!).render( <StrictMode> <App /> </StrictMode>, )
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/constants.ts
webview-ui/src/constants.ts
export const LINKS = { DOCUMENTATION: { REMOTE_MCP_SERVER_DOCS: "https://docs.cline.bot/mcp/connecting-to-a-remote-server", LOCAL_MCP_SERVER_DOCS: "https://docs.cline.bot/mcp/configuring-mcp-servers#editing-mcp-settings-files", }, }
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/vite-env.d.ts
webview-ui/src/vite-env.d.ts
/// <reference types="vite/client" />
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/Providers.tsx
webview-ui/src/Providers.tsx
import { HeroUIProvider } from "@heroui/react" import { type ReactNode } from "react" import { CustomPostHogProvider } from "./CustomPostHogProvider" import { ClineAuthProvider } from "./context/ClineAuthContext" import { ExtensionStateContextProvider } from "./context/ExtensionStateContext" import { PlatformProvider }...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/services/grpc-client-base.ts
webview-ui/src/services/grpc-client-base.ts
/** biome-ignore-all lint/complexity/noThisInStatic: In static methods, this refers to the constructor (the subclass that invoked the method) when we want to refer to the subclass serviceName. * * NOTE: This file imports PLATFORM_CONFIG directly rather than using the PlatformProvider * because it contains static uti...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/hooks/useFeatureFlag.ts
webview-ui/src/hooks/useFeatureFlag.ts
import { useFeatureFlagEnabled } from "posthog-js/react" /** * Hook to check feature flag status in the webview * Feature flags work independently of telemetry settings to ensure * proper extension functionality regardless of user privacy preferences */ export const useHasFeatureFlag = (flagName: string): boolean ...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/hooks/useMenuAnnouncement.ts
webview-ui/src/hooks/useMenuAnnouncement.ts
import { useEffect, useRef, useState } from "react" interface UseMenuAnnouncementOptions<T> { /** The list of items in the menu */ items: T[] /** The currently selected index */ selectedIndex: number /** Function to get the label for an item */ getItemLabel: (item: T) => string /** Optional function to check if...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/hooks/useAutoApproveActions.ts
webview-ui/src/hooks/useAutoApproveActions.ts
import { AutoApprovalSettings } from "@shared/AutoApprovalSettings" import { useCallback } from "react" import { updateAutoApproveSettings } from "@/components/chat/auto-approve-menu/AutoApproveSettingsAPI" import { ActionMetadata } from "@/components/chat/auto-approve-menu/types" import { useExtensionState } from "@/c...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/ReportBugPreview.tsx
webview-ui/src/components/chat/ReportBugPreview.tsx
import React from "react" import MarkdownBlock from "../common/MarkdownBlock" interface ReportBugPreviewProps { data: string } const ReportBugPreview: React.FC<ReportBugPreviewProps> = ({ data }) => { // Parse the JSON data from the context string const bugData = React.useMemo(() => { try { return JSON.parse(...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/ContextMenu.tsx
webview-ui/src/components/chat/ContextMenu.tsx
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react" import { cleanPathPrefix } from "@/components/common/CodeAccordian" import ScreenReaderAnnounce from "@/components/common/ScreenReaderAnnounce" import { useMenuAnnouncement } from "@/hooks/useMenuAnnouncement" import { ContextMenuOptionTyp...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/QuotedMessagePreview.tsx
webview-ui/src/components/chat/QuotedMessagePreview.tsx
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import React from "react" import styled from "styled-components" const PreviewContainer = styled.div` background-color: var(--vscode-input-background); /* Outer box matches text area */ /* border-left: 3px solid var(--vscode-textBlockQuote-border); */ /...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/ErrorRow.stories.tsx
webview-ui/src/components/chat/ErrorRow.stories.tsx
import { ClineMessage } from "@shared/ExtensionMessage" import type { Meta, StoryObj } from "@storybook/react-vite" import { useMemo } from "react" import { expect, userEvent, within } from "storybook/test" import { createStorybookDecorator } from "@/config/StorybookDecorator" import ErrorRow from "./ErrorRow" // Mock...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/UserMessage.tsx
webview-ui/src/components/chat/UserMessage.tsx
import { CheckpointRestoreRequest } from "@shared/proto/cline/checkpoints" import { ClineCheckpointRestore } from "@shared/WebviewMessage" import React, { forwardRef, useMemo, useRef, useState } from "react" import DynamicTextArea from "react-textarea-autosize" import Thumbnails from "@/components/common/Thumbnails" im...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/ErrorRow.test.tsx
webview-ui/src/components/chat/ErrorRow.test.tsx
import type { ClineMessage } from "@shared/ExtensionMessage" import { render, screen } from "@testing-library/react" import { describe, expect, it, vi } from "vitest" import ErrorRow from "./ErrorRow" // Mock the auth context vi.mock("@/context/ClineAuthContext", () => ({ useClineAuth: () => ({ clineUser: null, })...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/TaskFeedbackButtons.tsx
webview-ui/src/components/chat/TaskFeedbackButtons.tsx
import { StringRequest } from "@shared/proto/cline/common" import { TaskFeedbackType } from "@shared/WebviewMessage" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import React, { useEffect, useState } from "react" import styled from "styled-components" import { TaskServiceClient } from "@/services/grp...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/ErrorBlockTitle.tsx
webview-ui/src/components/chat/ErrorBlockTitle.tsx
import React from "react" import { ClineError, ClineErrorType } from "../../../../src/services/error/ClineError" import { ProgressIndicator } from "./ChatRow" interface ErrorBlockTitleProps { cost?: number apiReqCancelReason?: string apiRequestFailedMessage?: string retryStatus?: { attempt: number maxAttempts:...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/BrowserSessionRow.tsx
webview-ui/src/components/chat/BrowserSessionRow.tsx
import { BROWSER_VIEWPORT_PRESETS } from "@shared/BrowserSettings" import { BrowserAction, BrowserActionResult, ClineMessage, ClineSayBrowserAction } from "@shared/ExtensionMessage" import { StringRequest } from "@shared/proto/cline/common" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import deepEqua...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/ChatTextArea.tsx
webview-ui/src/components/chat/ChatTextArea.tsx
import { PulsingBorder } from "@paper-design/shaders-react" import { mentionRegex, mentionRegexGlobal } from "@shared/context-mentions" import { EmptyRequest, StringRequest } from "@shared/proto/cline/common" import { FileSearchRequest, FileSearchType, RelativePathsRequest } from "@shared/proto/cline/file" import { Upd...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
true
cline/cline
https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/webview-ui/src/components/chat/NewTaskPreview.tsx
webview-ui/src/components/chat/NewTaskPreview.tsx
import React from "react" import MarkdownBlock from "../common/MarkdownBlock" interface NewTaskPreviewProps { context: string } const NewTaskPreview: React.FC<NewTaskPreviewProps> = ({ context }) => { return ( <div className="bg-(--vscode-badge-background) text-(--vscode-badge-foreground) rounded-[3px] p-[14px] p...
typescript
Apache-2.0
0d04205dc4194c54e4bf424d2dc80f2fe1697e98
2026-01-04T15:28:48.884804Z
false