Skip to content

Commit b53004e

Browse files
sync: cline merge v3.26.6 (#206)
* sync: cline merge v3.26.6 --------- Co-authored-by: Magesh <mageshmscss@gmail.com>
1 parent 0b7686b commit b53004e

File tree

720 files changed

+45001
-49010
lines changed

Some content is hidden

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

720 files changed

+45001
-49010
lines changed
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.26.6 (see [changelog](https://github.com/cline/cline/blob/main/CHANGELOG.md#3266)).

.codespellrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/codespell.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,7 @@ jobs:
7171
- name: Install xvfb on Linux
7272
if: runner.os == 'Linux'
7373
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-
74+
8175
- name: Set up NPM on Windows
8276
if: runner.os == 'Windows'
8377
run: |
@@ -86,26 +80,25 @@ jobs:
8680
- name: Type Check
8781
run: npm run check-types
8882

89-
- name: ESLint Check
83+
- name: Lint Check
9084
run: npm run lint
9185

92-
- name: Prettier / Format Check
86+
- name: Format Check
9387
run: npm run format
9488

9589
# Build the extension before running tests
9690
- name: Build Tests and Extension
9791
run: npm run pretest
9892

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

10396
# Run extension tests with coverage
104-
- name: Extension Tests with Coverage
97+
- name: Extension Integration Tests with Coverage
10598
id: extension_coverage
10699
continue-on-error: true
107100
run: |
108-
node ./scripts/test-ci.js > extension_coverage.txt 2>&1
101+
node ./scripts/test-ci.js 2>&1 | tee extension_coverage.txt
109102
# Default the encoding to UTF-8 - It's not the default on Windows
110103
PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose
111104
@@ -117,7 +110,7 @@ jobs:
117110
cd webview-ui
118111
# Ensure coverage dependency is installed
119112
npm install --no-save @vitest/coverage-v8
120-
npm run test:coverage > webview_coverage.txt 2>&1
113+
npm run test:coverage 2>&1 | tee webview_coverage.txt
121114
cd ..
122115
# Default the encoding to UTF-8 - It's not the default on Windows
123116
PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose
@@ -132,21 +125,19 @@ jobs:
132125
path: |
133126
extension_coverage.txt
134127
webview-ui/webview_coverage.txt
135-
retention-period: workflow # Artifacts are automatically deleted when the workflow completes
136128
137129
# Set the check as failed if any of the tests failed
138-
- name: Print test results and check for failures
130+
- name: Check for test failures
139131
run: |
140-
echo "Extension Tests Result: ${{ steps.extension_coverage.outcome }}"
141-
cat extension_coverage.txt
142-
143-
echo "Webview Tests Result: ${{ steps.webview_coverage.outcome }}"
144-
cat webview-ui/webview_coverage.txt
145-
146132
# Check if any of the test steps failed
147133
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context
134+
if [ "${{ steps.extension_coverage.outcome }}" != "success" ]; then
135+
echo "Extension Integration Tests failed, see previous step for test output."
136+
fi
137+
if [ "${{ steps.webview_coverage.outcome }}" != "success" ]; then
138+
echo "Webview Tests failed, see previous step for test output."
139+
fi
148140
if [ "${{ steps.extension_coverage.outcome }}" != "success" ] || [ "${{ steps.webview_coverage.outcome }}" != "success" ]; then
149-
echo "Tests failed."
150141
exit 1
151142
fi
152143

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ webview-ui/src/services/grpc-client.ts
3333
# E2E Tests
3434
test-results
3535

36+
## CLI pre-release ##
37+
/cli
38+
3639
# TAG:HAI
3740
.hai/
3841
.hai.config
3942
.haiignore
43+

.hairules/workflows/git-branch-analysis.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,14 @@ Analyze the current branch's changes against main to provide informed insights a
66
## Step 1: Gather Git Information
77
<important>Do not return any text or conversation other than what is necessary to run these commands</important>
88

9-
**First, check the expected output size:**
10-
```shell
11-
(git branch --show-current && echo "=== STATUS ===" && git status --porcelain | cat && echo "=== COMMIT MESSAGES ===" && git log main..HEAD --oneline | cat && echo "=== CHANGED FILES ===" && git diff main --name-only | cat && echo "=== FULL DIFF ===" && git diff main | cat) | wc -l
12-
```
13-
14-
**If the expected line count is greater than 500 lines, use the file-based approach:**
15-
```shell
16-
git branch --show-current > hai-git-analysis.temp && echo "=== STATUS ===" >> hai-git-analysis.temp && git status --porcelain >> hai-git-analysis.temp && echo "=== COMMIT MESSAGES ===" >> hai-git-analysis.temp && git log main..HEAD --oneline >> hai-git-analysis.temp && echo "=== CHANGED FILES ===" >> hai-git-analysis.temp && git diff main --name-only >> hai-git-analysis.temp && echo "=== FULL DIFF ===" >> hai-git-analysis.temp && git diff main >> hai-git-analysis.temp
17-
```
18-
19-
Then, read the file using the read_file tool. After you have read the file but before you proceed with subsequent steps, delete it:
20-
```shell
21-
rm hai-git-analysis.temp
22-
```
23-
24-
**If the expected line count is 500 lines or fewer, use the direct approach:**
25-
```shell
26-
git branch --show-current && echo "=== STATUS ===" && git status --porcelain | cat && echo "=== COMMIT MESSAGES ===" && git log main..HEAD --oneline | cat && echo "=== CHANGED FILES ===" && git diff main --name-only | cat && echo "=== FULL DIFF ===" && git diff main | cat
27-
```
28-
29-
<important>If using the direct approach, pipe outputs through `cat` to avoid interactive terminals. If the user's shell is not bash/zsh, adjust the command and chaining
30-
syntax accordingly.</important>
9+
**Run the following command to get the latest changes (bash):**
10+
```bash
11+
B=$(for c in main master origin/main origin/master; do git rev-parse --verify -q "$c" >/dev/null && echo "$c" && break; done); B=${B:-HEAD}; r(){ git branch --show-current; printf "=== STATUS ===\n"; git status --porcelain | cat; printf "=== COMMIT MESSAGES ===\n"; git log "$B"..HEAD --oneline | cat; printf "=== CHANGED FILES ===\n"; git diff "$B" --name-only | cat; printf "=== FULL DIFF ===\n"; git diff "$B" | cat; }; L=$(r | wc -l); if [ "$L" -gt 500 ]; then r > hai-git-analysis.temp && echo "::OUTPUT_FILE=hai-git-analysis.temp"; else r; fi
12+
```
13+
14+
```powershell
15+
$B=$null;foreach($c in 'main','master','origin/main','origin/master'){git rev-parse --verify -q $c *> $null;if($LASTEXITCODE -eq 0){$B=$c;break}};if(-not $B){$B='HEAD'};function r([string]$b){git rev-parse --abbrev-ref HEAD; '=== STATUS ==='; git status --porcelain | cat; '=== COMMIT MESSAGES ==='; git log "$b"..HEAD --oneline | cat; '=== CHANGED FILES ==='; git diff "$b" --name-only | cat; '=== FULL DIFF ==='; git diff "$b" | cat};$out=r $B|Out-String;$lines=($out -split "`r?`n").Count;if($lines -gt 500){$out|Set-Content -NoNewline hai-git-analysis.temp; '::OUTPUT_FILE=hai-git-analysis.temp'}else{$out}
16+
```
3117

3218
## Step 2: Silent, Structured Analysis Phase
3319
- Analyze all git output without providing commentary or narration

.hairules/workflows/pr-review.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ EOF
219219
220220
## Basic PR Commands
221221
```bash
222+
# Get current PR number
223+
gh pr view --json number -q .number
224+
222225
# List open PRs
223226
gh pr list
224227
@@ -328,7 +331,7 @@ Hey, the PR looks good overall but I'm concerned about removing those timeouts.
328331
Could you add back the timeouts after focusing the sidebar? Something like:
329332
330333
```typescript
331-
await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus")
334+
await vscode.commands.executeCommand("hai.SidebarProvider.focus")
332335
await setTimeoutPromise(100) // Give UI time to update
333336
visibleWebview = WebviewProvider.getSidebarInstance()
334337
```

.husky/pre-commit

100755100644
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
echo "Running pre-commit checks..."
2-
3-
# Run ESLint
4-
echo "Running ESLint..."
5-
npm run lint || {
6-
echo "❌ ESLint check failed. Please fix the errors and try committing again."
7-
exit 1
8-
}
9-
10-
# Run Prettier
11-
echo "Running Prettier..."
12-
npx lint-staged --verbose || {
13-
echo "❌ Prettier failed. Please fix the errors and try committing again."
14-
exit 1
15-
}
16-
17-
echo "✅ All checks passed!"
1+
lint-staged --no-stash

.mocharc.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
2-
"extension": ["ts"],
3-
"spec": ["src/**/__tests__/*.ts", "eslint-rules/__tests__/**/*.test.ts"],
4-
"require": ["ts-node/register", "source-map-support/register", "./src/test/requires.ts"],
2+
"extension": [
3+
"ts"
4+
],
5+
"spec": [
6+
"src/**/__tests__/*.ts",
7+
"eslint-rules/__tests__/**/*.test.ts"
8+
],
9+
"require": [
10+
"ts-node/register",
11+
"source-map-support/register",
12+
"./src/test/requires.ts"
13+
],
514
"recursive": true
615
}

0 commit comments

Comments
 (0)