Compare commits

..

13 Commits

Author SHA1 Message Date
candieduniverse abe17361e0 Address reportbug removal review feedback 2026-04-09 14:02:49 -07:00
candieduniverse 7e0004b9e8 Finalize reportbug removal verification 2026-04-09 13:33:47 -07:00
candieduniverse 26ce90c8b3 Remove reportbug plumbing 2026-04-09 13:28:34 -07:00
candieduniverse 96697c93c5 Remove reportbug product surface 2026-04-09 13:17:37 -07:00
candieduniverse 9c33356d2e Create implementation plan doc 2026-04-09 13:07:05 -07:00
John Choi 9390d3f933 fix: update KanbanMigrationView test to match component text (#10173)
#10161 updated the component copy but missed updating the test assertions.
This breaks CI on main and any branch based on it.
2026-04-07 16:27:38 -07:00
Saoud Rizwan 5df470bf48 fix(cli): update kanban migration view copy to not imply TUI deprecation (#10161)
The previous copy ("Cline is moving out of the terminal", "old CLI")
gave the impression that the terminal TUI was being deprecated. Updated
to frame Kanban as the new default while making clear the TUI is still
fully available.
2026-04-06 16:00:11 -07:00
Tony Loehr 034c4342d1 Complete documentation for environment variable-based OpenTelemetry configs (#10155)
* Complete documentation for environment variable-based OpenTelemetry configuration

* Address PR review comments

- Add Values column to OTLP Configuration table for consistency
- Fix New Relic endpoint to include required port 4318
- Add note about Datadog region-specific endpoints
2026-04-06 17:22:57 -04:00
Tony Loehr 349295ab2c docs: remove Teams Plan references, focus on Enterprise (#10153)
Remove Teams Plan as an option for seat upgrades in the managing-members documentation. This aligns with the product strategy to drive customers toward Enterprise for any multiplayer/team scenarios.

Related: https://github.com/cline/cline-web/pull/256
2026-04-06 11:28:50 -07:00
Tony Loehr 841402c178 docs: add all enterprise inference providers to Remote Provider Configuration (#10127)
* docs: add OpenAI Compatible and Anthropic to enterprise SaaS provider configuration

Add documentation for all inference providers supported by the core
platform's remote config system (ProviderSettingsSchema). Previously
only Bedrock, Vertex, and LiteLLM had dedicated pages.

New pages:
- OpenAI Compatible admin/member config (covers Azure Foundry)
- Anthropic admin/member config

Updated:
- overview.mdx: expanded provider table to 7 rows
- docs.json: added navigation groups
- Capabilities Manual: added provider links

* Update docs/enterprise-solutions/configuration/remote-configuration/overview.mdx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update docs/enterprise-solutions/configuration/remote-configuration/overview.mdx

Co-authored-by: Renee Huang <100229782+reneehuang1@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Renee Huang <100229782+reneehuang1@users.noreply.github.com>
2026-04-06 03:51:43 +00:00
Robin Newhouse e52a052c81 Show read_file line ranges in chat UI (#10090)
Surface the actual read_file line window in chat summaries so users can see what context was added, while keeping manual approval and repeated same-file reads rendered accurately.
2026-04-02 11:26:13 -07:00
Saoud Rizwan 7a91a9be2e Bump version from 2.12.0 to 2.13.0 2026-04-01 20:09:42 -07:00
Saoud Rizwan 93a494d009 feat(cli): simplify unified update flow for cline and kanban (#10099)
* feat(cli): unify update flow for cline and kanban

* fix(cli): only install kanban when update is available

* fix(cli): include cline and kanban versions in no-update message
2026-04-01 20:08:19 -07:00
71 changed files with 1153 additions and 501 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cline",
"version": "2.12.0",
"version": "2.13.0",
"description": "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more",
"main": "dist/lib.mjs",
"types": "dist/lib.d.ts",
-1
View File
@@ -632,7 +632,6 @@ function translateAskMessage(
case "new_task":
case "condense":
case "summarize_task":
case "report_bug":
case "api_req_failed":
case "mistake_limit_reached":
case "command_output":
-16
View File
@@ -844,22 +844,6 @@ export const ChatMessage: React.FC<ChatMessageProps> = ({ message, mode, isStrea
)
}
// Report bug request
if (type === "ask" && ask === "report_bug" && text) {
return (
<Box flexDirection="column" marginBottom={1} width="100%">
<DotRow color={COLORS.primaryBlue} flashing={partial === true && isStreaming}>
<Text bold color={COLORS.primaryBlue}>
Cline wants to create a Github issue:
</Text>
</DotRow>
<Box flexDirection="column" paddingLeft={2}>
<Text color="gray">{text}</Text>
</Box>
</Box>
)
}
// Skip other message types
return null
}
-3
View File
@@ -45,9 +45,6 @@ const FEATURE_TIPS: FeatureTipItem[] = [
{
text: "Cline can browse websites — ask it to test your local dev server in the browser.",
},
{
text: "Use /reportbug to quickly file a GitHub issue with diagnostic context included.",
},
{
text: "Try 'npm i -g cline' to manage tasks on a Kankan board — orchestrate coding agents across worktrees.",
},
@@ -8,11 +8,11 @@ describe("KanbanMigrationView", () => {
const onSelect = vi.fn()
const { lastFrame } = render(createElement(KanbanMigrationView, { isRawModeSupported: true, onSelect }))
expect(lastFrame()).toContain("Cline is moving out of the terminal. Introducing Cline Kanban.")
expect(lastFrame()).toContain("Introducing Cline Kanban!")
expect(lastFrame()).toContain("Open the new experience")
expect(lastFrame()).toContain("Launch Cline Kanban and start there by default.")
expect(lastFrame()).toContain("cline --tui")
expect(lastFrame()).toContain("Close and rerun with cline --tui if you want the old CLI.")
expect(lastFrame()).toContain("You can always run cline --tui for the terminal experience.")
expect(lastFrame()).toContain("Exit")
})
+2 -2
View File
@@ -30,7 +30,7 @@ const InternalKanbanMigrationView: React.FC<Pick<KanbanMigrationViewProps, "onSe
},
{
label: "Exit",
description: "Close and rerun with cline --tui if you want the old CLI.",
description: "You can always run cline --tui for the terminal experience.",
value: "exit",
},
],
@@ -60,7 +60,7 @@ const InternalKanbanMigrationView: React.FC<Pick<KanbanMigrationViewProps, "onSe
<StaticRobotFrame />
<Text> </Text>
<Text bold color="white">
Cline is moving out of the terminal. Introducing Cline Kanban.
Introducing Cline Kanban!
</Text>
<Text color="gray">A board for orchestrating coding agents across worktrees, right from your browser.</Text>
<Text> </Text>
+27
View File
@@ -99,6 +99,12 @@ describe("CLI Commands", () => {
.description("Run kanban")
.action(() => {})
program
.command("update")
.description("Check for updates and install if available")
.option("-v, --verbose", "Show verbose output")
.action(() => {})
// Default command for interactive mode
program
.argument("[prompt]", "Task prompt")
@@ -113,6 +119,7 @@ describe("CLI Commands", () => {
.option("--auto-condense", "Enable AI-powered context compaction instead of mechanical truncation")
.option("--hooks-dir <path>", "Additional hooks directory")
.option("--auto-approve-all", "Enable auto-approve all")
.option("--update", "Check for updates and install if available")
.option("--kanban", "Run kanban")
.option("--tui", "Open the legacy terminal UI instead of the kanban experience")
.action(() => {})
@@ -315,6 +322,20 @@ describe("CLI Commands", () => {
})
})
describe("update command", () => {
it("should parse update command", () => {
const args = ["node", "cli", "update"]
program.parse(args)
})
it("should parse --verbose on update command", () => {
const updateCmd = getCommand("update")
const args = ["--verbose"]
updateCmd.parse(args, { from: "user" })
expect(updateCmd.opts().verbose).toBe(true)
})
})
describe("auth command", () => {
it("should parse auth command", () => {
const args = ["node", "cli", "auth"]
@@ -439,6 +460,11 @@ describe("CLI Commands", () => {
expect(program.opts().kanban).toBe(true)
})
it("should parse --update flag", () => {
program.parse(["node", "cli", "--update"])
expect(program.opts().update).toBe(true)
})
it("should parse --tui flag", () => {
program.parse(["node", "cli", "--tui"])
expect(program.opts().tui).toBe(true)
@@ -454,6 +480,7 @@ describe("CLI Commands", () => {
expect(commandNames).toContain("auth")
expect(commandNames).toContain("mcp")
expect(commandNames).toContain("kanban")
expect(commandNames).toContain("update")
})
it("should have correct aliases", () => {
+12 -1
View File
@@ -1027,7 +1027,7 @@ program
.command("update")
.description("Check for updates and install if available")
.option("-v, --verbose", "Show verbose output")
.action(() => checkForUpdates(CLI_VERSION))
.action((options) => checkForUpdates(CLI_VERSION, { verbose: options.verbose, includeKanban: true }))
program
.command("kanban")
@@ -1183,6 +1183,7 @@ program
.option("--auto-condense", "Enable AI-powered context compaction instead of mechanical truncation")
.option("--hooks-dir <path>", "Path to additional hooks directory for runtime hook injection")
.option("--acp", "Run in ACP (Agent Client Protocol) mode for editor integration")
.option("--update", "Check for updates and install if available")
.option("--kanban", `Run ${KANBAN_LAUNCH_COMMAND}`)
.option("--tui", "Open the legacy terminal UI instead of the kanban experience")
.option("-T, --taskId <id>", "Resume an existing task by ID")
@@ -1193,6 +1194,16 @@ program
exit(1)
}
if (options.update) {
if (prompt || options.taskId || options.continue || options.kanban || options.tui || options.acp) {
printWarning("Use --update without a prompt or task flags.")
exit(1)
}
await checkForUpdates(CLI_VERSION, { verbose: options.verbose, includeKanban: true })
return
}
if (options.kanban) {
if (prompt) {
printWarning("Use --kanban without a prompt.")
+198 -70
View File
@@ -1,9 +1,10 @@
import { spawn } from "node:child_process"
import { type ChildProcess, spawn, spawnSync } from "node:child_process"
import { realpathSync } from "node:fs"
import { exit } from "node:process"
import { ClineEndpoint } from "@/config"
import { fetch } from "@/shared/net"
import { printInfo, printWarning } from "./display"
import { printInfo, printSuccess, printWarning } from "./display"
import { resolveKanbanInstallCommand, spawnKanbanInstallProcess } from "./kanban"
export enum PackageManager {
NPM = "npm",
@@ -19,6 +20,11 @@ interface InstallationInfo {
updateCommand?: string
}
interface CheckForUpdatesOptions {
verbose?: boolean
includeKanban?: boolean
}
/**
* Check if a version string is a nightly build.
*/
@@ -91,9 +97,12 @@ function getInstallationInfo(currentVersion: string): InstallationInfo {
* Uses the appropriate tag based on whether the current version is nightly.
*/
async function getLatestVersion(currentVersion: string): Promise<string | null> {
return getLatestPackageVersion("cline", getNpmTag(currentVersion))
}
async function getLatestPackageVersion(packageName: string, tag = "latest"): Promise<string | null> {
try {
const tag = getNpmTag(currentVersion)
const response = await fetch(`https://registry.npmjs.org/cline/${tag}`)
const response = await fetch(`https://registry.npmjs.org/${encodeURIComponent(packageName)}/${tag}`)
if (!response.ok) return null
const data = (await response.json()) as { version: string }
return data.version || null
@@ -102,6 +111,29 @@ async function getLatestVersion(currentVersion: string): Promise<string | null>
}
}
async function getLatestKanbanVersion(): Promise<string | null> {
return getLatestPackageVersion("kanban")
}
function getInstalledKanbanVersion(): string | null {
try {
const command = process.platform === "win32" ? "kanban.cmd" : "kanban"
const result = spawnSync(command, ["--version"], {
encoding: "utf8",
shell: process.platform === "win32",
})
if (result.status !== 0) {
return null
}
const output = `${result.stdout ?? ""}\n${result.stderr ?? ""}`.trim()
const versionMatch = output.match(/\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?/)
return versionMatch?.[0] ?? null
} catch {
return null
}
}
/**
* Auto-update check that runs on CLI startup.
* Checks for updates asynchronously (non-blocking), then spawns a detached
@@ -157,85 +189,181 @@ async function checkAndUpdate(currentVersion: string, updateCommand: string): Pr
}
}
async function waitForProcessExit(updateProcess: ChildProcess): Promise<number> {
return new Promise<number>((resolve, reject) => {
updateProcess.once("close", (code) => {
resolve(code ?? 1)
})
updateProcess.once("error", (error) => {
reject(error)
})
})
}
async function runClineUpdate(updateCommand: string): Promise<number> {
const updateProcess = spawn(updateCommand, {
stdio: "inherit",
shell: true,
env: process.env,
windowsHide: true,
})
return waitForProcessExit(updateProcess)
}
type KanbanInstallCommand = NonNullable<ReturnType<typeof resolveKanbanInstallCommand>>
async function runKanbanUpdate(installCommand: KanbanInstallCommand): Promise<number> {
const updateProcess = spawnKanbanInstallProcess(installCommand, {
env: process.env,
windowsHide: true,
})
return waitForProcessExit(updateProcess)
}
function formatUpdateSummaryTargets(targets: string[]): string {
if (targets.length === 0) {
return ""
}
if (targets.length === 1) {
return targets[0]
}
if (targets.length === 2) {
return `${targets[0]} and ${targets[1]}`
}
return `${targets.slice(0, -1).join(", ")}, and ${targets.at(-1)}`
}
/**
* Check for updates and install if available (manual command)
*/
export async function checkForUpdates(currentVersion: string, options?: { verbose?: boolean }) {
printInfo("Checking for updates...")
export async function checkForUpdates(currentVersion: string, options: CheckForUpdatesOptions = {}) {
const includeKanban = options.includeKanban ?? true
printInfo("Checking for updates to cline and kanban packages...")
const { updateCommand, packageManager } = getInstallationInfo(currentVersion)
try {
const latestVersion = await getLatestVersion(currentVersion)
if (!latestVersion) {
printWarning("Failed to check for updates: could not fetch latest version")
exit(1)
}
const latestClineVersion = await getLatestVersion(currentVersion)
const canCheckClineVersion = latestClineVersion !== null
if (options?.verbose) {
printInfo(`Current version: ${currentVersion}`)
printInfo(`Latest version: ${latestVersion}`)
printInfo(`Package manager: ${packageManager}`)
}
// Compare versions
if (latestVersion === currentVersion) {
printInfo(`You are already on the latest version (${currentVersion})`)
exit(0)
}
// Check if current is newer (dev version)
if (compareVersions(currentVersion, latestVersion) > 0) {
printInfo(`You are already on a newer version ${currentVersion} (latest: ${latestVersion})`)
exit(0)
}
printInfo(`New version available: ${latestVersion} (current: ${currentVersion})`)
if (!updateCommand) {
printInfo("Unable to determine update command for your installation.")
printInfo("Please update manually using your package manager.")
exit(0)
}
// Ask user to confirm update
const userConfirmed = new Promise<boolean>((resolve) => {
process.stdout.write("Do you want to update now? (y/N): ")
process.stdin.setEncoding("utf-8")
process.stdin.once("data", (dataBuff) => {
const input = dataBuff.toString().trim().toLowerCase()
resolve(input === "y" || input === "yes")
})
})
if (!(await userConfirmed)) {
exit(0)
}
printInfo(`Installing update via ${packageManager}...`)
const updateProcess = spawn(updateCommand, {
stdio: "inherit",
shell: true,
env: process.env,
windowsHide: true,
})
updateProcess.on("close", (code) => {
if (code === 0) {
printInfo(`Successfully updated to version ${latestVersion}`)
exit(0)
} else {
printWarning(`Update failed. Please try running: ${updateCommand}`)
exit(1)
if (canCheckClineVersion) {
printInfo(`Latest version: ${latestClineVersion}`)
}
})
}
updateProcess.on("error", (err) => {
printWarning(`Failed to run update: ${err.message}`)
printInfo(`Please try running manually: ${updateCommand}`)
if (!canCheckClineVersion) {
printWarning("Failed to check for Cline updates: could not fetch latest version")
}
const clineComparison = latestClineVersion ? compareVersions(currentVersion, latestClineVersion) : null
const clineUpdateAvailable = clineComparison !== null && clineComparison < 0
const clineIsUpToDate = clineComparison !== null && clineComparison === 0
const canUpdateCline = clineUpdateAvailable && Boolean(updateCommand)
if (clineUpdateAvailable && latestClineVersion) {
printInfo(`New version available: ${latestClineVersion} (current: ${currentVersion})`)
}
if (clineUpdateAvailable && !updateCommand) {
printInfo("Unable to determine Cline update command for your installation.")
printInfo("Please update Cline manually using your package manager.")
}
const kanbanInstallCommand = includeKanban ? resolveKanbanInstallCommand() : null
const kanbanInstallerAvailable = kanbanInstallCommand !== null
if (includeKanban && !kanbanInstallerAvailable && options.verbose) {
printWarning("Unable to determine Kanban update command (npm, pnpm, or bun not found in PATH).")
}
const latestKanbanVersion = kanbanInstallerAvailable ? await getLatestKanbanVersion() : null
const installedKanbanVersion = includeKanban ? getInstalledKanbanVersion() : null
const kanbanIsUpToDate =
latestKanbanVersion !== null &&
installedKanbanVersion !== null &&
compareVersions(installedKanbanVersion, latestKanbanVersion) >= 0
const shouldInstallKanban =
kanbanInstallerAvailable &&
latestKanbanVersion !== null &&
(installedKanbanVersion === null || compareVersions(installedKanbanVersion, latestKanbanVersion) < 0)
if (!canCheckClineVersion && !shouldInstallKanban) {
exit(1)
})
}
if (!canUpdateCline && !shouldInstallKanban) {
if (clineIsUpToDate && kanbanIsUpToDate && installedKanbanVersion) {
printInfo(`You are already on the latest version cline@${currentVersion} and kanban@${installedKanbanVersion}`)
} else if (clineIsUpToDate) {
printInfo(`You are already on the latest version cline@${currentVersion}`)
}
exit(0)
}
let hadFailure = false
const installedUpdates: string[] = []
if (canUpdateCline && updateCommand && latestClineVersion) {
printInfo(`Installing cline@${latestClineVersion}...`)
try {
const clineUpdateCode = await runClineUpdate(updateCommand)
if (clineUpdateCode === 0) {
installedUpdates.push(`cline@${latestClineVersion}`)
} else {
printWarning(`Cline update failed. Please try running: ${updateCommand}`)
hadFailure = true
}
} catch (error) {
const message = error instanceof Error ? error.message : String(error)
printWarning(`Failed to run Cline update: ${message}`)
printInfo(`Please try running manually: ${updateCommand}`)
hadFailure = true
}
}
if (shouldInstallKanban && kanbanInstallCommand && latestKanbanVersion) {
const kanbanTargetVersion = latestKanbanVersion ?? "latest"
printInfo(`Installing kanban@${kanbanTargetVersion}...`)
try {
const kanbanUpdateCode = await runKanbanUpdate(kanbanInstallCommand)
if (kanbanUpdateCode === 0) {
installedUpdates.push(`kanban@${kanbanTargetVersion}`)
} else {
printWarning(`Kanban update failed. Please try running: ${kanbanInstallCommand.displayCommand}`)
hadFailure = true
}
} catch (error) {
const message = error instanceof Error ? error.message : String(error)
printWarning(`Failed to run Kanban update: ${message}`)
if (kanbanInstallCommand) {
printInfo(`Please try running manually: ${kanbanInstallCommand.displayCommand}`)
}
hadFailure = true
}
}
if (!hadFailure) {
if (installedUpdates.length > 1) {
printSuccess(`Installed updates for ${formatUpdateSummaryTargets(installedUpdates)}`)
} else if (installedUpdates.length === 1) {
printSuccess(`Installed update for ${installedUpdates[0]}`)
} else {
printInfo("No updates were installed.")
}
}
if (hadFailure) {
exit(1)
}
if (canUpdateCline || shouldInstallKanban) {
exit(0)
}
exit(1)
} catch (error) {
const message = error instanceof Error ? error.message : String(error)
printWarning(`Error checking for updates: ${message}`)
@@ -259,7 +387,7 @@ function parseVersion(version: string): ParsedVersion {
return {
base: nightlyMatch[1].split(".").map(Number),
isNightly: true,
timestamp: parseInt(nightlyMatch[2], 10),
timestamp: Number.parseInt(nightlyMatch[2], 10),
}
}
return {
-7
View File
@@ -21,7 +21,6 @@ Type `/` in the chat input to see available slash commands:
| `/newrule` | Create a rule file to teach Cline your preferences |
| `/deep-planning` | Investigate codebase, plan thoroughly, then create implementation task |
| `/explain-changes` | Generate AI explanations for any git diff (VS Code only) |
| `/reportbug` | Report a bug with diagnostic info |
### /newtask
@@ -62,12 +61,6 @@ This command is only available in VS Code.
Use `/explain-changes` when reviewing code, onboarding to a new codebase, or understanding what changed. For the full list of use cases and examples, see [Explain Changes Command](#explain-changes).
### /reportbug
`/reportbug` collects diagnostic information and helps you report issues with Cline. It gathers relevant context like your configuration, recent errors, and system details to make bug reports more useful for the development team.
Use `/reportbug` when you encounter unexpected behavior, crashes, or bugs you want to report.
## Custom Workflows
Beyond the built-in slash commands, you can create your own workflow files that work the same way. Store Markdown files in `.clinerules/workflows/` and invoke them with `/your-workflow.md`.
+22 -8
View File
@@ -258,7 +258,7 @@
"enterprise-solutions/sso-setup",
"enterprise-solutions/team-management/managing-members",
{
"group": "SaaS Provider Configuration",
"group": "Remote Provider Configuration",
"pages": [
"enterprise-solutions/configuration/remote-configuration/overview",
{
@@ -268,19 +268,33 @@
"enterprise-solutions/configuration/remote-configuration/aws-bedrock/member-configuration"
]
},
{
"group": "LiteLLM",
"pages": [
"enterprise-solutions/configuration/remote-configuration/litellm/admin-configuration",
"enterprise-solutions/configuration/remote-configuration/litellm/member-configuration"
]
},
{
"group": "Google Vertex AI",
"pages": [
"enterprise-solutions/configuration/remote-configuration/google-vertex/admin-configuration",
"enterprise-solutions/configuration/remote-configuration/google-vertex/member-configuration"
]
},
{
"group": "OpenAI Compatible",
"pages": [
"enterprise-solutions/configuration/remote-configuration/openai-compatible/admin-configuration",
"enterprise-solutions/configuration/remote-configuration/openai-compatible/member-configuration"
]
},
{
"group": "Anthropic",
"pages": [
"enterprise-solutions/configuration/remote-configuration/anthropic/admin-configuration",
"enterprise-solutions/configuration/remote-configuration/anthropic/member-configuration"
]
},
{
"group": "LiteLLM",
"pages": [
"enterprise-solutions/configuration/remote-configuration/litellm/admin-configuration",
"enterprise-solutions/configuration/remote-configuration/litellm/member-configuration"
]
}
]
},
@@ -0,0 +1,98 @@
---
title: "Configure Anthropic Provider (Admin)"
sidebarTitle: "Configure Anthropic (Admin)"
description: "This guide explains how administrators configure Anthropic as the organization-wide LLM provider for Cline."
---
As an administrator, you can add Anthropic as the organization-wide LLM provider for all Cline users through the hosted admin console. This centralized approach provides direct access to Anthropic's Claude models, with an optional custom base URL for organizations that route traffic through a proxy.
## Before You Begin
To get started with setting up Anthropic as your organization's LLM provider, you'll need a few items in place.
**Administrator access to the Cline Admin console**
You need admin privileges to enforce provider settings across your organization. If you can navigate to **Settings → Cline Settings** in the admin console at [app.cline.bot](https://app.cline.bot), you have the right access level.
**Anthropic API access**
Your organization needs an Anthropic account with API access to Claude models. Members will need individual API keys to authenticate.
<Note>
If your organization requires routing API traffic through a proxy or custom endpoint, have the proxy URL ready before configuring.
</Note>
## Configuration Steps
<Steps>
<Step title="Access Cline Settings">
Navigate to [app.cline.bot](https://app.cline.bot) and sign in with your administrator account. Go to **Settings → Cline Settings**.
<Info>
You should see the provider configuration options if you have the correct admin access level.
</Info>
</Step>
<Step title="Enable Remote Provider Configuration">
Toggle on **Enable settings** to reveal the remote provider configuration options. This allows you to enforce provider settings across your organization.
</Step>
<Step title="Select Anthropic as the API Provider">
Open the **API Provider** dropdown menu and select **Anthropic**. This will open the Anthropic configuration panel where you'll configure all your organization-wide settings.
</Step>
<Step title="Configure Anthropic Settings">
The configuration panel includes settings that control how Anthropic works for your organization:
<AccordionGroup>
<Accordion title="Base URL (optional)">
By default, Cline connects directly to the Anthropic API (`https://api.anthropic.com`). If your organization routes API traffic through a proxy or custom endpoint, enter the base URL here.
Use cases for a custom base URL:
- Corporate proxy that logs or filters API traffic
- Self-hosted API gateway for rate limiting or access control
- Regional routing requirements
Leave this empty to use the default Anthropic API endpoint.
<Tip>
If using a proxy, ensure it correctly forwards requests to the Anthropic API and preserves all required headers.
</Tip>
</Accordion>
</AccordionGroup>
</Step>
<Step title="Save Configuration">
After configuring your settings, close the provider configuration panel and click **Save** on the settings page to persist your changes.
Once saved, all organization members signed into the Cline extension will automatically use Anthropic with your configured settings. They won't be able to select other providers or switch to their personal Cline accounts.
<Warning>
Members can't switch to personal Cline accounts or join other organizations once remote configuration is enabled. This ensures consistent provider usage across your team.
</Warning>
</Step>
</Steps>
## Verification
To verify the configuration:
1. Check that the provider shows as "Anthropic" in the Enabled provider field
2. Confirm the settings persist after refreshing the page
3. Test with a member account to ensure they see only Anthropic as a provider
4. Verify that Claude models are available in the model dropdown
## Troubleshooting
**Members don't see the configured provider**
Ensure you clicked Save after closing the configuration panel. Verify the member account belongs to the correct organization.
**Connection errors when using a custom base URL**
Verify the proxy URL is correct and accessible from your team's development environments. Ensure the proxy correctly forwards requests to the Anthropic API.
**Configuration changes don't persist**
Make sure to click the Save button on the main settings page, not just close the configuration panel.
**Need to change settings later**
You can update the base URL or other settings at any time. Changes take effect immediately for all organization members.
For further details, consult the [Anthropic API documentation](https://docs.anthropic.com/) and coordinate with your infrastructure team.
@@ -0,0 +1,95 @@
---
title: "Configure Anthropic in VS Code (Members)"
sidebarTitle: "Configure Anthropic (Member)"
description: "Guide for engineers connecting to their organization's Anthropic provider through VS Code after admin setup"
---
As a team member, you can connect your local development environment to your organization's Anthropic provider setup. This guide walks you through configuring your API key in VS Code so you can start using Claude models through your organization's configuration. Your administrator has already configured the provider settings — you just need to add your API key to get started.
## Before You Begin
To successfully connect to your organization's Anthropic provider, you'll need a few things ready.
**Cline extension installed and configured**
The Cline extension must be installed in VS Code and you need to be signed into your organization account. If you haven't installed Cline yet, follow our [installation guide](/getting-started/installing-cline).
<Info>
**Quick Check**: Open the Cline panel in VS Code. If you see your organization name in the bottom left, you're signed in correctly.
</Info>
**Anthropic API key**
You need an API key from Anthropic to authenticate requests. Your organization may provide keys centrally or require you to create one through the [Anthropic Console](https://console.anthropic.com/).
<Note>
If you're unsure how to obtain an API key, check with your administrator about your organization's key provisioning process.
</Note>
## Configuration Steps
<Steps>
<Step title="Open Cline Settings">
Open VS Code and access the Cline settings panel using either of these methods:
- Click the settings icon (⚙️) in the Cline panel
- Click on the API Provider dropdown located directly below the chat area
</Step>
<Step title="Enter Your API Key">
1. Select or confirm the **Anthropic** provider is selected
2. Enter your Anthropic API key in the **API Key** field
3. If your administrator configured a custom base URL, it will already be set and locked
4. Click **Save** to store your credentials
<Tip>
API keys are stored locally and are only used by the Cline extension.
</Tip>
<Note>
The base URL setting is controlled by your administrator. If a custom proxy URL is configured, your API requests will be routed through it automatically.
</Note>
</Step>
<Step title="Verify Configuration">
After entering your API key, administrator-controlled settings (such as base URL) will be locked (shown with a lock icon 🔒) as they're managed by your organization.
</Step>
<Step title="Test the Connection">
Send a test message in Cline to verify your API key works correctly with the configured Anthropic endpoint.
<Tip>
**Testing Recommendation**
Try a simple test like "Hello" first to verify basic connectivity before starting development tasks.
</Tip>
</Step>
</Steps>
## Troubleshooting
**Anthropic not available as provider option**
Confirm you're signed into the correct Cline organization. Verify your administrator has saved the Anthropic configuration and that you have the latest version of the Cline extension.
**Authentication errors ("Invalid API Key" or "Unauthorized")**
Verify your API key is correct and active. Check the [Anthropic Console](https://console.anthropic.com/) to confirm your key status and that it has sufficient permissions.
**Connection errors or timeouts**
If your administrator configured a custom base URL (proxy), check with your IT team about network requirements. If using the default Anthropic endpoint, ensure you have internet access to `api.anthropic.com`.
**Models not available**
The available models depend on your Anthropic API plan and your organization's configuration. Contact your administrator if expected models are not available.
**Rate limit errors**
Your API key may have rate limits configured by Anthropic. If you encounter rate limit errors during normal use, contact your administrator about adjusting limits or managing key usage across the team.
## Security Best Practices
When working with your Anthropic API key:
- Keep your API key secure and do not share it
- Never store your API key in code or version control
- Report any suspected key compromise to your administrator immediately
- Regularly check the [Anthropic Console](https://console.anthropic.com/) for unusual usage patterns
For further details, consult the [Anthropic API documentation](https://docs.anthropic.com/) and coordinate with your organization's administrator.
@@ -0,0 +1,138 @@
---
title: "Configure OpenAI Compatible Provider (Admin)"
sidebarTitle: "Configure OpenAI Compatible (Admin)"
description: "This guide explains how administrators configure an OpenAI-compatible endpoint as the organization-wide LLM provider for Cline."
---
As an administrator, you can add an OpenAI-compatible endpoint as the organization-wide LLM provider for all Cline users through the hosted admin console. This covers any provider that exposes an OpenAI-compatible API, including Azure Foundry (Azure OpenAI), self-hosted inference engines (vLLM, TGI), and other compatible services.
## Before You Begin
To get started with setting up an OpenAI-compatible provider for your organization, you'll need a few items in place.
**Administrator access to the Cline Admin console**
You need admin privileges to enforce provider settings across your organization. If you can navigate to **Settings → Cline Settings** in the admin console at [app.cline.bot](https://app.cline.bot), you have the right access level.
**An OpenAI-compatible API endpoint**
You need a running endpoint that implements the OpenAI chat completions API. This could be:
- Azure Foundry (Azure OpenAI Service)
- A self-hosted inference engine (vLLM, text-generation-inference, etc.)
- Any third-party service with an OpenAI-compatible API
<Note>
If you're using Azure Foundry, you'll need your Azure OpenAI endpoint URL and optionally the API version. Work with your Azure administrator to ensure the endpoint is provisioned and accessible.
</Note>
**Endpoint URL and authentication details**
You'll need the base URL of your endpoint and any required authentication headers.
## Configuration Steps
<Steps>
<Step title="Access Cline Settings">
Navigate to [app.cline.bot](https://app.cline.bot) and sign in with your administrator account. Go to **Settings → Cline Settings**.
<Info>
You should see the provider configuration options if you have the correct admin access level.
</Info>
</Step>
<Step title="Enable Remote Provider Configuration">
Toggle on **Enable settings** to reveal the remote provider configuration options. This allows you to enforce provider settings across your organization.
</Step>
<Step title="Select OpenAI Compatible as the API Provider">
Open the **API Provider** dropdown menu and select **OpenAI Compatible**. This will open the configuration panel where you'll configure all your organization-wide settings.
</Step>
<Step title="Configure OpenAI Compatible Settings">
The configuration panel includes settings that control how the provider works for your organization:
<AccordionGroup>
<Accordion title="Base URL (required)">
Enter the base URL of your OpenAI-compatible endpoint. Examples:
- **Azure Foundry**: `https://your-resource.openai.azure.com`
- **Self-hosted vLLM**: `https://inference.yourcompany.com/v1`
- **Other compatible services**: The provider's API base URL
<Tip>
Use HTTPS endpoints in production for security. Ensure the URL is accessible from your team's development environments.
</Tip>
</Accordion>
<Accordion title="Custom Headers (optional)">
Add custom HTTP headers that will be included with every API request. This is useful for:
- Custom authentication schemes beyond API keys
- Routing headers for internal load balancers
- Organization or tenant identifiers required by your endpoint
Headers are configured as key-value pairs.
</Accordion>
<Accordion title="Azure API Version (optional — Azure Foundry only)">
If you're using Azure Foundry (Azure OpenAI), specify the API version string. For example: `2024-02-15-preview` or `2024-06-01`.
This field is only needed for Azure OpenAI deployments. Leave it empty for non-Azure endpoints.
<Note>
Check the [Azure OpenAI API version documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference) for available versions.
</Note>
</Accordion>
<Accordion title="Azure Identity Authentication (optional — Azure Foundry only)">
Enable this to use Azure Active Directory (Entra ID) token-based authentication instead of API keys. When enabled, members authenticate using their Azure AD credentials rather than a static API key.
This field is only relevant for Azure Foundry deployments.
</Accordion>
</AccordionGroup>
</Step>
<Step title="Save Configuration">
After configuring your settings, close the provider configuration panel and click **Save** on the settings page to persist your changes.
Once saved, all organization members signed into the Cline extension will automatically use the OpenAI Compatible provider with your configured settings. They won't be able to select other providers or switch to their personal Cline accounts.
<Warning>
Members can't switch to personal Cline accounts or join other organizations once remote configuration is enabled. This ensures consistent provider usage across your team.
</Warning>
</Step>
</Steps>
## Azure Foundry Configuration
For organizations using Azure Foundry (Azure OpenAI Service), use the following configuration:
1. **Base URL**: Your Azure OpenAI endpoint (e.g., `https://your-resource.openai.azure.com`)
2. **Azure API Version**: The API version to use (e.g., `2024-06-01`)
3. **Azure Identity Authentication**: Enable if your organization uses Azure AD for authentication instead of API keys
## Verification
To verify the configuration:
1. Check that the provider shows as "OpenAI Compatible" in the Enabled provider field
2. Confirm the settings persist after refreshing the page
3. Test with a member account to ensure they see only the OpenAI Compatible provider
4. Verify that configured models are available in the model dropdown
## Troubleshooting
**Members don't see the configured provider**
Ensure you clicked Save after closing the configuration panel. Verify the member account belongs to the correct organization.
**Connection errors to the endpoint**
Verify the Base URL is correct and accessible from your team's development environments. Check that any firewalls or security groups allow access from developer IP addresses.
**Azure authentication failures**
If using Azure Identity Authentication, verify that members' Azure AD accounts have the appropriate role assignments on the Azure OpenAI resource. If using API keys, verify the key is correctly entered by the member.
**Configuration changes don't persist**
Make sure to click the Save button on the main settings page, not just close the configuration panel.
**Need to change endpoint or settings later**
You can update these settings at any time. Changes take effect immediately for all organization members.
For Azure Foundry, consult the [Azure OpenAI Service documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/). For other OpenAI-compatible endpoints, refer to your provider's documentation.
@@ -0,0 +1,117 @@
---
title: "Configure OpenAI Compatible in VS Code (Members)"
sidebarTitle: "Configure OpenAI Compatible (Member)"
description: "Guide for engineers connecting to their organization's OpenAI-compatible endpoint through VS Code after admin setup"
---
As a team member, you can connect your local development environment to your organization's OpenAI-compatible endpoint. This guide walks you through configuring your credentials in VS Code so you can start using models through your organization's configured endpoint. Your administrator has already configured the provider settings — you just need to add your API key to get started.
## Before You Begin
To successfully connect to your organization's OpenAI-compatible endpoint, you'll need a few things ready.
**Cline extension installed and configured**
The Cline extension must be installed in VS Code and you need to be signed into your organization account. If you haven't installed Cline yet, follow our [installation guide](/getting-started/installing-cline).
<Info>
**Quick Check**: Open the Cline panel in VS Code. If you see your organization name in the bottom left, you're signed in correctly.
</Info>
**API key or credentials for your endpoint**
You need an API key or credentials to authenticate with your organization's configured endpoint. For Azure Foundry deployments using Azure Identity Authentication, your Azure AD credentials may be used instead.
<Note>
If you're unsure what credentials to use, check with your administrator or IT team about how your organization has configured access.
</Note>
## Configuration Steps
<Steps>
<Step title="Open Cline Settings">
Open VS Code and access the Cline settings panel using either of these methods:
- Click the settings icon (⚙️) in the Cline panel
- Click on the API Provider dropdown located directly below the chat area
</Step>
<Step title="Configure Your Credentials">
The authentication method depends on how your administrator configured the endpoint:
<AccordionGroup>
<Accordion title="API Key Authentication">
For most OpenAI-compatible endpoints:
1. Select or confirm the **OpenAI Compatible** provider is selected
2. Enter your API key in the **API Key** field
3. The base URL, custom headers, and other settings are preconfigured by your administrator
4. Click **Save** to store your credentials
<Tip>
API keys are stored locally and are only used by the Cline extension.
</Tip>
</Accordion>
<Accordion title="Azure Identity Authentication (Azure Foundry)">
If your organization uses Azure AD authentication:
1. Select or confirm the **OpenAI Compatible** provider is selected
2. Ensure you are signed into Azure in your development environment
3. The extension will use your Azure AD credentials automatically
4. No API key is needed when Azure Identity Authentication is enabled
<Note>
You may need the Azure Account extension or Azure CLI installed for credential resolution.
</Note>
</Accordion>
</AccordionGroup>
<Note>
The Base URL, custom headers, Azure API version, and Azure Identity settings are preconfigured by your administrator and do not need to be set in the extension.
</Note>
</Step>
<Step title="Verify Configuration">
After configuring your credentials, administrator-controlled settings will be locked (shown with a lock icon 🔒) as they're managed by your organization.
</Step>
<Step title="Test the Connection">
Send a test message in Cline to verify your credentials work correctly with the configured endpoint.
<Tip>
**Testing Recommendation**
Try a simple test like "Hello" first to verify basic connectivity before starting development tasks.
</Tip>
</Step>
</Steps>
## Troubleshooting
**OpenAI Compatible not available as provider option**
Confirm you're signed into the correct Cline organization. Verify your administrator has saved the configuration and that you have the latest version of the Cline extension.
**Authentication errors ("Access Denied" or "Invalid API Key")**
Verify your API key is correct and active. For Azure Foundry with Azure Identity Authentication, ensure you are signed into Azure in your development environment and that your account has the appropriate role assignments on the Azure OpenAI resource.
**Connection errors or timeouts**
The endpoint URL is configured by your administrator. If you experience connection issues, check with your IT team about network requirements (VPN, firewall rules, etc.).
**Models not available**
The available models depend on your organization's endpoint configuration. Contact your administrator if expected models are not available in the model dropdown.
**Configuration changes don't persist**
Make sure to save your credentials. The base URL and other admin-controlled settings cannot be changed locally.
## Security Best Practices
When working with your API credentials:
- Keep your API key secure and do not share it
- Never store credentials in code or version control
- Report any suspected key compromise to your administrator immediately
- Follow your organization's usage guidelines for the configured endpoint
Your organization administrator controls which endpoint, models, and settings are available. The extension will automatically apply the configured settings based on your organization's remote configuration.
For Azure Foundry, refer to the [Azure OpenAI Service documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/). For other endpoints, consult your organization's internal documentation or contact your administrator.
@@ -1,11 +1,11 @@
---
title: "SaaS Provider Configuration"
title: "Enterprise Provider Configuration"
sidebarTitle: "Overview"
description: "Configure inference providers through the Cline hosted admin console for centralized organization management"
---
SaaS Provider Configuration allows administrators to centrally configure inference providers for their entire organization through the Cline hosted admin console. This approach ensures consistent provider access, security policies, and cost management across all team members without requiring individual developer setup or infrastructure deployment.
Remote Provider Configuration allows administrators to centrally configure inference providers for their entire organization through the Cline hosted admin console. This approach ensures consistent provider access, security policies, and cost management across all team members without requiring individual developer setup or infrastructure deployment.
## How Remote Configuration Works
@@ -35,11 +35,17 @@ Cline supports remote configuration for the following inference providers:
| Provider | Use Case | Configuration | Member Setup |
|----------|----------|---------------|--------------|
| **Cline** | Organizations using Cline's native provider with centralized API key management | API provider selection, model access | No individual API keys needed - fully managed by organization |
| **Amazon Bedrock** | Organizations using AWS infrastructure | Region selection, VPC endpoints, cross-region inference, prompt caching | AWS credential configuration in VS Code |
| **LiteLLM** | Organizations requiring multi-model access through a unified proxy | Proxy endpoint, authentication, model routing | API key or endpoint configuration in VS Code (or centralized with Master Key) |
| **Google Vertex AI** | Organizations using Google Cloud Platform | Project ID, region selection, model access | Service account or credential configuration in VS Code |
| **Cline** | Organizations using Cline's native provider with centralized API key management | API provider selection, model access | No individual API keys needed fully managed by organization |
| **Amazon Bedrock** | Organizations using AWS infrastructure | Region selection, VPC endpoints, cross-region inference, global inference, prompt caching | AWS credential configuration (API key, CLI profile, or credential chain) |
| **Google Vertex AI** | Organizations using Google Cloud Platform | Project ID, region selection, model access | Google Cloud credential configuration (service account, SDK, or ADC) |
| **Azure Foundry** | Organizations using Azure OpenAI or Azure AI services | Base URL, Azure API version, Azure identity authentication, custom headers | API key configuration in the extension |
| **Anthropic** | Organizations using the Anthropic API directly | Optional custom base URL for proxy deployments, model access | API key configuration in the extension |
| **OpenAI Compatible** | Organizations using any OpenAI-compatible endpoint (self-hosted, vLLM, custom proxies) | Base URL, custom headers, model access | API key configuration in the extension |
| **LiteLLM** | Organizations requiring multi-model access through a unified proxy | Proxy endpoint, authentication, model routing | API key or endpoint configuration (or centralized with Master Key) |
<Note>
**Azure Foundry** uses the OpenAI Compatible provider configuration with Azure-specific settings (API version, Azure identity authentication). See the [OpenAI Compatible admin configuration](/enterprise-solutions/configuration/remote-configuration/openai-compatible/admin-configuration) for setup instructions.
</Note>
## Configuration Process
@@ -55,7 +61,7 @@ Provider configuration is automatically distributed to all organization members
</Step>
<Step title="Member Credential Setup">
Team members add their individual credentials (API keys, AWS profiles, etc.) to connect to the configured provider.
Team members add their individual credentials (API keys, AWS profiles, etc.) to connect to the configured provider. For some providers like Cline and LiteLLM (with Master Key), no individual credentials are needed.
</Step>
<Step title="Immediate Access">
@@ -92,11 +98,17 @@ Select your provider below to begin the configuration process:
AWS-based AI models with enterprise security and compliance features.
</Card>
<Card title="Google Vertex AI" icon="google" href="/enterprise-solutions/configuration/remote-configuration/google-vertex/admin-configuration">
Google Cloud's AI platform with Gemini models and regional control.
</Card>
<Card title="OpenAI Compatible" icon="plug" href="/enterprise-solutions/configuration/remote-configuration/openai-compatible/admin-configuration">
Any OpenAI-compatible endpoint, including Azure Foundry.
</Card>
<Card title="Anthropic" icon="robot" href="/enterprise-solutions/configuration/remote-configuration/anthropic/admin-configuration">
<Card title="LiteLLM" icon="layer-group" href="/enterprise-solutions/configuration/remote-configuration/litellm/admin-configuration">
Unified proxy for accessing 100+ AI models through a single interface.
</Card>
<Card title="Google Vertex AI" icon="google" href="/enterprise-solutions/configuration/remote-configuration/google-vertex/admin-configuration">
Google Cloud's AI platform with advanced ML capabilities and global infrastructure.
</Card>
</CardGroup>
@@ -0,0 +1,155 @@
---
title: "OpenTelemetry Environment Variables"
sidebarTitle: "OpenTelemetry Override"
description: "Configure OpenTelemetry using environment variables for advanced scenarios"
---
<Note>
This is an **advanced configuration method**. Most users should use [Remote Configuration](/enterprise-solutions/monitoring/opentelemetry) via the dashboard instead.
</Note>
Environment variables provide an alternative way to configure OpenTelemetry, useful for self-hosted deployments, local development, CI/CD pipelines, or when you need to override organization settings.
## When to Use
- **Self-hosted deployments** without dashboard access
- **Local development and testing** with your own collectors
- **CI/CD pipelines** that need observability
- **Override organization settings** with user-specific configuration
<Warning>
Environment variable configuration bypasses user telemetry settings and will export data regardless of individual preferences.
</Warning>
## Environment Variables
### Core Configuration
| Variable | Description | Values |
|----------|-------------|--------|
| `CLINE_OTEL_TELEMETRY_ENABLED` | Enable OpenTelemetry export | `"true"` or `"false"` |
| `CLINE_OTEL_METRICS_EXPORTER` | Metrics exporters (comma-separated) | `"console"`, `"otlp"` |
| `CLINE_OTEL_LOGS_EXPORTER` | Logs exporters (comma-separated) | `"console"`, `"otlp"` |
### OTLP Configuration
| Variable | Description | Values |
|----------|-------------|--------|
| `CLINE_OTEL_EXPORTER_OTLP_PROTOCOL` | OTLP protocol | `"grpc"`, `"http/json"`, or `"http/protobuf"` |
| `CLINE_OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP collector endpoint (applies to both metrics and logs) | URL with optional port |
| `CLINE_OTEL_EXPORTER_OTLP_HEADERS` | Authentication headers (comma-separated `key=value` pairs) | `"key=value,key2=value2"` |
| `CLINE_OTEL_EXPORTER_OTLP_INSECURE` | Disable TLS for gRPC (local development only) | `"true"` |
### Advanced OTLP Configuration
For separate metrics and logs endpoints:
| Variable | Description |
|----------|-------------|
| `CLINE_OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` | Metrics-specific protocol override |
| `CLINE_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | Metrics-specific endpoint |
| `CLINE_OTEL_EXPORTER_OTLP_LOGS_PROTOCOL` | Logs-specific protocol override |
| `CLINE_OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` | Logs-specific endpoint |
### Export Tuning
| Variable | Description | Default |
|----------|-------------|---------|
| `CLINE_OTEL_METRIC_EXPORT_INTERVAL` | Milliseconds between metric exports | 60000 |
| `CLINE_OTEL_LOG_BATCH_SIZE` | Maximum batch size for log records | 512 |
| `CLINE_OTEL_LOG_BATCH_TIMEOUT` | Maximum time before exporting logs (ms) | 5000 |
| `CLINE_OTEL_LOG_MAX_QUEUE_SIZE` | Maximum queue size for log records | 2048 |
## Quick Start Examples
### Datadog with gRPC
```bash
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=otlp
export CLINE_OTEL_LOGS_EXPORTER=otlp
export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT=https://api.datadoghq.com:4317
export CLINE_OTEL_EXPORTER_OTLP_HEADERS="dd-api-key=YOUR_API_KEY"
code .
```
<Note>
The endpoint shown above is for Datadog's **US1 region**. If you're in a different region (EU, US3, US5, AP1, etc.), replace `api.datadoghq.com` with your region-specific hostname (e.g., `api.datadoghq.eu` for EU). See [Datadog's OTLP documentation](https://docs.datadoghq.com/opentelemetry/) for your region's endpoint.
</Note>
### New Relic with HTTP
```bash
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=otlp
export CLINE_OTEL_LOGS_EXPORTER=otlp
export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net:4318
export CLINE_OTEL_EXPORTER_OTLP_HEADERS="api-key=YOUR_LICENSE_KEY"
code .
```
### Local Development (Insecure)
```bash
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=otlp
export CLINE_OTEL_LOGS_EXPORTER=otlp
export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export CLINE_OTEL_EXPORTER_OTLP_INSECURE=true
code .
```
### Console Output (Testing)
```bash
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=console
export CLINE_OTEL_LOGS_EXPORTER=console
code .
```
## Debugging
Enable detailed OpenTelemetry diagnostic logging:
```bash
export TEL_DEBUG_DIAGNOSTICS=true
code .
```
This outputs:
- Configuration being used
- Exporters being created
- Connection attempts
- Export successes/failures
Check the VS Code Developer Tools Console (Help > Toggle Developer Tools) for diagnostic output.
## Configuration Priority
When multiple configuration methods are present, Cline uses this priority order:
1. **Environment variables** (highest priority) - This method
2. **Remote Configuration** - Dashboard settings
3. **Default settings** - Built-in defaults
Environment variable configuration will override dashboard settings.
## See Also
<CardGroup cols={2}>
<Card title="Dashboard Configuration" icon="globe" href="/enterprise-solutions/monitoring/opentelemetry">
Configure OpenTelemetry via the web dashboard
</Card>
<Card title="Remote Configuration" icon="server" href="/enterprise-solutions/configuration/remote-configuration/overview">
Learn about Remote Configuration system
</Card>
</CardGroup>
@@ -199,8 +199,7 @@ Understanding how seats work helps you manage your license effectively:
<Accordion title="Upgrading Your License" icon="arrow-up">
Need more seats?
- **Teams Plan:** Contact your account manager or visit app.cline.bot/settings/billing to upgrade your license.
- **Enterprise Plan:** Includes unlimited seats with no per-user restrictions.
- **Enterprise Plan:** Includes unlimited seats with no per-user restrictions. Contact your account manager or visit app.cline.bot/settings/billing to upgrade.
</Accordion>
</AccordionGroup>
+1 -1
View File
@@ -261,5 +261,5 @@ These same patterns work for any project, from simple scripts to full applicatio
## Need Help?
- **Start a fresh conversation**: Type `/new` in the chat input to begin a new task
- **Report issues**: Use `/reportbug` to help us improve
- **Report issues**: Open a GitHub issue in the [Cline repository](https://github.com/cline/cline/issues)
- **Get support**: Join our [Discord community](https://discord.gg/cline)
@@ -23,7 +23,6 @@ export const toolUseNames = [
"attempt_completion",
"new_task",
"condense",
"report_bug",
"new_rule",
"web_fetch",
] as const
@@ -561,8 +561,8 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content)
-1
View File
@@ -11,7 +11,6 @@ option java_package = "bot.cline.proto";
// SlashService provides methods for managing slash commands
service SlashService {
// Sends button click message
rpc reportBug(StringRequest) returns (Empty);
rpc condense(StringRequest) returns (Empty);
// Get available slash commands for autocomplete (used by CLI)
+2 -1
View File
@@ -30,7 +30,8 @@ enum ClineAsk {
USE_MCP_SERVER = 11;
NEW_TASK = 12;
CONDENSE = 13;
REPORT_BUG = 14;
reserved 14;
reserved "REPORT_BUG";
SUMMARIZE_TASK = 15;
ACT_MODE_RESPOND = 16;
USE_SUBAGENTS = 17;
+5 -8
View File
@@ -1,10 +1,7 @@
import { Empty, StringRequest } from "@shared/proto/cline/common"
import { Controller } from ".."
/**
* Report bug slash command logic
* Compatibility shim for downstream integration workflows that may temporarily
* mirror file updates without propagating deletions.
*
* The original slash-command bridge has been removed.
*/
export async function reportBug(controller: Controller, _request: StringRequest): Promise<Empty> {
await controller.task?.handleWebviewAskResponse("yesButtonClicked")
return Empty.create()
}
export {}
-31
View File
@@ -195,37 +195,6 @@ Below is the user's input when they indicated that they wanted to create a new C
</explicit_instructions>\n
`
export const reportBugToolResponse = () =>
`<explicit_instructions type="report_bug">
The user has explicitly asked you to help them submit a bug to the Cline github page (you MUST now help them with this irrespective of what your conversation up to this point in time was). To do so you will use the report_bug tool which is defined below. However, you must first ensure that you have collected all required information to fill in all the parameters for the tool call. If any of the the required information is apparent through your previous conversation with the user, you can suggest how to fill in those entries. However you should NOT assume you know what the issue about unless it's clear.
Otherwise, you should converse with the user until you are able to gather all the required details. When conversing with the user, make sure you ask for/reference all required information/fields. When referencing the required fields, use human friendly versions like "Steps to reproduce" rather than "steps_to_reproduce". Only then should you use the report_bug tool call.
The report_bug tool can be used in either of the PLAN or ACT modes.
The report_bug tool call is defined below:
Description:
Your task is to fill in all of the required fields for a issue/bug report on github. You should attempt to get the user to be as verbose as possible with their description of the bug/issue they encountered. Still, it's okay, when the user is unaware of some of the details, to set those fields as "N/A".
Parameters:
- title: (required) Concise description of the issue.
- what_happened: (required) What happened and also what the user expected to happen instead.
- steps_to_reproduce: (required) What steps are required to reproduce the bug.
- api_request_output: (optional) Relevant API request output.
- additional_context: (optional) Any other context about this bug not already mentioned.
Usage:
<report_bug>
<title>Title of the issue</title>
<what_happened>Description of the issue</what_happened>
<steps_to_reproduce>Steps to reproduce the issue</steps_to_reproduce>
<api_request_output>Output from the LLM API related to the bug</api_request_output>
<additional_context>Other issue details not already covered</additional_context>
</report_bug>
Below is the user's input when they indicated that they wanted to submit a Github issue.
</explicit_instructions>\n
`
export const explainChangesToolResponse = () =>
`<explicit_instructions type="explain_changes">
The user has asked you to explain code changes. You have access to a tool called **generate_explanation** that opens a multi-file diff view with AI-generated inline comments explaining code changes between two git references.
+1 -1
View File
@@ -114,5 +114,5 @@ This session is being continued from a previous conversation that ran out of con
${summaryText}.
Please continue the conversation from where we left it off without asking the user any further questions. Continue with the last task that you were asked to work on. Pay special attention to the most recent user message when responding rather than the initial task message, if applicable.
If the most recent user's message starts with "/newtask", "/smol", "/compact", "/newrule", or "/reportbug", you should indicate to the user that they will need to run this command again.
If the most recent user's message starts with "/newtask", "/smol", "/compact", or "/newrule", you should indicate to the user that they will need to run this command again.
`
@@ -773,7 +773,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content)
@@ -792,7 +792,7 @@ RULES
- Be sure to consider the type of project (e.g. Python, JavaScript, web application) when determining the appropriate structure and files to include. Also consider what files may be most relevant to accomplishing the task, for example looking at a project's manifest file would help you understand the project's dependencies, which you could incorporate into any code you write.
- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.
- When you want to modify a file, use the replace_in_file or write_to_file tool directly with the desired changes. You do not need to display the changes before using the tool.
- Use Markdown **only where semantically correct** (e.g., \`inline code\`, \`\`\`code fences\`\`\`, lists, tables). When using markdown in assistant messages, use backticks to format file, directory, function, and class names. Use \( and \) for inline math, \[ and \] for block math.
- Use Markdown **only where semantically correct** (e.g., \`inline code\`, \`\`\`code fences\`\`\`, lists, tables). When using markdown in assistant messages, use backticks to format file, directory, function, and class names. Use ( and ) for inline math, [ and ] for block math.
- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively. When you've completed your task, you must use the attempt_completion tool to present the result to the user. The user may provide feedback, which you can use to make improvements and try again.
- You are only allowed to ask the user questions using the ask_followup_question tool. Use this tool only when you need additional details to complete a task, and be sure to use a clear and concise question that will help you move forward with the task. However if you can use the available tools to avoid having to ask the user questions, you should do so. For example, if the user mentions a file that may be in an outside directory like the Desktop, you should use the list_files tool to list the files in the Desktop and check if the file they are talking about is there, rather than asking the user to provide the file path themselves.
- When the user is being vague, you should be proactive about asking clarifying questions using the ask_followup_question tool to ensure you understand their request. However, if you can infer the user's intent based on the context and available tools, you should proceed without asking unnecessary questions
@@ -800,7 +800,7 @@ RULES
- The user may provide a file's contents directly in their message, in which case you shouldn't use the read_file tool to get the file contents again since you already have it.
- Your goal is to try to accomplish the user's task, NOT engage in a back and forth conversation.${
supportsBrowserUse
? `\n- The user may ask generic non-development tasks, such as "what\'s the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question. However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action.`
? `\n- The user may ask generic non-development tasks, such as "what's the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question. However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action.`
: ""
}
- NEVER end attempt_completion result with a question or request to engage in further conversation! Formulate the end of your result in a way that is final and does not require further input from the user.
@@ -616,7 +616,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -580,7 +580,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -594,7 +594,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -63,7 +63,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -61,7 +61,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -63,7 +63,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -651,7 +651,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -571,7 +571,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -616,7 +616,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -580,7 +580,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -594,7 +594,7 @@ CAPABILITIES
====
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are `getting-started` (Intro for new coders, installing Cline and dev essentials), `model-selection` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), `features` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), `task-management` (Task and Context Management in Cline), `prompt-engineering` (Improving your prompting skills, Prompt Engineering Guide), `cline-tools` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), `mcp` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), `enterprise` (Cloud provider integration, Security concerns, Custom instructions), `more-info` (Telemetry and other reference content)
@@ -79,7 +79,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -77,7 +77,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -79,7 +79,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -62,7 +62,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -60,7 +60,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -62,7 +62,7 @@ CAPABILITIES
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -207,7 +207,7 @@ You can track and communicate your progress on the overall task using the task_p
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -205,7 +205,7 @@ You can track and communicate your progress on the overall task using the task_p
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -207,7 +207,7 @@ You can track and communicate your progress on the overall task using the task_p
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -207,7 +207,7 @@ You can track and communicate your progress on the overall task using the task_p
FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.
====
@@ -4,7 +4,7 @@ import type { PromptVariant, SystemPromptContext } from "../types"
const FEEDBACK_TEMPLATE_TEXT = `
If the user asks for help or wants to give feedback inform them of the following:
- To give feedback, users should report the issue using the /reportbug slash command in the chat.
- To give feedback, users can open a GitHub issue in the Cline repository.
When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot.
- The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content)
@@ -142,7 +142,7 @@ const GEMINI_3_RULES_TEMPLATE = (context: SystemPromptContext) => `RULES
const GEMINI_3_FEEDBACK_TEMPLATE = (_context: SystemPromptContext) => `FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.`
const GEMINI_3_ACT_VS_PLAN_TEMPLATE = (context: SystemPromptContext) => `ACT MODE V.S. PLAN MODE
@@ -105,7 +105,7 @@ This ensures your work aligns with the existing codebase structure and avoids un
const GPT5_1_FEEDBACK = (_context: SystemPromptContext) => `FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.`
export const gpt51ComponentOverrides: PromptVariant["componentOverrides"] = {
[SystemPromptSection.AGENT_ROLE]: {
@@ -83,7 +83,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
const FEEDBACK = (_context: SystemPromptContext) => `FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.`
export const GPT_5_TEMPLATE_OVERRIDES = {
BASE,
@@ -100,7 +100,7 @@ You accomplish a given task iteratively, breaking it down into clear steps and w
const FEEDBACK = (_context: SystemPromptContext) => `FEEDBACK
When user is providing you with feedback on how you could improve, you can let the user know to report new issue using the '/reportbug' slash command.`
When user is providing you with feedback on how you could improve, you can let the user know to open a GitHub issue in the Cline repository.`
export const TEMPLATE_OVERRIDES = {
BASE,
+1 -3
View File
@@ -11,7 +11,6 @@ import {
explainChangesToolResponse,
newRuleToolResponse,
newTaskToolResponse,
reportBugToolResponse,
} from "../prompts/commands"
import { StateManager } from "../storage/StateManager"
@@ -49,7 +48,7 @@ export async function parseSlashCommands(
providerInfo?: ApiProviderInfo,
mcpPromptFetcher?: McpPromptFetcher,
): Promise<{ processedText: string; needsClinerulesFileCheck: boolean }> {
const SUPPORTED_DEFAULT_COMMANDS = ["newtask", "smol", "compact", "newrule", "reportbug", "deep-planning", "explain-changes"]
const SUPPORTED_DEFAULT_COMMANDS = ["newtask", "smol", "compact", "newrule", "deep-planning", "explain-changes"]
// Determine if the current provider/model/setting actually uses native tool calling
const willUseNativeTools = isNativeToolCallingConfig(providerInfo!, enableNativeToolCalls || false)
@@ -59,7 +58,6 @@ export async function parseSlashCommands(
smol: condenseToolResponse(focusChainSettings),
compact: condenseToolResponse(focusChainSettings),
newrule: newRuleToolResponse(),
reportbug: reportBugToolResponse(),
"deep-planning": deepPlanningToolResponse(focusChainSettings, providerInfo, willUseNativeTools),
"explain-changes": explainChangesToolResponse(),
}
@@ -17,7 +17,6 @@ import { LoadMcpDocumentationHandler } from "./handlers/LoadMcpDocumentationHand
import { NewTaskHandler } from "./handlers/NewTaskHandler"
import { PlanModeRespondHandler } from "./handlers/PlanModeRespondHandler"
import { ReadFileToolHandler } from "./handlers/ReadFileToolHandler"
import { ReportBugHandler } from "./handlers/ReportBugHandler"
import { SearchFilesToolHandler } from "./handlers/SearchFilesToolHandler"
import { UseSubagentsToolHandler } from "./handlers/SubagentToolHandler"
import { SummarizeTaskHandler } from "./handlers/SummarizeTaskHandler"
@@ -99,7 +98,6 @@ export class ToolExecutorCoordinator {
[ClineDefaultTool.WEB_SEARCH]: (_v: ToolValidator) => new WebSearchToolHandler(),
[ClineDefaultTool.CONDENSE]: (_v: ToolValidator) => new CondenseHandler(),
[ClineDefaultTool.SUMMARIZE_TASK]: (_v: ToolValidator) => new SummarizeTaskHandler(_v),
[ClineDefaultTool.REPORT_BUG]: (_v: ToolValidator) => new ReportBugHandler(),
[ClineDefaultTool.NEW_RULE]: (v: ToolValidator) =>
new SharedToolHandler(ClineDefaultTool.NEW_RULE, new WriteToFileToolHandler(v)),
[ClineDefaultTool.APPLY_PATCH]: (_v: ToolValidator) => new ApplyPatchHandler(_v),
@@ -18,16 +18,19 @@ import { ToolResultUtils } from "../utils/ToolResultUtils"
export const DEFAULT_MAX_LINES = 1000
const FILE_TRUNCATED_MARKER = "\n\n---\n\n[FILE TRUNCATED:"
/**
* Slice file content to the requested line range, add one-based `N |` line labels,
* and append a continuation hint when the file has more lines to read.
*/
export function formatFileContentWithLineNumbers(content: string, startLine?: number, endLine?: number): string {
type DisplayedLineSlice = {
start: number
end: number
totalLines: number
lines: string[]
truncationSuffix: string
}
function getDisplayedLineSlice(content: string, startLine?: number, endLine?: number): DisplayedLineSlice | null {
if (!content) {
return content
return null
}
// Separate any byte-truncation notice appended by content-limits.ts
let body = content
let truncationSuffix = ""
const truncationIndex = content.indexOf(FILE_TRUNCATED_MARKER)
@@ -48,6 +51,42 @@ export function formatFileContentWithLineNumbers(content: string, startLine?: nu
const start = shouldSwapBounds ? requestedEnd : requestedStart
const end = Math.min(totalLines, shouldSwapBounds ? requestedStart : requestedEnd)
return { start, end, totalLines, lines, truncationSuffix }
}
/**
* Line range shown for a read_file result (matches formatFileContentWithLineNumbers). Omits image reads and empty files.
*/
export function getReadToolDisplayedLineRange(
block: ToolUse,
fileContent: FileContentResult,
): { start: number; end: number } | undefined {
if (fileContent.imageBlock) {
return undefined
}
const { startLine, endLine } = parseRequestedLineRange(block)
const slice = getDisplayedLineSlice(fileContent.text, startLine, endLine)
if (!slice || slice.totalLines === 0) {
return undefined
}
return { start: slice.start, end: slice.end }
}
/**
* Slice file content to the requested line range, add one-based `N |` line labels,
* and append a continuation hint when the file has more lines to read.
*/
export function formatFileContentWithLineNumbers(content: string, startLine?: number, endLine?: number): string {
if (!content) {
return content
}
const meta = getDisplayedLineSlice(content, startLine, endLine)
if (!meta) {
return content
}
const { start, end, totalLines, lines, truncationSuffix } = meta
const slice = lines.slice(start - 1, end)
const labeled = slice.map((line, i) => `${start + i} | ${line}`).join("\n")
@@ -82,6 +121,24 @@ function buildReadResponse(block: ToolUse, fileContent: FileContentResult, prefi
return prefix ? `${prefix}\n${text}` : text
}
async function emitReadFileToolUiComplete(
config: TaskConfig,
sharedMessageProps: ClineSayTool,
block: ToolUse,
fileContent: FileContentResult,
): Promise<void> {
if (config.isSubagentExecution) {
return
}
const range = getReadToolDisplayedLineRange(block, fileContent)
const payload: ClineSayTool = { ...sharedMessageProps }
if (range) {
payload.readLineStart = range.start
payload.readLineEnd = range.end
}
await config.callbacks.say("tool", JSON.stringify(payload), undefined, undefined, false)
}
export class ReadFileToolHandler implements IFullyManagedTool {
readonly name = ClineDefaultTool.FILE_READ
@@ -170,10 +227,9 @@ export class ReadFileToolHandler implements IFullyManagedTool {
const shouldAutoApprove =
config.isSubagentExecution || (await config.callbacks.shouldAutoApproveToolWithPath(block.name, relPath))
if (shouldAutoApprove) {
// Auto-approval flow
// Auto-approval flow (completed read is announced after extractFileContent so line range is known)
if (!config.isSubagentExecution) {
await config.callbacks.removeLastPartialMessageIfExistsWithType("ask", "tool")
await config.callbacks.say("tool", completeMessage, undefined, undefined, false)
}
// Capture telemetry
@@ -283,6 +339,7 @@ export class ReadFileToolHandler implements IFullyManagedTool {
}
if (validCached.readCount >= 3) {
await emitReadFileToolUiComplete(config, sharedMessageProps, block, fileContent)
return buildReadResponse(
block,
fileContent,
@@ -290,6 +347,7 @@ export class ReadFileToolHandler implements IFullyManagedTool {
)
}
await emitReadFileToolUiComplete(config, sharedMessageProps, block, fileContent)
return buildReadResponse(
block,
fileContent,
@@ -338,9 +396,11 @@ export class ReadFileToolHandler implements IFullyManagedTool {
// Handle image blocks separately - they need to be pushed to userMessageContent
if (fileContent.imageBlock) {
config.taskState.userMessageContent.push(fileContent.imageBlock)
await emitReadFileToolUiComplete(config, sharedMessageProps, block, fileContent)
return buildReadResponse(block, fileContent)
}
await emitReadFileToolUiComplete(config, sharedMessageProps, block, fileContent)
return buildReadResponse(block, fileContent)
}
}
@@ -1,140 +1,7 @@
import type { ToolUse } from "@core/assistant-message"
import { formatResponse } from "@core/prompts/responses"
import { processFilesIntoText } from "@integrations/misc/extract-text"
import { showSystemNotification } from "@integrations/notifications"
import { createAndOpenGitHubIssue } from "@utils/github-url-utils"
import * as os from "os"
import { HostProvider } from "@/hosts/host-provider"
import { ExtensionRegistryInfo } from "@/registry"
import { Logger } from "@/shared/services/Logger"
import { ClineDefaultTool } from "@/shared/tools"
import type { ToolResponse } from "../../index"
import type { IPartialBlockHandler, IToolHandler } from "../ToolExecutorCoordinator"
import type { TaskConfig } from "../types/TaskConfig"
import type { StronglyTypedUIHelpers } from "../types/UIHelpers"
export class ReportBugHandler implements IToolHandler, IPartialBlockHandler {
readonly name = ClineDefaultTool.REPORT_BUG
constructor() {}
getDescription(block: ToolUse): string {
return `[${block.name}]`
}
async handlePartialBlock(block: ToolUse, uiHelpers: StronglyTypedUIHelpers): Promise<void> {
const partialMessage = JSON.stringify({
title: uiHelpers.removeClosingTag(block, "title", block.params.title),
what_happened: uiHelpers.removeClosingTag(block, "what_happened", block.params.what_happened),
steps_to_reproduce: uiHelpers.removeClosingTag(block, "steps_to_reproduce", block.params.steps_to_reproduce),
api_request_output: uiHelpers.removeClosingTag(block, "api_request_output", block.params.api_request_output),
additional_context: uiHelpers.removeClosingTag(block, "additional_context", block.params.additional_context),
})
await uiHelpers.ask(this.name, partialMessage, block.partial).catch(() => {})
}
async execute(config: TaskConfig, block: ToolUse): Promise<ToolResponse> {
const title = block.params.title
const what_happened = block.params.what_happened
const steps_to_reproduce = block.params.steps_to_reproduce
const api_request_output = block.params.api_request_output
const additional_context = block.params.additional_context
// Validate required parameters
if (!title) {
config.taskState.consecutiveMistakeCount++
return await config.callbacks.sayAndCreateMissingParamError(block.name, "title")
}
if (!what_happened) {
config.taskState.consecutiveMistakeCount++
return await config.callbacks.sayAndCreateMissingParamError(block.name, "what_happened")
}
if (!steps_to_reproduce) {
config.taskState.consecutiveMistakeCount++
return await config.callbacks.sayAndCreateMissingParamError(block.name, "steps_to_reproduce")
}
if (!api_request_output) {
config.taskState.consecutiveMistakeCount++
return await config.callbacks.sayAndCreateMissingParamError(block.name, "api_request_output")
}
if (!additional_context) {
config.taskState.consecutiveMistakeCount++
return await config.callbacks.sayAndCreateMissingParamError(block.name, "additional_context")
}
config.taskState.consecutiveMistakeCount = 0
// Show notification if enabled
if (config.autoApprovalSettings.enableNotifications) {
showSystemNotification({
subtitle: "Cline wants to create a github issue...",
message: `Cline is suggesting to create a github issue with the title: ${title}`,
})
}
// Derive system information values algorithmically
const operatingSystem = os.platform() + " " + os.release()
const currentMode = config.mode
const clineVersion = ExtensionRegistryInfo.version
const host = await HostProvider.env.getHostVersion({})
const systemInfo = `${host.platform}: ${host.version}, Node.js: ${process.version}, Architecture: ${os.arch()}`
const apiConfig = config.services.stateManager.getApiConfiguration()
const apiProvider = currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider
const providerAndModel = `${apiProvider} / ${config.api.getModel().id}`
// Ask user for confirmation
const bugReportData = JSON.stringify({
title,
what_happened,
steps_to_reproduce,
api_request_output,
additional_context,
// Include derived values in the JSON for display purposes
provider_and_model: providerAndModel,
operating_system: operatingSystem,
system_info: systemInfo,
cline_version: clineVersion,
})
const { text, images, files: reportBugFiles } = await config.callbacks.ask(this.name, bugReportData, false)
// If the user provided a response, treat it as feedback
if (text || (images && images.length > 0) || (reportBugFiles && reportBugFiles.length > 0)) {
let fileContentString = ""
if (reportBugFiles && reportBugFiles.length > 0) {
fileContentString = await processFilesIntoText(reportBugFiles)
}
await config.callbacks.say("user_feedback", text ?? "", images, reportBugFiles)
return formatResponse.toolResult(
`The user did not submit the bug, and provided feedback on the Github issue generated instead:\n<feedback>\n${text}\n</feedback>`,
images,
fileContentString,
)
} else {
// If no response, the user accepted the bug report
try {
// Create a Map of parameters for the GitHub issue
const params = new Map<string, string>()
params.set("title", title)
params.set("operating-system", operatingSystem)
params.set("cline-version", clineVersion)
params.set("system-info", systemInfo)
params.set("additional-context", additional_context)
params.set("what-happened", what_happened)
params.set("steps", steps_to_reproduce)
params.set("provider-model", providerAndModel)
params.set("logs", api_request_output)
// Use our utility function to create and open the GitHub issue URL
// This bypasses VS Code's URI handling issues with special characters
await createAndOpenGitHubIssue("cline", "cline", "bug_report.yml", params)
} catch (error) {
Logger.error(`An error occurred while attempting to report the bug: ${error}`)
}
return formatResponse.toolResult(`The user accepted the creation of the Github issue.`)
}
}
}
/**
* Compatibility shim for downstream integration workflows that may temporarily
* mirror file updates without propagating deletions.
*
* The original report-bug handler has been removed.
*/
export {}
@@ -1,6 +1,34 @@
import assert from "node:assert/strict"
import { ClineDefaultTool } from "@shared/tools"
import { describe, it } from "mocha"
import { DEFAULT_MAX_LINES, formatFileContentWithLineNumbers } from "../ReadFileToolHandler"
import { DEFAULT_MAX_LINES, formatFileContentWithLineNumbers, getReadToolDisplayedLineRange } from "../ReadFileToolHandler"
describe("getReadToolDisplayedLineRange", () => {
const block = (start?: string, end?: string) => ({
type: "tool_use" as const,
name: ClineDefaultTool.FILE_READ,
params: {
path: "f.txt",
...(start !== undefined ? { start_line: start } : {}),
...(end !== undefined ? { end_line: end } : {}),
},
partial: false,
})
it("matches the slice shown for explicit start/end", () => {
const text = Array.from({ length: 10 }, (_, i) => `L${i + 1}`).join("\n")
const r = getReadToolDisplayedLineRange(block("3", "5"), { text })
assert.deepEqual(r, { start: 3, end: 5 })
})
it("returns undefined for image reads", () => {
const r = getReadToolDisplayedLineRange(block(), {
text: "ok",
imageBlock: { type: "image", source: { type: "url", url: "x" } } as any,
})
assert.equal(r, undefined)
})
})
describe("formatFileContentWithLineNumbers", () => {
describe("line labels", () => {
+3 -1
View File
@@ -151,7 +151,6 @@ export type ClineAsk =
| "new_task"
| "condense"
| "summarize_task"
| "report_bug"
| "use_subagents"
export type ClineSay =
@@ -216,6 +215,9 @@ export interface ClineSayTool {
operationIsLocatedInWorkspace?: boolean
/** Starting line numbers in the original file where each SEARCH block matched */
startLineNumbers?: number[]
/** Inclusive line range actually returned by read_file (for UI summaries). */
readLineStart?: number
readLineEnd?: number
}
export interface ClineSayHook {
@@ -24,7 +24,6 @@ function convertClineAskToProtoEnum(ask: AppClineAsk | undefined): ClineAsk | un
new_task: ClineAsk.NEW_TASK,
condense: ClineAsk.CONDENSE,
summarize_task: ClineAsk.SUMMARIZE_TASK,
report_bug: ClineAsk.REPORT_BUG,
use_subagents: ClineAsk.USE_SUBAGENTS,
}
@@ -57,7 +56,6 @@ function convertProtoEnumToClineAsk(ask: ClineAsk): AppClineAsk | undefined {
[ClineAsk.NEW_TASK]: "new_task",
[ClineAsk.CONDENSE]: "condense",
[ClineAsk.SUMMARIZE_TASK]: "summarize_task",
[ClineAsk.REPORT_BUG]: "report_bug",
[ClineAsk.USE_SUBAGENTS]: "use_subagents",
}
-6
View File
@@ -30,12 +30,6 @@ export const BASE_SLASH_COMMANDS: SlashCommand[] = [
section: "default",
cliCompatible: true,
},
{
name: "reportbug",
description: "Create a Github issue with Cline",
section: "default",
cliCompatible: true,
},
]
// VS Code-only slash commands
-1
View File
@@ -27,7 +27,6 @@ export enum ClineDefaultTool {
WEB_SEARCH = "web_search",
CONDENSE = "condense",
SUMMARIZE_TASK = "summarize_task",
REPORT_BUG = "report_bug",
NEW_RULE = "new_rule",
APPLY_PATCH = "apply_patch",
GENERATE_EXPLANATION = "generate_explanation",
-9
View File
@@ -782,15 +782,6 @@ export const CondenseConversation = quickStory(
"Would you like me to condense the conversation to improve performance?",
"Shows utility action to condense conversation for better performance.",
)
export const ReportBug = quickStory(
"Report Bug",
"report_bug",
JSON.stringify({
steps_to_reproduce: "1. Open Cline\n2. Start a new task\n3. Observe the error",
what_happened: "Cline crashes unexpectedly",
}),
"Shows utility action to report bugs to the GitHub repository.",
)
export const ResumeCompletedTask = quickStory(
"Resume Completed Task type",
"resume_completed_task",
+6 -11
View File
@@ -59,7 +59,6 @@ import { MarkdownRow } from "./MarkdownRow"
import NewTaskPreview from "./NewTaskPreview"
import PlanCompletionOutputRow from "./PlanCompletionOutputRow"
import QuoteButton from "./QuoteButton"
import ReportBugPreview from "./ReportBugPreview"
import { RequestStartRow } from "./RequestStartRow"
import SearchResultsDisplay from "./SearchResultsDisplay"
import SubagentStatusRow from "./SubagentStatusRow"
@@ -527,6 +526,12 @@ export const ChatRowContent = memo(
{tool.path && !tool.path.startsWith(".") && <span>/</span>}
<span className="ph-no-capture whitespace-nowrap overflow-hidden text-ellipsis mr-2 text-left [direction: rtl]">
{cleanPathPrefix(tool.path ?? "") + "\u200E"}
{tool.readLineStart != null && tool.readLineEnd != null ? (
<span className="opacity-80">
{" "}
({tool.readLineStart}-{tool.readLineEnd})
</span>
) : null}
</span>
<div className="grow" />
{!isImage && <SquareArrowOutUpRightIcon className="size-2" />}
@@ -1253,16 +1258,6 @@ export const ChatRowContent = memo(
<NewTaskPreview context={message.text || ""} />
</div>
)
case "report_bug":
return (
<div>
<div className={HEADER_CLASSNAMES}>
<FilePlus2Icon className="size-2" />
<span className="text-foreground font-bold">Cline wants to create a Github issue:</span>
</div>
<ReportBugPreview data={message.text || ""} />
</div>
)
case "plan_mode_respond": {
let response: string | undefined
let options: string[] | undefined
@@ -40,9 +40,6 @@ const FEATURE_TIPS: FeatureTipItem[] = [
{
text: "Cline can browse websites — ask it to test your local dev server in the browser.",
},
{
text: "Use /reportbug to quickly file a GitHub issue with diagnostic context included.",
},
{
text: 'You can disable these tips in Settings → Features → "Feature Tips".',
},
@@ -1,84 +1,9 @@
import React from "react"
import MarkdownBlock from "../common/MarkdownBlock"
interface ReportBugPreviewProps {
data: string
/**
* Compatibility shim for downstream integration workflows that may temporarily
* mirror file updates without propagating deletions.
*
* The original preview component has been removed.
*/
export default function ReportBugPreview() {
return null
}
const ReportBugPreview: React.FC<ReportBugPreviewProps> = ({ data }) => {
// Parse the JSON data from the context string
const bugData = React.useMemo(() => {
try {
return JSON.parse(data || "{}")
} catch (e) {
console.error("Failed to parse bug report data", e)
return {}
}
}, [data])
return (
<div className="bg-badge-background/50 text-badge-foreground rounded-xs p-3">
<h2 className="font-bold mb-3">{bugData.title || "Bug Report"}</h2>
<div className="space-y-3 text-sm">
{bugData.what_happened && (
<div>
<div className="font-semibold">What Happened?</div>
<MarkdownBlock markdown={bugData.what_happened} />
</div>
)}
{bugData.steps_to_reproduce && (
<div>
<div className="font-semibold">Steps to Reproduce</div>
<MarkdownBlock markdown={bugData.steps_to_reproduce} />
</div>
)}
{bugData.api_request_output && (
<div>
<div className="font-semibold">Relevant API Request Output</div>
<MarkdownBlock markdown={bugData.api_request_output} />
</div>
)}
{bugData.provider_and_model && (
<div>
<div className="font-semibold">Provider/Model</div>
<MarkdownBlock markdown={bugData.provider_and_model} />
</div>
)}
{bugData.operating_system && (
<div>
<div className="font-semibold">Operating System</div>
<MarkdownBlock markdown={bugData.operating_system} />
</div>
)}
{bugData.system_info && (
<div>
<div className="font-semibold">System Info</div>
<MarkdownBlock markdown={bugData.system_info} />
</div>
)}
{bugData.cline_version && (
<div>
<div className="font-semibold">Cline Version</div>
<MarkdownBlock markdown={bugData.cline_version} />
</div>
)}
{bugData.additional_context && (
<div>
<div className="font-semibold">Additional Context</div>
<MarkdownBlock markdown={bugData.additional_context} />
</div>
)}
</div>
</div>
)
}
export default ReportBugPreview
@@ -0,0 +1,59 @@
import type { ClineMessage } from "@shared/ExtensionMessage"
import { describe, expect, it } from "vitest"
import { buildToolsWithReasoning, getToolGroupSummaryFromParsedTools } from "./ToolGroupRenderer"
const readToolMessage = (
ts: number,
type: "ask" | "say",
path: string,
range?: { start: number; end: number },
): ClineMessage => ({
ts,
type,
...(type === "ask" ? { ask: "tool" as const } : { say: "tool" as const }),
text: JSON.stringify({
tool: "readFile",
path,
...(range ? { readLineStart: range.start, readLineEnd: range.end } : {}),
}),
})
describe("buildToolsWithReasoning", () => {
it("replaces an immediately-following read approval ask with the completed read", () => {
const tools = buildToolsWithReasoning([
readToolMessage(1, "ask", "src/a.ts"),
readToolMessage(2, "say", "src/a.ts", { start: 1, end: 20 }),
])
expect(tools).toHaveLength(1)
expect(tools[0].tool.say).toBe("tool")
expect(tools[0].parsedTool.readLineStart).toBe(1)
expect(tools[0].parsedTool.readLineEnd).toBe(20)
})
it("keeps separate reads of the same file when they are distinct operations", () => {
const tools = buildToolsWithReasoning([
readToolMessage(1, "ask", "src/a.ts"),
readToolMessage(2, "say", "src/a.ts", { start: 1, end: 20 }),
readToolMessage(3, "ask", "src/a.ts"),
readToolMessage(4, "say", "src/a.ts", { start: 40, end: 60 }),
])
expect(tools).toHaveLength(2)
expect(tools.map((tool) => [tool.parsedTool.readLineStart, tool.parsedTool.readLineEnd])).toEqual([
[1, 20],
[40, 60],
])
})
})
describe("getToolGroupSummaryFromParsedTools", () => {
it("counts rendered read tools once after ask/say collapse", () => {
const tools = buildToolsWithReasoning([
readToolMessage(1, "ask", "src/a.ts"),
readToolMessage(2, "say", "src/a.ts", { start: 1, end: 20 }),
])
expect(getToolGroupSummaryFromParsedTools(tools.map((tool) => tool.parsedTool))).toBe("Cline read 1 file")
})
})
@@ -40,8 +40,14 @@ const getActivityText = (tool: ClineSayTool): string | null => {
}
switch (tool.tool) {
case "readFile":
return tool.path ? `Reading ${cleanedPath}...` : null
case "readFile": {
if (!tool.path) {
return null
}
const lineHint =
tool.readLineStart != null && tool.readLineEnd != null ? ` (lines ${tool.readLineStart}-${tool.readLineEnd})` : ""
return `Reading ${cleanedPath}${lineHint}...`
}
case "listFilesTopLevel":
case "listFilesRecursive":
return tool.path ? `Exploring ${cleanedPath}/...` : null
@@ -144,7 +150,7 @@ export const ToolGroupRenderer = memo(({ messages, allMessages, isLastGroup }: T
return [...dedupedCompleted, ...activeTools]
}, [completedTools, activeTools])
const summary = getToolGroupSummary(filteredMessages)
const summary = getToolGroupSummaryFromParsedTools(completedTools.map((item) => item.parsedTool))
const handleOpenFile = useCallback((filePath: string) => {
FileServiceClient.openFileRelativePath(StringRequest.create({ value: filePath })).catch((err) =>
@@ -234,7 +240,7 @@ export const ToolGroupRenderer = memo(({ messages, allMessages, isLastGroup }: T
* Build tool items WITHOUT reasoning.
* Reasoning should not be displayed in file lists - only file/folder content.
*/
function buildToolsWithReasoning(messages: ClineMessage[]): ToolWithReasoning[] {
export function buildToolsWithReasoning(messages: ClineMessage[]): ToolWithReasoning[] {
const result: ToolWithReasoning[] = []
for (const msg of messages) {
@@ -245,6 +251,23 @@ function buildToolsWithReasoning(messages: ClineMessage[]): ToolWithReasoning[]
if (isLowStakesTool(msg)) {
const parsedTool = parseToolSafe(msg.text)
const previous = result.at(-1)
const supersedesPreviousReadAsk =
parsedTool.tool === "readFile" &&
parsedTool.path &&
msg.say === "tool" &&
previous?.tool.ask === "tool" &&
previous.parsedTool.tool === "readFile" &&
previous.parsedTool.path === parsedTool.path
if (supersedesPreviousReadAsk) {
result[result.length - 1] = {
tool: msg,
parsedTool,
reasoning: undefined,
}
continue
}
result.push({
tool: msg,
parsedTool,
@@ -276,8 +299,16 @@ function getToolDisplayInfo(tool: ClineSayTool) {
const folderPath = filePath + "/"
switch (tool.tool) {
case "readFile":
return { icon, path: filePath, label: "read" }
case "readFile": {
const lineNote =
tool.readLineStart != null && tool.readLineEnd != null ? `lines ${tool.readLineStart}-${tool.readLineEnd}` : null
return {
icon,
path: filePath,
label: "read",
displayText: lineNote ? `${cleanPathPrefix(filePath)} · ${lineNote}` : undefined,
}
}
case "listFilesTopLevel":
return { icon, path: folderPath, label: "listed" }
case "listFilesRecursive":
@@ -319,15 +350,10 @@ function formatSearchDisplay(regex: string, path: string, filePattern?: string):
/**
* Get summary label for a tool group - shows what's been added to context.
*/
function getToolGroupSummary(messages: ClineMessage[]): string {
export function getToolGroupSummaryFromParsedTools(tools: ClineSayTool[]): string {
const counts = { read: 0, list: 0, search: 0, def: 0 }
for (const msg of messages) {
if (!isLowStakesTool(msg)) {
continue
}
const tool = parseToolSafe(msg.text)
for (const tool of tools) {
switch (tool.tool) {
case "readFile":
counts.read++
@@ -82,7 +82,6 @@ export function useMessageHandlers(messages: ClineMessage[], chatState: ChatStat
case "api_req_failed":
case "new_task":
case "condense":
case "report_bug":
await TaskServiceClient.askResponse(
AskResponseRequest.create({
responseType: "messageResponse",
@@ -280,11 +279,6 @@ export function useMessageHandlers(messages: ClineMessage[], chatState: ChatStat
console.error(err),
)
break
case "report_bug":
await SlashServiceClient.reportBug(StringRequest.create({ value: lastMessage?.text })).catch((err) =>
console.error(err),
)
break
}
break
}
@@ -106,7 +106,6 @@ describe("getButtonConfig", () => {
{ ask: "resume_completed_task", expectedConfig: "resume_completed_task" },
{ ask: "new_task", expectedConfig: "new_task" },
{ ask: "condense", expectedConfig: "condense" },
{ ask: "report_bug", expectedConfig: "report_bug" },
]
stateConfigs.forEach(({ ask, expectedConfig }) => {
@@ -10,7 +10,7 @@ export type ButtonActionType =
| "proceed" // Send messageResponse or yesButtonClicked
| "new_task" // Start a new task
| "cancel" // Cancel streaming
| "utility" // Execute utility function (condense, report_bug)
| "utility" // Execute utility function (condense)
| "retry" // Retry the last action
/**
@@ -169,14 +169,6 @@ export const BUTTON_CONFIGS: Record<string, ButtonConfig> = {
primaryAction: "utility",
secondaryAction: undefined,
},
report_bug: {
sendingDisabled: false,
enableButtons: true,
primaryText: "Report GitHub issue",
secondaryText: undefined,
primaryAction: "utility",
secondaryAction: undefined,
},
// Streaming/partial states - disable interaction during streaming
partial: {
@@ -287,8 +279,6 @@ export function getButtonConfig(message: ClineMessage | undefined, _mode: Mode =
// Utility
case "condense":
return BUTTON_CONFIGS.condense
case "report_bug":
return BUTTON_CONFIGS.report_bug
default:
return BUTTON_CONFIGS.tool_approve