Skip to content

Commit a4bdb75

Browse files
author
hongyu9
committed
first commit
0 parents  commit a4bdb75

File tree

1,824 files changed

+317602
-0
lines changed

Some content is hidden

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

1,824 files changed

+317602
-0
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/changelog-config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const getReleaseLine = async (changeset) => {
2+
const [firstLine] = changeset.summary
3+
.split("\n")
4+
.map((l) => l.trim())
5+
.filter(Boolean)
6+
return `- ${firstLine}`
7+
}
8+
9+
const getDependencyReleaseLine = async () => {
10+
return ""
11+
}
12+
13+
const changelogFunctions = {
14+
getReleaseLine,
15+
getDependencyReleaseLine,
16+
}
17+
18+
module.exports = changelogFunctions

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
3+
"changelog": "./changelog-config.js",
4+
"commit": false,
5+
"fixed": [["roo-cline"]],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.ci/.develop.gitlab-ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
variables:
2+
NODE_IMAGE: registry.api.weibo.com/hongyu9/node/node:20.19.2-alpine-v0.1
3+
4+
# 1. develop 分支:测试包流程
5+
build_test_develop:
6+
stage: build_test_develop
7+
image: $NODE_IMAGE
8+
rules:
9+
- if: '$CI_COMMIT_BRANCH == "develop" && $CI_COMMIT_MESSAGE !~ /^\[bot\]/'
10+
script:
11+
- pnpm install
12+
- pnpm run vsix
13+
- cp ./bin/*.vsix ./
14+
- cd src
15+
- CURRENT_VERSION=$(npm pkg get version | tr -d '"')
16+
- cd ..
17+
- echo "请人工测试 .vsix 后点继续,测试通过后 bump 版本号并创建 release 分支"
18+
- |
19+
curl "https://oapi.dingtalk.com/robot/send?access_token=${DINGTAKE_TOKEN}" \
20+
-s -H 'Content-Type: application/json' \
21+
-d "{
22+
\"msgtype\": \"markdown\",
23+
\"markdown\": {
24+
\"title\": \"Wecoder ${CURRENT_VERSION} +1 Alpha 打包完成\",
25+
\"text\": \"### Wecoder ${CURRENT_VERSION} +1 Alpha 打包完成\n* 分支:develop\n* 当前版本:${CURRENT_VERSION} +1 Alpha\n* 下载链接:[点击下载](${CI_PROJECT_URL}/-/jobs/$CI_JOB_ID/artifacts/browse)\n* 如需继续流程,请在 CI 页面点击 create_mr 创建合并请求\n * CI 详情页:[跳转到本次 Pipeline](${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID})\"
26+
}
27+
}"
28+
artifacts:
29+
paths:
30+
- "*.vsix"
31+
expire_in: 1 hour
32+
33+
create_mr:
34+
stage: create_mr
35+
image: $NODE_IMAGE
36+
before_script:
37+
- git config --global user.email "gitlab@git.intra.weibo.com"
38+
- git config --global user.name "Wecoder CI"
39+
- git remote set-url origin https://oauth2:${CI_PUSH_TOKEN}@git.intra.weibo.com/${CI_PROJECT_PATH}.git
40+
- git checkout develop
41+
# 关键补充:先同步远端最新 develop
42+
- git pull --rebase origin develop
43+
rules:
44+
- if: '$CI_COMMIT_BRANCH == "develop" && $CI_COMMIT_MESSAGE !~ /^\[bot\]/'
45+
script:
46+
- |
47+
cd src
48+
CURRENT_VERSION=$(npm pkg get version | tr -d '"')
49+
npm version patch -m "chore(release): bump version to %s"
50+
cd ..
51+
NEW_VERSION=$(node -p "require('./src/package.json').version")
52+
git add src/package.json # 如果有
53+
git commit --no-verify --allow-empty -m "[bot]chore(release): bump version to ${NEW_VERSION}" # 若没自动commit
54+
# 再次同步一下(防止极端并发),可选
55+
git pull --rebase origin develop
56+
git push origin develop
57+
MR_URL="${CI_PROJECT_URL}/-/merge_requests/new?merge_request%5Bsource_branch%5D=${CI_COMMIT_REF_NAME}&merge_request%5Btarget_branch%5D=main&merge_request%5Btitle%5D=chore%28release%29%3A%20bump%20version%20to%20${NEW_VERSION}"
58+
echo "点击创建MR: ${MR_URL}"
59+
curl "https://oapi.dingtalk.com/robot/send?access_token=${DINGTAKE_TOKEN}" \
60+
-s -H 'Content-Type: application/json' \
61+
-d "{
62+
\"msgtype\": \"markdown\",
63+
\"markdown\": {
64+
\"title\": \"Wecoder ${CURRENT_VERSION} +1 Alpha 合并请求\",
65+
\"text\": \"### Wecoder ${CURRENT_VERSION} +1 Alpha 合并请求\n* Pipeline 地址:[查看 Pipeline](${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID})\n* 分支:develop\n* 当前版本:${CURRENT_VERSION} +1 Alpha\n* 创建 MR:[点击这里创建合并请求](${MR_URL})\"
66+
}
67+
}"
68+
when: manual

.ci/.docker.gitlab-ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
image: registry.api.weibo.com/ci/ci-runner:xuemin8-20241104-extend
2+
3+
variables:
4+
K8S_NAMESPACE: ci-deploy-video
5+
MAIL_TO: weibo_rd_video@staff.sina.com.cn
6+
SERVICE: wecoder
7+
MASTER_BRANCH: master
8+
9+
docker_we_coder_base:
10+
stage: package
11+
retry: 1
12+
variables:
13+
SERVICE: base_we_coder
14+
DOCKERFILE_PATH: base_docker/
15+
script:
16+
- build_image
17+
when: manual
18+
19+
docker_we_coder:
20+
stage: package
21+
retry: 1
22+
variables:
23+
DOCKERFILE_PATH: ./
24+
script:
25+
- build_image

.ci/.main.gitlab-ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
variables:
2+
NODE_IMAGE: registry.api.weibo.com/hongyu9/node/node:20.19.2-alpine-v0.1
3+
VSCE_PAT: ${VSCE_TOKEN}
4+
5+
# 1. main 分支:发布流程
6+
build_test_main:
7+
stage: build_test_main
8+
image: $NODE_IMAGE
9+
rules:
10+
- if: '$CI_COMMIT_BRANCH == "main"'
11+
script:
12+
- pnpm install
13+
- pnpm run vsix
14+
- cp ./bin/*.vsix ./
15+
- cd src
16+
- CURRENT_VERSION=$(npm pkg get version | tr -d '"')
17+
- cd ..
18+
- echo "请人工测试 .vsix 后点继续,测试通过后 发布正式版本。"
19+
- |
20+
curl "https://oapi.dingtalk.com/robot/send?access_token=${DINGTAKE_TOKEN}" \
21+
-s -H 'Content-Type: application/json' \
22+
-d "{
23+
\"msgtype\": \"markdown\",
24+
\"markdown\": {
25+
\"title\": \"Wecoder打包进度:Main分支打包完成\",
26+
\"text\": \"### Wecoder ${CURRENT_VERSION} Release 打包完成\n* 分支:main\n* 当前版本:${CURRENT_VERSION} Release\n* 下载地址:[点击下载](${CI_PROJECT_URL}/-/jobs/$CI_JOB_ID/artifacts/browse)\n* 如需发布正式版,请在 CI 页面点击 publish 创建合并请求\n * CI 详情页:[跳转到本次 Pipeline](${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID})\"
27+
}
28+
}"
29+
artifacts:
30+
paths:
31+
- "*.vsix"
32+
expire_in: 1 hour
33+
34+
publish:
35+
stage: publish
36+
image: $NODE_IMAGE
37+
rules:
38+
- if: '$CI_COMMIT_BRANCH == "main"'
39+
script:
40+
- cd src
41+
- CURRENT_VERSION=$(npm pkg get version | tr -d '"')
42+
- cd ..
43+
- pnpm install
44+
- pnpm vsix
45+
- echo ">>>>>> 发布至 vscode 市场 开始"
46+
- pnpm --filter wecoder publish:marketplace
47+
- echo ">>>>>> 发布至 vscode 市场 完成"
48+
- echo ">>>>>> 发布至 云 IDE 市场 开始"
49+
- npx ovsx publish ./bin/*.vsix -p c15981ee-d317-4ade-b8cb-53e09ba174a3
50+
- echo ">>>>>> 发布至 云 IDE 市场 完成"
51+
- |
52+
curl "https://oapi.dingtalk.com/robot/send?access_token=${DINGTAKE_TOKEN}" \
53+
-s -H 'Content-Type: application/json' \
54+
-d "{
55+
\"msgtype\": \"markdown\",
56+
\"markdown\": {
57+
\"title\": \"Wecoder ${CURRENT_VERSION} 已发布\",
58+
\"text\": \"### Wecoder ${CURRENT_VERSION} 已发布\n* 发布市场:\n * VSCode:[已完成](https://marketplace.visualstudio.com/items?itemName=weiboplat.wecoder)\n * 云 Idea:已完成\n * Pipeline 地址:[查看 Pipeline](${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID})\n* 分支:main\n* 当前版本:${CURRENT_VERSION}\"
59+
}
60+
}"
61+
when: manual

.ci/.runtime.gitlab-ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
variables:
2+
NODE_IMAGE: registry.api.weibo.com/hongyu9/node/node:20.19.2-alpine-v0.1
3+
PROJECT_NAME: weibo_rd/common/wecode/wecode-runtime-package
4+
5+
runtime_create_mr:
6+
stage: runtime_create_mr
7+
image: $NODE_IMAGE
8+
dependencies:
9+
- build_test_main # 加上依赖,拿到 artifact
10+
before_script:
11+
- git config --global user.email "gitlab@git.intra.weibo.com"
12+
- git config --global user.name "Wecoder CI"
13+
rules:
14+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE !~ /^\[bot\]/'
15+
script:
16+
- |
17+
git clone https://oauth2:${CI_PUSH_TOKEN}@git.intra.weibo.com/${PROJECT_NAME}.git wecode-runtime-package
18+
# 拿 artifact 文件,这里假设只有一个 vsix 文件
19+
VSIX_FILE=$(ls *.vsix | head -n 1)
20+
NEW_VERSION=$(echo $VSIX_FILE | sed 's/.*\///')
21+
cd wecode-runtime-package
22+
cp -f ../${VSIX_FILE} centos/code-server/wecoder.vsix
23+
# 切分支
24+
NEW_BRANCH="release/auto-bump-${NEW_VERSION}"
25+
git checkout -b $NEW_BRANCH
26+
git add centos/code-server/wecoder.vsix
27+
git commit -m "chore(release): bump version to ${NEW_VERSION}"
28+
git push origin $NEW_BRANCH
29+
MR_URL="https://git.intra.weibo.com/${PROJECT_NAME}/-/merge_requests/new?merge_request%5Bsource_branch%5D=${NEW_BRANCH}&merge_request%5Btarget_branch%5D=develop&merge_request%5Btitle%5D=chore%28release%29%3A%20bump%20version%20to%20${NEW_VERSION}"
30+
MAIN_MR_URL="https://git.intra.weibo.com/${PROJECT_NAME}/-/merge_requests/new?merge_request%5Bsource_branch%5D=develop&merge_request%5Btarget_branch%5D=main&merge_request%5Btitle%5D=chore%28release%29%3A%20bump%20version%20to%20${NEW_VERSION}"
31+
echo "点击创建MR: ${MR_URL}"
32+
curl "https://oapi.dingtalk.com/robot/send?access_token=${DINGTAKE_TOKEN}" \
33+
-s -H 'Content-Type: application/json' \
34+
-d "{
35+
\"msgtype\": \"markdown\",
36+
\"markdown\": {
37+
\"title\": \"Wecoder Runtime ${NEW_VERSION} 合并请求\",
38+
\"text\": \"### Wecoder Runtime ${NEW_VERSION} 合并请求\n* Pipeline 地址:[查看 Pipeline](${CI_PROJECT_URL}/-/pipelines/${CI_PIPELINE_ID})\n* 分支:$NEW_BRANCH\n* 当前版本:${NEW_VERSION}\n* 创建 MR:[创建合并请求到 develop 分支](${MR_URL})\n---\n> **请在合并到 develop 后,再创建合并到 main 的合并请求:**\n>\n> * [点击这里快速创建 main 分支的 MR](${MAIN_MR_URL})\"
39+
}
40+
}"

.dockerignore

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# git
2+
.git
3+
4+
# build artifacts
5+
bin/
6+
dist/
7+
**/dist/
8+
out/
9+
**/out/
10+
src/webview-ui/
11+
12+
# dependencies
13+
node_modules/
14+
**/node_modules/
15+
16+
# testing
17+
coverage/
18+
**/.vscode-test/
19+
**/mock/
20+
21+
# devtools
22+
knip.json
23+
.husky/
24+
25+
# monorepo
26+
.turbo/
27+
**/.turbo/
28+
29+
# next.js
30+
**/.next/
31+
.vercel
32+
33+
# Ignore common development files
34+
node_modules
35+
.git
36+
.gitignore
37+
.dockerignore
38+
.env*
39+
.vscode
40+
.idea
41+
42+
# Ignore build artifacts
43+
dist
44+
build
45+
*.log
46+
*.tmp
47+
.cache
48+
coverage
49+
50+
# Ignore OS files
51+
.DS_Store
52+
Thumbs.db
53+
54+
# Ignore test files
55+
__tests__
56+
*.test.js
57+
*.spec.js
58+
*.test.ts
59+
*.spec.ts
60+
61+
# Ignore development config files
62+
.eslintrc*
63+
.prettierrc*
64+
65+
# Ignore most directories except what we need for the build
66+
apps/
67+
evals/
68+
webview-ui/node_modules
69+
src/node_modules
70+
71+
# Keep essential files for the build
72+
!README.md
73+
!CHANGELOG.md
74+
!package.json
75+
!pnpm-lock.yaml
76+
!pnpm-workspace.yaml
77+
!scripts/bootstrap.mjs
78+
!apps/web-evals/
79+
!src/
80+
!webview-ui/
81+
!packages/evals/.docker/entrypoints/runner.sh
82+
!packages/build/
83+
!packages/cloud/
84+
!packages/config-eslint/
85+
!packages/config-typescript/
86+
!packages/evals/
87+
!packages/ipc/
88+
!packages/telemetry/
89+
!packages/types/
90+
!locales/

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ran Prettier on all files - https://github.com/RooCodeInc/Roo-Code/pull/404
2+
60a0a824b96a0b326af4d8871b6903f4ddcfe114
3+
579bdd9dbf6d2d569e5e7adb5ff6292b1e42ea34

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
demo.gif filter=lfs diff=lfs merge=lfs -text
2+
assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
3+
src/assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
4+
5+
# Test snapshot files - mark as linguist-generated to exclude from GitHub language statistics
6+
*.snap linguist-generated=true
7+
8+
# Non-English translation files - mark as linguist-generated to exclude from GitHub language statistics
9+
# Root locales directory (contains only non-English translations)
10+
locales/** linguist-generated=true
11+
12+
# Mark all locale directories as generated first
13+
src/i18n/locales/** linguist-generated=true
14+
webview-ui/src/i18n/locales/** linguist-generated=true
15+
16+
# Then explicitly mark English directories as NOT generated (override the above)
17+
src/i18n/locales/en/** linguist-generated=false
18+
webview-ui/src/i18n/locales/en/** linguist-generated=false
19+
20+
# This approach uses gitattributes' last-match-wins rule to exclude English while including all other locales

0 commit comments

Comments
 (0)