scai
Version:
> AI-powered CLI tools for smart commit messages, auto generated comments, and readme files — all powered by local models.
13 lines (12 loc) • 412 B
JavaScript
// File: src/commands/SummaryCmd.ts
import fs from 'fs/promises';
import { summaryModule } from '../pipeline/modules/summaryModule.js';
export async function summarizeFile(filepath) {
try {
const code = await fs.readFile(filepath, 'utf-8');
await summaryModule.run({ code });
}
catch (err) {
console.error(`❌ Could not read or summarize ${filepath}:`, err.message);
}
}