MCPcopy
hub / github.com/coder/mux / buildForegroundContinuationNote

Function buildForegroundContinuationNote

src/node/services/tools/task.ts:239–252  ·  view source on GitHub ↗
(
  taskCount: number,
  reason: "backgrounded" | "timed_out"
)

Source from the content-addressed store, hash-verified

237}
238
239function buildForegroundContinuationNote(
240 taskCount: number,
241 reason: "backgrounded" | "timed_out"
242): string {
243 if (reason === "backgrounded") {
244 return taskCount === 1
245 ? "Task sent to background because a new message was queued. Use task_await to monitor progress."
246 : "Tasks were sent to background because a new message was queued. Use task_await to monitor progress.";
247 }
248
249 return taskCount === 1
250 ? "Task exceeded foreground wait limit and continues running in background. Use task_await to monitor progress."
251 : "Tasks exceeded the foreground wait limit and continue running in background. Use task_await to monitor progress.";
252}
253
254function buildInterruptedTaskNote(taskCount: number): string {
255 return taskCount === 1

Callers 1

createTaskToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected