Filehigh importancesource

constants.ts

tools/FileEditTool/constants.ts

12
Lines
538
Bytes
4
Exports
0
Imports
10
Keywords

What this is

This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.

Beginner explanation

This file is part of the tool layer, which means it describes actions the system can perform for the user or model.

How it is used

Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.

Expert explanation

Architecturally, this file intersects with tool-system, file-tools. It contains 12 lines, 0 detected imports, and 4 detected exports.

Important relationships

Detected exports

  • FILE_EDIT_TOOL_NAME
  • CLAUDE_FOLDER_PERMISSION_PATTERN
  • GLOBAL_CLAUDE_FOLDER_PERMISSION_PATTERN
  • FILE_UNEXPECTEDLY_MODIFIED_ERROR

Keywords

claudefilepermissionpatterngrantingsession-levelaccessfolderavoidcircular

Detected imports

  • No import paths detected.

Source notes

This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.

Open parent directory

Full source

// 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.'