MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / formatAutonomyFlowsList

Function formatAutonomyFlowsList

src/utils/autonomyFlows.ts:1045–1064  ·  view source on GitHub ↗
(
  flows: AutonomyFlowRecord[],
  limit = 10,
)

Source from the content-addressed store, hash-verified

1043}
1044
1045export function formatAutonomyFlowsList(
1046 flows: AutonomyFlowRecord[],
1047 limit = 10,
1048): string {
1049 const slice = flows.slice(0, limit)
1050 if (slice.length === 0) {
1051 return 'No autonomy flows recorded.'
1052 }
1053 return slice
1054 .map(flow => {
1055 const source = flow.sourceLabel ?? flow.sourceId ?? 'automatic'
1056 const stepSummary = flow.currentStep ? ` | step=${flow.currentStep}` : ''
1057 const waitSummary =
1058 flow.status === 'waiting' && flow.waitJson
1059 ? ` | waiting=${flow.waitJson.reason}`
1060 : ''
1061 return `${flow.flowId} | managed | rev=${flow.revision} | ${flow.status} | ${source}${stepSummary}${waitSummary}\n goal=${flow.goal} | runs=${flow.runCount}`
1062 })
1063 .join('\n')
1064}
1065
1066export function formatAutonomyFlowDetail(
1067 flow: AutonomyFlowRecord | null | undefined,

Callers 3

getAutonomyFlowsTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected