Skip to main content

Module common

Module common 

Source
Expand description

Utility functions for the VT Code agent

This module contains common utility functions that are used across different parts of the VT Code agent, helping to reduce code duplication and improve maintainability.

Structs§

ProjectOverview
Lightweight project overview extracted from workspace files

Functions§

build_project_overview
Build a minimal project overview from Cargo.toml and README.md
current_timestamp
Get current Unix timestamp in seconds
detect_workspace_languages
Detect the dominant workspace languages using file extension heuristics.
display_language_from_editor_language_id
display_language_from_path
extract_readme_excerpt
Get the first meaningful section of the README/markdown as an excerpt
extract_toml_str
Extract a string value from a simple TOML key assignment within the [package] section
merge_env_patterns
Merge a base list of patterns with patterns loaded from an environment variable. The environment variable, if set, is expected to be a comma-separated list of values.
render_pty_output_fn
Render PTY output in a terminal-like interface
safe_replace_text
Safe text replacement with validation
summarize_workspace_languages
Summarize workspace languages using file extension heuristics