Skip to content

Commit caf5b56

Browse files
committed
merge main
2 parents 031179e + 7d54246 commit caf5b56

File tree

281 files changed

+20744
-3229
lines changed

Some content is hidden

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

281 files changed

+20744
-3229
lines changed

.claude/lint-check.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Get file path from hook input
4+
FILE_PATH=$(cat | jq -r '.tool_input.file_path // .tool_input.edits[].file_path // empty' | head -n1)
5+
6+
# Function to run lint and typecheck
7+
run_checks() {
8+
local dir=$1
9+
cd "$dir"
10+
npm run lint >&2 && npm run tsc:check >&2
11+
}
12+
13+
# Run checks based on file location
14+
if [[ "$FILE_PATH" == *"/core/"* ]]; then
15+
run_checks core
16+
elif [[ "$FILE_PATH" == *"/gui/"* ]]; then
17+
run_checks gui
18+
elif [[ "$FILE_PATH" == *"/extensions/vscode/"* ]]; then
19+
run_checks extensions/vscode
20+
fi

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Write|Edit|MultiEdit",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "$CLAUDE_PROJECT_DIR/.claude/lint-check.sh"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.continue/rules/documentation-standards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ alwaysApply: false
1212

1313
### Conversational and Direct
1414

15-
- Follow Docusaurus documentation standards
15+
- Follow Mintlify documentation standards
1616
- Use simple, conversational language that gets straight to the point
1717
- Avoid overly technical jargon when simpler terms work
1818
- Write as if speaking directly to the developer using the tool

.github/actions/build-vscode-extension/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ inputs:
1818
description: 'Commit SHA for version modification (optional, uses first 7 chars)'
1919
required: false
2020
default: ''
21+
github-token:
22+
description: 'GitHub token for downloading ripgrep'
23+
required: true
2124
outputs:
2225
target:
2326
description: 'The target string used for the build'
@@ -83,7 +86,7 @@ runs:
8386
npm ci
8487
env:
8588
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
86-
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
89+
GITHUB_TOKEN: ${{ inputs.github-token }}
8790

8891
- name: Install gui dependencies
8992
shell: bash
@@ -98,6 +101,12 @@ runs:
98101
npm ci
99102
npm i vectordb
100103
104+
- name: Build GUI
105+
shell: bash
106+
run: |
107+
cd gui
108+
npm run build
109+
101110
- name: Prepackage the extension
102111
shell: bash
103112
run: |

.github/actions/run-jetbrains-tests/action.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
name: 'Run JetBrains Tests'
2-
description: 'Setup and run JetBrains IntelliJ tests with all dependencies'
1+
name: "Run JetBrains Tests"
2+
description: "Setup and run JetBrains IntelliJ tests with all dependencies"
3+
4+
inputs:
5+
github-token:
6+
description: "GitHub token for accessing repositories"
7+
required: true
8+
ci-github-token:
9+
description: "CI GitHub token for vscode extension build"
10+
required: true
311

412
runs:
5-
using: 'composite'
13+
using: "composite"
614
steps:
715
- uses: actions/setup-node@v4
816
with:
@@ -20,6 +28,13 @@ runs:
2028
cd core
2129
npm ci
2230
31+
- name: Install gui node_modules and build
32+
shell: bash
33+
run: |
34+
cd gui
35+
npm ci
36+
npm run build
37+
2338
- name: Setup Java
2439
uses: actions/[email protected]
2540
with:
@@ -29,7 +44,7 @@ runs:
2944
- name: Setup FFmpeg
3045
uses: AnimMouse/setup-ffmpeg@v1
3146
with:
32-
token: ${{ env.GITHUB_TOKEN }}
47+
token: ${{ inputs.github-token }}
3348

3449
- name: Setup Gradle
3550
uses: gradle/actions/setup-gradle@v3
@@ -70,7 +85,7 @@ runs:
7085
npm run prepackage
7186
env:
7287
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
73-
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
88+
GITHUB_TOKEN: ${{ inputs.ci-github-token }}
7489

7590
- uses: actions/cache@v4
7691
id: binary-cache
@@ -128,4 +143,4 @@ runs:
128143
with:
129144
name: jb-failure-report
130145
path: |
131-
${{ github.workspace }}/extensions/intellij/build/reports
146+
${{ github.workspace }}/extensions/intellij/build/reports
Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: 'Setup Packages'
2-
description: 'Cache and build packages with npm caching'
1+
name: "Setup Packages"
2+
description: "Cache and build packages with npm caching"
33

44
runs:
5-
using: 'composite'
5+
using: "composite"
66
steps:
77
- uses: actions/setup-node@v4
88
with:
@@ -21,17 +21,3 @@ runs:
2121
- name: Build packages
2222
shell: bash
2323
run: node ./scripts/build-packages.js
24-
25-
- name: Install package dependencies
26-
shell: bash
27-
run: |
28-
for package_dir in packages/*/; do
29-
if [ -f "$package_dir/package.json" ] && [ ! -d "$package_dir/node_modules" ]; then
30-
echo "Installing dependencies for $package_dir"
31-
cd "$package_dir"
32-
npm ci
33-
cd - > /dev/null
34-
elif [ -d "$package_dir/node_modules" ]; then
35-
echo "Using cached dependencies for $package_dir"
36-
fi
37-
done

.github/workflows/auto-assign-issue.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: pozil/auto-assign-issue@v2
1515
with:
1616
repo-token: ${{ secrets.CI_GITHUB_TOKEN }}
17-
assignees: sestinj,Patrick-Erichsen,tomasz-stefaniak,RomneyDa
17+
assignees: Patrick-Erichsen,tomasz-stefaniak,RomneyDa,tingwai
1818
numOfAssignee: 1
1919
# - name: "Add default labels"
2020
# uses: actions-ecosystem/action-add-labels@v1

.github/workflows/compliance.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
fi
4141
4242
- name: Add PR title guidance comment
43-
if: steps.pr-title-check.outputs.valid == 'false'
43+
if: always() && steps.pr-title-check.outputs.valid == 'false'
4444
uses: actions/github-script@v7
4545
with:
4646
script: |
@@ -88,6 +88,9 @@ jobs:
8888
].join('\n')
8989
});
9090
}
91+
- name: Ensure job always succeeds
92+
if: always()
93+
run: echo "✅ Conventional commits check completed (warning only)"
9194

9295
security-audit:
9396
name: Security Audit
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Label Merged PRs
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
label-pr:
9+
if: github.event.pull_request.merged == true
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: write
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Check if author is in tier list
19+
id: check-author
20+
run: |
21+
USERS=(
22+
"TyDunn"
23+
"jpoly1219"
24+
"bdougie"
25+
"uinstinct"
26+
"sestinj"
27+
"tingwai"
28+
"tomasz-stefaniak"
29+
"RomneyDa"
30+
"Patrick-Erichsen"
31+
)
32+
33+
PR_AUTHOR="${{ github.event.pull_request.user.login }}"
34+
SHOULD_LABEL="false"
35+
36+
for user in "${USERS[@]}"; do
37+
if [[ "$PR_AUTHOR" == "$user" ]]; then
38+
SHOULD_LABEL="true"
39+
break
40+
fi
41+
done
42+
43+
echo "should_label=$SHOULD_LABEL" >> $GITHUB_OUTPUT
44+
45+
- name: Determine and apply tier label
46+
if: steps.check-author.outputs.should_label == 'true'
47+
uses: actions/github-script@v7
48+
with:
49+
script: |
50+
const pr = context.payload.pull_request;
51+
52+
// Check if PR already has a tier label
53+
const existingLabels = pr.labels.map(l => l.name);
54+
if (existingLabels.some(label => label.match(/^tier [1-3]$/))) {
55+
console.log('PR already has a tier label, skipping');
56+
return;
57+
}
58+
59+
// Function to extract conventional commit prefix
60+
function getConventionalPrefix(title) {
61+
const match = title.match(/^([a-z]+)(\s|$|:)/);
62+
return match ? match[1] : '';
63+
}
64+
65+
// Function to determine tier
66+
function determineTier(pr) {
67+
const additions = pr.additions;
68+
const deletions = pr.deletions;
69+
const changedFiles = pr.changed_files;
70+
const title = pr.title;
71+
const body = pr.body || '';
72+
73+
const prefix = getConventionalPrefix(title);
74+
75+
// If no conventional commit prefix, skip
76+
if (!prefix) {
77+
console.log('No conventional commit format, skipping');
78+
return null;
79+
}
80+
81+
// Tier 4 (unlabeled): fix, test, docs, style, refactor, perf, build, ci, revert, improve
82+
const tier4Prefixes = ['fix', 'test', 'docs', 'style', 'refactor', 'perf', 'build', 'ci', 'revert', 'chore', 'improve'];
83+
if (tier4Prefixes.includes(prefix)) {
84+
console.log('Tier 4 prefix detected, will remain unlabeled');
85+
return null;
86+
}
87+
88+
const totalChanges = additions + deletions;
89+
90+
// Tier 1: Major features (1000+ lines changed, or 20+ files, or feat with large scope)
91+
if (totalChanges > 1000 || changedFiles > 20 ||
92+
(prefix === 'feat' && totalChanges > 800) ||
93+
title.match(/(major|milestone|launch)/)) {
94+
return 'tier 1';
95+
}
96+
97+
// Tier 2: Important features (500+ lines changed, or 10+ files, or standard feat)
98+
if (totalChanges > 500 || changedFiles > 10 || prefix === 'feat') {
99+
return 'tier 2';
100+
}
101+
102+
// Tier 3: Smaller improvements
103+
return 'tier 3';
104+
}
105+
106+
const tier = determineTier(pr);
107+
108+
if (tier) {
109+
console.log(`Assigning ${tier} label to PR #${pr.number}`);
110+
console.log(`Title: ${pr.title}`);
111+
console.log(`Changes: +${pr.additions} -${pr.deletions} (${pr.changed_files} files)`);
112+
113+
await github.rest.issues.addLabels({
114+
owner: context.repo.owner,
115+
repo: context.repo.repo,
116+
issue_number: pr.number,
117+
labels: [tier]
118+
});
119+
120+
console.log(`✓ Label '${tier}' added successfully`);
121+
}

.github/workflows/main.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ jobs:
8080
arch: ${{ matrix.arch }}
8181
npm_config_arch: ${{ matrix.npm_config_arch }}
8282
pre-release: false
83-
env:
84-
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
83+
github-token: ${{ secrets.GITHUB_TOKEN }}
8584

8685
- name: Upload .vsix artifact
8786
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)