Compare commits
5 Commits
docs/readm
...
fix/ci
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d89653143 | |||
| bc68869493 | |||
| ccee6dcde8 | |||
| d9ec4f60e0 | |||
| 9ca1ae506f |
@ -1,73 +0,0 @@
|
||||
name: "ci@backend pipeline"
|
||||
|
||||
trigger:
|
||||
change:
|
||||
paths:
|
||||
- "backend/**"
|
||||
|
||||
jobs:
|
||||
unit_test:
|
||||
image: hub.byted.org/codebase/ci_go_1_24:latest
|
||||
name: Unit Test
|
||||
steps:
|
||||
- id: mysql_scripts
|
||||
name: mysql scripts
|
||||
uses: actions/mysql-scripts@v1
|
||||
inputs:
|
||||
db_name: opencoze
|
||||
host: mysql
|
||||
path: "docker/atlas/migrations/*.sql"
|
||||
user: root
|
||||
password: root
|
||||
- name: Go Test
|
||||
uses: actions/codecov
|
||||
inputs:
|
||||
driver: go
|
||||
commands:
|
||||
- modules=`find . -name "go.mod" -exec dirname {} \;`
|
||||
- echo $modules
|
||||
- list=""
|
||||
- coverpkg=""
|
||||
- if [[ ! -f "go.work" ]];then go work init;fi
|
||||
- for module in $modules; do go work use $module; list=$module"/... "$list; coverpkg=$module"/...,"$coverpkg; done
|
||||
- go work sync
|
||||
- go test -coverprofile=coverage.out -gcflags="all=-l -N" -coverpkg=$coverpkg $list
|
||||
config:
|
||||
status:
|
||||
project:
|
||||
opencoze:
|
||||
minimum_coverage: 0%
|
||||
paths:
|
||||
- "!tests"
|
||||
- "!examples/**"
|
||||
- "!*/examples/**"
|
||||
- "!*/mock/**"
|
||||
- "!*/model/**"
|
||||
diff:
|
||||
eino:
|
||||
line_limit: 10 # 增量行数少于多少行时,默认置成功
|
||||
minimum_coverage: 0%
|
||||
paths:
|
||||
- "!tests"
|
||||
- "!examples/**"
|
||||
- "!*/examples/**"
|
||||
- "!*/mock/**"
|
||||
- "!*/model/**"
|
||||
- name: Sonar
|
||||
uses: actions/sonar@v1
|
||||
inputs:
|
||||
coverage_path: /tmp/coverage.out
|
||||
coverage_type: go
|
||||
disable_quality_gates: true
|
||||
exclusions_list:
|
||||
- "!tests"
|
||||
- "examples/**"
|
||||
- "*/mock/**"
|
||||
- "*/model/**"
|
||||
language: go
|
||||
services:
|
||||
- id: mysql
|
||||
image: hub.byted.org/ee/mysql:8.0
|
||||
envs:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: opencoze
|
||||
@ -1,180 +0,0 @@
|
||||
name: CI@fe-master
|
||||
trigger:
|
||||
cron:
|
||||
push:
|
||||
branches: []
|
||||
paths:
|
||||
- "frontend/**"
|
||||
types: [branch]
|
||||
notification:
|
||||
when: failure
|
||||
# 搜索群名:Bot Studio Monorepo CI 报警群
|
||||
to: ['7350862409475031044']
|
||||
manual:
|
||||
notification:
|
||||
when: failure
|
||||
|
||||
jobs:
|
||||
lint: &base_job
|
||||
runs-on:
|
||||
env: online
|
||||
name: Lint
|
||||
image: hub.byted.org/base/bot_monorepo_ci_env:ae543e9bbc6d8155cffbd8f5ed27fb73
|
||||
# 从最近的 CI 执行记录看,install 步骤有概率会等待超时
|
||||
# 目前已 oncall,这里先设置一个超时时间,避免阻塞
|
||||
timeout: 30
|
||||
envs:
|
||||
RUSH_BUILD_CACHE_WRITE_ALLOWED: ${{RUSH_BUILD_CACHE_WRITE_ALLOWED}}
|
||||
RUSH_BUILD_CACHE_ENABLED: ${{RUSH_BUILD_CACHE_ENABLED}}
|
||||
RUSH_BUILD_CACHE_CREDENTIAL: ${{RUSH_BUILD_CACHE_CREDENTIAL}}
|
||||
ACCESS_TOKEN: ${{CI_BOT_ACCESS_TOKEN}}
|
||||
CI: 'true'
|
||||
RUN_BYTEST_COV: 'false' # disable Jupiter default behavior of invoke bytestcov
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 'true'
|
||||
CYPRESS_INSTALL_BINARY: '0'
|
||||
TAIKO_SKIP_CHROMIUM_DOWNLOAD: '0'
|
||||
RE2_DOWNLOAD_SKIP_PATH: '1'
|
||||
RE2_DOWNLOAD_MIRROR: https://bnpm.bytedance.net/mirrors
|
||||
# https://typescript-eslint.io/packages/parser/#allowautomaticsingleruninference
|
||||
TSESTREE_SINGLE_RUN: 'true'
|
||||
# 使用云盘缓存:https://bytedance.larkoffice.com/wiki/A60lwgolSinteMkOz71cFPvFneg
|
||||
# TODO:不同job的缓存key暂时使用同一个,后续可以考虑区分
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-master-v2-lint
|
||||
size: 256
|
||||
steps:
|
||||
- &checkout_step
|
||||
id: Checkout
|
||||
uses: actions/checkout
|
||||
inputs:
|
||||
depth: 1
|
||||
- &proxy_step
|
||||
name: SetupProxy
|
||||
commands:
|
||||
- bash .codebase/scripts/env.sh
|
||||
- &init_env_step
|
||||
name: Initialization
|
||||
commands:
|
||||
- printenv
|
||||
- git config user.name ci_flow
|
||||
- git config user.email ci_flow@bytedance.com
|
||||
- &install_deps_step
|
||||
name: Install dependencies
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js install
|
||||
# 暂时不启用,因为eslintignore文件移除会导致解析报错,后期接入可考虑动态读取eslint ignore配置
|
||||
# - name: PreLint
|
||||
# parallel-with-next-step: true
|
||||
# commands:
|
||||
# - npx oxlint@latest -A all .
|
||||
- name: Lint
|
||||
commands:
|
||||
- NODE_OPTIONS="--max-old-space-size=4096" node common/scripts/install-run-rush.js lint
|
||||
|
||||
ts_check:
|
||||
<<: *base_job
|
||||
name: Check TS Type
|
||||
timeout: 30
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-master-v2-ts-check
|
||||
size: 256
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: Check TS Type
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js ts-check -v
|
||||
|
||||
build:
|
||||
<<: *base_job
|
||||
name: Build
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-master-v2-build
|
||||
size: 256
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: Build
|
||||
commands:
|
||||
- CUSTOM_VERSION=release REGION=sg BUILD_BRANCH=test node common/scripts/install-run-rush.js build -v
|
||||
|
||||
test:
|
||||
<<: *base_job
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-master-v2-test
|
||||
size: 256
|
||||
name: Test
|
||||
services:
|
||||
# 下面启动一个mysql和mongo服务,主要用于coze.hub.core相关服务的集成测试
|
||||
# id需要保持跟代码中连接的host一致
|
||||
- id: hub_mysql
|
||||
image: hub.byted.org/ee/mysql:5.7
|
||||
envs:
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_DATABASE: coze_hub
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_TCP_PORT: 3306
|
||||
- id: hub_mongo
|
||||
image: hub.byted.org/ee/mongo:4.0.24
|
||||
commands:
|
||||
- mongod --replSet rs0
|
||||
- id: mongo-init
|
||||
image: hub.byted.org/ee/mongo:4.0.24
|
||||
commands:
|
||||
- sleep 10s
|
||||
- mongo mongodb://127.0.0.1:27017 --eval 'rs.initiate()'
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: wait mongo ready
|
||||
uses: actions/mongodb-scripts
|
||||
inputs:
|
||||
host: 127.0.0.1
|
||||
port: 27017
|
||||
- name: wait mysql ready
|
||||
uses: actions/mysql-scripts
|
||||
inputs:
|
||||
host: hub_mysql
|
||||
user: test
|
||||
password: test
|
||||
commands:
|
||||
- mysql -u test -ptest -h hub_mysql -P 3306 -e 'show databases;'
|
||||
# 服务发现
|
||||
- id: consul
|
||||
uses: actions/setup-consul
|
||||
- name: Test Coverage
|
||||
id: test
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js test:cov -v
|
||||
# https://bytedance.feishu.cn/wiki/wikcn9Z4azEdfJalVPKcOs9vxsR
|
||||
|
||||
security_scan:
|
||||
<<: *base_job
|
||||
name: Security Scan
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-master-v2-scan
|
||||
size: 256
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: build
|
||||
commands:
|
||||
- CUSTOM_VERSION=release REGION=sg node common/scripts/install-run-rush.js build -o app-botstudio-main -v
|
||||
- id: Argus
|
||||
commands:
|
||||
- npm i @ies/argus-scan@0.30.37 -g
|
||||
- bash .codebase/scripts/argus-scan.sh
|
||||
@ -1,89 +0,0 @@
|
||||
name: CI@fe-tsc
|
||||
trigger:
|
||||
manual:
|
||||
change:
|
||||
# 临时支持 project-ide 项目需求,临时修改为如下格式
|
||||
# 后续需调整回 integration/**
|
||||
types: [create, push, restore]
|
||||
paths:
|
||||
- "frontend/**"
|
||||
notification:
|
||||
when: failure
|
||||
|
||||
jobs:
|
||||
ts_check: &base_job
|
||||
runs-on:
|
||||
env: online
|
||||
image: hub.byted.org/base/bot_monorepo_ci_env:ae543e9bbc6d8155cffbd8f5ed27fb73
|
||||
# 从最近的 CI 执行记录看,install 步骤有概率会等待超时
|
||||
# 目前已 oncall,这里先设置一个超时时间,避免阻塞
|
||||
timeout: 30
|
||||
if: ${{ !Event.Change.IsPreSubmit }}
|
||||
envs:
|
||||
targetBranch: ${{Event.Change.Target.Branch}}
|
||||
RUSH_BUILD_CACHE_WRITE_ALLOWED: ${{RUSH_BUILD_CACHE_WRITE_ALLOWED}}
|
||||
RUSH_BUILD_CACHE_ENABLED: ${{RUSH_BUILD_CACHE_ENABLED}}
|
||||
RUSH_BUILD_CACHE_CREDENTIAL: ${{RUSH_BUILD_CACHE_CREDENTIAL}}
|
||||
ACCESS_TOKEN: ${{CI_BOT_ACCESS_TOKEN}}
|
||||
CI: 'true'
|
||||
RUN_BYTEST_COV: 'false'
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 'true'
|
||||
CYPRESS_INSTALL_BINARY: '0'
|
||||
TAIKO_SKIP_CHROMIUM_DOWNLOAD: '0'
|
||||
RE2_DOWNLOAD_SKIP_PATH: '1'
|
||||
RE2_DOWNLOAD_MIRROR: https://bnpm.bytedance.net/mirrors
|
||||
MERGE_REQUEST_TITLE: ${{Event.Change.Title}}
|
||||
TSESTREE_SINGLE_RUN: 'true'
|
||||
steps:
|
||||
- &checkout_step
|
||||
name: Checkout
|
||||
uses: actions/checkout
|
||||
inputs:
|
||||
submodules: true
|
||||
depth: 1
|
||||
|
||||
- &proxy_step
|
||||
name: SetupProxy
|
||||
commands:
|
||||
- bash .codebase/scripts/env.sh
|
||||
|
||||
- &remote_info_step
|
||||
id: RemoteInfo
|
||||
uses: 'actions/mr-remote-info'
|
||||
inputs:
|
||||
info_list: ['behind_commits', 'changed_files', 'changed_files_path']
|
||||
|
||||
- &cache_step
|
||||
id: Cache
|
||||
uses: actions/cache
|
||||
inputs:
|
||||
key: flow-monorepo-${{Event.Change.Source.Branch}}
|
||||
paths:
|
||||
- common/temp/pnpm-store
|
||||
restore_keys:
|
||||
- flow-monorepo-${{Event.Change.Source.Branch}}
|
||||
- flow-monorepo-store-master
|
||||
|
||||
- &init_env_step
|
||||
id: InitEnv
|
||||
name: Initialization
|
||||
commands:
|
||||
- printenv
|
||||
- git config user.name ci_flow
|
||||
- git config user.email ci_flow@bytedance.com
|
||||
- npm config set registry=https://registry.npmjs.org
|
||||
- pnpm config set network-concurrency 32
|
||||
- echo "$(<${{Steps.RemoteInfo.Outputs.changed_files_path}})"
|
||||
- echo "::set-output name=ShouldRunBuild::${{ Event.Change.IsPreSubmit || int(Steps.RemoteInfo.Outputs.behind_commits) <= 6 }}"
|
||||
|
||||
- &install_deps_step
|
||||
name: Install dependencies
|
||||
commands:
|
||||
- npx why-is-node-running@v2.x common/scripts/install-run-rush.js increment --action install -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
|
||||
- name: Prepare basic packages
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js pre-build -v
|
||||
- name: Check TS Type
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js increment --action ts-check -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
@ -1,184 +0,0 @@
|
||||
name: CI@fe
|
||||
trigger:
|
||||
manual:
|
||||
change:
|
||||
source-branches: ['!release/**', '!task/**']
|
||||
types: [create, push, restore]
|
||||
paths:
|
||||
- "frontend/**"
|
||||
notification:
|
||||
when: failure
|
||||
|
||||
jobs:
|
||||
lint: &base_job
|
||||
runs-on:
|
||||
env: online
|
||||
image: hub.byted.org/base/bot_monorepo_ci_env:ae543e9bbc6d8155cffbd8f5ed27fb73
|
||||
# 从最近的 CI 执行记录看,install 步骤有概率会等待超时
|
||||
# 目前已 oncall,这里先设置一个超时时间,避免阻塞
|
||||
timeout: 30
|
||||
if: ${{ !Event.Change.IsPreSubmit }}
|
||||
envs:
|
||||
targetBranch: ${{Event.Change.Target.Branch}}
|
||||
RUSH_BUILD_CACHE_WRITE_ALLOWED: ${{RUSH_BUILD_CACHE_WRITE_ALLOWED}}
|
||||
RUSH_BUILD_CACHE_ENABLED: ${{RUSH_BUILD_CACHE_ENABLED}}
|
||||
RUSH_BUILD_CACHE_CREDENTIAL: ${{RUSH_BUILD_CACHE_CREDENTIAL}}
|
||||
ACCESS_TOKEN: ${{CI_BOT_ACCESS_TOKEN}}
|
||||
CI: 'true'
|
||||
RUN_BYTEST_COV: 'false'
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 'true'
|
||||
CYPRESS_INSTALL_BINARY: '0'
|
||||
TAIKO_SKIP_CHROMIUM_DOWNLOAD: '0'
|
||||
BUILD_BRANCH: ${{Event.Change.Source.Branch}}
|
||||
RE2_DOWNLOAD_SKIP_PATH: '1'
|
||||
MERGE_REQUEST_TITLE: ${{Event.Change.Title}}
|
||||
TSESTREE_SINGLE_RUN: 'true'
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-ci-v2-lint
|
||||
size: 256
|
||||
steps:
|
||||
- &checkout_step
|
||||
name: Checkout
|
||||
uses: actions/checkout
|
||||
inputs:
|
||||
submodules: true
|
||||
depth: 1
|
||||
|
||||
- &proxy_step
|
||||
name: SetupProxy
|
||||
commands:
|
||||
- bash .codebase/scripts/env.sh
|
||||
|
||||
- &remote_info_step
|
||||
id: RemoteInfo
|
||||
uses: 'actions/mr-remote-info'
|
||||
inputs:
|
||||
info_list: ['behind_commits', 'changed_files', 'changed_files_path']
|
||||
|
||||
- &cache_step
|
||||
id: Cache
|
||||
uses: actions/cache
|
||||
inputs:
|
||||
key: flow-monorepo-${{Event.Change.Source.Branch}}
|
||||
paths:
|
||||
- common/temp/pnpm-store
|
||||
- packages/arch/idl/src/auto-generated
|
||||
restore_keys:
|
||||
- flow-monorepo-${{Event.Change.Source.Branch}}
|
||||
- flow-monorepo-store-master
|
||||
|
||||
- &init_env_step
|
||||
id: InitEnv
|
||||
name: Initialization
|
||||
commands:
|
||||
- printenv
|
||||
- git config user.name ci_flow
|
||||
- git config user.email ci_flow@bytedance.com
|
||||
- npm config set registry=https://registry.npmjs.org
|
||||
- pnpm config set network-concurrency 32
|
||||
- echo "$(<${{Steps.RemoteInfo.Outputs.changed_files_path}})"
|
||||
- echo "::set-output name=ShouldRunBuild::${{ Event.Change.IsPreSubmit || int(Steps.RemoteInfo.Outputs.behind_commits) <= 6 }}"
|
||||
|
||||
- &install_deps_step
|
||||
name: Install dependencies
|
||||
commands:
|
||||
- npx why-is-node-running@v2.x common/scripts/install-run-rush.js increment --action install -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
|
||||
- name: Check Lint
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js increment --action lint -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
|
||||
style_check:
|
||||
<<: *base_job
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-ci-v2-style-check
|
||||
size: 256
|
||||
name: Check Stylelint
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *remote_info_step
|
||||
- *cache_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: Check Stylelint
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js increment --action style -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
|
||||
build:
|
||||
<<: *base_job
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-ci-v2-build
|
||||
size: 256
|
||||
name: Build
|
||||
timeout: 20
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *remote_info_step
|
||||
- *cache_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: Build
|
||||
id: build
|
||||
if: ${{ Steps.InitEnv.Outputs.ShouldRunBuild }}
|
||||
commands:
|
||||
- node common/scripts/install-run-rush.js increment --action build -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
|
||||
test:
|
||||
<<: *base_job
|
||||
caches:
|
||||
- backend: ebs
|
||||
key: bot-studio-monorepo-ci-v2-test
|
||||
size: 256
|
||||
name: Test Coverage
|
||||
services:
|
||||
# 下面启动一个mysql和mongo服务,主要用于coze.hub.core相关服务的集成测试
|
||||
# id需要保持跟代码中连接的host一致
|
||||
- id: hub_mysql
|
||||
image: hub.byted.org/ee/mysql:5.7
|
||||
envs:
|
||||
MYSQL_ROOT_PASSWORD: test
|
||||
MYSQL_DATABASE: coze_hub
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
MYSQL_TCP_PORT: 3306
|
||||
- id: hub_mongo
|
||||
image: hub.byted.org/ee/mongo:4.0.24
|
||||
commands:
|
||||
- mongod --replSet rs0
|
||||
- id: mongo-init
|
||||
image: hub.byted.org/ee/mongo:4.0.24
|
||||
commands:
|
||||
- sleep 10s
|
||||
- mongo mongodb://127.0.0.1:27017 --eval 'rs.initiate()'
|
||||
steps:
|
||||
- *checkout_step
|
||||
- *proxy_step
|
||||
- *remote_info_step
|
||||
- *cache_step
|
||||
- *init_env_step
|
||||
- *install_deps_step
|
||||
- name: wait mongo ready
|
||||
uses: actions/mongodb-scripts
|
||||
inputs:
|
||||
host: 127.0.0.1
|
||||
port: 27017
|
||||
- name: wait mysql ready
|
||||
uses: actions/mysql-scripts
|
||||
inputs:
|
||||
host: hub_mysql
|
||||
user: test
|
||||
password: test
|
||||
commands:
|
||||
- mysql -u test -ptest -h hub_mysql -P 3306 -e 'show databases;'
|
||||
# 服务发现
|
||||
- id: consul
|
||||
uses: actions/setup-consul
|
||||
- name: Test Coverage
|
||||
commands:
|
||||
- git fetch --filter=blob:none --unshallow -q
|
||||
- node common/scripts/install-run-rush.js increment --action test:cov -p ${{Steps.RemoteInfo.Outputs.changed_files_path}}
|
||||
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# 暂时只扫描 app-botstudio-main 项目的产物
|
||||
result=$(argus scm -c apps/bot/dist_sg/static -n obric/cloud/bot_studio_oversea -l)
|
||||
|
||||
if echo "$result" | grep -q '::add-message level=error:::'; then
|
||||
if [ "$CI" ]; then
|
||||
echo '::add-message level=info::本地验证命令:`npm install -g @ies/argus-scan@0.30.37 && REGION=sg CUSTOM_VERSION=release rush build -o app-botstudio-main && argus scm -c apps/bot/dist_sg/static -n obric/cloud/bot_studio_oversea -l`'
|
||||
fi
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
SOURCE_BRANCH=${SOURCE_BRANCH}
|
||||
TARGET_BRANCH=${targetBranch}
|
||||
|
||||
if [[ $TARGET_BRANCH == "master" && !($SOURCE_BRANCH =~ ^release/ || $SOURCE_BRANCH =~ ^hotfix/ || $SOURCE_BRANCH =~ ^task/ || $SOURCE_BRANCH =~ ^fix/) ]]; then
|
||||
# 检查$SOURCE_BRANCH是否以'release/'或'hotfix/'或'task/'或'fix/'开头
|
||||
LATEST_BRANCH="release/$(date -d '+8 hour' +%Y%m%d)"
|
||||
CONCLUSION="{\"name\": \"Target Branch\", \"conclusion\": \"failed\", \"output\":{\"summary\":\"Error: Please don't merge to master directly, use [$LATEST_BRANCH](https://code.byted.org/obric/bot-studio-monorepo/commits/$LATEST_BRANCH) instead.\n You can contact [@fanwenjie.fe](https://code.byted.org/fanwenjie.fe) to skip this error.\" }}"
|
||||
else
|
||||
CONCLUSION="{\"name\": \"Target Branch\", \"conclusion\": \"success\", \"output\":{\"summary\":\"Good Pratice\" }}"
|
||||
fi
|
||||
|
||||
echo $CONCLUSION >>check-merge-target.log
|
||||
echo "::update-check-run::check-merge-target.log"
|
||||
@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# Your target branch
|
||||
TARGET_BRANCH=$targetBranch
|
||||
|
||||
if [[ ${SOURCE_BRANCH} =~ ^integration/ || ${SOURCE_BRANCH} =~ ^release/ ]]; then
|
||||
# integration -> xxx or release/xxx -> master SKIP check-mr-size.
|
||||
echo "::add-message level=info::SKIP check-mr-size"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Specify the pattern you want to exclude, using *space* as the separator
|
||||
EXCLUDE_PATTERNS=(
|
||||
'**/pnpm-lock.yaml'
|
||||
'packages/arch/bot-api/src/auto-generate/**'
|
||||
'apps/bot-op/src/services/bam-auto-generate/**'
|
||||
'apps/prompt-platform/src/services/auto-generate/**'
|
||||
"**/lib/**"
|
||||
"**/.*/**"
|
||||
'**/__tests__/**'
|
||||
'**/__test__/**'
|
||||
"**/__mocks__/**"
|
||||
"**/__mock__/**"
|
||||
"**/*.test.*/**"
|
||||
"**/*.spec.*/**"
|
||||
"**/__snapshots__/**"
|
||||
"**/*.snap"
|
||||
'**/*.svg'
|
||||
'ee/e2e/bot-studio/**'
|
||||
'common/changes/**'
|
||||
'apps/fornax/**'
|
||||
"apps/api-builder/**"
|
||||
"packages/api-builder/**"
|
||||
)
|
||||
|
||||
for pattern in "${EXCLUDE_PATTERNS[@]}"; do
|
||||
EXCLUDE_STRING+=":(exclude)$pattern "
|
||||
done
|
||||
|
||||
# Count the number of files changed but exclude certain files and folders
|
||||
file_changes=$(git diff --name-only "origin/$TARGET_BRANCH..." $EXCLUDE_STRING | wc -l)
|
||||
|
||||
# Count the number of line changes but exclude certain files and folders
|
||||
line_changes=$(git diff --shortstat "origin/$TARGET_BRANCH..." $EXCLUDE_STRING | awk '{print ($4>$6)?$4:$6}')
|
||||
|
||||
# Check if number of changed files is greater than 100 or if number of line changes is greater than 2000
|
||||
if [ "$file_changes" -gt 100 ] || [ "$line_changes" -gt 2000 ]; then
|
||||
CONCLUSION="{\"name\": \"MR Size\", \"conclusion\": \"failed\", \"output\":{\"summary\":\"Error: Too many changes. Number of changed files is **""$file_changes""**, number of changed lines is **""$line_changes""**.\n You can contact [@fanwenjie.fe](https://code.byted.org/fanwenjie.fe) to skip this error.\" }}"
|
||||
else
|
||||
CONCLUSION="{\"name\": \"MR Size\", \"conclusion\": \"success\", \"output\":{\"summary\":\"Good\" }}"
|
||||
fi
|
||||
|
||||
echo $CONCLUSION >>check-mr-size.log
|
||||
echo "::update-check-run::check-mr-size.log"
|
||||
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
PRE_COMMITS=$1
|
||||
|
||||
# 按 codebase 给出的口径,pre commits 超过 5 时容易导致 rebase 失败,因此主动给出警告,避免进入 CQ 后被弹出
|
||||
if [ $PRE_COMMITS -gt 5 ]; then
|
||||
CONCLUSION="{\"name\": \"Pre Commits Check\", \"conclusion\": \"failed\", \"output\":{\"summary\":\"分支已落后目标分支较多,非常容易导致进入 CQ 后被弹出,请执行 rebase/merge 同步代码后重试。\" }}"
|
||||
else
|
||||
CONCLUSION="{\"name\": \"Pre Commits Check\", \"conclusion\": \"success\", \"output\":{\"summary\":\"good\" }}"
|
||||
fi
|
||||
|
||||
echo $CONCLUSION >> check-pre-commits.log
|
||||
echo "::update-check-run::check-pre-commits.log"
|
||||
@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
basename=$(basename "$CHANGE_URL")
|
||||
lastParam=$(echo "$basename" | cut -d'/' -f1)
|
||||
|
||||
targetBranch="${targetBranch}"
|
||||
sourceBranch="${SOURCE_BRANCH}"
|
||||
mrTitle="${MR_TITLE}"
|
||||
mrDescription="${MR_DESCRIPTION}"
|
||||
|
||||
echo "::set-output name=mrId::$lastParam" # 输出 lastParam 的值
|
||||
|
||||
result=$(curl --location "https://code.byted.org/api/v4/projects/548801/merge_requests/$lastParam" \
|
||||
--header "Private-Token: $GITLAB_TOKEN")
|
||||
|
||||
commits=$(curl --location "https://code.byted.org/api/v4/projects/548801/merge_requests/$lastParam/commits" \
|
||||
--header "Private-Token: $GITLAB_TOKEN")
|
||||
|
||||
isSquash=$(echo "$result" | jq -r '.squash') # 使用jq提取isSquash的值
|
||||
|
||||
commitsCount=$(echo "$commits" | jq length)
|
||||
|
||||
echo "::set-output name=squash::$isSquash" # 输出 isSquash 的值
|
||||
echo "::set-output name=commitsCount::$commitsCount" # 输出 commitsCount 的值
|
||||
|
||||
if [[ $isSquash == true ]]; then
|
||||
# 勾选squash
|
||||
|
||||
if [[ $sourceBranch == release/* && $targetBranch == master ]]; then
|
||||
echo "::add-message level=error::**release 分支合入 master 时,不可开启 squash **"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $mrDescription == \[no-squash\]* ]]; then
|
||||
echo "::add-message level=error::**当前 MR 勾选了 Squash 选项,但是描述中包含[no-squash]**"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
# 没有勾选squash
|
||||
|
||||
if [[ $mrDescription == \[no-squash\]* ||
|
||||
$commitsCount -le 1 ||
|
||||
$mrTitle == WIP:* ||
|
||||
$mrTitle == wip:* ||
|
||||
$sourceBranch == release/* ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "::add-message level=error::**当前 MR 应该勾选 Squash 选项**"
|
||||
exit 1
|
||||
|
||||
fi
|
||||
@ -1,53 +0,0 @@
|
||||
const fs = require('fs/promises');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
|
||||
// node scripts/checksum-by-change.js /usr/changed-path.json
|
||||
// change-path 文件来自 ci
|
||||
const changedPath = process.argv[2];
|
||||
const readJson = async jsonFile => {
|
||||
const content = await fs.readFile(jsonFile, 'utf-8');
|
||||
let _val = null;
|
||||
try {
|
||||
eval(`_val = ${content}`);
|
||||
return _val;
|
||||
} catch (e) {
|
||||
console.error(`json parse failure: `, e);
|
||||
}
|
||||
};
|
||||
|
||||
const readChangedPackages = async changedPath => {
|
||||
const [changedFiles, { projects }] = await Promise.all([
|
||||
readJson(changedPath),
|
||||
readJson(path.resolve(__dirname, '../../rush.json')),
|
||||
]);
|
||||
const changedProjects = projects
|
||||
.filter(project => {
|
||||
const { projectFolder } = project;
|
||||
const endsWithSlash = projectFolder.endsWith('/');
|
||||
const compareFolder = `${projectFolder}${endsWithSlash ? '' : '/'}`;
|
||||
if (!changedFiles) {
|
||||
// changed-path.json 内容可能为null
|
||||
return true;
|
||||
}
|
||||
const matched = changedFiles.find(file => file.startsWith(compareFolder));
|
||||
return !!matched;
|
||||
})
|
||||
.map(({ packageName }) => packageName)
|
||||
.sort((r1, r2) => r1.localeCompare(r2));
|
||||
return changedProjects;
|
||||
};
|
||||
|
||||
async function main() {
|
||||
if (!changedPath || changedPath.length <= 0) {
|
||||
throw new Error(`Please pass the correct "changedPath" path`);
|
||||
}
|
||||
const changedPackages = await readChangedPackages(changedPath);
|
||||
|
||||
const hash = crypto.createHash('md5');
|
||||
changedPackages.forEach(r => hash.update(r));
|
||||
const hashValue = hash.digest('hex');
|
||||
console.log(`::set-output name=hash::${hashValue}`);
|
||||
}
|
||||
|
||||
main();
|
||||
@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo ::set-env name=no_proxy::cn.goofy.app,.cn.goofy.app,goofy.app,.goofy.app,localhost,.byted.org,byted.org,.bytedance.net,bytedance.net,127.0.0.1,127.0.0.0/8,169.254.0.0/16,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16,10.0.0.0/8,::1,fe80::/10,fd00::/8
|
||||
echo ::set-env name=all_proxy::http://sys-proxy-rd-relay.byted.org:3128
|
||||
echo ::set-env name=http_proxy::http://sys-proxy-rd-relay.byted.org:3128
|
||||
echo ::set-env name=https_proxy::http://sys-proxy-rd-relay.byted.org:3128
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Setup common env for CI & SCM
|
||||
# 1. 忽略不影响构建的 install
|
||||
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true
|
||||
export CYPRESS_INSTALL_BINARY=0
|
||||
export TAIKO_SKIP_CHROMIUM_DOWNLOAD=0
|
||||
export CUSTOM_VERSION="inhouse"
|
||||
export RE2_DOWNLOAD_SKIP_PATH=1
|
||||
export RE2_DOWNLOAD_MIRROR="https://bnpm.bytedance.net/mirrors"
|
||||
export PUPPETEER_SKIP_DOWNLOAD=true
|
||||
|
||||
# 2. 在 CI 环境生效:
|
||||
echo ::set-env name=PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD::$PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
|
||||
echo ::set-env name=CYPRESS_INSTALL_BINARY::$CYPRESS_INSTALL_BINARY
|
||||
echo ::set-env name=TAIKO_SKIP_CHROMIUM_DOWNLOAD::$TAIKO_SKIP_CHROMIUM_DOWNLOAD
|
||||
echo ::set-env name=RE2_DOWNLOAD_SKIP_PATH::$RE2_DOWNLOAD_SKIP_PATH
|
||||
echo ::set-env name=RE2_DOWNLOAD_MIRROR::$RE2_DOWNLOAD_MIRROR
|
||||
echo ::set-env name=PUPPETEER_SKIP_DOWNLOAD::$PUPPETEER_SKIP_DOWNLOAD
|
||||
@ -10,7 +10,6 @@ EXCLUDE_PATTERNS=(
|
||||
'packages/arch/bot-api/src/auto-generate/**'
|
||||
'apps/bot-op/src/services/bam-auto-generate/**'
|
||||
'apps/prompt-platform/src/services/auto-generate/**'
|
||||
".cursor/api/**"
|
||||
"**/lib/**"
|
||||
"**/.*/**"
|
||||
'**/__tests__/**'
|
||||
@ -24,9 +23,7 @@ EXCLUDE_PATTERNS=(
|
||||
'**/e2e/**'
|
||||
'common/changes/**'
|
||||
'apps/fornax/**',
|
||||
"packages/arch/semi-theme-hand01",
|
||||
"packages/arch/arco-icon",
|
||||
"packages/arch/resources/**"
|
||||
"packages/arch/semi-theme-hand01"
|
||||
)
|
||||
|
||||
for pattern in "${EXCLUDE_PATTERNS[@]}"; do
|
||||
@ -34,13 +34,13 @@ const (
|
||||
type RunEvent string
|
||||
|
||||
const (
|
||||
RunEventCreated RunEvent = "conversation.run.created"
|
||||
RunEventInProgress RunEvent = "conversation.run.in_progress"
|
||||
RunEventCompleted RunEvent = "conversation.run.completed"
|
||||
RunEventFailed RunEvent = "conversation.run.failed"
|
||||
RunEventExpired RunEvent = "conversation.run.expired"
|
||||
RunEventCancelled RunEvent = "conversation.run.cancelled"
|
||||
RunEventRequiredAction RunEvent = "conversation.run.required_action"
|
||||
RunEventCreated RunEvent = "conversation.chat.created"
|
||||
RunEventInProgress RunEvent = "conversation.chat.in_progress"
|
||||
RunEventCompleted RunEvent = "conversation.chat.completed"
|
||||
RunEventFailed RunEvent = "conversation.chat.failed"
|
||||
RunEventExpired RunEvent = "conversation.chat.expired"
|
||||
RunEventCancelled RunEvent = "conversation.chat.cancelled"
|
||||
RunEventRequiredAction RunEvent = "conversation.chat.required_action"
|
||||
|
||||
RunEventMessageDelta RunEvent = "conversation.message.delta"
|
||||
RunEventMessageCompleted RunEvent = "conversation.message.completed"
|
||||
|
||||
@ -23,5 +23,5 @@ if [ "$PRE_LINT" != "1" ]; then
|
||||
node common/scripts/install-run-rush.js fix-ts-refers --use-cached-files --shallow --submit-changes
|
||||
# node infra/commanders/fix-peer-deps/bin/main.js fix --use-cached-files -s
|
||||
node common/scripts/install-run-rush.js -q lint-staged || exit $?
|
||||
bash .codebase/scripts/check-file-size.sh || exit $?
|
||||
bash .github/scripts/check-file-size.sh || exit $?
|
||||
fi
|
||||
|
||||
Binary file not shown.
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import { defineConfig } from '@coze-arch/rsbuild-config';
|
||||
@ -103,8 +103,6 @@ const mergedConfig = defineConfig({
|
||||
/\/node_modules\/(marked|@dagrejs|@tanstack)\//,
|
||||
],
|
||||
alias: {
|
||||
// TODO: fixme late,开源之前需要干掉这个
|
||||
'@slardar/web/client': '@slardar/web/cn',
|
||||
'@coze-arch/foundation-sdk': require.resolve(
|
||||
'@coze-foundation/foundation-sdk',
|
||||
),
|
||||
|
||||
@ -42,6 +42,7 @@ module.exports = [
|
||||
'**/es/**',
|
||||
'**/lib/**',
|
||||
'**/.codebase/**',
|
||||
'**/.github/**',
|
||||
'**/.changeset/**',
|
||||
'**/config/**',
|
||||
'**/common/scripts/**',
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @coze-arch/max-line-per-function */
|
||||
import { NavLink, useParams } from 'react-router-dom';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
@ -47,8 +47,8 @@ import {
|
||||
type ConnectResultInfo,
|
||||
} from '@coze-agent-ide/space-bot';
|
||||
|
||||
import styles from '../index.module.less';
|
||||
import { PublishResultArea } from './component/publish-result-area';
|
||||
import styles from '../index.module.less';
|
||||
|
||||
interface PublishResultProps {
|
||||
// 隐藏Banner
|
||||
@ -190,7 +190,6 @@ export const PublishResult = ({
|
||||
type: IntelligenceType.Bot,
|
||||
spaceId: String(spaceId),
|
||||
intelligenceId: String(botId),
|
||||
// 开源版暂不支持该功能
|
||||
enable: FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE,
|
||||
});
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ const ToolHeader: FC<ToolHeaderProps> = ({
|
||||
/>
|
||||
<span className={s.title}>{I18n.t('plugin_edit_tool_title')}</span>
|
||||
<OauthButtonAction />
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{FLAGS['bot.devops.plugin_mockset'] ? (
|
||||
<Tooltip
|
||||
style={{ display: mocksetDisabled ? 'block' : 'none' }}
|
||||
|
||||
@ -13,12 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { createContext, useContext } from 'react';
|
||||
|
||||
export enum BotCreatorScene {
|
||||
Bot = 'bot',
|
||||
/** 开源版暂不支持该功能 */
|
||||
DouyinBot = 'douyin-bot',
|
||||
}
|
||||
|
||||
|
||||
@ -144,7 +144,7 @@ export const MoreMenuButton: FC = () => {
|
||||
spaceId,
|
||||
enable:
|
||||
showPublishManageMenu &&
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
FLAGS['bot.studio.publish_management'] &&
|
||||
!IS_OPEN_SOURCE,
|
||||
});
|
||||
@ -172,7 +172,7 @@ export const MoreMenuButton: FC = () => {
|
||||
<Dropdown
|
||||
render={
|
||||
<Dropdown.Menu mode="menu">
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{showPublishManageMenu &&
|
||||
FLAGS['bot.studio.publish_management'] &&
|
||||
!IS_OPEN_SOURCE
|
||||
@ -196,7 +196,7 @@ export const MoreMenuButton: FC = () => {
|
||||
: null}
|
||||
{hideOpenIn ? null : (
|
||||
<>
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{showPublishManageMenu &&
|
||||
FLAGS['bot.studio.publish_management'] &&
|
||||
!IS_OPEN_SOURCE ? (
|
||||
|
||||
@ -154,7 +154,6 @@ export function ModelOption({
|
||||
{model.name}
|
||||
</Typography.Title>
|
||||
<div className="shrink-0 flex gap-[6px]">
|
||||
{/* 抖音分身场景下不展示改 tag,开源版暂不支持该功能 */}
|
||||
{model.model_status_details?.is_free_model &&
|
||||
scene !== BotCreatorScene.DouyinBot ? (
|
||||
<Tag size="mini" color="primary" className="!coz-mg-plus">
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { uniq } from 'lodash-es';
|
||||
import { useRequest } from 'ahooks';
|
||||
import { useMultiAgentStore } from '@coze-studio/bot-detail-store/multi-agent';
|
||||
@ -60,7 +60,6 @@ export const useGetModelList = () => {
|
||||
const res = await SpaceApi.GetTypeList({
|
||||
cur_model_ids: expectedIdList,
|
||||
model: true,
|
||||
// 开源版暂不支持该功能
|
||||
...(scene === BotCreatorScene.DouyinBot && {
|
||||
model_scene: ModelScene.Douyin,
|
||||
}),
|
||||
|
||||
@ -70,7 +70,7 @@ const useAgentSkillPluginSettingModalController = (
|
||||
},
|
||||
{
|
||||
refreshDeps: [commonParams],
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
ready: visible && FLAGS['bot.devops.plugin_mockset'],
|
||||
},
|
||||
);
|
||||
|
||||
@ -73,7 +73,7 @@ const usePartMainController = (pluginInfo: PluginInfoForPlayground) => {
|
||||
value: PARA.toLowerCase(),
|
||||
},
|
||||
];
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
if (FLAGS['bot.devops.plugin_mockset']) {
|
||||
keyOptions.unshift({
|
||||
label: I18n.t('bot_ide_plugin_setting_modal_mockset_tab'),
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import cls from 'classnames';
|
||||
import { useBotInfoStore } from '@coze-studio/bot-detail-store/bot-info';
|
||||
@ -99,7 +99,7 @@ const AgentIdePrompt = (props: AgentIdePromptProps) => {
|
||||
librarys={libraryList}
|
||||
onAddLibrary={addLibrary}
|
||||
spaceId={space_id}
|
||||
// Agent IDE 在抖音分身场景下,需要传入分身id进行判断当前资源是否存在 开源版暂不支持该功能
|
||||
// Agent IDE 在抖音分身场景下,需要传入分身id进行判断当前资源是否存在
|
||||
avatarBotId={
|
||||
businessType === BusinessType.DouyinAvatar ? botId : undefined
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ export function ChangeButton({
|
||||
}: ChangeButtonProps) {
|
||||
const [FLAGS] = useFlags();
|
||||
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
const showText = modeInfo?.showText || FLAGS['bot.studio.prompt_diff'];
|
||||
const ToolTipFragment = tooltip ? Tooltip : React.Fragment;
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, {
|
||||
useEffect,
|
||||
useMemo,
|
||||
@ -133,7 +133,6 @@ export const OnboardingMessage = forwardRef<
|
||||
initValues={onboardingContent}
|
||||
isReadonly={isReadonly}
|
||||
isGenerating={isLoading}
|
||||
// 开源版暂不支持该功能
|
||||
plainText={scene === BotCreatorScene.DouyinBot}
|
||||
onChange={submitEditor}
|
||||
onBlur={() => {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type SetStateAction } from 'react';
|
||||
|
||||
import { type PluginPricingRule } from '@coze-arch/bot-api/plugin_develop';
|
||||
@ -98,6 +98,6 @@ export interface PublisherBotInfo {
|
||||
hasPublished?: boolean;
|
||||
// 收费插件列表
|
||||
pluginPricingRules?: Array<PluginPricingRule>;
|
||||
// 业务类型 DouyinAvatar=1 抖音分身 开源版暂不支持该功能
|
||||
// 业务类型 DouyinAvatar=1 抖音分身
|
||||
businessType?: BusinessType;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import eventEmitter from 'eventemitter3';
|
||||
|
||||
vi.stubGlobal('IS_OVERSEA', false);
|
||||
@ -54,9 +54,6 @@ export const testSetup = () => {
|
||||
}),
|
||||
})),
|
||||
}));
|
||||
vi.mock('@slardar/web/client', () => ({
|
||||
createMinimalBrowserClient: vi.fn(),
|
||||
}));
|
||||
// mock上传插件实现
|
||||
vi.mock('../src/plugins/upload-plugin', () => ({
|
||||
ChatCoreUploadPlugin: class {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { devtools } from 'zustand/middleware';
|
||||
import { create } from 'zustand';
|
||||
import {
|
||||
@ -28,7 +28,6 @@ interface ICommonConfig {
|
||||
homeBannerTask?: Array<HomeBannerDisplay>;
|
||||
quickStart?: Array<QuickStartConfig>;
|
||||
oceanProjectSpaces?: Array<string>;
|
||||
/** 开源版暂不支持该功能 */
|
||||
douyinAvatarSpaces?: Array<string>;
|
||||
}
|
||||
export interface ICommonConfigStoreState {
|
||||
|
||||
@ -134,7 +134,7 @@ export const DynamicChatList = ({
|
||||
!!canEdit &&
|
||||
!!list?.length &&
|
||||
!inBatch &&
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
FLAGS['bot.automation.conversation_batch_delete'];
|
||||
const exitBatch = () => {
|
||||
setInBatch(false);
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useState, useCallback } from 'react';
|
||||
|
||||
import classnames from 'classnames';
|
||||
@ -90,7 +90,7 @@ export const Configuration = () => {
|
||||
onClick={handleSwitchExpand}
|
||||
/>
|
||||
</div>
|
||||
{/* The community version does not currently support conversation management in project, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<div
|
||||
className={classnames(
|
||||
|
||||
@ -99,7 +99,7 @@ export const GlobalHandler = ({
|
||||
|
||||
useWsListener((props: WsMessageProps) => {
|
||||
if (
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
!FLAGS['bot.automation.project_multi_tab'] ||
|
||||
!leftPanelResourceType.includes(props.bizType)
|
||||
) {
|
||||
|
||||
@ -65,7 +65,7 @@ const PrimarySidebarCore = ({
|
||||
>
|
||||
<div className={styles.title}>
|
||||
{I18n.t('project_resource_sidebar_title')}
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{FLAGS['bot.automation.dependency_tree'] ? (
|
||||
<>
|
||||
<Button
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import 'reflect-metadata';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import React, { useMemo, memo } from 'react';
|
||||
@ -73,7 +73,7 @@ const ProjectIDE: React.FC<ProjectIDEProps> = memo(
|
||||
() => ({
|
||||
view: {
|
||||
widgetRegistries: [
|
||||
// The community version does not currently support conversation management in project, for future expansion
|
||||
// will support soon
|
||||
...(IS_OPEN_SOURCE ? [] : [ConversationRegistry]),
|
||||
WorkflowWidgetRegistry,
|
||||
DatabaseWidgetRegistry,
|
||||
|
||||
@ -77,12 +77,12 @@ export const ModelOptionItem: React.FC<OptionItemProps> = ({
|
||||
const tags: OptionItemTag[] = [];
|
||||
|
||||
const shouldShowEndPoint = showEndPointName && endPointName;
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
const displayName = FLAGS['bot.studio.model_select_switch_end_point_name_pos']
|
||||
? endPointName || name
|
||||
: name;
|
||||
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
const displayEndPointName = FLAGS[
|
||||
'bot.studio.model_select_switch_end_point_name_pos'
|
||||
]
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable max-lines */
|
||||
/* eslint-disable max-lines-per-function */
|
||||
@ -37,15 +37,6 @@ import { useCurrentEnterpriseInfo } from '@coze-foundation/enterprise-store-adap
|
||||
import { PictureUpload } from '@coze-common/biz-components/picture-upload';
|
||||
import { logger } from '@coze-arch/logger';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { safeJSONParse } from '@coze-arch/bot-utils';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
import {
|
||||
type PrivateLink,
|
||||
type commonParamSchema,
|
||||
} from '@coze-arch/bot-api/plugin_develop';
|
||||
import { FileBizType, IconType } from '@coze-arch/bot-api/developer_api';
|
||||
import { DeveloperApi, PluginDevelopApi } from '@coze-arch/bot-api';
|
||||
import { InfoPopover } from '@coze-agent-ide/bot-plugin-tools/infoPopover';
|
||||
import { IconCozPlus, IconCozTrashCan } from '@coze-arch/coze-design/icons';
|
||||
import {
|
||||
Cascader,
|
||||
@ -60,6 +51,15 @@ import {
|
||||
Typography,
|
||||
withField,
|
||||
} from '@coze-arch/coze-design';
|
||||
import { safeJSONParse } from '@coze-arch/bot-utils';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
import {
|
||||
type PrivateLink,
|
||||
type commonParamSchema,
|
||||
} from '@coze-arch/bot-api/plugin_develop';
|
||||
import { FileBizType, IconType } from '@coze-arch/bot-api/developer_api';
|
||||
import { DeveloperApi, PluginDevelopApi } from '@coze-arch/bot-api';
|
||||
import { InfoPopover } from '@coze-agent-ide/bot-plugin-tools/infoPopover';
|
||||
|
||||
import {
|
||||
findAuthTypeItemV2,
|
||||
@ -142,7 +142,6 @@ export const PluginForm: FC<{
|
||||
{
|
||||
ready:
|
||||
compareLevel === UserLevel.Enterprise &&
|
||||
// 开源版暂不支持该功能
|
||||
FLAGS['bot.studio.plugin_vpc'] &&
|
||||
!IS_OPEN_SOURCE,
|
||||
},
|
||||
@ -225,7 +224,6 @@ export const PluginForm: FC<{
|
||||
if (
|
||||
editInfo?.meta_info?.private_link_id &&
|
||||
compareLevel === UserLevel.Enterprise &&
|
||||
// 开源版暂不支持该功能
|
||||
FLAGS['bot.studio.plugin_vpc']
|
||||
) {
|
||||
setDisableEditUrl(true);
|
||||
@ -292,7 +290,6 @@ export const PluginForm: FC<{
|
||||
return (
|
||||
<>
|
||||
{compareLevel === UserLevel.Enterprise &&
|
||||
// 开源版暂不支持该功能
|
||||
FLAGS['bot.studio.plugin_vpc'] ? (
|
||||
<FormSelect
|
||||
label={{
|
||||
|
||||
@ -443,7 +443,7 @@ export const useGetToolColumns = (props: UseGetToolColumnsProps) => {
|
||||
visible={record.api_id === showDropdownItem?.api_id}
|
||||
render={
|
||||
<Dropdown.Menu className="px-[4px]">
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{FLAGS2['bot.devops.plugin_import_export'] ? (
|
||||
<Dropdown.Item
|
||||
disabled={
|
||||
@ -459,7 +459,7 @@ export const useGetToolColumns = (props: UseGetToolColumnsProps) => {
|
||||
{I18n.t('code_snippet')}
|
||||
</Dropdown.Item>
|
||||
) : null}
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{FLAGS2['bot.devops.plugin_mockset'] ? (
|
||||
<Dropdown.Item
|
||||
className="rounded-[4px]"
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { Tag } from '@coze-arch/coze-design';
|
||||
@ -38,7 +38,6 @@ export const IntelligenceTag: React.FC<IntelligenceTagProps> = ({
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
// 开源版暂不支持该功能
|
||||
if (intelligenceType === IntelligenceType.DouyinAvatarBot) {
|
||||
return (
|
||||
<Tag color="red" size="small" className="w-fit">
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import {
|
||||
type IntelligenceData,
|
||||
type SearchScope,
|
||||
@ -29,7 +29,7 @@ export enum DevelopCustomTypeStatus {
|
||||
All = 0,
|
||||
Project = 1,
|
||||
Agent = 2,
|
||||
DouyinAvatarBot = 3, // single agent 类型的抖音分身 开源版暂不支持该功能
|
||||
DouyinAvatarBot = 3, // single agent 类型的抖音分身
|
||||
}
|
||||
|
||||
export interface DraftIntelligenceList {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
|
||||
import qs from 'qs';
|
||||
@ -39,7 +39,6 @@ export const KnowledgeUploadPage = () => {
|
||||
UnitType.TEXT_DOC) as UnitType;
|
||||
const opt = (locationSearchParams.get('opt') || OptType.ADD) as OptType;
|
||||
const docID = locationSearchParams.get('doc_id') || '';
|
||||
// 开源版暂不支持该功能
|
||||
const isDouyinBot =
|
||||
locationSearchParams.get('is_douyin') === 'true' ? true : false;
|
||||
const { dataset_id, space_id } = useParams();
|
||||
|
||||
@ -75,7 +75,7 @@ export const usePromptConfig: UseEntityConfigHook = ({
|
||||
usePromptConfiguratorModal({
|
||||
spaceId,
|
||||
source: 'resource_library',
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
enableDiff: FLAGS['bot.studio.prompt_diff'],
|
||||
onUpdateSuccess: reloadList,
|
||||
onDiff: ({ libraryId }) => {
|
||||
|
||||
@ -91,7 +91,7 @@ export const PublishButton = ({
|
||||
intelligenceId: projectId,
|
||||
spaceId,
|
||||
enable: !!(
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
(
|
||||
FLAGS['bot.studio.publish_management'] &&
|
||||
hasPublished &&
|
||||
@ -186,7 +186,7 @@ export const PublishButton = ({
|
||||
<Divider />
|
||||
</div>
|
||||
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE ? (
|
||||
<div>
|
||||
<div className="coz-fg-secondary font-[500] px-[8px] pt-[4px] pb-0 mb-[2px]">
|
||||
|
||||
@ -86,7 +86,7 @@ export const TemplateConfigForm = forwardRef<
|
||||
// eslint-disable-next-line @coze-arch/max-line-per-function
|
||||
>(({ record, userInfo }, ref) => {
|
||||
const [FLAGS] = useFlags();
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
const customRequest = FLAGS['bot.studio.project_publish_imagex']
|
||||
? uploadCustomRequestImageX
|
||||
: uploadCustomRequest;
|
||||
|
||||
@ -44,7 +44,7 @@ export const PublishRecord: FC<{
|
||||
type: IntelligenceType.Project,
|
||||
spaceId,
|
||||
intelligenceId: projectId,
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
enable: FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE,
|
||||
});
|
||||
|
||||
@ -58,7 +58,7 @@ export const PublishRecord: FC<{
|
||||
<div className="text-[12px] coz-fg-dim leading-[16px]">
|
||||
{I18n.t('project_release_already_released_desc')}
|
||||
</div>
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE ? (
|
||||
<div className="text-[12px] coz-fg-dim leading-[16px]">
|
||||
{I18n.t('release_management_detail1', {
|
||||
|
||||
@ -89,7 +89,7 @@ export const useCreateWorkflowModal = ({
|
||||
};
|
||||
|
||||
const workflowModalInitState = useMemo(() => {
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
if (isWorkflowMode || FLAGS['bot.community.store_imageflow']) {
|
||||
return {
|
||||
productCategory: 'all',
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
import {
|
||||
@ -126,7 +126,6 @@ export const useWorkflowResourceMenuActions = (
|
||||
{
|
||||
hide:
|
||||
!enablePublishEntry || // 上架入口加白
|
||||
// 开源版暂不支持该功能
|
||||
(!FLAGS['bot.community.store_imageflow'] && isImageFlow) || // Imageflow 不支持商店
|
||||
!isSelfCreator ||
|
||||
bizExtend?.plugin_id === '0',
|
||||
|
||||
@ -13,18 +13,18 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { type FC, useContext, useState } from 'react';
|
||||
|
||||
import { WorkflowMode, BindBizType } from '@coze-arch/idl/workflow_api';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { CustomError } from '@coze-arch/bot-error';
|
||||
import {
|
||||
IconCozWorkflow,
|
||||
IconCozChat,
|
||||
IconCozArrowDown,
|
||||
} from '@coze-arch/coze-design/icons';
|
||||
import { Menu, Button } from '@coze-arch/coze-design';
|
||||
import { CustomError } from '@coze-arch/bot-error';
|
||||
|
||||
import WorkflowModalContext from '../workflow-modal-context';
|
||||
import { WorkflowModalFrom, type WorkFlowModalModeProps } from '../type';
|
||||
@ -80,7 +80,7 @@ export const CreateWorkflowBtn: FC<
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* The community version does not currently support chatflow, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{showSingleButton || IS_OPEN_SOURCE ? (
|
||||
<Button
|
||||
className={className}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @coze-arch/max-line-per-function */
|
||||
import {
|
||||
forwardRef,
|
||||
@ -28,14 +28,14 @@ import { useQuery } from '@tanstack/react-query';
|
||||
import { WorkflowMode } from '@coze-workflow/base/api';
|
||||
import { workflowApi, isGeneralWorkflow } from '@coze-workflow/base';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
import { ProductEntityType } from '@coze-arch/bot-api/product_api';
|
||||
import { ProductApi } from '@coze-arch/bot-api';
|
||||
import {
|
||||
IconCozAllFill,
|
||||
IconCozFireFill,
|
||||
IconCozKnowledgeFill,
|
||||
} from '@coze-arch/coze-design/icons';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
import { ProductEntityType } from '@coze-arch/bot-api/product_api';
|
||||
import { ProductApi } from '@coze-arch/bot-api';
|
||||
|
||||
import WorkflowModalContext from '../workflow-modal-context';
|
||||
import {
|
||||
@ -97,7 +97,6 @@ const WorkflowFilter = forwardRef<
|
||||
FLAGS['bot.community.store_imageflow'] ||
|
||||
isGeneralWorkflow(context?.flowMode || WorkflowMode.Workflow)
|
||||
) {
|
||||
// The community version does not currently support workflow template tags for future expansion
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return {
|
||||
type: 'PublicGetProductCategoryList',
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { type Form } from '@coze-workflow/test-run/formily';
|
||||
@ -100,7 +100,7 @@ const schema = {
|
||||
'x-component-props': {
|
||||
title: I18n.t('devops_publish_multibranch_BotInfo.OnboardingInfo'),
|
||||
collapsible: true,
|
||||
// The community version does not support AI-generated opening text for now, for future expansion
|
||||
// will support soon
|
||||
action: IS_OPEN_SOURCE ? null : <AIGenerateBtn />,
|
||||
},
|
||||
properties: {
|
||||
@ -152,7 +152,7 @@ const schema = {
|
||||
},
|
||||
voices: {
|
||||
type: 'object',
|
||||
// The community version does not currently support the Agent voice configuration in Chatflow, for future expansion
|
||||
// will support soon
|
||||
'x-visible': !IS_OVERSEA && !IS_OPEN_SOURCE,
|
||||
'x-decorator': 'FormSection',
|
||||
'x-decorator-props': {
|
||||
@ -173,7 +173,7 @@ const schema = {
|
||||
},
|
||||
input: {
|
||||
type: 'void',
|
||||
// The community version does not support change user input method (typing, voice), for future expansion
|
||||
// will support soon
|
||||
'x-visible': !IS_OVERSEA && !IS_OPEN_SOURCE,
|
||||
'x-component': 'FormSection',
|
||||
'x-component-props': {
|
||||
|
||||
@ -13,14 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useRef, useState } from 'react';
|
||||
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { type FileItem, type UploadProps } from '@coze-arch/bot-semi/Upload';
|
||||
import { FileBizType } from '@coze-arch/bot-api/developer_api';
|
||||
import { IconCozEdit } from '@coze-arch/coze-design/icons';
|
||||
import { CozAvatar, Toast, Upload } from '@coze-arch/coze-design';
|
||||
import { type FileItem, type UploadProps } from '@coze-arch/bot-semi/Upload';
|
||||
import { FileBizType } from '@coze-arch/bot-api/developer_api';
|
||||
|
||||
import { EmptyRoleAvatar } from '../../empty-role-avatar';
|
||||
import customUploadRequest from './utils/custom-upload-request';
|
||||
@ -139,7 +139,7 @@ export const RoleAvatarUpload = (props: PackageUploadProps) => {
|
||||
</div>
|
||||
</Upload>
|
||||
|
||||
{/* The community version does not support AI-generated avatar, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{!disabled && !IS_OPEN_SOURCE ? (
|
||||
<AutoGenerate
|
||||
generateInfo={generateInfo}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
@ -33,7 +33,7 @@ export const TestFormHeader: React.FC = () => {
|
||||
const { open } = useOpenTraceListPanel();
|
||||
|
||||
const handleOpenTraceBottomSheet = useCallback(() => {
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
@ -55,7 +55,7 @@ export const TestFormHeader: React.FC = () => {
|
||||
hiddenStateText
|
||||
onClick={handleOpenTraceBottomSheet}
|
||||
extra={
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE && (
|
||||
<span className={'cursor-pointer font-medium'}>
|
||||
{I18n.t('workflow_testset_view_log')}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @coze-arch/no-batch-import-or-export */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import {
|
||||
@ -63,7 +63,7 @@ export const NodeFieldCollapse: React.FC<React.PropsWithChildren> = ({
|
||||
<div className={css.extra}>
|
||||
<ModeSwitch />
|
||||
|
||||
{/* The community version does not support AI-generated test-run inputs, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<AIGenerateButton
|
||||
schema={schema}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { useState } from 'react';
|
||||
|
||||
@ -83,7 +83,7 @@ export const AIGenerateButton: React.FC<AIGenerateButtonProps> = ({
|
||||
i => i.name === FieldName.Node,
|
||||
);
|
||||
|
||||
// The community version does not support AI-generated test-run inputs, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import cls from 'classnames';
|
||||
@ -38,7 +38,7 @@ export const TestFormSheetHeaderV2 = () => {
|
||||
const { open } = useOpenTraceListPanel();
|
||||
|
||||
const handleOpenTraceBottomSheet = useCallback(() => {
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
@ -61,7 +61,7 @@ export const TestFormSheetHeaderV2 = () => {
|
||||
onClick={handleOpenTraceBottomSheet}
|
||||
hiddenStateText
|
||||
extra={
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE && (
|
||||
<span className={cls('cursor-pointer font-medium')}>
|
||||
{I18n.t('workflow_testset_view_log')}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable complexity */
|
||||
/**
|
||||
@ -204,7 +204,7 @@ const TestNodeFormCore: React.FC<TestNodeFormBaseProps> = ({
|
||||
const { open } = useOpenTraceListPanel();
|
||||
|
||||
const handleOpenTraceBottomSheet = useCallback(() => {
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
@ -222,7 +222,7 @@ const TestNodeFormCore: React.FC<TestNodeFormBaseProps> = ({
|
||||
onClick={handleOpenTraceBottomSheet}
|
||||
hiddenStateText
|
||||
extra={
|
||||
// The community version does not currently support trace, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE && (
|
||||
<span className={'font-medium cursor-pointer'}>
|
||||
{I18n.t('workflow_testset_view_log')}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useRef, type RefObject } from 'react';
|
||||
|
||||
import cls from 'classnames';
|
||||
@ -78,7 +78,7 @@ export const Tools = (props: ITool) => {
|
||||
margin={3}
|
||||
/>
|
||||
) : null}
|
||||
{/* The community version does not currently support trace, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{!IS_OPEN_SOURCE && <OpenTraceButton />}
|
||||
<StartTestRunButton />
|
||||
</>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
|
||||
import semver from 'semver';
|
||||
@ -245,7 +245,7 @@ const VersionForm: React.FC<{
|
||||
]}
|
||||
/>
|
||||
|
||||
{/* The community version does not currently support testset, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{!IS_OPEN_SOURCE && <TestSetSelect onSelect={handleTestSetSelect} />}
|
||||
|
||||
{renderBtn()}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { IconCozArrowLeft } from '@coze-arch/coze-design/icons';
|
||||
@ -59,10 +59,9 @@ const WorkFlowHeader: React.FC = () => {
|
||||
</div>
|
||||
|
||||
<div className={styles.right}>
|
||||
{/** The community version does not currently provide resource tree modal. Will allow for future expansion. */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : <ReferenceButton workflowId={workflowId} />}
|
||||
|
||||
{/** The community version does not currently provide features such as billing, collaboration, history, and workspaces to allow for future expansion. */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<>
|
||||
{!readonly && <CreditButton />}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
||||
/* eslint-disable max-lines */
|
||||
import { isFunction } from 'lodash-es';
|
||||
@ -722,7 +722,7 @@ export class WorkflowGlobalStateEntity extends ConfigEntity<WorkflowGlobalState>
|
||||
this.spaceId !== PUBLIC_SPACE_ID &&
|
||||
!this.projectId &&
|
||||
!IS_BOT_OP &&
|
||||
// The community version does not support the mockset yet, for future expansion
|
||||
// will support soon
|
||||
!IS_OPEN_SOURCE
|
||||
);
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ const getFileChildren = () => {
|
||||
|
||||
// 1. 是否开启了auto start节点支持音色字段能力
|
||||
// 2. 是否开启了语音资源功能
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
if (
|
||||
FLAGS['bot.automation.start_support_voice'] &&
|
||||
FLAGS['bot.studio.library_voice_resource']
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type ReactNode } from 'react';
|
||||
|
||||
import { VARIABLE_TYPE_ALIAS_MAP, ViewVariableType } from '@coze-workflow/base';
|
||||
@ -89,7 +89,6 @@ const getFileChildren = (
|
||||
generateVariableOption({ type: ViewVariableType.Video, parentPath }),
|
||||
// 1. 是否开启了auto start节点支持音色字段能力
|
||||
// 2. 是否开启了语音资源功能
|
||||
// 开源版暂不支持该功能
|
||||
FLAGS['bot.automation.start_support_voice'] &&
|
||||
FLAGS['bot.studio.library_voice_resource']
|
||||
? generateVariableOption({ type: ViewVariableType.Voice })
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
@ -48,7 +48,7 @@ export const ModelSelectV2: React.FC<ModelSelectV2Props> = ({
|
||||
const { spaceId, projectId, isBindDouyin } = useGlobalState();
|
||||
return (
|
||||
<ModelSelect
|
||||
// The community version does not currently support to view model detail, for future expansion
|
||||
// will support soon
|
||||
enableJumpDetail={isBindDouyin || IS_OPEN_SOURCE ? false : { spaceId }}
|
||||
className={classNames(styles.select, className)}
|
||||
popoverClassName={classNames(
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
@ -36,7 +36,7 @@ const Sql = () => {
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
{/* The community version does not currently support the AI-generated SQL function for future expansion */}
|
||||
{/* will support soon */}
|
||||
{!readonly && !IS_OPEN_SOURCE ? (
|
||||
<AutoGenerate
|
||||
className={styles['auto-generate']}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { INTENT_NODE_MODE } from '@coze-workflow/nodes';
|
||||
@ -22,7 +22,7 @@ import { I18n } from '@coze-arch/i18n';
|
||||
import { INTENT_MODE } from '@/node-registries/intent/constants';
|
||||
import { RadioSetterField } from '@/node-registries/common/fields';
|
||||
export default function ModeRadio() {
|
||||
// The community version does not support the fast mode of intent recognition for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { get, isNil, omit } from 'lodash-es';
|
||||
import { type NodeFormContext } from '@flowgram-adapter/free-layout-editor';
|
||||
import { variableUtils } from '@coze-workflow/variable';
|
||||
@ -54,7 +54,7 @@ export const transformOnInit = (
|
||||
const inputParameters = get(inputs, 'inputParameters', []);
|
||||
|
||||
// - If it is a new node, the default is fast mode, otherwise it is determined according to the backend return value (if there is no backend mode field, it means it is historical data, then it is standard mode)
|
||||
// - The community version does not support the fast mode of intent recognition for future expansion
|
||||
// - will support soon
|
||||
const intentModeInInit =
|
||||
isNewCreateInInit && !IS_OPEN_SOURCE
|
||||
? INTENT_NODE_MODE.MINIMAL
|
||||
|
||||
@ -62,7 +62,7 @@ export const Inputs = withFieldArray(
|
||||
tooltip={I18n.t('ltm_240826_01')}
|
||||
testId={getNodeSetterId(fieldName)}
|
||||
actions={[
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
isChatflow && FLAGS['bot.automation.ltm_enhance'] ? (
|
||||
<HistorySwitchField name="inputs.historySetting.enableChatHistory" />
|
||||
) : null,
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { omit, isUndefined } from 'lodash-es';
|
||||
@ -45,7 +45,7 @@ export const transformOnInit = (
|
||||
|
||||
let trigger;
|
||||
|
||||
// The community version does not support the project trigger feature, for future expansion
|
||||
// will support soon
|
||||
if (projectId && !IS_OPEN_SOURCE) {
|
||||
const triggerService =
|
||||
context.node.getService<TriggerService>(TriggerService);
|
||||
|
||||
@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { TriggerForm } from '@coze-workflow/nodes';
|
||||
import { FILE_TYPES, ViewVariableType } from '@coze-workflow/base';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
import { Switch } from '@coze-arch/coze-design';
|
||||
import { useFlags } from '@coze-arch/bot-flags';
|
||||
|
||||
import { withNodeConfigForm } from '@/node-registries/common/hocs';
|
||||
import { useGlobalState } from '@/hooks';
|
||||
@ -41,7 +41,6 @@ export const FormRender = withNodeConfigForm(() => {
|
||||
|
||||
let hiddenTypes = isBindDouyin ? FILE_TYPES : [];
|
||||
|
||||
// The community version does not support the Voice feature, for future expansion
|
||||
if (IS_OPEN_SOURCE) {
|
||||
hiddenTypes = [ViewVariableType.Voice, ViewVariableType.ArrayVoice];
|
||||
}
|
||||
@ -71,7 +70,7 @@ export const FormRender = withNodeConfigForm(() => {
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{/* The community version does not support the project trigger feature, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{(projectId || IS_BOT_OP) && !IS_OPEN_SOURCE ? (
|
||||
<RadioSetterField
|
||||
name={'trigger.tab'}
|
||||
@ -118,7 +117,7 @@ export const FormRender = withNodeConfigForm(() => {
|
||||
hasFeedback={false}
|
||||
/>
|
||||
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{isChatflow && FLAGS['bot.automation.message_auto_write'] ? (
|
||||
<Section title={I18n.t('basic_setting')} tooltip="">
|
||||
<SwitchField
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import {
|
||||
DEFAULT_NODE_META_PATH,
|
||||
DEFAULT_OUTPUTS_PATH,
|
||||
@ -39,7 +39,7 @@ export const START_NODE_REGISTRY: WorkflowNodeRegistry<NodeTestMeta> = {
|
||||
copyDisable: true,
|
||||
headerReadonly: true,
|
||||
showTrigger: ({ projectId }) =>
|
||||
// The community version does not support the project trigger feature, for future expansion
|
||||
// will support soon
|
||||
(!!projectId || IS_BOT_OP) && !IS_OPEN_SOURCE,
|
||||
nodeMetaPath: DEFAULT_NODE_META_PATH,
|
||||
outputsPath: DEFAULT_OUTPUTS_PATH,
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type FC, useMemo } from 'react';
|
||||
|
||||
import { useGlobalVariableServiceState } from '@coze-workflow/variable';
|
||||
@ -150,7 +150,7 @@ export const ExpandSheetEditor: FC<ExpandSheetEditorProps> = props => {
|
||||
></Button>
|
||||
</Tooltip>
|
||||
|
||||
{/* The community version does not support the AI-generated system prompt feature, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<NLPromptButton disabled={props?.readonly} onlyIcon />
|
||||
)}
|
||||
|
||||
@ -91,7 +91,7 @@ export const EditorWithPromptKit: FC<EditorWithPromptKitProps> = props => {
|
||||
const promptValue = useRef<string>(value || '');
|
||||
|
||||
const [FLAGS] = useFlags();
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
const isHitLLMPromptSkills = FLAGS['bot.automation.llm_prompt_skills'];
|
||||
|
||||
const { open, node: PromptLibrary } = usePromptLibraryModal({
|
||||
@ -158,7 +158,7 @@ export const EditorWithPromptKit: FC<EditorWithPromptKitProps> = props => {
|
||||
<InputSlotWidget mode="input" />
|
||||
<LibraryBlockWidget
|
||||
{
|
||||
// 开源版暂不支持该功能
|
||||
// 即将支持,敬请期待
|
||||
...(isHitLLMPromptSkills
|
||||
? {
|
||||
librarys: libraries,
|
||||
@ -179,7 +179,7 @@ export const EditorWithPromptKit: FC<EditorWithPromptKitProps> = props => {
|
||||
/>
|
||||
<HighlightExpressionOnActive />
|
||||
|
||||
{/* 开源版暂不支持该功能 */}
|
||||
{/* 即将支持,敬请期待 */}
|
||||
{isHitLLMPromptSkills ? (
|
||||
<ContentSearchPopover
|
||||
variableTree={variableTree}
|
||||
|
||||
@ -13,14 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { PublicScopeProvider } from '@coze-workflow/variable';
|
||||
import { NLPromptButton } from '@coze-workflow/resources-adapter';
|
||||
import { PromptEditorProvider } from '@coze-common/prompt-kit-base/editor';
|
||||
import { I18n } from '@coze-arch/i18n';
|
||||
import { UIIconButton } from '@coze-arch/bot-semi';
|
||||
import {
|
||||
IconCozExpand,
|
||||
IconCozLightbulb,
|
||||
@ -28,6 +27,7 @@ import {
|
||||
IconCozTrayArrowUp,
|
||||
} from '@coze-arch/coze-design/icons';
|
||||
import { Tooltip, IconButton, Button } from '@coze-arch/coze-design';
|
||||
import { UIIconButton } from '@coze-arch/bot-semi';
|
||||
|
||||
import { useNodeFormPanelState } from '@/hooks/use-node-side-sheet-store';
|
||||
import { CopyButton } from '@/components/copy-button';
|
||||
@ -112,7 +112,7 @@ export const PromptKitBar = props => {
|
||||
</Tooltip>
|
||||
|
||||
<div className={styles['nl-prompt']}>
|
||||
{/* The community version does not support the AI-generated system prompt feature, for future expansion */}
|
||||
{/* will support soon */}
|
||||
{IS_OPEN_SOURCE ? null : (
|
||||
<NLPromptButton
|
||||
disabled={readonly}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { inject, injectable } from 'inversify';
|
||||
import type { WorkflowJSON } from '@flowgram-adapter/free-layout-editor';
|
||||
import { getTestDataByTestset, FieldName } from '@coze-workflow/test-run';
|
||||
@ -70,7 +70,7 @@ export class RelatedCaseDataService {
|
||||
node => node.type === StandardNodeType.Start,
|
||||
);
|
||||
|
||||
/* The community version does not currently support testset, for future expansion */
|
||||
/* will support soon */
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { pick } from 'lodash-es';
|
||||
import { inject, injectable } from 'inversify';
|
||||
import { QueryClient } from '@tanstack/react-query';
|
||||
@ -76,7 +76,7 @@ export class TriggerService {
|
||||
protected subWorkflowInfos: Record<string, WorkflowDetailInfoData> = {};
|
||||
protected startNodeFormValues: Record<string, unknown> = {};
|
||||
async load() {
|
||||
// The community version does not support the project trigger feature, for future expansion
|
||||
// will support soon
|
||||
if (this.globalState.projectId && !IS_OPEN_SOURCE) {
|
||||
const meta = await fetchTriggerFormMeta({
|
||||
spaceId: this.globalState.spaceId,
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import {
|
||||
type IFormSchema,
|
||||
TestFormFieldName,
|
||||
@ -21,8 +21,8 @@ import {
|
||||
} from '@coze-workflow/test-run-next';
|
||||
import { PUBLIC_SPACE_ID } from '@coze-workflow/base';
|
||||
|
||||
import type { WorkflowNodeEntity } from '../types';
|
||||
import { getTestsetField } from './generate-form-schema/testset-field';
|
||||
import type { WorkflowNodeEntity } from '../types';
|
||||
import { generateFormRelatedField } from './generate-form-related-field';
|
||||
import { generateFormNodeField } from './generate-form-node-field';
|
||||
|
||||
@ -63,7 +63,7 @@ export const generateFormSchema = async (
|
||||
/**
|
||||
* 若支持测试集且输入不为空,则添加测试集的组件
|
||||
*/
|
||||
/* The community version does not currently support testset, for future expansion */
|
||||
/* will support soon */
|
||||
if (
|
||||
!IS_OPEN_SOURCE &&
|
||||
spaceId !== PUBLIC_SPACE_ID &&
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { inject, injectable } from 'inversify';
|
||||
import { EntityManager } from '@flowgram-adapter/free-layout-editor';
|
||||
import {
|
||||
@ -241,7 +241,7 @@ export class WorkflowPlaygroundContext implements PlaygroundContext {
|
||||
pageNum: number;
|
||||
pageSize?: number;
|
||||
}): Promise<GetUserFavoriteListData | undefined> {
|
||||
// The community version does not currently support plugin favorite function, for future expansion
|
||||
// will support soon
|
||||
if (IS_OPEN_SOURCE) {
|
||||
return {
|
||||
favorite_products: [],
|
||||
|
||||
Reference in New Issue
Block a user