Skip to content

Commit

Permalink
Remove unused integration YAML constant and related code references
Browse files Browse the repository at this point in the history
  • Loading branch information
JegernOUTT committed Dec 12, 2024
1 parent a6a504e commit 247ef98
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 79 deletions.
76 changes: 0 additions & 76 deletions src/integrations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,79 +74,3 @@ pub fn integrations_list(allow_experimental: bool) -> Vec<&'static str> {
pub fn go_to_configuration_message(integration_name: &str) -> String {
format!("🧩 for configuration go to SETTINGS:{integration_name}")
}


pub const INTEGRATIONS_DEFAULT_YAML: &str = r#"# This file is used to configure integrations in Refact Agent.
# If there is a syntax error in this file, no integrations will work.
#
# Here you can set up which commands require confirmation or must be denied. If both apply, the command is denied.
# Rules use glob patterns for wildcard matching (https://en.wikipedia.org/wiki/Glob_(programming))
# Command line: things you can call and immediately get an answer
#cmdline:
# run_make:
# command: "make"
# command_workdir: "%project_path%"
# timeout: 600
# description: "Run `make` inside a C/C++ project, or a similar project with a Makefile."
# parameters: # this is what the model needs to produce, you can use %parameter% in command and workdir
# - name: "project_path"
# description: "absolute path to the project"
# output_filter: # output filter is optional, can help if the output is very long to reduce it, preserving valuable information
# limit_lines: 50
# limit_chars: 10000
# valuable_top_or_bottom: "top" # the useful infomation more likely to be at the top or bottom? (default "top")
# grep: "(?i)error|warning" # in contrast to regular grep this doesn't remove other lines from output, just prefers matching when approaching limit_lines or limit_chars (default "(?i)error")
# grep_context_lines: 5 # leave that many lines around a grep match (default 5)
# remove_from_output: "process didn't exit" # some lines are very long and unwanted, this is also a regular expression (default "")
#cmdline_services:
# manage_py_runserver:
# command: "python manage.py runserver"
# command_workdir: "%project_path%"
# description: "Start or stop `python manage.py runserver` running in the background"
# parameters:
# - name: "project_path"
# description: "absolute path to the project"
# startup_wait: 10
# startup_wait_port: 8000
# --- Docker integration ---
docker:
docker_daemon_address: "unix:///var/run/docker.sock" # Path to the Docker daemon. For remote Docker, the path to the daemon on the remote server.
# docker_cli_path: "/usr/local/bin/docker" # Uncomment to set a custom path for the docker cli, defaults to "docker"
# Uncomment the following to connect to a remote Docker daemon
# Docker and necessary ports will be forwarded for container communication. No additional commands will be executed over SSH.
# ssh_config:
# host: "<your_server_domain_or_ip_here>"
# user: "root"
# port: 22
# identity_file: "~/.ssh/id_rsa"
run_chat_threads_inside_container: false
# The folder inside the container where the workspace is mounted, refact-lsp will start there, defaults to "/app"
# container_workspace_folder: "/app"
# Image ID for running containers, which can later be selected in the UI before starting a chat thread.
# docker_image_id: "079b939b3ea1"
# Map container ports to local ports
# ports:
# - local_port: 4000
# container_port: 3000
# Path to the LSP binary on the host machine, to be bound into the containers.
host_lsp_path: "/opt/refact/bin/refact-lsp"
# Will be added as a label to containers, images, and other resources created by Refact Agent, defaults to "refact"
label: "refact"
# Uncomment to execute a command inside the container when the thread starts. Regardless, refact-lsp will run independently of this setting.
# command: "npm run dev"
# The time in minutes that the containers will be kept alive while not interacting with the chat thread, defaults to 60.
keep_containers_alive_for_x_minutes: 60
"#;
1 change: 0 additions & 1 deletion src/integrations/setting_up_integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use tokio::fs as async_fs;
use tokio::io::AsyncWriteExt;

use crate::global_context::GlobalContext;
use crate::integrations::integr_abstract::IntegrationTrait;
// use crate::tools::tools_description::Tool;
// use crate::yaml_configs::create_configs::{integrations_enabled_cfg, read_yaml_into_value};

Expand Down
3 changes: 1 addition & 2 deletions src/yaml_configs/create_configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ pub async fn yaml_configs_try_create_all(gcx: Arc<ARwLock<GlobalContext>>) -> St
let files = vec![
("bring-your-own-key.yaml", crate::caps::BRING_YOUR_OWN_KEY_SAMPLE),
("customization.yaml", crate::yaml_configs::customization_compiled_in::COMPILED_IN_INITIAL_USER_YAML),
("privacy.yaml", crate::privacy_compiled_in::COMPILED_IN_INITIAL_PRIVACY_YAML),
("integrations.yaml", crate::integrations::INTEGRATIONS_DEFAULT_YAML),
("privacy.yaml", crate::privacy_compiled_in::COMPILED_IN_INITIAL_PRIVACY_YAML)
];

for (file_name, content) in files {
Expand Down

0 comments on commit 247ef98

Please sign in to comment.