MCPcopy Create free account
hub / github.com/Noumena-Network/code / renderProgressHint

Function renderProgressHint

src/tools/REPLTool/javascriptReplFactory.tsx:359–378  ·  view source on GitHub ↗
(data: ReplToolCallProgress)

Source from the content-addressed store, hash-verified

357}
358
359function renderProgressHint(data: ReplToolCallProgress): string {
360 if (data.phase !== 'start') {
361 return 'Running JavaScript REPL script...'
362 }
363 const input = data.toolInput
364 const hintRaw =
365 typeof input.command === 'string'
366 ? input.command
367 : typeof input.file_path === 'string'
368 ? input.file_path
369 : typeof input.path === 'string'
370 ? input.path
371 : typeof input.pattern === 'string'
372 ? input.pattern
373 : undefined
374 if (!hintRaw) {
375 return `Running ${data.toolName}...`
376 }
377 return `Running ${data.toolName}: ${preview(hintRaw, 200)}`
378}
379
380export function createJavascriptReplTool(
381 config: JavascriptReplToolConfig,

Callers 1

Calls 1

previewFunction · 0.70

Tested by

no test coverage detected