Merge branch 'main' into feature_iflytek
This commit is contained in:
commit
7e1a643e70
2 changed files with 1 additions and 7 deletions
|
|
@ -41,22 +41,16 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio
|
||||||
- Features:
|
- Features:
|
||||||
- Line-based and multi-line content matching
|
- Line-based and multi-line content matching
|
||||||
- Whitespace normalization with indentation preservation
|
- Whitespace normalization with indentation preservation
|
||||||
- Fuzzy matching with confidence scoring
|
|
||||||
- Multiple simultaneous edits with correct positioning
|
- Multiple simultaneous edits with correct positioning
|
||||||
- Indentation style detection and preservation
|
- Indentation style detection and preservation
|
||||||
- Git-style diff output with context
|
- Git-style diff output with context
|
||||||
- Preview changes with dry run mode
|
- Preview changes with dry run mode
|
||||||
- Failed match debugging with confidence scores
|
|
||||||
- Inputs:
|
- Inputs:
|
||||||
- `path` (string): File to edit
|
- `path` (string): File to edit
|
||||||
- `edits` (array): List of edit operations
|
- `edits` (array): List of edit operations
|
||||||
- `oldText` (string): Text to search for (can be substring)
|
- `oldText` (string): Text to search for (can be substring)
|
||||||
- `newText` (string): Text to replace with
|
- `newText` (string): Text to replace with
|
||||||
- `dryRun` (boolean): Preview changes without applying (default: false)
|
- `dryRun` (boolean): Preview changes without applying (default: false)
|
||||||
- `options` (object): Optional formatting settings
|
|
||||||
- `preserveIndentation` (boolean): Keep existing indentation (default: true)
|
|
||||||
- `normalizeWhitespace` (boolean): Normalize spaces while preserving structure (default: true)
|
|
||||||
- `partialMatch` (boolean): Enable fuzzy matching (default: true)
|
|
||||||
- Returns detailed diff and match information for dry runs, otherwise applies changes
|
- Returns detailed diff and match information for dry runs, otherwise applies changes
|
||||||
- Best Practice: Always use dryRun first to preview changes before applying them
|
- Best Practice: Always use dryRun first to preview changes before applying them
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ const allowedDirectories = args.map(dir =>
|
||||||
// Validate that all directories exist and are accessible
|
// Validate that all directories exist and are accessible
|
||||||
await Promise.all(args.map(async (dir) => {
|
await Promise.all(args.map(async (dir) => {
|
||||||
try {
|
try {
|
||||||
const stats = await fs.stat(dir);
|
const stats = await fs.stat(expandHome(dir));
|
||||||
if (!stats.isDirectory()) {
|
if (!stats.isDirectory()) {
|
||||||
console.error(`Error: ${dir} is not a directory`);
|
console.error(`Error: ${dir} is not a directory`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue