kandil_code 2.1.1

Intelligent development platform (CLI + TUI + Multi-Agent System) with cross-platform AI model benchmarking, system diagnostics, and advanced development tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use anyhow::Result;
use std::fs;
use std::path::Path;

pub const INDEX_HTML: &str = include_str!("../pwa/index.html");
pub const MANIFEST: &str = include_str!("../pwa/manifest.webmanifest");
pub const SERVICE_WORKER: &str = include_str!("../pwa/service_worker.js");

pub fn write_assets(dir: &Path) -> Result<()> {
    fs::create_dir_all(dir)?;
    fs::write(dir.join("index.html"), INDEX_HTML)?;
    fs::write(dir.join("manifest.webmanifest"), MANIFEST)?;
    fs::write(dir.join("sw.js"), SERVICE_WORKER)?;
    Ok(())
}