Skip to content

Commit f837f64

Browse files
committed
Rename restrict shell commands requirement to disable tool calling across documentation and codebase
1 parent 3a15ba3 commit f837f64

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Output strictly as a bulleted list of file paths without explanations or any oth
150150
151151
# Requirements
152152
153-
- All project's files were preloaded to [files](#files). You cannot look for other files.
153+
- All project's files were preloaded to [files](#files). You must work strictly within the provided context.
154154
- Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.
155155
156156
# Query
@@ -195,7 +195,7 @@ Whenever showing a new, updated, renamed, or deleted file, provide a brief expla
195195
196196
# Requirements
197197
198-
- All project's files were preloaded to [files](#files). You cannot look for other files.
198+
- All project's files were preloaded to [files](#files). You must work strictly within the provided context.
199199
- Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.
200200
- Exception: If [task](#task) includes *.png image paths, read them using the appropriate tool.
201201
- Exception: Perform file system operations (create, update, delete) required to complete the [task](#task).
@@ -236,7 +236,7 @@ _Explanations, planning, and analysis._
236236
237237
# Requirements
238238
239-
- All project's files were preloaded to [files](#files). You cannot look for other files.
239+
- All project's files were preloaded to [files](#files). You must work strictly within the provided context.
240240
- Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.
241241
- Exception: If [task](#task) includes *.png image paths, read them using the appropriate tool.
242242
@@ -327,7 +327,7 @@ Example:
327327
328328
# Requirements
329329
330-
- All project's files were preloaded to [files](#files). You cannot look for other files.
330+
- All project's files were preloaded to [files](#files). You must work strictly within the provided context.
331331
- Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.
332332
333333
# Task
@@ -387,7 +387,7 @@ Your response must begin with "**Commit message:**", then proceed with the messa
387387
388388
# Requirements
389389
390-
- All project's files were preloaded to [files](#files). You cannot look for other files.
390+
- All project's files were preloaded to [files](#files). You must work strictly within the provided context.
391391
- Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.
392392
393393
# Task

‎apps/editor/src/commands/code-at-cursor-command/utils/perform-code-at-cursor.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export const perform_code_at_cursor = async (params: {
364364
output_formatting: code_at_cursor_output_formatting,
365365
requirements: [
366366
cli_edit_ask_requirements.preloaded_context,
367-
cli_edit_ask_requirements.restrict_shell_commands
367+
cli_edit_ask_requirements.disable_tool_calling
368368
],
369369
user_instructions: code_at_cursor_user_instructions
370370
})

‎apps/editor/src/commands/generate-commit-message-commands/utils/build-commit-message-prompt.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export const build_commit_message_prompt = async (
220220

221221
const api_prompt = `${prompt_sections}\n\n# Task\n\n${commit_message_prompt}`
222222
const chatbot_prompt = `${prompt_sections}\n\n# Output formatting\n\n${commit_message_format}\n\n# Task\n\n${commit_message_prompt}`
223-
const cli_prompt = `${prompt_sections}\n\n# Output formatting\n\n${commit_message_format}\n\n# Requirements\n\n- ${cli_edit_ask_requirements.preloaded_context}\n- ${cli_edit_ask_requirements.restrict_shell_commands}\n\n# Task\n\n${commit_message_prompt}`
223+
const cli_prompt = `${prompt_sections}\n\n# Output formatting\n\n${commit_message_format}\n\n# Requirements\n\n- ${cli_edit_ask_requirements.preloaded_context}\n- ${cli_edit_ask_requirements.disable_tool_calling}\n\n# Task\n\n${commit_message_prompt}`
224224

225225
return { api_prompt, chatbot_prompt, cli_prompt }
226226
}

‎apps/editor/src/constants/instructions.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ export const voice_input_instructions =
7070

7171
export const cli_edit_ask_requirements = {
7272
preloaded_context:
73-
"All project's files were preloaded to [files](#files). You cannot look for other files.",
74-
restrict_shell_commands:
73+
'All available files were preloaded to [files](#files). You must work strictly within the provided context.',
74+
disable_tool_calling:
7575
'Calling tools, including shell commands (e.g. grep, glob, ls, git, etc.) is FORBIDDEN.',
7676
exception_read_images:
7777
'Exception: If [task](#task) includes *.png image paths, read them using the appropriate tool.',
78-
exception_allow_file_system_operations:
79-
'Exception: Perform file system operations (create, update, delete) required to complete the [task](#task).',
8078
exception_read_audio:
81-
'Exception: If [task](#task) includes *.wav audio file paths, read them using the appropriate tool.'
79+
'Exception: If [task](#task) includes *.wav audio file paths, read them using the appropriate tool.',
80+
exception_allow_file_system_operations:
81+
'Exception: Perform file system operations (create, update, delete) required to complete the [task](#task).'
8282
}

‎apps/editor/src/features/search-files/search-modes/perform-intelligent-search-mode.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export const perform_intelligent_search_mode = async (params: {
423423
? default_agent.name
424424
: undefined
425425

426-
const cli_prompt = `# Files\n\n${md_files}# Task\n\n${base_instructions}\n\n# Output formatting\n\n${ai_file_search_format_instructions}\n\n# Requirements\n\n- ${cli_edit_ask_requirements.preloaded_context}\n- ${cli_edit_ask_requirements.restrict_shell_commands}\n\n# Query\n\n${search_term}`
426+
const cli_prompt = `# Files\n\n${md_files}# Task\n\n${base_instructions}\n\n# Output formatting\n\n${ai_file_search_format_instructions}\n\n# Requirements\n\n- ${cli_edit_ask_requirements.preloaded_context}\n- ${cli_edit_ask_requirements.disable_tool_calling}\n\n# Query\n\n${search_term}`
427427

428428
const invoke_cli_result = await invoke_agentic_cli({
429429
workspace_provider: params.workspace_provider,

‎apps/editor/src/views/prompt/backend/message-handlers/handle-patch-repair.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export const handle_patch_repair = async (params: {
255255
}
256256
cli_prompt += `# Output formatting\n\n`
257257
cli_prompt += `${patch_repair_format_instructions}\n\n`
258-
cli_prompt += `# Requirements\n\n- ${cli_edit_ask_requirements.restrict_shell_commands}\n\n`
258+
cli_prompt += `# Requirements\n\n- ${cli_edit_ask_requirements.disable_tool_calling}\n\n`
259259
cli_prompt += `# Task\n\n${patch_repair_task_instructions}`
260260

261261
const config_codeWebChat = vscode.workspace.getConfiguration('codeWebChat')

‎apps/editor/src/views/prompt/backend/message-handlers/handle-voice-input.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const stop_recording = async (prompt_view_provider: PromptViewProvider) => {
213213
)
214214
await fs.promises.writeFile(temp_audio_path, audio_buffer)
215215

216-
const cli_prompt = `# Task\n\n${voice_input_instructions}\n\nAudio file: \`${temp_audio_path.replace(/\\/g, '/')}\`\n\n# Requirements\n\n- ${cli_edit_ask_requirements.restrict_shell_commands}\n- ${cli_edit_ask_requirements.exception_read_audio}`
216+
const cli_prompt = `# Task\n\n${voice_input_instructions}\n\nAudio file: \`${temp_audio_path.replace(/\\/g, '/')}\`\n\n# Requirements\n\n- ${cli_edit_ask_requirements.disable_tool_calling}\n- ${cli_edit_ask_requirements.exception_read_audio}`
217217

218218
const invoke_cli_result = await invoke_agentic_cli({
219219
workspace_provider: prompt_view_provider.workspace_provider,

‎apps/editor/src/views/prompt/backend/message-handlers/utils/build-cli-prompt.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const build_cli_prompt = async (params: {
7575
}
7676

7777
const requirements_list = [cli_edit_ask_requirements.preloaded_context]
78-
requirements_list.push(cli_edit_ask_requirements.restrict_shell_commands)
78+
requirements_list.push(cli_edit_ask_requirements.disable_tool_calling)
7979

8080
if (prompt_view_provider.cli_prompt_type == 'edit-files') {
8181
requirements_list.push(cli_edit_ask_requirements.exception_read_images)

0 commit comments

Comments
 (0)