Skip to content

Commit a54d176

Browse files
committed
fix: remove stale team CLI teammate refresh
1 parent d0810a8 commit a54d176

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

packages/cli/src/team.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
#!/usr/bin/env node
22
import * as p from '@clack/prompts';
3-
import fs from 'fs';
4-
import { Settings, updateAgentTeammates } from '@tinyclaw/core';
3+
import { Settings } from '@tinyclaw/core';
54
import {
65
unwrap, cleanId, validateId,
76
writeSettings, requireSettings,
87
} from './shared.ts';
98

10-
function refreshTeamInfo(settings: Settings) {
11-
const agents = settings.agents || {};
12-
const teams = settings.teams || {};
13-
for (const [agentId, agent] of Object.entries(agents)) {
14-
if (agent.working_directory && fs.existsSync(agent.working_directory)) {
15-
updateAgentTeammates(agent.working_directory, agentId, agents, teams);
16-
}
17-
}
18-
}
19-
209
// --- team add ---
2110

2211
async function teamAdd() {
@@ -78,8 +67,6 @@ async function teamAdd() {
7867
};
7968
writeSettings(settings);
8069

81-
refreshTeamInfo(settings);
82-
8370
p.log.success(`Team '${teamId}' created!`);
8471
p.log.info(`Agents: ${selectedAgents.join(', ')}`);
8572
p.log.info(`Leader: @${leader}`);
@@ -109,7 +96,6 @@ async function teamRemove(teamId: string) {
10996
delete settings.teams![teamId];
11097
writeSettings(settings);
11198

112-
refreshTeamInfo(settings);
11399
p.log.success(`Team '${teamId}' removed.`);
114100
}
115101

@@ -161,8 +147,6 @@ async function teamRemoveAgent(teamId: string, agentId: string) {
161147
team.leader_agent = newLeader;
162148
writeSettings(settings);
163149

164-
refreshTeamInfo(settings);
165-
166150
p.log.success(`Removed @${agentId} from team '${teamId}'.${newLeader !== team.leader_agent ? ` New leader: @${newLeader}.` : ''}`);
167151
}
168152

@@ -235,8 +219,6 @@ function teamAddAgent(teamId: string, agentId: string) {
235219
team.agents.push(agentId);
236220
writeSettings(settings);
237221

238-
refreshTeamInfo(settings);
239-
240222
p.log.success(`Added @${agentId} to team '${teamId}' (${team.name}).`);
241223
}
242224

0 commit comments

Comments
 (0)