Enhance initialization and API handling

- Updated the `InitCommand` to conditionally add and commit all changes after initializing a git repository, improving project setup efficiency.
- Modified the API service to include requested IDs in the instance retrieval process, ensuring accurate instance management.

These changes aim to streamline the initialization process and enhance the API's functionality for better user experience.
This commit is contained in:
Joe 2026-03-03 08:08:47 -06:00
parent d434a97334
commit 3b3bd04fad
3 changed files with 15 additions and 3 deletions

View file

@ -98,3 +98,7 @@ this should utilize the mcp to run the game and fetch the errors, make sure the
modify /atlas-push to always trigger /playtest-quick after it finishes pushing, looping back around to fix issues if needed. make sure the errors are related to what we actually pushed, so it doesnt try to fix others work. if it's others work, ask the user if they want to fix it - thought recommend they should do a planning phase.
"/atlas-push no test" or similar it just skips the automated test
git config --system core.longpaths true
make clone support multi-placeids like we did with defend-67

View file

@ -127,6 +127,10 @@ impl InitCommand {
!self.skip_git
};
if did_git_init {
crate::git::git_add_all_and_commit(&base_path, "Initial commit");
}
if !self.skip_rules && did_git_init {
log::debug!("Adding agent submodules...");
@ -189,10 +193,8 @@ impl InitCommand {
if !any_failed {
println!("Added agent submodules successfully.");
}
}
if did_git_init {
crate::git::git_add_all_and_commit(&base_path, "Initial commit");
crate::git::git_add_all_and_commit(&base_path, "Add agent submodules");
}
println!("Created project successfully.");

View file

@ -3411,6 +3411,12 @@ impl ApiService {
}
}
for &id in &requested_ids {
if tree.get_instance(id).is_some() {
included_ids.insert(id);
}
}
for &id in &included_ids {
if let Some(instance) = tree.get_instance(id) {
instances.insert(id, instance_for_scripts_only(instance, &included_ids));