MCPcopy Create free account
hub / github.com/arctic-cli/interface / updateWorkingIndicator

Function updateWorkingIndicator

packages/arctic/src/cli/cmd/run.ts:143–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 let workingInterval: number | undefined
142
143 const updateWorkingIndicator = () => {
144 if (workingInterval) {
145 clearInterval(workingInterval as any)
146 }
147 if (!isWorking) {
148 process.stderr.write("\r" + " ".repeat(50))
149 return
150 }
151 const spinner = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
152 let i = 0
153 workingInterval = setInterval(() => {
154 process.stderr.write(`\r${UI.Style.TEXT_INFO}${spinner[i % 10]} Working...${UI.Style.TEXT_NORMAL}`)
155 i++
156 }, 100) as any
157 }
158
159 const eventProcessor = (async () => {
160 for await (const event of events.stream) {

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected