MCPcopy Index your code
hub / github.com/simstudioai/sim / appendStdout

Function appendStdout

apps/sim/lib/execution/isolated-vm-worker.cjs:170–190  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

168 let isolate = null
169
170 const appendStdout = (line) => {
171 if (stdoutTruncated || !line) return
172
173 const remaining = MAX_STDOUT_CHARS - stdoutLength
174 if (remaining <= 0) {
175 stdoutTruncated = true
176 stdoutChunks.push('[stdout truncated]\n')
177 return
178 }
179
180 if (line.length <= remaining) {
181 stdoutChunks.push(line)
182 stdoutLength += line.length
183 return
184 }
185
186 stdoutChunks.push(line.slice(0, remaining))
187 stdoutChunks.push('\n[stdout truncated]\n')
188 stdoutLength = MAX_STDOUT_CHARS
189 stdoutTruncated = true
190 }
191
192 let context = null
193 let bootstrapScript = null

Callers 2

executeCodeFunction · 0.85
executeTaskFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected