Skip to main content

Module utils

Module utils 

Source
Expand description

Utility modules for the Winx application.

This module contains various utility functions and types used throughout the application, such as file and path handling, repository analysis, etc.

Modules§

bash_parser
display_tree
Directory-tree renderer, ported from wcgw’s display_tree.DirectoryTree.
encoder
Claude-compatible token counting.
mmap
mode_prompts
Behavioral prompts injected per operating mode, ported from wcgw’s modes.py.
output_compress
Conscious compression of noisy shell output.
path
path_prob
File-path relevance ranking, ported from wcgw’s FastPathAnalyzer.
redact
Secret redaction for outgoing tool output.
repo
Repository context, ported for parity with wcgw’s repo_context.py.
scratch_file
Offload the dropped head of an over-long PTY output to a scratch file.
symbols
Symbol/outline extraction via tree-sitter-tags and each grammar’s embedded TAGS_QUERY — the same engine GitHub uses for code navigation. We surface only definitions (functions, types, methods, …), not references.
syntax
workspace_stats

Functions§

floor_char_boundary
Largest index <= idx that is a char boundary of s.
test_json_parsing
Debug helper to test JSON parsing of an Initialize request