Skip to content

Commit b6bfde7

Browse files
authored
Update version to 1.00.6 and improve error handling
1 parent 532a069 commit b6bfde7

1 file changed

Lines changed: 42 additions & 10 deletions

File tree

soar files/soar_main.py

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# SOAR MAIN SYSTEM
33
# SOAR - Script Optimization and Automation Runtime
44
# Made by Philip Kluz
5-
# Version 1.00.5 Early Beta
6-
# Modded Version
5+
# Version 1.00.6 Early Beta
6+
# DO NOT EDIT
77
# =====================================================
88

99
from __future__ import annotations
@@ -31,7 +31,8 @@
3131
import urllib.request
3232
import ssl
3333
import certifi
34-
import importlib.util
34+
35+
3536

3637
_last_resource_alert = 0
3738
RESOURCE_COOLDOWN = 10 #seconds
@@ -66,6 +67,11 @@
6667
except ImportError:
6768
OpenAI = None
6869

70+
try:
71+
import rsms # type: ignore
72+
except Exception:
73+
rsms = None
74+
6975
APP_NAME = "SOAR"
7076
BASE_DIR = Path(__file__).resolve().parent
7177
MAIN_SCRIPT = Path(__file__).resolve()
@@ -245,8 +251,8 @@ def load_settings():
245251
loaded = json.loads(SETTINGS_FILE.read_text(encoding="utf-8"))
246252
if isinstance(loaded, dict):
247253
data.update(loaded)
248-
except Exception:
249-
pass
254+
except Exception as e:
255+
print(f"[{stamp()}] [SETTINGS ERROR] Failed to load configuration: {e}")
250256

251257
SETTINGS_CACHE = data
252258
return dict(data)
@@ -460,10 +466,11 @@ def load_soar_mods():
460466
except Exception as e:
461467
print(f"Error loading mod {mod_name}: {e}")
462468

463-
print("Mods loaded successfully.")
469+
print("Mods above.")
464470

465471
load_soar_mods() #mods end 1
466472

473+
467474
def show_voice_status():
468475
pref = get_voice_preference()
469476
print()
@@ -1295,6 +1302,7 @@ def analyze_code_syntax(file_path):
12951302
return f"Could not analyze file structure: {e}"
12961303

12971304
def reply_to(user_text):
1305+
12981306
text = user_text.strip().lower()
12991307
parts = []
13001308
if not text:
@@ -1895,6 +1903,30 @@ def convert_csv_to_json(csv_path, json_path):
18951903
print(f"Error creating project: {e}")
18961904
return maybe_address_user("I encountered an error creating the Java project.")
18971905

1906+
if text == "rsms run" or text == "resource monitor":
1907+
try:
1908+
import importlib
1909+
import rsms # type: ignore
1910+
importlib.reload(rsms)
1911+
1912+
print("\n================ SOAR RSMS LAUNCHER ================")
1913+
print("[SOAR] Spawning standalone window environment...")
1914+
1915+
success = rsms.launch()
1916+
1917+
if success:
1918+
print("[SOAR] RSMS context moved cleanly to external terminal workspace.")
1919+
print("====================================================")
1920+
return maybe_address_user("Resource monitor launched in a new window.")
1921+
else:
1922+
print("[SOAR] Unable to find a compatible GUI terminal window client.")
1923+
print("====================================================")
1924+
return maybe_address_user("I could not spawn a new window on this host machine.")
1925+
1926+
except Exception as e:
1927+
print(f"RSMS Launch Error: {e}")
1928+
return maybe_address_user("The resource management system module is unavailable.")
1929+
18981930
if text.startswith("view project ") or text.startswith("tree "):
18991931
try:
19001932
if text.startswith("view project "):
@@ -2399,7 +2431,7 @@ def apply_personality_traits(base_text, category="general"):
23992431
"You are SOAR (Script Optimization and Automation Runtime), an advanced, intelligent local desktop AI assistant "
24002432
"created by Philip Kluz. You are running on a Mac/Windows. You are a custom automated runtime helper built with pure Python.\n\n"
24012433
"Your current system specifications and architectural capabilities include:\n"
2402-
"- Version: 1.00.5 Early Beta.\n"
2434+
"- Version: 1.00.6 Early Beta.\n"
24032435
"- AVSS (Anti Virus SOAR Software): A localized, active protection shield running on a daemon thread monitoring background processes and providing security hardening.\n"
24042436
"- ACHDS (Advanced Code Helper Diagnostic System): Files outside of soar if upon users request can be fixed.\n"
24052437
"- CSRS (Connection Server Request System): Can try to widen signal of wifi or network, can also give diagnostics on the wifi.\n"
@@ -3145,7 +3177,7 @@ def emergency_shutdown():
31453177
except Exception:
31463178
sys.exit(0)
31473179

3148-
def process_command(raw, from_voice=False): #mod start 2
3180+
def process_command(raw, from_voice=False): #mods start 2
31493181
if shutting_down or stop_event.is_set():
31503182
return
31513183

@@ -4621,7 +4653,7 @@ def autocode_loop():
46214653
print("Voice starts automatically if your mic libraries are ready.\n")
46224654

46234655
try:
4624-
speak("SOAR Booted, version 1.00.5 Modded Edition. Voice is on.", allow_sound=True)
4656+
speak("SOAR Booted, version 1.00.6. Voice is on.", allow_sound=True)
46254657
except Exception:
46264658
pass
46274659

@@ -4712,4 +4744,4 @@ def start_avss():
47124744
sys.exit(0)
47134745

47144746
if __name__ == "__main__":
4715-
main()
4747+
main()

0 commit comments

Comments
 (0)