generated from kevisual/vite-react-template
feat: enhance repository management UI and functionality
- Added navigation to repository details in RepoCard component. - Implemented a new BuildConfig component for managing build configurations. - Integrated build configuration initialization and saving logic in the store. - Updated RepoInfoCard to include workspace management features. - Improved repository editing dialog with better state handling. - Enhanced repository list fetching with search capabilities. - Added support for creating and managing development configurations. - Refactored code for better readability and maintainability.
This commit is contained in:
@@ -49,4 +49,58 @@ export const createCommitBlankConfig = (params: { repo?: string, event: 'api_tri
|
||||
git commit --allow-empty -m "up: ${now}"
|
||||
git push
|
||||
`
|
||||
}
|
||||
|
||||
export const createDevConfig = (params: { repo?: string, event?: string }) => {
|
||||
const event = params?.event || 'api_trigger_event';
|
||||
return `##### 配置开始,保留注释 #####
|
||||
.common_env: &common_env
|
||||
env:
|
||||
# 使用环境变量管理密钥,推荐使用密钥仓库管理密钥, 详情见 readme.md
|
||||
# 使用仓库密钥时,注释
|
||||
## 可选 API-Key 配置(按需取消注释)
|
||||
# MINIMAX_API_KEY: '' # Minimax 模型
|
||||
# ZHIPU_API_KEY: '' # 智谱 AI
|
||||
# BAILIAN_CODE_API_KEY: '' # 阿里云百炼
|
||||
# VOLCENGINE_API_KEY: '' # 火山引擎
|
||||
# CNB_API_KEY: '' # CNB API
|
||||
|
||||
# 可选应用配置
|
||||
# FEISHU_APP_ID: '' # 飞书应用 ID
|
||||
# FEISHU_APP_SECRET: '' # 飞书应用密钥
|
||||
|
||||
# CNB_COOKIE: '' # 可选配置,用cnb.cool的cookie
|
||||
USERNAME: root
|
||||
ASSISTANT_CONFIG_DIR: /workspace/kevisual # ASSISTANT_CONFIG_DIR 环境变量指定了配置文件所在的目录
|
||||
# CNB_KEVISUAL_ORG: kevisual # 私密仓库使用环境配置(默认即可,默认为当前用户组CNB_GROUP_SLUG)
|
||||
# CNB_KEVISUAL_APP: assistant-app # 可选配置(默认即可)
|
||||
# CNB_OPENCLAW: openclaw # 仓库名(默认即可)
|
||||
# CNB_OPENWEBUI: open-webui # 仓库名(默认即可)
|
||||
|
||||
##### 配置结束 #####
|
||||
|
||||
main:
|
||||
${event}:
|
||||
- docker:
|
||||
image: docker.cnb.cool/kevisual/dev-env:latest
|
||||
services:
|
||||
- vscode
|
||||
- docker
|
||||
runner:
|
||||
cpus: 16
|
||||
imports:
|
||||
- https://cnb.cool/kevisual/env/-/blob/main/.env.development
|
||||
env: !reference [.common_env, env]
|
||||
stages:
|
||||
- name: 环境变量
|
||||
script: printenv > ~/.env.development
|
||||
- name: 启动nginx
|
||||
script: nginx
|
||||
- name: 初始化开发机
|
||||
script: zsh /workspace/scripts/init.sh
|
||||
# endStages:
|
||||
# - name: 结束阶段
|
||||
# script: bun /workspace/scripts/end.ts
|
||||
|
||||
`
|
||||
}
|
||||
Reference in New Issue
Block a user