πŸ“„ File detail

tools/FileEditTool/constants.ts

🧩 .tsπŸ“ 12 linesπŸ’Ύ 538 bytesπŸ“ text
← Back to All Files

🎯 Use case

This module implements the β€œFileEditTool” tool (File Edit) β€” something the model can call at runtime alongside other agent tools. On the API surface it exposes FILE_EDIT_TOOL_NAME, CLAUDE_FOLDER_PERMISSION_PATTERN, GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN, and FILE_UNEXPECTEDLY_MODIFIED_ERROR β€” mainly types, interfaces, or factory objects.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

// In its own file to avoid circular dependencies export const FILE_EDIT_TOOL_NAME = 'Edit' // Permission pattern for granting session-level access to the project's .claude/ folder export const CLAUDE_FOLDER_PERMISSION_PATTERN = '/.claude/**'

πŸ“€ Exports (heuristic)

  • FILE_EDIT_TOOL_NAME
  • CLAUDE_FOLDER_PERMISSION_PATTERN
  • GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN
  • FILE_UNEXPECTEDLY_MODIFIED_ERROR

πŸ–₯️ Source preview

// In its own file to avoid circular dependencies
export const FILE_EDIT_TOOL_NAME = 'Edit'

// Permission pattern for granting session-level access to the project's .claude/ folder
export const CLAUDE_FOLDER_PERMISSION_PATTERN = '/.claude/**'

// Permission pattern for granting session-level access to the global ~/.claude/ folder
export const GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN = '~/.claude/**'

export const FILE_UNEXPECTEDLY_MODIFIED_ERROR =
  'File has been unexpectedly modified. Read it again before attempting to write it.'