(
args: string,
options?: {
enqueueInMemory?: boolean
removeQueuedInMemory?: boolean
},
)
| 202 | } |
| 203 | |
| 204 | export async function getAutonomyCommandText( |
| 205 | args: string, |
| 206 | options?: { |
| 207 | enqueueInMemory?: boolean |
| 208 | removeQueuedInMemory?: boolean |
| 209 | }, |
| 210 | ): Promise<string> { |
| 211 | const parsed = parseAutonomyArgs(args) |
| 212 | |
| 213 | switch (parsed.type) { |
| 214 | case 'status': |
| 215 | return getAutonomyStatusText({ deep: parsed.deep }) |
| 216 | case 'runs': |
| 217 | return getAutonomyRunsText(parsed.limit) |
| 218 | case 'flows': |
| 219 | return getAutonomyFlowsText(parsed.limit) |
| 220 | case 'flow-detail': |
| 221 | return getAutonomyFlowText(parsed.flowId) |
| 222 | case 'flow-cancel': |
| 223 | return cancelAutonomyFlowText(parsed.flowId, { |
| 224 | removeQueuedInMemory: options?.removeQueuedInMemory, |
| 225 | }) |
| 226 | case 'flow-resume': |
| 227 | return resumeAutonomyFlowText(parsed.flowId, { |
| 228 | enqueueInMemory: options?.enqueueInMemory, |
| 229 | }) |
| 230 | case 'usage': |
| 231 | return AUTONOMY_USAGE |
| 232 | } |
| 233 | } |
no test coverage detected