studio: sanitize public defaults
This commit is contained in:
@@ -53,8 +53,13 @@ App::App(const std::string& data_path)
|
||||
LlamaConfig llama_config;
|
||||
llama_config.llama_cli_path = "~/llama.cpp/build/bin/llama-cli";
|
||||
llama_config.model_path = "~/llama.cpp/models/tinyllama-1.1b.Q4_K_M.gguf";
|
||||
llama_config.rpc_servers = "100.104.53.21:50052";
|
||||
llama_config.use_rpc = true;
|
||||
const char* rpc_env = std::getenv("AFS_LLM_RPC_SERVERS");
|
||||
if (rpc_env && rpc_env[0] != '\0') {
|
||||
llama_config.rpc_servers = rpc_env;
|
||||
llama_config.use_rpc = true;
|
||||
} else {
|
||||
llama_config.use_rpc = false;
|
||||
}
|
||||
llama_config.context_size = 4096;
|
||||
llama_config.n_predict = 256;
|
||||
llama_config.temperature = 0.7f;
|
||||
|
||||
@@ -11,11 +11,17 @@ namespace afs {
|
||||
namespace studio {
|
||||
|
||||
TrainingMonitor::TrainingMonitor() {
|
||||
// Default Windows mount for medical-mechanica D:
|
||||
// Default Windows mount (optional).
|
||||
const char* env_mount = std::getenv("AFS_WINDOWS_MOUNT");
|
||||
if (env_mount && env_mount[0] != '\0') {
|
||||
config_.windows_mount_path = core::FileSystem::ResolvePath(env_mount);
|
||||
return;
|
||||
}
|
||||
|
||||
const char* home = std::getenv("HOME");
|
||||
if (home) {
|
||||
config_.windows_mount_path =
|
||||
std::filesystem::path(home) / "Mounts" / "mm-d" / "afs_training";
|
||||
std::filesystem::path(home) / "Mounts" / "windows-training";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ struct TrainingMonitorConfig {
|
||||
std::string windows_training_dir = "D:/afs_training";
|
||||
|
||||
// SSH config (fallback if mount not available)
|
||||
std::string ssh_host = "medical-mechanica";
|
||||
std::string ssh_user = "Administrator";
|
||||
std::string ssh_host;
|
||||
std::string ssh_user;
|
||||
|
||||
// Auto-refresh
|
||||
bool auto_refresh = true;
|
||||
|
||||
@@ -391,23 +391,19 @@ bool DataLoader::Refresh() {
|
||||
mounts_.push_back({name, path, path_exists_(path)});
|
||||
};
|
||||
|
||||
add_mount("Code", "~/Code");
|
||||
add_mount("Home", "~");
|
||||
auto trunk_root = ResolveTrunkRoot();
|
||||
if (trunk_root) {
|
||||
add_mount("Trunk", trunk_root->string());
|
||||
add_mount("Workspace", trunk_root->string());
|
||||
}
|
||||
auto scawful_root = ResolveHafsScawfulRoot();
|
||||
if (scawful_root) {
|
||||
add_mount("afs_scawful", scawful_root->string());
|
||||
auto plugin_root = ResolveHafsScawfulRoot();
|
||||
if (plugin_root) {
|
||||
add_mount("AFS Plugin", plugin_root->string());
|
||||
}
|
||||
add_mount("usdasm", "~/Code/usdasm");
|
||||
add_mount("Medical Mechanica (D)", "/Users/scawful/Mounts/mm-d/afs_training");
|
||||
if (trunk_root) {
|
||||
add_mount("Oracle-of-Secrets", (trunk_root.value() / "scawful/retro/oracle-of-secrets").string());
|
||||
add_mount("yaze", (trunk_root.value() / "scawful/retro/yaze").string());
|
||||
} else {
|
||||
add_mount("Oracle-of-Secrets", "~/Code/Oracle-of-Secrets");
|
||||
add_mount("yaze", "~/Code/yaze");
|
||||
const char* extra_mount = std::getenv("AFS_EXTRA_MOUNT");
|
||||
if (extra_mount && extra_mount[0] != '\0') {
|
||||
const char* label = std::getenv("AFS_EXTRA_MOUNT_LABEL");
|
||||
add_mount(label && label[0] != '\0' ? label : "Extra Mount", extra_mount);
|
||||
}
|
||||
add_mount("AFS Context", ResolveContextRoot().string());
|
||||
add_mount("AFS Training", ResolveTrainingRoot().string());
|
||||
|
||||
@@ -68,7 +68,11 @@ void RenderChatPanel(AppState& state,
|
||||
}
|
||||
|
||||
ImGui::SetNextItemWidth(200);
|
||||
static char rpc_servers[256] = "100.104.53.21:50052";
|
||||
static char rpc_servers[256] = "";
|
||||
if (rpc_servers[0] == '\0' && !config.rpc_servers.empty()) {
|
||||
strncpy(rpc_servers, config.rpc_servers.c_str(), sizeof(rpc_servers) - 1);
|
||||
rpc_servers[sizeof(rpc_servers) - 1] = '\0';
|
||||
}
|
||||
if (ImGui::InputText("RPC Servers", rpc_servers, sizeof(rpc_servers))) {
|
||||
config.rpc_servers = rpc_servers;
|
||||
config_changed = true;
|
||||
|
||||
Reference in New Issue
Block a user