MCPcopy Create free account
hub / github.com/microsoft/Webwright / flush

Function flush

assets/compare_trajectory/app.js:571–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

569 const blocks = [];
570 let active = null;
571 const flush = () => {
572 if (!active) {
573 return;
574 }
575 const body = active.lines.join('\n').replace(/^\n+|\n+$/g, '');
576 if (body && looksLikePython(body)) {
577 blocks.push({
578 title: active.path,
579 text: body,
580 sourceLabel: active.action.toLowerCase() + ' patch'
581 });
582 }
583 active = null;
584 };
585 lines.forEach((line) => {
586 const fileMatch = line.match(/^\*\*\*\s+(Add|Update|Delete) File:\s+(.+)$/);
587 if (fileMatch) {

Callers 1

extractPythonFromPatchFunction · 0.85

Calls 1

looksLikePythonFunction · 0.85

Tested by

no test coverage detected