feat(lsp): implement auto-provisioning for language servers
- Added LSP auto-provisioning functionality to automatically install and connect language servers. - Introduced `shutdown_lsp` method to cleanly shut down LSP servers on application exit. - Enhanced `AppStateRest` to spawn a background thread for provisioning language servers. - Updated `builtin_agents` to include new LSP-related agents. - Modified settings to include options for LSP auto-provisioning and supported languages. - Updated file editing and writing tools to notify LSP servers of changes. - Enhanced LSP tools to support auto-detection of servers based on file extensions. - Added utility functions for managing known file extensions and resolving server names. - Created a new `provisioner` module to handle the provisioning logic for various language servers.
This commit is contained in:
@@ -28,6 +28,13 @@ pub fn builtin_agents() -> Vec<AgentDefinition> {
|
||||
"grep".to_string(),
|
||||
"glob".to_string(),
|
||||
"git_operator".to_string(),
|
||||
"lsp_connect".to_string(),
|
||||
"lsp_diagnostics".to_string(),
|
||||
"lsp_hover".to_string(),
|
||||
"lsp_definition".to_string(),
|
||||
"lsp_references".to_string(),
|
||||
"lsp_completion".to_string(),
|
||||
"lsp_disconnect".to_string(),
|
||||
]
|
||||
).with_max_steps(usize::MAX),
|
||||
|
||||
@@ -43,6 +50,10 @@ pub fn builtin_agents() -> Vec<AgentDefinition> {
|
||||
"glob".to_string(),
|
||||
"recall".to_string(),
|
||||
"remember".to_string(),
|
||||
"lsp_diagnostics".to_string(),
|
||||
"lsp_hover".to_string(),
|
||||
"lsp_definition".to_string(),
|
||||
"lsp_references".to_string(),
|
||||
]
|
||||
).with_max_steps(usize::MAX),
|
||||
|
||||
@@ -57,6 +68,8 @@ pub fn builtin_agents() -> Vec<AgentDefinition> {
|
||||
"grep".to_string(),
|
||||
"glob".to_string(),
|
||||
"search".to_string(),
|
||||
"lsp_definition".to_string(),
|
||||
"lsp_references".to_string(),
|
||||
]
|
||||
).with_max_steps(usize::MAX),
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ pub struct Settings {
|
||||
pub verify_timeout_ms: u64,
|
||||
pub workflow_max_concurrency: usize,
|
||||
pub session_archive_enabled: bool,
|
||||
pub lsp_auto_provision: bool,
|
||||
pub lsp_languages: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for Settings {
|
||||
@@ -58,6 +60,8 @@ impl Default for Settings {
|
||||
verify_timeout_ms: 30000,
|
||||
workflow_max_concurrency: 5,
|
||||
session_archive_enabled: true,
|
||||
lsp_auto_provision: true,
|
||||
lsp_languages: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user