Improve Python cel command set & tests#674
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and expands the application and document tool APIs, improves code organization, and enhances documentation for workspace context and Python scripting. The most significant changes include splitting up the original
AppToolsclass into focused partial classes, introducing new and improved endpoints for application and document management, and updating documentation to clarify context prioritization and Python API discovery.API Refactoring and Expansion
AppToolsclass was split into multiple partial classes, each in its own file, to improve maintainability and clarity. This includes moving methods for version info, logging, alerts, project status, and file refresh into separate files. [1] [2] [3] [4] [5] [6] [7] [8] [9]AppTools:AppVersion: Returns the application version string.GetProjectStatus: Returns project load state and name as JSON.LogInfo,LogWarning,LogError: Log messages at different severity levels. [1] [2] [3]RefreshFiles: Forces a refresh of the project file listing.ShowAlert: Displays an alert dialog to the user.Document Editing Tools
DocumentTools.ApplyEdits, which applies targeted text edits to a document and returns detailed information about affected line ranges and resulting line count, improving feedback for agent-driven edits.DocumentTools.Activateto activate an open document in the editor.Serialization and Utility Improvements
AgentToolBasewith camelCase property naming and null value omission, ensuring consistent API responses. [1] [2]ExecuteCommandAsyncto return a standardized success result.Documentation Updates
AgentContext.mdto clarify context prioritization when resolving file references, and added instructions for discovering the Python API and installed packages. [1] [2]Python Environment Info
PythonEnvironmentInfoto store the list of installed Python packages as reported by the Python host, enabling tools to query available packages at runtime.