MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / getToolPreview

Function getToolPreview

apps/webuiapps/src/lib/appGeneratorPlugin.ts:198–214  ·  view source on GitHub ↗
(block: { name: string; input: Record<string, unknown> })

Source from the content-addressed store, hash-verified

196}
197
198function getToolPreview(block: { name: string; input: Record<string, unknown> }): string {
199 const input = block.input;
200 switch (block.name) {
201 case 'Write':
202 case 'Edit':
203 return `file=${input.file_path || input.path || ''}`;
204 case 'Read':
205 return `file=${input.file_path || ''}`;
206 case 'Bash':
207 return `cmd=${String(input.command || '').slice(0, 80)}`;
208 case 'Glob':
209 case 'Grep':
210 return `pattern=${input.pattern || ''}`;
211 default:
212 return JSON.stringify(input).slice(0, 80);
213 }
214}
215
216interface AppGeneratorOptions {
217 llmConfigFile: string;

Callers 1

runOneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected