Skip to content

Commit 6feffa9

Browse files
koki-developclaude
andcommitted
docs: Update CLAUDE.md with improved command documentation
Add development commands and update technical details: - Add development command (bun run src/index.tsx) - Add global install command (bun link) - Correct cat response delay timing (300-1300ms) - Add exit control documentation (double Ctrl+C) - Update file editing details with streaming optimization 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 76f95f0 commit 6feffa9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CLAUDE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1212
- **Run tests**: `bun test` - Runs all test files (*.spec.ts)
1313
- **Run single test**: `bun test src/lib/util.spec.ts` - Run specific test file
1414
- **Test cat**: `bun test src/lib/cat.spec.ts` - Run cat vocabulary and emotion detection tests
15+
- **Development**: `bun run src/index.tsx` - Run the app directly without building
16+
- **Install globally**: `bun link` - Install as global `cat-code` command for testing
1517

1618
## Project Architecture
1719

@@ -51,9 +53,10 @@ The custom InputField component supports comprehensive terminal-style keybinding
5153
- **Message Persistence**: Uses Ink's `<Static>` component to render chat history that doesn't re-render
5254
- **Loading States**: Displays cyan spinner with "Thinking..." during cat response delay
5355
- **Input Management**: Disables cursor and prevents duplicate submissions during loading
54-
- **Cat Behavior**: Cat class provides contextual responses based on detected emotions, with 500ms delay for realistic interaction
56+
- **Cat Behavior**: Cat class provides contextual responses based on detected emotions, with random delay (300-1300ms) for realistic interaction
5557
- **Message Styling**: User messages prefixed with "> " in gray, cat messages prefixed with "⏺ " in cyan
5658
- **Multi-line Support**: Both user and cat messages use indent utility for proper 2+ line formatting
59+
- **Exit Control**: Double Ctrl+C required within 500ms to exit, single Ctrl+C clears input
5760

5861
### Build Process
5962
The build process creates a standalone executable CLI tool:
@@ -121,8 +124,9 @@ The cat occasionally "plays" with code files, making random edits and showing di
121124
### File Editing Behavior
122125
- **Trigger Probability**: 20% chance during cat responses (configurable in `cat.ts`)
123126
- **File Selection**: Prefers git-tracked files, falls back to glob patterns for text files
124-
- **Cat Word Replacement**: Randomly replaces up to 3 instances of words with cat sounds (ニャー, ミャー, etc.)
127+
- **Cat Word Replacement**: Randomly replaces words line-by-line with cat sounds (ニャー, ミャー, etc.) using streaming for memory efficiency
125128
- **Supported File Types**: txt, md, js, jsx, ts, tsx, json, css, html, xml, yml, yaml
129+
- **Memory Optimization**: Uses streaming with per-line processing to handle large files efficiently
126130

127131
### Diff Display System
128132
- **ANSI256 Colors**: Uses ansi256(52) for deletions (red background), ansi256(22) for additions (green background)

0 commit comments

Comments
 (0)