mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 16:01:24 +00:00
fix: anchor MEDIA tag parsing
This commit is contained in:
@@ -71,6 +71,13 @@ export function splitMediaFromOutput(raw: string): {
|
||||
continue;
|
||||
}
|
||||
|
||||
const trimmedStart = line.trimStart();
|
||||
if (!trimmedStart.startsWith("MEDIA:")) {
|
||||
keptLines.push(line);
|
||||
lineOffset += line.length + 1; // +1 for newline
|
||||
continue;
|
||||
}
|
||||
|
||||
const matches = Array.from(line.matchAll(MEDIA_TOKEN_RE));
|
||||
if (matches.length === 0) {
|
||||
keptLines.push(line);
|
||||
|
||||
Reference in New Issue
Block a user