Skip to content

Commit a4e548a

Browse files
sync: cline merge v3.17.5 (#160)
1 parent defb26a commit a4e548a

File tree

320 files changed

+37999
-16461
lines changed

Some content is hidden

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

320 files changed

+37999
-16461
lines changed

.changeset/large-meals-grab.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.17.5 (see [changelog](https://github.com/cline/cline/blob/main/CHANGELOG.md#3175)).

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/test.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ permissions:
1515

1616
jobs:
1717
test:
18-
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, windows-latest]
22+
runs-on: ${{ matrix.os }}
23+
name: ${{ matrix.os == 'ubuntu-latest' && 'test' || format('test ({0})', matrix.os) }}
24+
defaults:
25+
run:
26+
shell: bash
1927
steps:
2028
- name: Checkout code
2129
uses: actions/checkout@v4
@@ -60,6 +68,11 @@ jobs:
6068
if: steps.webview-cache.outputs.cache-hit != 'true'
6169
run: cd webview-ui && npm ci
6270

71+
- name: Set up NPM on Windows
72+
if: runner.os == 'Windows'
73+
run: |
74+
npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"
75+
6376
- name: Type Check
6477
run: npm run check-types
6578

@@ -81,8 +94,9 @@ jobs:
8194
id: extension_coverage
8295
continue-on-error: true
8396
run: |
84-
xvfb-run -a npm run test:coverage > extension_coverage.txt 2>&1
85-
PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose
97+
node ./scripts/test-ci.js > extension_coverage.txt 2>&1
98+
# Default the encoding to UTF-8 - It's not the default on Windows
99+
PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose
86100
87101
# Run webview tests with coverage
88102
- name: Webview Tests with Coverage
@@ -92,13 +106,16 @@ jobs:
92106
cd webview-ui
93107
# Ensure coverage dependency is installed
94108
npm install --no-save @vitest/coverage-v8
95-
npm run test:coverage > webview_coverage.txt 2>&1 || true
109+
npm run test:coverage > webview_coverage.txt 2>&1
96110
cd ..
97-
PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose
111+
# Default the encoding to UTF-8 - It's not the default on Windows
112+
PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose
98113
99114
# Save coverage reports as artifacts (workflow-scoped)
100115
- name: Save Coverage Reports
101116
uses: actions/upload-artifact@v4
117+
# Only upload artifacts on Linux - We only need coverage from one OS
118+
if: runner.os == 'Linux'
102119
with:
103120
name: pr-coverage-reports
104121
path: |
@@ -107,14 +124,18 @@ jobs:
107124
retention-period: workflow # Artifacts are automatically deleted when the workflow completes
108125

109126
# Set the check as failed if any of the tests failed
110-
- name: Check for test failures
127+
- name: Print test results and check for failures
111128
run: |
129+
echo "Extension Tests Result: ${{ steps.extension_coverage.outcome }}"
130+
cat extension_coverage.txt
131+
132+
echo "Webview Tests Result: ${{ steps.webview_coverage.outcome }}"
133+
cat webview-ui/webview_coverage.txt
134+
112135
# Check if any of the test steps failed
113136
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context
114137
if [ "${{ steps.extension_coverage.outcome }}" != "success" ] || [ "${{ steps.webview_coverage.outcome }}" != "success" ]; then
115138
echo "Tests failed."
116-
cat extension_coverage.txt
117-
cat webview-ui/webview_coverage.txt
118139
exit 1
119140
fi
120141

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
out
22
dist
3+
dist-standalone
34
node_modules
45
tmp
56
.vscode-test/
@@ -23,3 +24,11 @@ coverage
2324
!.github/scripts/coverage/
2425

2526
*evals.env
27+
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
33+
webview-ui/src/services/grpc-client.ts
34+
src/standalone/server-setup.ts

.hairules/hai-overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class Task {
209209
switch (chunk.type) {
210210
case "text":
211211
// Parse into content blocks
212-
this.assistantMessageContent = parseAssistantMessage(chunk.text)
212+
this.assistantMessageContent = parseAssistantMessageV2(chunk.text)
213213
// Present blocks to user
214214
await this.presentAssistantMessage()
215215
break
@@ -220,7 +220,7 @@ class Task {
220220
await pWaitFor(() => this.userMessageContentReady)
221221

222222
// 4. Continue loop with tool result
223-
const recDidEndLoop = await this.recursivelyMakeClineRequests(
223+
const recDidEndLoop = await this.recursivelyMakeHAIRequests(
224224
this.userMessageContent
225225
)
226226
}
@@ -430,7 +430,7 @@ The Task class provides robust task state management and resumption capabilities
430430
class Task {
431431
async resumeTaskFromHistory() {
432432
// 1. Load saved state
433-
this.clineMessages = await getSavedClineMessages(this.getContext(), this.taskId)
433+
this.clineMessages = await getSavedHAIMessages(this.getContext(), this.taskId)
434434
this.apiConversationHistory = await getSavedApiConversationHistory(this.getContext(), this.taskId)
435435

436436
// 2. Handle interrupted tool executions
@@ -462,7 +462,7 @@ class Task {
462462
private async saveTaskState() {
463463
// Save conversation history
464464
await saveApiConversationHistory(this.getContext(), this.taskId, this.apiConversationHistory)
465-
await saveClineMessages(this.getContext(), this.taskId, this.clineMessages)
465+
await saveHAIMessages(this.getContext(), this.taskId, this.clineMessages)
466466

467467
// Create checkpoint
468468
const commitHash = await this.checkpointTracker?.commit()
@@ -734,7 +734,7 @@ class Controller {
734734
const task = `Set up the MCP server from ${mcpDetails.githubUrl}...`
735735

736736
// Initialize task and show chat view
737-
await this.initClineWithTask(task)
737+
await this.initHAIWithTask(task)
738738
}
739739
}
740740
```

0 commit comments

Comments
 (0)