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++
675 B
Raw Blame
import type { Session } from './types';

export function sessionLog(session: Session) {
  return JSON.stringify({ schema: 'strata.session-log/1', exportedAt: new Date().toISOString(), session }, null, 2);
}

export function downloadSessionLog(session: Session) {
  const url = URL.createObjectURL(new Blob([sessionLog(session)], { type: 'application/json' }));
  const link = document.createElement('a');
  const name = session.title.replace(/[^\p{L}\p{N}._-]+/gu, '-').slice(0, 80) || 'chat';
  link.href = url; link.download = `${name}-session-log.json`;
  document.body.appendChild(link); link.click(); link.remove();
  setTimeout(() => URL.revokeObjectURL(url), 1000);
}