Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++
365 B
Raw Blame
export type Window = {start: number; end: number};
export function mergeWindows(windows: Window[], gap = 0): Window[] {
  windows.sort((a,b)=>a.start-b.start);
  const result: Window[] = [];
  for (const w of windows) {
    const last = result.at(-1);
    if (last && w.start < last.end) last.end = w.end;
    else result.push(w);
  }
  return result;
}