feat: add agent delete command and bulk tab close operations

This commit is contained in:
Mohamed Boudra
2026-03-07 12:32:49 +07:00
parent 6b51088f39
commit 1d1c7058f1
21 changed files with 783 additions and 86 deletions
+7 -7
View File
@@ -215,18 +215,18 @@ async function test_agent_continues(agentId: string): Promise<void> {
console.log('PASS: Agent completed after permission was granted')
}
async function test_agent_stop(agentId: string): Promise<void> {
console.log('\n--- Test: Stop agent ---')
async function test_agent_delete(agentId: string): Promise<void> {
console.log('\n--- Test: Delete agent ---')
const result = await ctx.paseo(['stop', agentId])
const result = await ctx.paseo(['delete', agentId])
console.log('Exit code:', result.exitCode)
console.log('Stdout:', result.stdout)
if (result.stderr) console.log('Stderr:', result.stderr)
assert.strictEqual(result.exitCode, 0, 'agent stop should succeed')
assert.strictEqual(result.exitCode, 0, 'agent delete should succeed')
console.log('PASS: Agent stopped successfully')
console.log('PASS: Agent deleted successfully')
}
async function main(): Promise<void> {
@@ -270,10 +270,10 @@ async function main(): Promise<void> {
console.error(err)
process.exitCode = 1
} finally {
// Always try to stop the agent if it was created
// Always try to delete the agent if it was created
if (agentId) {
try {
await test_agent_stop(agentId)
await test_agent_delete(agentId)
} catch {
// Ignore errors during cleanup
}