@@ -120,20 +120,20 @@ EOF
120120
121121## Chat Key Mappings
122122
123- | Insert | Normal | Action |
124- | ------- | ------- | --------------------------------------------------- |
123+ | Insert | Normal | Action |
124+ | ------- | ------- | ---------------------------------------------------- |
125125| ` <Tab> ` | - | ** Autocomplete resources/files/options** (use this!) |
126- | ` <C-c> ` | ` q ` | Close the chat window |
127- | ` <C-l> ` | ` <C-l> ` | Reset and clear the chat window |
128- | ` <C-s> ` | ` <CR> ` | Submit the current prompt |
129- | ` <C-y> ` | ` <C-y> ` | Accept nearest diff |
130- | - | ` gj ` | Jump to section of nearest diff |
131- | - | ` gqa ` | Add all answers from chat to quickfix |
132- | - | ` gqd ` | Add all diffs from chat to quickfix |
133- | - | ` gy ` | Yank nearest diff to register |
134- | - | ` gd ` | Show diff between source and nearest diff |
135- | - | ` gc ` | Show info about current chat |
136- | - | ` gh ` | Show help message |
126+ | ` <C-c> ` | ` q ` | Close the chat window |
127+ | ` <C-l> ` | ` <C-l> ` | Reset and clear the chat window |
128+ | ` <C-s> ` | ` <CR> ` | Submit the current prompt |
129+ | ` <C-y> ` | ` <C-y> ` | Accept nearest diff |
130+ | - | ` gj ` | Jump to section of nearest diff |
131+ | - | ` gqa ` | Add all answers from chat to quickfix |
132+ | - | ` gqd ` | Add all diffs from chat to quickfix |
133+ | - | ` gy ` | Yank nearest diff to register |
134+ | - | ` gd ` | Show diff between source and nearest diff |
135+ | - | ` gc ` | Show info about current chat |
136+ | - | ` gh ` | Show help message |
137137
138138** 💡 Pro tip:** After typing ` # ` , ` @ ` , ` #buffer: ` , or ` #file: ` , press ` <Tab> ` to see available options. This is the fastest way to work!
139139
@@ -153,18 +153,18 @@ EOF
153153
154154All predefined functions belong to the ` copilot` group .
155155
156- | Function | Manual ` #...` | Description | Available Options |
157- | ---- ------- | ------------- | ------------------------------------------------------ | -------------------------------------------------------------------------- |
158- | ` bash` | No | Executes a bash command and returns output | Tool - only (use ` @copilot` ) |
159- | ` buffer` | Yes | Retrieves content from buffer (s ) with diagnostics | ` active` , ` visible` , ` listed` , ` quickfix` , buffer number , or filename |
160- | ` clipboard` | Yes | Provides access to system clipboard content | No options |
161- | ` edit` | No | Applies a unified diff to a file | Tool - only (use ` @copilot` ) |
162- | ` file` | Yes | Reads content from a specified file path | Any file path (use ` <Tab>` for completion ) |
163- | ` gitdiff` | Yes | Retrieves git diff information | ` unstaged` (default ), ` staged` , or commit SHA |
164- | ` glob` | Yes | Lists filenames matching a pattern in workspace | Any glob pattern (default : ` **/*` ) |
165- | ` grep` | Yes | Searches for a pattern across files in workspace | Any search pattern |
166- | ` selection` | Yes | Includes the current visual selection with diagnostics | No options |
167- | ` url` | Yes | Fetches content from a specified URL | Any HTTPS URL |
156+ | Function | Manual ` #...` | Description | Available Options |
157+ | ---- ------- | ------------- | ------------------------------------------------------ | --------------------------------------------------------------------- |
158+ | ` bash` | No | Executes a bash command and returns output | Tool - only (use ` @copilot` ) |
159+ | ` buffer` | Yes | Retrieves content from buffer (s ) with diagnostics | ` active` , ` visible` , ` listed` , ` quickfix` , buffer number , or filename |
160+ | ` clipboard` | Yes | Provides access to system clipboard content | No options |
161+ | ` edit` | No | Applies a unified diff to a file | Tool - only (use ` @copilot` ) |
162+ | ` file` | Yes | Reads content from a specified file path | Any file path (use ` <Tab>` for completion ) |
163+ | ` gitdiff` | Yes | Retrieves git diff information | ` unstaged` (default ), ` staged` , or commit SHA |
164+ | ` glob` | Yes | Lists filenames matching a pattern in workspace | Any glob pattern (default : ` **/*` ) |
165+ | ` grep` | Yes | Searches for a pattern across files in workspace | Any search pattern |
166+ | ` selection` | Yes | Includes the current visual selection with diagnostics | No options |
167+ | ` url` | Yes | Fetches content from a specified URL | Any HTTPS URL |
168168
169169- ** ` #<function>` ** - Embeds output directly in your message (e .g ., ` #buffer:listed` , ` #file:src/main.lua` )
170170- ** ` @<function/group>` ** - Makes function (s ) available for LLM to call when needed (e .g ., ` @copilot` , ` @file` )
@@ -185,21 +185,27 @@ All predefined functions belong to the `copilot` group.
185185
186186` ` ` markdown
187187# Current buffer
188+
188189# buffer :active
189190
190191# All open buffers (replaces old # buffers )
192+
191193# buffer :listed
192194
193195# All visible buffers
196+
194197# buffer :visible
195198
196199# Specific file
200+
197201# file :src / main .lua
198202
199203# Git changes
204+
200205# gitdiff :staged
201206
202207# URL content
208+
203209# url :https :// example .com / docs
204210```
205211
@@ -209,12 +215,14 @@ When you use `@copilot`, the LLM can call functions from the `copilot` group suc
209215
210216``` markdown
211217# Give LLM access to workspace tools
218+
212219@copilot What files are in this project?
213220
214221# Sticky context with tools
222+
215223> #buffer: listed
216224> @copilot
217- Refactor the authentication code
225+ > Refactor the authentication code
218226```
219227
220228By default, tool calls require manual approval. Configure ` trusted_tools ` to automatically run specific tools (see [ Functions] ( #functions ) ).
@@ -353,6 +361,7 @@ Use `trusted_tools` to control which tool calls are executed automatically:
353361** How tool trust works:**
354362
355363A tool is trusted when any of these match:
364+
356365- Its function definition sets ` trusted = true `
357366- Its function name appears in ` trusted_tools `
358367- Its function group appears in ` trusted_tools `
0 commit comments