Skip to content

Commit 3832002

Browse files
sync: cline merge v3.20.3 (#198)
1 parent 32bfb1f commit 3832002

File tree

803 files changed

+85961
-94168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

803 files changed

+85961
-94168
lines changed

.changeset/serious-turtles-live.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hai-build-code-generator": minor
3+
---
4+
5+
Merged changes from Cline 3.20.3 (see [changelog](https://github.com/cline/cline/blob/main/CHANGELOG.md#3203)).

.eslintrc.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"ecmaVersion": 6,
66
"sourceType": "module"
77
},
8-
"plugins": ["@typescript-eslint"],
8+
"plugins": ["@typescript-eslint", "eslint-rules"],
99
"rules": {
1010
"@typescript-eslint/naming-convention": [
1111
"warn",
@@ -19,7 +19,15 @@
1919
"eqeqeq": "warn",
2020
"no-throw-literal": "warn",
2121
"semi": "off",
22-
"react-hooks/exhaustive-deps": "off"
22+
"react-hooks/exhaustive-deps": "off",
23+
"eslint-rules/no-direct-vscode-api": "warn",
24+
"no-restricted-syntax": [
25+
"error",
26+
{
27+
"selector": "VariableDeclarator[id.type=\"ObjectPattern\"][init.object.name=\"process\"][init.property.name=\"env\"]",
28+
"message": "Use process.env.VARIABLE_NAME directly instead of destructuring"
29+
}
30+
]
2331
},
2432
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
2533
}

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
demo.gif filter=lfs diff=lfs merge=lfs -text
2+
assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
3+
14
* text=auto eol=lf

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
**Important:** All bug reports must be reproducible using Claude 3.5 Sonnet. Cline uses complex prompts so less capable models may not work as expected.
8+
**Important:** All bug reports must be reproducible using Claude 4 Sonnet. HAI uses complex prompts so less capable models may not work as expected.
99
- type: textarea
1010
id: what-happened
1111
attributes:
@@ -24,7 +24,7 @@ body:
2424
2.
2525
3.
2626
validations:
27-
required: true
27+
required: false
2828
- type: textarea
2929
id: logs
3030
attributes:
@@ -36,23 +36,22 @@ body:
3636
attributes:
3737
label: Provider/Model
3838
description: What provider and model were you using when the issue occurred?
39-
placeholder: "e.g., cline:anthropic/claude-3.7-sonnet, gemini:gemini-2.5-pro-exp-03-25"
40-
validations:
41-
required: true
42-
- type: input
43-
id: operating-system
44-
attributes:
45-
label: Operating System
46-
description: What operating system are you using?
47-
placeholder: "e.g., Windows 11, macOS Sonoma, Ubuntu 22.04"
39+
placeholder: "e.g., anthropic/claude-3.7-sonnet, gemini:gemini-2.5-pro-exp-03-25"
4840
validations:
4941
required: true
5042
- type: textarea
5143
id: system-info
5244
attributes:
53-
label: System Info
54-
description: What system information is relevant to the issue?
55-
placeholder: "e.g., CPU: Intel Core i7-11700K, GPU: NVIDIA GeForce RTX 3070, RAM: 32GB DDR4"
45+
label: System Information
46+
description: What operating system and hardware are you using?
47+
placeholder: |
48+
Operating System: Windows 11, macOS Sonoma, Ubuntu 22.04, etc.
49+
Hardware: CPU, GPU, RAM specifications if relevant
50+
e.g.,
51+
OS: Windows 11
52+
CPU: Intel Core i7-11700K
53+
GPU: NVIDIA GeForce RTX 3070
54+
RAM: 32GB DDR4
5655
validations:
5756
required: true
5857
- type: input
@@ -63,8 +62,3 @@ body:
6362
placeholder: "e.g., 1.2.3"
6463
validations:
6564
required: true
66-
- type: textarea
67-
id: additional-context
68-
attributes:
69-
label: Additional context
70-
description: Add any other context about the problem here, such as screenshots or related issues.

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929

3030
### Additional Notes
3131

32-
<!-- Add any additional notes for reviewers -->
32+
<!-- Add any additional notes for reviewers -->

.github/workflows/stale.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow will only label and/or close 30 issues at a time in order to avoid exceeding a rate limit.
2+
# More info: https://docs.github.com/en/actions/use-cases-and-examples/project-management/closing-inactive-issues
3+
name: Close inactive issues
4+
on:
5+
schedule:
6+
- cron: "30 1 * * *"
7+
8+
jobs:
9+
close-issues:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
steps:
15+
- uses: actions/stale@v9
16+
with:
17+
days-before-issue-stale: 60
18+
days-before-issue-close: 14
19+
stale-issue-label: "stale"
20+
stale-issue-message: "This issue is stale because it has been open for 60 days with no activity."
21+
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
22+
days-before-pr-stale: -1
23+
days-before-pr-close: -1
24+
exempt-issue-labels: "pinned,security"
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-stale.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Stale Issues Workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
days-before-stale:
6+
description: "Days before an issue becomes stale"
7+
required: true
8+
default: "1"
9+
days-before-close:
10+
description: "Days before a stale issue is closed"
11+
required: true
12+
default: "1"
13+
14+
jobs:
15+
test-stale:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
issues: write
19+
pull-requests: write
20+
steps:
21+
- uses: actions/stale@28ca103
22+
with:
23+
days-before-issue-stale: ${{ github.event.inputs.days-before-stale }}
24+
days-before-issue-close: ${{ github.event.inputs.days-before-close }}
25+
stale-issue-label: "stale"
26+
stale-issue-message: "This issue is stale because it has been open for ${{ github.event.inputs.days-before-stale }} days with no activity."
27+
close-issue-message: "This issue was closed because it has been inactive for ${{ github.event.inputs.days-before-close }} days since being marked as stale."
28+
days-before-pr-stale: -1
29+
days-before-pr-close: -1
30+
exempt-issue-labels: "pinned,security"
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}
32+
debug-only: true

.github/workflows/test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ jobs:
6868
if: steps.webview-cache.outputs.cache-hit != 'true'
6969
run: cd webview-ui && npm ci
7070

71+
- name: Install xvfb on Linux
72+
if: runner.os == 'Linux'
73+
run: sudo apt-get update && sudo apt-get install -y xvfb
74+
75+
- name: Install local modules on windows
76+
if: runner.os == 'Windows' && steps.root-cache.outputs.cache-hit == 'true'
77+
run: |
78+
npm install eslint-plugin-eslint-rules
79+
cd webview-ui/ && npm install eslint-plugin-eslint-rules
80+
7181
- name: Set up NPM on Windows
7282
if: runner.os == 'Windows'
7383
run: |
@@ -86,8 +96,9 @@ jobs:
8696
- name: Build Tests and Extension
8797
run: npm run pretest
8898

89-
- name: Unit Tests
90-
run: npm run test:unit
99+
# Unit Tests disabled due to module system conflicts between backend and webview-ui
100+
# - name: Unit Tests
101+
# run: npm run test:unit
91102

92103
# Run extension tests with coverage
93104
- name: Extension Tests with Coverage

.gitignore

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,33 @@ tmp
77
*.vsix
88

99
.DS_Store
10+
.idea
1011

1112
pnpm-lock.yaml
12-
.hai/
1313

14-
.haiignore
1514
.clineignore
16-
17-
.env
1815
.venv
1916
.actrc
2017

18+
webview-ui/src/**/*.js
19+
webview-ui/src/**/*.js.map
20+
2121
# Ignore coverage directories and files
2222
coverage
2323
# But don't ignore the coverage scripts in .github/scripts/
2424
!.github/scripts/coverage/
2525

2626
*evals.env
2727

28-
# Generated proto files
29-
src/shared/proto/*.ts
30-
src/core/controller/*/methods.ts
31-
src/core/controller/*/index.ts
32-
src/core/controller/grpc-service-config.ts
28+
## Generated files ##
29+
src/generated/
30+
src/shared/proto/
3331
webview-ui/src/services/grpc-client.ts
34-
src/standalone/server-setup.ts
32+
33+
# E2E Tests
34+
test-results
35+
36+
# TAG:HAI
37+
.hai/
3538
.hai.config
39+
.haiignore

.hairules/hai-overview.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ Key providers include:
164164
- **OpenRouter**: Meta-provider supporting multiple model providers
165165
- **AWS Bedrock**: Integration with Amazon's AI services
166166
- **Gemini**: Google's AI models
167+
- **Cerebras**: High-performance inference with Llama, Qwen, and DeepSeek models
167168
- **Ollama**: Local model hosting
168169
- **LM Studio**: Local model hosting
169170
- **VSCode LM**: VSCode's built-in language models
@@ -220,7 +221,7 @@ class Task {
220221
await pWaitFor(() => this.userMessageContentReady)
221222

222223
// 4. Continue loop with tool result
223-
const recDidEndLoop = await this.recursivelyMakeHAIRequests(
224+
const recDidEndLoop = await this.recursivelyMakeClineRequests(
224225
this.userMessageContent
225226
)
226227
}
@@ -430,7 +431,7 @@ The Task class provides robust task state management and resumption capabilities
430431
class Task {
431432
async resumeTaskFromHistory() {
432433
// 1. Load saved state
433-
this.clineMessages = await getSavedHAIMessages(this.getContext(), this.taskId)
434+
this.clineMessages = await getSavedClineMessages(this.getContext(), this.taskId)
434435
this.apiConversationHistory = await getSavedApiConversationHistory(this.getContext(), this.taskId)
435436

436437
// 2. Handle interrupted tool executions
@@ -462,7 +463,7 @@ class Task {
462463
private async saveTaskState() {
463464
// Save conversation history
464465
await saveApiConversationHistory(this.getContext(), this.taskId, this.apiConversationHistory)
465-
await saveHAIMessages(this.getContext(), this.taskId, this.clineMessages)
466+
await saveClineMessages(this.getContext(), this.taskId, this.clineMessages)
466467

467468
// Create checkpoint
468469
const commitHash = await this.checkpointTracker?.commit()
@@ -715,7 +716,7 @@ The Controller class manages MCP servers through the McpHub service:
715716
class Controller {
716717
mcpHub?: McpHub
717718

718-
constructor(context: vscode.ExtensionContext, outputChannel: vscode.OutputChannel, webviewProvider: WebviewProvider) {
719+
constructor(context: vscode.ExtensionContext, webviewProvider: WebviewProvider) {
719720
this.mcpHub = new McpHub(this)
720721
}
721722

@@ -734,7 +735,7 @@ class Controller {
734735
const task = `Set up the MCP server from ${mcpDetails.githubUrl}...`
735736

736737
// Initialize task and show chat view
737-
await this.initHAIWithTask(task)
738+
await this.initClineWithTask(task)
738739
}
739740
}
740741
```

0 commit comments

Comments
 (0)