mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 11:40:43 +00:00
test: simplify plugin tool argument parsing
This commit is contained in:
@@ -126,12 +126,18 @@ function splitTopLevelArgs(args: string): string[] {
|
||||
continue;
|
||||
}
|
||||
if (char === "," && depth === 0) {
|
||||
parts.push(args.slice(start, index).trim());
|
||||
const part = args.slice(start, index).trim();
|
||||
if (part.length > 0) {
|
||||
parts.push(part);
|
||||
}
|
||||
start = index + 1;
|
||||
}
|
||||
}
|
||||
parts.push(args.slice(start).trim());
|
||||
return parts.filter(Boolean);
|
||||
const part = args.slice(start).trim();
|
||||
if (part.length > 0) {
|
||||
parts.push(part);
|
||||
}
|
||||
return parts;
|
||||
}
|
||||
|
||||
function extractStringLiterals(source: string): string[] {
|
||||
|
||||
Reference in New Issue
Block a user