1be6e6756c
修复 Cocos 内置插件提示词,禁止回退到项目内 MCP 扩展 移除 agc_cocos_execute 对项目写锁的无关依赖 将项目对话读取移到 blocking worker,避免客户端窗口阻塞 为 Windows 开发与发行构建默认启用 Cocos 编辑器执行能力 补充 Cocos Inspector 引导、桥接协议和客户端回归验证
25 lines
706 B
JavaScript
25 lines
706 B
JavaScript
/** 默认桌面能力;显式 feature 参数优先,不把应用参数当 Cargo 参数。 */
|
|
export function withDefaultCargoFeatures(argv, features) {
|
|
const separator = argv.indexOf('--');
|
|
const cargoArgs = separator < 0 ? argv : argv.slice(0, separator);
|
|
if (
|
|
!features.length ||
|
|
cargoArgs.some(
|
|
(value) =>
|
|
value === '--features' ||
|
|
value === '-f' ||
|
|
value.startsWith('--features=') ||
|
|
/^-f.+/u.test(value),
|
|
)
|
|
) {
|
|
return argv;
|
|
}
|
|
return [`--features=${features.join(',')}`, ...argv];
|
|
}
|
|
|
|
export function defaultEditorFeatures(target) {
|
|
return target === 'win32' || target.includes('windows')
|
|
? ['cocos-editor-execute']
|
|
: [];
|
|
}
|