Skip to content

Commit 0e74363

Browse files
committed
Update AI tool documentation structure and descriptions
Restructured the documentation of built-in AI tools into logical categories with clearer section headings. Updated descriptions to include parameter types and clarified behaviors for tools like `ReadFileContent` and `FindInFiles`. Fixed minor style in theme configuration. * docs Generated by CodeLite Signed-off-by: Eran Ifrah <eran@codelite.org>
1 parent 14d27bd commit 0e74363

File tree

2 files changed

+49
-46
lines changed

2 files changed

+49
-46
lines changed

docs/docs/AI/ai.md

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -70,57 +70,60 @@ or to instruct the model to perform tasks.
7070

7171
CodeLite exposes the following built-in tools for the model:
7272

73-
### File Operations
74-
- **ReadFileContent** - Read file contents
75-
- `filepath` (required): Path to the file to read
76-
- `from_line` (optional): Starting line number (1-based)
77-
- `line_count` (optional): Number of lines to read
78-
79-
- **CreateNewFile** - Create a new file with optional content
80-
- `filepath` (required): Path where the new file should be created
81-
- `file_content` (optional): Initial content to write to the file
82-
83-
- **OpenFileInEditor** - Open a file for editing or viewing
84-
- `filepath` (required): Path of the file to open
85-
86-
- **ApplyPatch** - Apply a git-style diff patch to a file
87-
- `file_path` (required): Path to the file to patch
88-
- `patch_content` (required): Git-style diff patch content to apply
89-
90-
### Search
91-
- **FindInFiles** - Search for a pattern within files in a directory
92-
- `root_folder` (required): Root directory where search begins
93-
- `find_what` (required): Text pattern to search for
94-
- `file_pattern` (required): File pattern to match (e.g., "*.txt", "*.py")
95-
- `case_sensitive` (optional): Enable case-sensitive matching (default: true)
96-
- `is_regex` (optional): Treat find_what as regex pattern (default: false)
97-
- `whole_word` (optional): Match only complete words (default: true)
73+
### File & Workspace Management
74+
- **CreateNewFile** - Create a new file at the specified path with optional content
75+
- `filepath` (string): The path where the new file should be created
76+
- `file_content` (string): The initial content to write to the file
9877

99-
### Git Operations
100-
- **GetLogInRangeCommit** - Return git history between two commits
101-
- `start_commit` (required): First commit in the range
102-
- `end_commit` (required): Second commit in the range
103-
104-
### Workspace Management
105-
- **CreateWorkspace** - Create a new workspace (local or remote)
106-
- `path` (required): Directory path where workspace should be created
107-
- `name` (optional): Name of the workspace to create
108-
- `host` (optional): SSH host for creating a remote workspace
78+
- **CreateWorkspace** - Create a new workspace at the given path with the provided name
79+
- `path` (string): The directory path where the workspace should be created
80+
- `name` (string): The name of the workspace to create
81+
- `host` (string): The SSH host for creating a remote workspace
10982

110-
### Editor Information
111-
- **GetActiveEditorFilePath** - Get the file path of the currently active editor (no arguments)
83+
- **ReadFileContent** - Read the content of a file from the disk
84+
- `filepath` (string): The path of the file to read
85+
- `from_line` (number, optional): Starting line number (1-based) to read from
86+
- `line_count` (number, optional): Number of lines to read
11287

113-
- **GetActiveEditorText** - Get the text content of the active editor tab (no arguments)
88+
- **OpenFileInEditor** - Try to open a file and load it into the editor for editing or viewing
89+
- `filepath` (string): The path of the file to open inside the editor
11490

115-
### System Information
116-
- **GetOS** - Get the current active operating system (no arguments)
91+
- **GetActiveEditorFilePath** - Retrieves the file path of the currently active editor
92+
- (no parameters)
11793

118-
### Build & Compilation
119-
- **ReadCompilerOutput** - Read the most recent build command's compiler output (no arguments)
94+
- **GetActiveEditorText** - Return the text of the active tab inside the editor
95+
- `from_line` (number, optional): Optional starting line (1-based)
96+
- `count` (number, optional): Number of lines to read
12097

121-
### Shell Execution
122-
- **ShellExecute** - Execute a shell command
123-
- `command` (required): The shell command to execute
98+
### Git Operations
99+
- **ApplyPatch** - Apply a git style diff patch to a file
100+
- `patch_content` (string): The git style diff patch content to apply
101+
- `file_path` (string): The path to the file that should be patched
102+
103+
- **GetLogInRangeCommit** - Return git history of commits between a range of commits
104+
- `start_commit` (string): The first commit in the range
105+
- `end_commit` (string): The second commit in the range
106+
107+
### Search & Exploration
108+
- **FindInFiles** - Search for a given pattern within files in a directory (using `grep`)
109+
- `root_folder` (string): The root directory where the search begins
110+
- `find_what` (string): The text pattern to search for
111+
- `file_pattern` (string): The file pattern to match
112+
- `case_sensitive` (boolean, optional): When enabled, performs case-sensitive matching
113+
- `whole_word` (boolean, optional): When enabled, matches only complete words
114+
- `is_regex` (boolean, optional): When enabled, treats find_what as a regular expression pattern
115+
- `context_lines_before` (number, optional): Number of lines to display before each match
116+
- `context_lines_after` (number, optional): Number of lines to display after each match
117+
118+
### System & Execution
119+
- **GetOS** - Return the current active OS
120+
- (no parameters)
121+
122+
- **ShellExecute** - Execute a shell command and return its output
123+
- `command` (string): The shell command to execute
124+
125+
- **ReadCompilerOutput** - Read and fetches the compiler build log output of the most recent build command executed by the user
126+
- (no parameters)
124127

125128
### Quick Example
126129

docs/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ nav:
8181
- CodeLite 13.0: downloads/oldDownloads/Repositories13.md
8282
- CodeLite 12.0: downloads/oldDownloads/Repositories12.md
8383
theme:
84-
name: 'material'
84+
name: material
8585
features:
8686
- navigation.tabs
8787
- navigation.sections

0 commit comments

Comments
 (0)