Skip to content

Multiple Copilot Improvements#251

Open
hendrikmennen wants to merge 1 commit into
mainfrom
feat/copilot-trim-tools-autopilot-sysmsg
Open

Multiple Copilot Improvements#251
hendrikmennen wants to merge 1 commit into
mainfrom
feat/copilot-trim-tools-autopilot-sysmsg

Conversation

@hendrikmennen

@hendrikmennen hendrikmennen commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This pull request removes several AI file and directory management functions and their supporting code from AiBuiltInFunctions.cs, streamlining the available built-in AI functions. It also introduces a DetailExtractor for file read/edit functions to provide more contextual information, and improves how function execution details are reported in the UI. Additionally, there are minor improvements to terminal command descriptions and output handling.

Removed AI file/directory management functions and supporting code:

  • Removed the following built-in AI functions: searchFiles, listDirectory, pathExists, createDirectory, movePath, and deletePath. All related handler methods and helper types (SearchMatch, DirectoryEntry, and their logic) have also been deleted from AiBuiltInFunctions.cs. [1] [2] [3] [4] [5] [6] [7]

Function execution reporting improvements:

  • Added the DetailExtractor property to file read/edit functions, which provides a relative file path for better context in UI notifications. [1] [2] [3]
  • Updated the function provider to use the extracted detail when reporting function execution, improving the clarity of function activity in the UI.

Terminal command improvements:

  • Clarified the description for the terminal execution function to specify that commands run in the IDE terminal panel.

Minor changes:

  • Adjusted function result reporting: now omits the generic success message when no exception occurs, only showing output if there is an error.
  • Removed unnecessary using System.Text.RegularExpressions; after deleting related code.

…ystem message sections

Removed 6 built-in AI tool registrations that duplicate the Copilot CLI's
own native capabilities (searchFiles, listDirectory, pathExists,
createDirectory, movePath, deletePath). The CLI handles these natively
via its Grep/Glob/LS/Bash tools with no extra RPC overhead.
Kept the 9 IDE-specific tools that the CLI cannot provide on its own:
readFile (reads live editor buffer), editFile (opens diff tab in IDE),
runTerminalCommand (routes through IDE terminal panel), getActiveProject,
getOpenFiles, getFocusedFile, getErrorsForFile, getAllErrors, openIDESettings.
Added Autopilot mode: a new checkbox setting under 'AI Chat > Copilot CLI'
that auto-approves all permission requests (OnPreToolUse + OnPermissionRequest)
without showing confirmation dialogs - equivalent to Claude Code's auto-accept.
Added IOneWareAiFunction.DetailExtractor: an optional delegate that extracts
a short human-readable label (e.g. relative file path) from invocation
arguments. readFile and editFile now surface the relative path as ToolOutput
in the chat message. The generic 'Tool {id} succeeded.' message is removed.
Replaced the monolithic CopilotModule.SystemMessage constant with SDK-native
SystemMessageMode.Customize section overrides. Each concern is scoped to
its proper SystemMessageSection (Identity, EnvironmentContext, ToolInstructions,
CodeChangeRules, Tone, Safety, RuntimeInstructions) using SectionOverrideAction.Append
so the SDK's own defaults are preserved and only IDE-specific content is added.
@hendrikmennen hendrikmennen changed the title feat(copilot): trim redundant AI tools, add Autopilot mode, use SDK s… Varous Copilot Improvements Jun 22, 2026
@hendrikmennen hendrikmennen changed the title Varous Copilot Improvements Multiple Copilot Improvements Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant