mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-24 21:10:43 -07:00
fix(workspaces): link workspace:status directly to local script and clean up fleet.ts
This commit is contained in:
@@ -78,25 +78,6 @@ async function stopWorker() {
|
||||
await provider.stop();
|
||||
}
|
||||
|
||||
async function remoteStatus() {
|
||||
const settingsPath = path.join(REPO_ROOT, '.gemini/workspaces/settings.json');
|
||||
if (!fs.existsSync(settingsPath)) {
|
||||
console.error('❌ Settings not found. Run "npm run workspace:setup" first.');
|
||||
return;
|
||||
}
|
||||
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
||||
const config = settings.workspace;
|
||||
|
||||
const provider = ProviderFactory.getProvider({
|
||||
projectId: config?.projectId || getProjectId(),
|
||||
zone: config?.zone || DEFAULT_ZONE,
|
||||
instanceName: INSTANCE_PREFIX
|
||||
});
|
||||
|
||||
console.log(`📡 Fetching remote status from ${INSTANCE_PREFIX}...`);
|
||||
await provider.exec('tsx /mnt/disks/data/scripts/status.ts');
|
||||
}
|
||||
|
||||
async function rebuildWorker() {
|
||||
const projectId = getProjectId();
|
||||
console.log(`🔥 Rebuilding worker ${INSTANCE_PREFIX}...`);
|
||||
@@ -127,9 +108,6 @@ async function main() {
|
||||
case 'stop':
|
||||
await stopWorker();
|
||||
break;
|
||||
case 'status':
|
||||
await remoteStatus();
|
||||
break;
|
||||
default:
|
||||
console.error(`❌ Unknown fleet action: ${action}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"workspace:check": "tsx .gemini/skills/workspaces/scripts/check.ts",
|
||||
"workspace:clean": "tsx .gemini/skills/workspaces/scripts/clean.ts",
|
||||
"workspace:fleet": "tsx .gemini/skills/workspaces/scripts/fleet.ts",
|
||||
"workspace:status": "npm run workspace:fleet status",
|
||||
"workspace:status": "tsx .gemini/skills/workspaces/scripts/status.ts",
|
||||
"workspace:attach": "tsx .gemini/skills/workspaces/scripts/attach.ts",
|
||||
"workspace:logs": "tsx .gemini/skills/workspaces/scripts/logs.ts",
|
||||
"workspace:remove": "tsx .gemini/skills/workspaces/scripts/clean.ts",
|
||||
|
||||
Reference in New Issue
Block a user