Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
203ff8f
docs: enrich Quick Start guide with more context for new users (#9338)
Feb 16, 2026
1cfd560
feat(cline): add z-ai/glm-5 to free model recommendations (#9341)
arafatkatze Feb 16, 2026
1a911f4
fix(telemetry): refresh OTEL org attributes on identify (#9318)
alex-lum Feb 16, 2026
bb05b2f
changeset version bump (#9316)
github-actions[bot] Feb 16, 2026
7680c6a
Merge upstream/main with conflict resolution
github-actions[bot] Feb 17, 2026
50f1d43
Sync upstream (exclude workflows)
github-actions[bot] Feb 17, 2026
8cb0c6d
Fix e2e tests. (#9350)
dominiccooney Feb 17, 2026
955ae2f
feat: add Claude Sonnet 4.6 support and surface it as free (#9356)
saoudrizwan Feb 17, 2026
80dfce0
docs: remove stale Claude 5 mention from Auto Compact docs (#9360)
saoudrizwan Feb 17, 2026
36c68a6
fix: remove expired MiniMax free promo surfaces (#9361)
saoudrizwan Feb 17, 2026
c60f18d
Adding 1m (#9346)
github-actions[bot] Feb 17, 2026
eb9f53e
fix: smarter retry for write_to_file missing content parameter (#9276)
ClineXDiego Feb 17, 2026
34a21b8
docs: add security policy (#9365)
saoudrizwan Feb 18, 2026
a840913
fix: disable click-to-set auto-condense threshold and hardcode defaul…
robinnewhouse Feb 18, 2026
0c691f7
feat(cli): add /skills slash command (#9089)
robinnewhouse Feb 18, 2026
f302dde
Merge upstream/main with conflict resolution
github-actions[bot] Feb 18, 2026
2d81c31
Alex/inf 413 bug no telemetry for versions greater than 20 (#9372)
alex-lum Feb 18, 2026
5871fd0
feat(cerebras): remove deprecated llama-3.3-70b and qwen-3-32b models…
sebastiand-cerebras Feb 18, 2026
1d8497c
Prevent error messages when displaying featured models in the CLI (#9…
BarreiroT Feb 18, 2026
ca154eb
Add MiniMax M2.5 to the MiniMax provider (#9381)
BarreiroT Feb 18, 2026
af93e31
feat(models): make sonnet 4.6 default and remove free promo positioni…
saoudrizwan Feb 18, 2026
ae6468b
fix(models): reinstate minimax m2.5 free promo surfaces (#9387)
saoudrizwan Feb 18, 2026
28d60a8
fix(models): keep Sonnet 4.5 as default for now (#9389)
saoudrizwan Feb 18, 2026
3a14a88
fix: include root workspace for changesets release (#9393)
arafatkatze Feb 18, 2026
7c782ab
Changeset version bump (#9364)
github-actions[bot] Feb 18, 2026
9fd2b99
chore: remove autoCondenseThreshold setting and related code (#9396)
abeatrix Feb 18, 2026
7c95b53
Add support for DB backed Welcome Banner (#9315)
cryptoque Feb 18, 2026
4023c18
remove default timeout (#9401)
maxpaulus43 Feb 19, 2026
8ec033a
Merge upstream/main with conflict resolution
github-actions[bot] Feb 19, 2026
113039a
CLI 2.0: allow custom inference profile arn for bedrock provider (#9271)
maxpaulus43 Feb 19, 2026
5a2a5d1
refactor: replace non-null assertions with checks in PatchParser (#9402)
abeatrix Feb 19, 2026
28e6297
fix: flaky Cancel behavior by preventing duplicate cancel actions (CL…
abeatrix Feb 19, 2026
1dd8e76
fix(chat): make Cmd/Ctrl+A select-all deterministic (#9408)
abeatrix Feb 19, 2026
6ed3944
Export global, workspace and secrets from VSCode to share with CLI (#…
dominiccooney Feb 19, 2026
8787ab3
Update package-lock.json. (#9414)
dominiccooney Feb 19, 2026
8680218
Update sap-ai-sdk version (#9417)
jjtang1985 Feb 19, 2026
7fa0a49
Changeset version bump (#9413)
github-actions[bot] Feb 19, 2026
0eab54a
fix(release-eng): Fix nightly extension publish failure caused by wor…
candieduniverse Feb 19, 2026
3e58478
feat: add dynamic flag to adjust banner cache duration (#9421)
cryptoque Feb 19, 2026
6d3f8e1
fix(release-eng): Pin VSCode nightly build to node version 22 (#9423)
candieduniverse Feb 19, 2026
a2794c6
fix(evals): restore missing smoke eval npm scripts (#9429)
robinnewhouse Feb 19, 2026
277ec47
Merge upstream/main with conflict resolution
github-actions[bot] Feb 20, 2026
94692b5
docs: add MCP support documentation for Cline CLI (#9390)
Feb 20, 2026
02c2601
fix(gemini): add 3.1 pro while keeping 3.0 compatibility (#9438)
saoudrizwan Feb 20, 2026
70db6bd
fix: inline focus-chain slider within its feature row (#9444)
abeatrix Feb 20, 2026
75fbeb4
fix cline auth with acp flag (#9405)
maxpaulus43 Feb 20, 2026
a0d52d4
cli yolo mode should not persist yolo setting to disk ever (#9370)
maxpaulus43 Feb 20, 2026
03ab296
feat: responses api for openai native provider (#9411)
abeatrix Feb 21, 2026
44c3efc
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Feb 21, 2026
4455db5
Pull Cline's recommended from internal endpoint (#9376)
arafatkatze Feb 23, 2026
0e833ad
Add /q command to quit CLI (#9400)
shey-cline Feb 23, 2026
fcf3792
fix auth check for acp mode (#9491)
maxpaulus43 Feb 23, 2026
2b1b1d1
fix: restrict OpenAI tool ID transformation to native provider (#9459)
abeatrix Feb 23, 2026
9e7a30b
feat: preconnect websocket to reduce response latency (#9458)
abeatrix Feb 23, 2026
dce0902
Oca Messages API implementation for new Claude Models (#9447)
ChaiEranki Feb 23, 2026
1b0ab3d
sambanova provider: update models list (#9479)
hanw-dev Feb 23, 2026
7f1632f
fix: prevent reasoning delta crash on usage-only stream chunks (#9432)
robinnewhouse Feb 23, 2026
01547ba
feat: add AgentConfigLoader for file-based agent configs (ENG-1547) (…
abeatrix Feb 23, 2026
a7a35c0
ci: add automatic retries for smoke test jobs (#9503)
robinnewhouse Feb 23, 2026
38ea422
Sso video (#9496)
jl-codes Feb 23, 2026
810b5b7
added mcp enterprise configuration details (#9501)
jl-codes Feb 23, 2026
93eb607
Remove all traces of changeset-converter.yml GitHub Action and npm ru…
candieduniverse Feb 23, 2026
88da4dd
feat: fetch featured models from backend with local fallback (#9495)
arafatkatze Feb 24, 2026
df4f551
feat: add support for skills and optional modelId in subagent config …
abeatrix Feb 24, 2026
091cf94
Move PR skill to .agents/skills (#9505)
robinnewhouse Feb 24, 2026
b97d148
Release V3.67.0 (#9509)
arafatkatze Feb 24, 2026
0270945
Merge upstream/main with conflict resolution
github-actions[bot] Feb 24, 2026
ea65383
chore: replace baseUrl with explicit relative paths in tsconfig files…
abeatrix Feb 24, 2026
c1a4348
sdk lib (#9259)
maxpaulus43 Feb 24, 2026
0d4e47e
fix: use isLocatedInPath() instead of string.includes() for path cont…
CodeForContribute Feb 24, 2026
32893ee
Fix OpenAI Codex by setting Store to false (#9523)
BarreiroT Feb 24, 2026
f001e73
Add isLocatedInPath tests (#9526)
BarreiroT Feb 24, 2026
5b99168
fix: remove placeholder tools from final native tool list (#9499)
abeatrix Feb 24, 2026
31e8c85
Remove voice mode UI and disable dictation (#9511)
arafatkatze Feb 24, 2026
8a73f63
feat: update recommended model from GPT-5.2 Codex to GPT-5.3 Codex (#…
arafatkatze Feb 24, 2026
9989225
Parse CLINE_OTEL_EXPORTER_OTLP_HEADERS headers and force the build co…
BarreiroT Feb 24, 2026
7fadcfa
feat: add thinking to MiniMax M2.5 and add the M2.5-highspeed model t…
Feb 24, 2026
452733c
Release changeset PR (#9528)
candieduniverse Feb 24, 2026
42e6a24
Add Focus Indicator on Action Buttons in Extension (#9487)
shey-cline Feb 24, 2026
f10b6f3
Add Additional Markdown Formatting in CLI (#9392)
shey-cline Feb 24, 2026
cab0d4f
Merge upstream/main with conflict resolution
github-actions[bot] Feb 25, 2026
94b02bf
fix: use model.info.maxTokens for OpenRouter instead of hardcoded 819…
robinnewhouse Feb 26, 2026
c36e375
fix: update stale maxTokens values for Claude 3.7+ models across Anth…
robinnewhouse Feb 26, 2026
fa53f30
fix: generate commit message from staged changes only when staging ex…
CodeForContribute Feb 26, 2026
c61f9a9
fix: fetch model info from API in CLI headless auth for Cline and Ver…
robinnewhouse Feb 26, 2026
6c519ff
Increase timeout of flaky test; this is not the long term solution bu…
candieduniverse Feb 26, 2026
8e5be3f
fix: use JSON_SCHEMA for yaml.load to prevent unsafe deserialization …
robinnewhouse Feb 26, 2026
913cf4b
feat: add dynamic Cline provider model fetching from Cline endpoint (…
arafatkatze Feb 26, 2026
4b2619d
fix: resolve "Could not find the file context" error in Explain Chang…
ClineXDiego Feb 26, 2026
0a8f1ef
fix: clear all OCA secrets on auth refresh failure to prevent re-auth…
ClineXDiego Feb 26, 2026
6048527
Version bump and changelog for release (#9577)
candieduniverse Feb 26, 2026
e76989f
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Feb 27, 2026
cd320ea
Add User-Agent to requests to the Cline back-end (#9583)
BarreiroT Feb 27, 2026
d48d5ee
fix: restore gpt-oss native file editing on OpenAI-compatible models …
robinnewhouse Feb 27, 2026
a502bd8
WIP: Make hooks work on Windows PowerShell (#9552)
candieduniverse Feb 27, 2026
fd8cecd
update cline sdk docs (#9532)
maxpaulus43 Feb 27, 2026
e4755ff
Merge upstream/main with conflict resolution
github-actions[bot] Feb 28, 2026
819f9ce
show sdk docs in cline page (#9597)
reneehuang1 Mar 2, 2026
76bd092
fix: trigger auto-compaction on OpenRouter context overflow errors (#…
saoudrizwan Mar 2, 2026
e6cbae0
fix: prevent Chinese filename escaping in diff view (#9612)
Br1an67 Mar 2, 2026
d96c5d4
workflow: add default auto-tag flow for Publish Release (#9584)
arafatkatze Mar 2, 2026
520ddb8
fix(checkpoints): retry nested git restore and prevent silent .git_di…
saoudrizwan Mar 2, 2026
fc3d986
Release: version bump and changelog updates (#9640)
candieduniverse Mar 2, 2026
6def83a
[doc] api doc changes (#9581)
reneehuang1 Mar 3, 2026
6890029
Merge upstream/main with conflict resolution
github-actions[bot] Mar 3, 2026
fb04a9b
Log RPC size histogram. (#9626)
dominiccooney Mar 3, 2026
b5c0cc1
fix(subagent): fix subagents erroring out by handling context-window …
saoudrizwan Mar 3, 2026
2822723
fix: stop infinite getLatestMcpServers RPC loop when opening MCP serv…
dominiccooney Mar 3, 2026
e484534
fix(task): process usage chunks independently from non-usage stream f…
saoudrizwan Mar 3, 2026
0ec6c55
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Mar 4, 2026
718e5b5
Add model identifier to the JSON payload that hooks receive (#9646)
candieduniverse Mar 4, 2026
e92c7de
Restrict /test-jetbrains workflow trigger to authorized users (#9657)
arafatkatze Mar 4, 2026
28d806a
fix(openrouter): stop sending max_tokens in stream requests (#9634)
saoudrizwan Mar 4, 2026
12f5dc2
update changelog and bump version numbers (#9664)
maxpaulus43 Mar 4, 2026
152ba67
feat: add OTel tracking for AI output line/file metrics (lines added/…
alex-lum Mar 4, 2026
2baf966
fix: handle streamableHttp reconnects and preserve OAuth redirect URI…
dominiccooney Mar 5, 2026
df53394
Merge upstream/main with conflict resolution
github-actions[bot] Mar 5, 2026
aef32f5
fix: bypass git hooks on checkpoint initial commit (#9688)
ClineXDiego Mar 5, 2026
27343cc
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Mar 6, 2026
8fb2e8a
Adding gpt 5.4 models to chatgpt subscripiton (#9692)
arafatkatze Mar 6, 2026
469752a
feat(cli): add --hooks-dir flag for runtime hook injection (#9658)
saoudrizwan Mar 6, 2026
bf52657
feat(hooks): add Notification hook for attention boundaries (#9699)
saoudrizwan Mar 6, 2026
a562868
feat(cli): add --auto-approve-all flag for interactive mode (#9698)
saoudrizwan Mar 6, 2026
1753d9d
release changelog and version bump (#9706)
maxpaulus43 Mar 6, 2026
eb25634
fix(bedrock): handle thinking and redacted_thinking blocks in message…
ClineXDiego Mar 6, 2026
c8f8137
Fix flaky hooks tests on Windows (#9690)
candieduniverse Mar 6, 2026
a2fa4d3
[ENG-1571] Enable CLI Error autocapture (#9686)
BarreiroT Mar 6, 2026
6ccd662
Hooks: Add feature toggle (toggled off by default) (#9671)
candieduniverse Mar 6, 2026
c65fda0
Merge upstream/main with conflict resolution
github-actions[bot] Mar 7, 2026
c489f79
fix(cli): apply task flags before welcome TUI mount (#9721)
saoudrizwan Mar 7, 2026
b3c29bf
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Mar 8, 2026
bf96223
docs: add .github/copilot-instructions.md for AI coding agents (#9606)
mitsu888 Mar 8, 2026
fa7265f
feat: add Anthropic Opus 4.6 fast mode variants (#9725)
saoudrizwan Mar 8, 2026
18561ed
prompt: add test verification rules and make CLI_RULES language-agnos…
robinnewhouse Mar 8, 2026
55569ef
fix(tools): prevent crash when list_files/list_code_definition_names …
robinnewhouse Mar 8, 2026
911fcfd
gemini-hc: add parameter descriptions to Gemini tool schemas (#9681)
robinnewhouse Mar 8, 2026
f6d2b4d
Add --auto-condense CLI flag to enable AI-powered context compaction …
robinnewhouse Mar 8, 2026
3973739
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Mar 9, 2026
bce71b4
feat(cli): add --continue for current directory (#9726)
saoudrizwan Mar 9, 2026
a335b5c
fix(cli): prevent startup prompt replay on resize remount (#9735)
saoudrizwan Mar 9, 2026
36618fb
fix(cli): remount TUI only on width resize (#9736)
saoudrizwan Mar 9, 2026
cae9bff
test: rebaseline vertex_gemini3.tools.snap (#9731)
dominiccooney Mar 9, 2026
d39a53f
Add Padding to Retry Message (#9635)
shey-cline Mar 9, 2026
2eed79d
use setSessionOverride instead of setGlobalState (#9707)
maxpaulus43 Mar 9, 2026
c4c8b16
chore: remove changesets bot artifacts (#9739)
arafatkatze Mar 9, 2026
92ec126
Fix Windows unit test path normalization (#9742)
candieduniverse Mar 9, 2026
ffa4785
fix(telemetry): restore cache token and cost metrics in captureTokenU…
alex-lum Mar 9, 2026
cf1f8ff
Merge upstream/main with conflict resolution
github-actions[bot] Mar 10, 2026
6129caa
Get user consent before loading images in Markdown (#9745)
BarreiroT Mar 10, 2026
156f18f
call telemetry service after initializeCli (#9752)
maxpaulus43 Mar 10, 2026
7355f7e
fix(gemini): cap flash output tokens to 8192 across providers (#9749)
arafatkatze Mar 10, 2026
b0b6a98
Merge remote-tracking branch 'upstream/main' into upstream-main
github-actions[bot] Mar 11, 2026
8200573
feat(cli): add kanban alias command (#9763)
saoudrizwan Mar 11, 2026
6d29bc6
fix(prompt): resolve native tool placeholder interpolation (#9764)
arafatkatze Mar 11, 2026
4ecccf5
feat(cli): add mcp add shortcuts for stdio and http servers (#9773)
saoudrizwan Mar 11, 2026
44cbfe9
Update Jupyter Notebook gifs (#9772)
ajjuaire Mar 11, 2026
0e7e009
Changelog and version bump for release (#9775)
candieduniverse Mar 12, 2026
50b57f4
feat(telemetry): add provider to task.tokens event (#9762)
alex-lum Mar 12, 2026
c1432ed
Merge upstream/main with conflict resolution
github-actions[bot] Mar 12, 2026
bbeecef
docs: fix broken Oracle Code Assist website link (#9782)
gatof81 Mar 12, 2026
a27bedf
max/cli tui e2e tests (#9753)
maxpaulus43 Mar 12, 2026
59bc7fe
Merge upstream/main with conflict resolution
github-actions[bot] Mar 13, 2026
a33ad91
Sync upstream (exclude workflows)
github-actions[bot] Mar 13, 2026
aacc69a
fix: catch file-not-found in ReadFileToolHandler instead of crashing …
dominiccooney Mar 13, 2026
8d07b7d
fix: catch errors in path-based tool handlers instead of crashing (#9…
dominiccooney Mar 13, 2026
ce37a72
adding workflow
ashokrajacs Mar 13, 2026
1d1071d
fix: consolidate Parallel tool-calling fixes (#9738)
arafatkatze Mar 13, 2026
7b25a21
fix(cli): add -y flag to npx kanban to auto-confirm install
saoudrizwan Mar 13, 2026
91b947d
feat: Add W&B Inference by Coreweave as provider (#9800)
MBakirWB Mar 13, 2026
2abfccb
Merge upstream/main with conflict resolution
github-actions[bot] Mar 14, 2026
3d5439c
Sync upstream (exclude workflows)
github-actions[bot] Mar 14, 2026
67eeb6e
update package json and add workflow
ashokrajacs Mar 16, 2026
a04f9d3
changeset update and deleted locale folder
ashokrajacs Mar 16, 2026
7858a06
Merge branch 'main' into upstream-main
ashokrajacs Mar 16, 2026
50f335c
new version fixes
ashokrajacs Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: create-pull-request
description: Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, and PR creation using the gh CLI tool.
description: Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, PR template usage, and PR creation using the gh CLI tool.
---

# Create Pull Request
Expand Down
5 changes: 5 additions & 0 deletions .changeset/social-toes-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hai-build-code-generator": patch
---

merge from cline version 3.72.0
26 changes: 0 additions & 26 deletions .changie.yaml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copilot Instructions for Cline

This is a VS Code extension. Read `.clinerules/general.md` for tribal knowledge and nuanced patterns.

## Architecture
- **Core** (`src/`): `extension.ts` → `WebviewProvider` → `Controller` (single source of truth) → `Task` (agent loop).
- **Webview** (`webview-ui/`): React/Vite app. State via `ExtensionStateContext.tsx`, synced through message passing.
- **CLI** (`cli/`): React Ink terminal UI sharing core logic. Update CLI when changing webview features.
- **Communication**: Protobuf-defined gRPC-like protocol over VS Code message passing. Schemas in `proto/`.
- **MCP**: `src/services/mcp/McpHub.ts`.

## Build & Test (Critical — non-obvious commands)
- **Build**: `npm run compile` — NOT `npm run build`.
- **Watch**: `npm run watch` (extension + webview).
- **Protos**: `npm run protos` — run **immediately** after any `.proto` change. Generates into `src/shared/proto/`, `src/generated/`.
- **Tests**: `npm run test:unit`. After prompt/tool changes: `UPDATE_SNAPSHOTS=true npm run test:unit`.

## Protobuf RPC Workflow (4 steps)
1. **Define** in `proto/cline/*.proto`. Naming: `PascalCaseService`, `camelCase` RPCs, `PascalCase` Messages. Use `common.proto` shared types for simple data.
2. **Generate**: `npm run protos`.
3. **Backend handler**: `src/core/controller/<domain>/`.
4. **Frontend call**: `UiServiceClient.myMethod(Request.create({...}))`.
- Adding enums (e.g. `ClineSay`) → also update `src/shared/proto-conversions/cline-message.ts`.

## Adding API Providers (silent failure risk)
Three proto conversion updates are **required** or the provider silently resets to Anthropic:
1. `proto/cline/models.proto` — add to `ApiProvider` enum.
2. `convertApiProviderToProto()` in `src/shared/proto-conversions/models/api-configuration-conversion.ts`.
3. `convertProtoToApiProvider()` in the same file.

Also update: `src/shared/api.ts`, `src/shared/providers/providers.json`, `src/core/api/index.ts`, `webview-ui/.../providerUtils.ts`, `webview-ui/.../validate.ts`, `webview-ui/.../ApiOptions.tsx`, and `cli/src/components/ModelPicker.tsx`.

For Responses API providers: add to `isNextGenModelProvider()` in `src/utils/model-utils.ts` and set `apiFormat: ApiFormat.OPENAI_RESPONSES` on models.

## Adding Tools to System Prompt (5+ file chain)
1. Add enum to `ClineDefaultTool` in `src/shared/tools.ts`.
2. Create definition in `src/core/prompts/system-prompt/tools/` (export `[GENERIC]` minimum).
3. Register in `src/core/prompts/system-prompt/tools/init.ts`.
4. Whitelist in `src/core/prompts/system-prompt/variants/*/config.ts` for each model family.
5. Handler in `src/core/task/tools/handlers/`, wire in `ToolExecutor.ts`.
6. If tool has UI: add `ClineSay` enum in proto → `ExtensionMessage.ts` → `cline-message.ts` → `ChatRow.tsx`.
7. Regenerate snapshots: `UPDATE_SNAPSHOTS=true npm run test:unit`.

## Modifying System Prompt
Modular: `components/` (shared) + `variants/` (model-specific) + `templates/` (`{{PLACEHOLDER}}`). Variants override components via `componentOverrides` in `config.ts` or custom `template.ts`. XS variant is heavily condensed inline. Always regenerate snapshots after changes.

## Global State Keys (silent failure risk)
Adding a key requires: type in `src/shared/storage/state-keys.ts`, read via `context.globalState.get()` in `src/core/storage/utils/state-helpers.ts` `readGlobalStateFromDisk()`, and add to return object. Missing the `.get()` call compiles fine but value is always `undefined`.

## Slash Commands (3 places)
- `src/core/slash-commands/index.ts` — definitions.
- `src/core/prompts/commands.ts` — system prompt integration.
- `webview-ui/src/utils/slash-commands.ts` — webview autocomplete.

## Conventions
- **Paths**: Always use `src/utils/path` helpers (`toPosixString`) for cross-platform compatibility.
- **Logging**: `src/shared/services/Logger.ts`.
- **Feature flags**: See PR #7566 as reference pattern.
57 changes: 52 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
<!--
Thank you for contributing to Cline!

⚠️ Important: Before submitting this PR, please ensure you have:
- For feature requests: Created a discussion in our Feature Requests discussions board https://github.com/cline/cline/discussions/categories/feature-requests and received approval from core maintainers before implementation
- For all changes: Link the associated issue/discussion in the "Related Issue" section below

Limited exceptions:
Small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality may be submitted directly without prior discussion.

Why this requirement?
We deeply appreciate all community contributions - they are essential to Cline's success! To ensure the best use of everyone's time and maintain project direction, we use our Feature Requests discussions board to gauge community interest and validate feature ideas before implementation begins. This helps us focus development efforts on features that will benefit the most users.
-->

### Related Issue

<!-- Replace XXXX with the issue number that this PR addresses -->
**Issue:** #XXXX

### Description

<!-- Describe your changes in detail. What problem does this PR solve? -->
<!--
Help reviewers understand your changes by making this PR readable and well-organized:

- What problem does this PR solve?
- Why were these changes introduced and what purpose do they serve?
- For larger changes, provide context about your approach and reasoning

Small PRs may need minimal description, but larger changes benefit from explaining where you're coming from. Much of this context can be in the linked issue above, so feel free to reference it rather than repeating everything here.
-->

### Test Procedure

<!--
Please walk us through your testing approach and thought process. This helps reviewers understand that you've thoroughly considered the impact of your changes:

- How did you test this change?
- What could potentially break and how did you verify it doesn't?
- What existing functionality might be affected and how did you check it still works?
- Why are you confident this is ready for merge?

We're not looking for exhaustive documentation - just evidence that you've thought through the implications of your changes and tested accordingly.
-->

### Type of Change

Expand All @@ -20,13 +60,20 @@

- [ ] Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
- [ ] Tests are passing (`npm test`) and code is formatted and linted (`npm run format && npm run lint`)
- [ ] I have created a changeset using `npm run changeset` (required for user-facing changes)
- [ ] I have reviewed [contributor guidelines](https://github.com/presidio-oss/cline-based-code-generator/blob/main/CONTRIBUTING.md)
- [ ] I have reviewed [contributor guidelines](https://github.com/cline/cline/blob/main/CONTRIBUTING.md)

### Screenshots

<!-- For UI changes, add screenshots here -->
<!--
Help reviewers quickly understand your changes:

- **UI Changes**: Please include screenshots showing before/after states
- **Complex Workflows**: Consider uploading a screen recording (video) if your changes involve multiple steps or state transitions
- **Backend Changes**: Not required, but feel free to include terminal output or other evidence that demonstrates functionality

This helps reviewers see what you've built without having to pull down and test your branch first.
-->

### Additional Notes

<!-- Add any additional notes for reviewers -->
<!-- Add any additional notes for reviewers -->
79 changes: 0 additions & 79 deletions .github/scripts/overwrite_changeset_changelog.py

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ test-results

# Smoke test results (generated)
evals/smoke-tests/results/

.tui-test
secrets.json
tui-traces
tests/**/cache
6 changes: 3 additions & 3 deletions .hairules/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ This file is the secret sauce for working effectively in this codebase. It captu

## Miscellaneous
- This is a VS Code extension—check `package.json` for available scripts before trying to verify builds (e.g., `npm run compile`, not `npm run build`).
- When creating PRs, if the change is user-facing and significant enough to warrant a changelog entry, run `npm run changeset` and create a patch changeset. Never create minor or major version bumps. Skip changesets for trivial fixes, internal refactors, or minor UI tweaks that users wouldn't notice.
- When adding new feature flags, see this PR as a reference https://github.com/presidio-oss/hai-build-codegen/pull/28
- Additional instructions about making requests: @.hairules/network.md
- When creating PRs, contributors should not create changelog-entry files. Maintainers handle release versioning and changelog curation during the release process.
- When adding new feature flags, see this PR as a reference https://github.com/cline/cline/pull/7566
- Additional instructions about making requests: @.clinerules/network.md

## gRPC/Protobuf Communication
The extension and webview communicate via gRPC-like protocol over VS Code message passing.
Expand Down
64 changes: 64 additions & 0 deletions .hairules/storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Storage Architecture

Global settings, secrets and workspace state are stored in **file-backed JSON stores** under `~/.cline/data/`. This is the shared storage layer used by VSCode, CLI, and JetBrains.

## Key Abstractions

### `StorageContext` (src/shared/storage/storage-context.ts)
The entry point. Created via `createStorageContext()` and passed to `StateManager.initialize()`. Contains three `ClineFileStorage` instances:
- `globalState` → `~/.cline/data/globalState.json`
- `secrets` → `~/.cline/data/secrets.json` (mode 0o600)
- `workspaceState` → `~/.cline/data/workspaces/<hash>/workspaceState.json`

### `ClineFileStorage` (src/shared/storage/ClineFileStorage.ts)
Synchronous JSON key-value store backed by a single file. Supports `get()`, `set()`, `setBatch()`, `delete()`. Writes are atomic (write-then-rename).

### `StateManager` (src/core/storage/StateManager.ts)
In-memory cache on top of `StorageContext`. All runtime reads hit the cache; writes update cache immediately and debounce-flush to disk.

## ⚠️ Do NOT Use VSCode's ExtensionContext for Storage

**Do not** read from or write to `context.globalState`, `context.workspaceState`, or `context.secrets` for persistent data. These are VSCode-specific and not available on CLI or JetBrains.

Instead, use:
```typescript
// Reading state
StateManager.get().getGlobalStateKey("myKey")
StateManager.get().getSecretKey("mySecretKey")
StateManager.get().getWorkspaceStateKey("myWsKey")

// Writing state
StateManager.get().setGlobalState("myKey", value)
StateManager.get().setSecret("mySecretKey", value)
StateManager.get().setWorkspaceState("myWsKey", value)
```

Remember that your data may be read by a different client than the one that wrote it. For example, a value written by Cline in JetBrains may be read by Cline CLI.

## VSCode Migration (src/hosts/vscode/vscode-to-file-migration.ts)

On VSCode startup, a migration copies data from VSCode's `ExtensionContext` storage into the file-backed stores. This runs in `src/common.ts` before `StateManager.initialize()`.

- **Sentinel**: `__vscodeMigrationVersion` key in global state and workspace state — prevents re-migration.
- **Merge strategy**: File store wins. Existing values are never overwritten.
- **Safe downgrade**: VSCode storage is NOT cleared, so older extension versions still work.

## Adding New Storage Keys

1. Add to `src/shared/storage/state-keys.ts` (see existing patterns)
2. Read/write via `StateManager` (NOT via `context.globalState`)
3. If adding a secret, add to `SecretKeys` array in `state-keys.ts`

## File Layout

```
~/.cline/
data/
globalState.json # Global settings & state
secrets.json # API keys (mode 0o600)
tasks/
taskHistory.json # Task history (separate file)
workspaces/
<hash>/
workspaceState.json # Per-workspace toggles
```
2 changes: 1 addition & 1 deletion .hairules/workflows/address-pr-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Review and address all comments on the current branch's PR.
- Inline comments: `gh api repos/{owner}/{repo}/pulls/{pr_number}/comments`
- General comments: `gh pr view {pr_number} --json comments,reviews`

4. Present a summary of all comments with your recommendation for each (apply, skip, or respond). Ignore bot noise (changeset-bot, CI status, etc.).
4. Present a summary of all comments with your recommendation for each (apply, skip, or respond). Ignore bot noise (release automation, CI status, etc.).

5. **Wait for my approval** before proceeding.

Expand Down
13 changes: 3 additions & 10 deletions .hairules/workflows/hotfix-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,9 @@ On the main branch, create a commit that updates:

2. **package.json** - Update the version field to the new version

3. **Delete changesets** for the commits being included in the hotfix. This prevents the changeset bot from including duplicate entries in the next regular release.
3. No changelog-entry file cleanup is needed. Contributors do not create changelog-entry files in this repo.

Find and delete the changeset files associated with the selected commits:
```bash
ls .changeset/
```

Each changeset file in `.changeset/` corresponds to a PR. Read them to identify which ones belong to the commits you're hotfixing, then delete those files.

**Skip running `npm run install:all`** - the automation handles outdated lockfiles.
**Skip running `npm run install:all`** - release automation handles lockfile consistency as needed.

Commit with message format: `v{VERSION} Release Notes (hotfix)`

Expand All @@ -107,7 +100,7 @@ In the commit body, mention:
- List the cherry-picked commits that will be included

```bash
git add CHANGELOG.md package.json .changeset/
git add CHANGELOG.md package.json
git commit -m "v3.40.1 Release Notes (hotfix)

Hotfix release including:
Expand Down
2 changes: 0 additions & 2 deletions .hairules/workflows/pr-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ A few notes:
So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us.
</request_changes_comment>
<request_changes_comment>
Also, don't forget to add a changeset since this fixes a user-facing bug.

The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts.
</request_changes_comment>
</example_comments_that_i_have_written_before>
Loading
Loading