Skip to content

refactor: replace synchronous fs calls in look-at.ts with async equivalents #17

@dscv103

Description

@dscv103

Problem

src/tools/look-at.ts uses statSync and readFileSync while every other tool and hook in the codebase uses node:fs/promises. These block the Bun event loop unnecessarily.

// CURRENT — blocks event loop const stats = statSync(args.filePath); const content = readFileSync(args.filePath, 'utf-8');

Fix

import { stat, readFile } from 'node:fs/promises'; // Inside execute (already async): const stats = await stat(args.filePath); const content = await readFile(args.filePath, 'utf-8');

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode improvement without behavior change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions