char-slop/ai-dots

ai dotfiles

git clone https://git.t4t.associates/char-slop/ai-dots

Charlotte Somcomputer-use: allow native-resolution monitor selection under Windows67898d2

main
1 folder4 files

files

src/
.gitignore15 B
Cargo.lock47.9 KiB
Cargo.toml291 B
README.md897 B

visualize-code

renders a slice of a source file as a syntax-highlighted png (catppuccin latte, ioskeley mono) for the visualize_code tool in extensions/hashline/visualize-code.ts.

visualize-code <out.png> <path> <first-line> <label>... < source

stdin is the whole file, so highlighting has full context; path is only used to detect the language. one line is rendered per label, starting at first-line (1-indexed), until the image would get big enough for providers to downsample it. the number of lines rendered is printed to stdout.

building

the fonts are embedded but not committed:

curl -sSLO https://github.com/ahatem/IoskeleyMono/releases/latest/download/IoskeleyMono-NL.zip
unzip -j IoskeleyMono-NL.zip 'Normal/Unhinted/IoskeleyMonoNL-'{Regular,Bold,Italic,BoldItalic}.ttf -d fonts
cargo build --release
cp target/release/visualize-code ../../libexec/