acp migration (ui) : ui connect to acp directly instead of goosed (#10081)

This commit is contained in:
Lifei Zhou
2026-07-02 10:29:29 +10:00
committed by GitHub
parent 0d4b6924b9
commit b83b194dad
78 changed files with 2630 additions and 7899 deletions
+19
View File
@@ -0,0 +1,19 @@
const fs = require('fs');
const path = require('path');
const desktopRoot = path.resolve(__dirname, '..');
const pathsToRemove = [
path.join(desktopRoot, 'node_modules', '.vite'),
path.join(desktopRoot, 'node_modules', '.vite-temp'),
path.join(desktopRoot, '.vite'),
];
for (const targetPath of pathsToRemove) {
if (!fs.existsSync(targetPath)) {
continue;
}
fs.rmSync(targetPath, { recursive: true, force: true });
console.log(`Removed ${path.relative(desktopRoot, targetPath)}`);
}
@@ -23,17 +23,6 @@ const windowsFiles = [
'goose-npm/**/*'
];
const macosFiles = [
'goosed',
'goose',
'jbang',
'npx',
'uvx',
'*.db',
'*.log',
'.gitkeep'
];
// Helper function to check if file matches patterns
function matchesPattern(filename, patterns) {
return patterns.some(pattern => {
@@ -174,9 +163,10 @@ function cleanBinDirectory(targetPlatform) {
const filePath = path.join(srcBinDir, file.name);
if (targetPlatform === 'darwin' || targetPlatform === 'linux') {
// For macOS/Linux, remove Windows-specific files
if (matchesPattern(file.name, windowsFiles)) {
console.log(`Removing Windows file: ${file.name}`);
const isLegacyBackendBinary = file.name === 'goosed';
if (isLegacyBackendBinary || matchesPattern(file.name, windowsFiles)) {
const fileType = isLegacyBackendBinary ? 'legacy backend binary' : 'Windows file';
console.log(`Removing ${fileType}: ${file.name}`);
if (file.isDirectory()) {
fs.rmSync(filePath, { recursive: true, force: true });
} else {