🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🐛 fix(cli): add update alias for lh agent edit (#21257)
Arvin Xu1f5d89a41a49
diff --git a/apps/cli/src/commands/agent.test.ts b/apps/cli/src/commands/agent.test.tsindex 6874a3ce7a9..a5ea4860f3d 100644--- a/apps/cli/src/commands/agent.test.ts+++ b/apps/cli/src/commands/agent.test.ts@@ -336,6 +336,18 @@ describe('agent command', () => {});});+ it('should accept update as an alias of edit', async () => {+ mockTrpcClient.agent.updateAgentConfig.mutate.mockResolvedValue({});++ const program = createProgram();+ await program.parseAsync(['node', 'test', 'agent', 'update', 'a1', '--title', 'Updated']);++ expect(mockTrpcClient.agent.updateAgentConfig.mutate).toHaveBeenCalledWith({+ agentId: 'a1',+ value: { title: 'Updated' },+ });+ });+it('should exit when no changes specified', async () => {const program = createProgram();await program.parseAsync(['node', 'test', 'agent', 'edit', 'a1']);diff --git a/apps/cli/src/commands/agent.ts b/apps/cli/src/commands/agent.tsindex 3283dbc18a7..b8db49f6c08 100644--- a/apps/cli/src/commands/agent.ts+++ b/apps/cli/src/commands/agent.ts@@ -199,6 +199,7 @@ export function registerAgentCommand(program: Command) {agent.command('edit [agentId]')+ .alias('update').description('Update agent configuration').option('--slug <slug>', 'Agent slug (e.g. inbox)').option('-t, --title <title>', 'New title')