mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
feat: update sidebar agent workflow and host filter UI
This commit is contained in:
@@ -111,7 +111,10 @@ export async function runLsCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
let agents = await client.fetchAgents()
|
||||
const fetchPayload = await client.fetchAgents({
|
||||
filter: options.all ? { includeArchived: true } : undefined,
|
||||
})
|
||||
let agents = fetchPayload.entries.map((entry) => entry.agent)
|
||||
|
||||
// By default, exclude archived agents. `-a` includes them.
|
||||
if (!options.all) {
|
||||
|
||||
@@ -53,7 +53,8 @@ export async function runStopCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
let agents = await client.fetchAgents()
|
||||
const fetchPayload = await client.fetchAgents({ filter: { includeArchived: true } })
|
||||
let agents = fetchPayload.entries.map((entry) => entry.agent)
|
||||
const stoppedIds: string[] = []
|
||||
|
||||
if (options.all) {
|
||||
|
||||
@@ -111,7 +111,8 @@ export async function runStatusCommand(
|
||||
const client = await tryConnectToDaemon({ host, timeout: 1500 })
|
||||
if (client) {
|
||||
try {
|
||||
const agents = await client.fetchAgents()
|
||||
const agentsPayload = await client.fetchAgents({ filter: { includeArchived: true } })
|
||||
const agents = agentsPayload.entries.map((entry) => entry.agent)
|
||||
runningAgents = agents.filter(a => a.status === 'running').length
|
||||
idleAgents = agents.filter(a => a.status === 'idle').length
|
||||
} catch {
|
||||
|
||||
@@ -57,7 +57,8 @@ export async function runLsCommand(options: PermitLsOptions, _command: Command):
|
||||
}
|
||||
|
||||
try {
|
||||
const agents = await client.fetchAgents()
|
||||
const agentsPayload = await client.fetchAgents({ filter: { includeArchived: true } })
|
||||
const agents = agentsPayload.entries.map((entry) => entry.agent)
|
||||
await client.close()
|
||||
|
||||
// Collect all pending permissions from all agents
|
||||
|
||||
@@ -76,7 +76,8 @@ export async function runLsCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
const agents = await client.fetchAgents()
|
||||
const agentsPayload = await client.fetchAgents({ filter: { includeArchived: true } })
|
||||
const agents = agentsPayload.entries.map((entry) => entry.agent)
|
||||
|
||||
// Get worktree list from daemon
|
||||
const response = await client.getPaseoWorktreeList({})
|
||||
|
||||
Reference in New Issue
Block a user