Refactor dependencies in Cargo.toml and update start.bas dialog

- Removed unused Tauri dependencies and replaced aws-sdk-s3 with opendal for S3 services.
- Cleaned up feature flags in Cargo.toml.
- Simplified the welcome message logic in start.bas and removed redundant comments.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-10-28 12:07:14 -03:00
parent a2f64ed10f
commit 0cb16552b3
5 changed files with 439 additions and 4183 deletions

4534
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -37,12 +37,10 @@ license = "AGPL-3.0"
repository = "https://github.com/GeneralBots/BotServer"
[features]
desktop = ["tauri", "tauri-plugin-opener", "tauri-plugin-dialog"]
default = [ "vectordb"]
vectordb = ["qdrant-client"]
email = ["imap"]
web_automation = ["headless_chrome"]
webapp = ["tauri", "tauri-plugin-opener", "tauri-plugin-dialog"]
[dependencies]
actix-cors = "0.7"
@ -90,7 +88,7 @@ urlencoding = "2.1"
uuid = { version = "1.11", features = ["serde", "v4"] }
zip = "2.2"
time = "0.3.44"
aws-sdk-s3 = { version = "1.108.0", features = ["behavior-version-latest"] }
opendal = { version = "0.54.1", features = ["services-s3"] }
headless_chrome = { version = "1.0.18", optional = true }
rand = "0.9.2"
pdf-extract = "0.10.0"
@ -99,12 +97,6 @@ sha2 = "0.10.9"
ureq = "3.1.2"
indicatif = "0.18.0"
tauri = { version = "2", features = ["unstable"], optional = true }
tauri-plugin-opener = { version = "2", optional = true }
tauri-plugin-dialog = { version = "2", optional = true }
[build-dependencies]
tauri-build = { version = "2", features = [] }
[profile.release]
lto = true # Enables Link-Time Optimization

View file

@ -342,7 +342,7 @@ impl AutomationService {
trace!("Downloading from bucket={} key={}", bucket_name, s3_key);
match s3_client
match s3_client.
.get_object()
.bucket(&bucket_name)
.key(&s3_key)

View file

@ -1,67 +0,0 @@
REM Simple KISS authentication - signup/login only, no recovery
REM This script is called when user needs authentication
TALK "Welcome! Please choose an option:"
TALK "Type 'signup' to create a new account"
TALK "Type 'login' to access your existing account"
HEAR choice
IF choice = "signup" THEN
TALK "Great! Let's create your account."
TALK "Enter your email:"
HEAR email
TALK "Enter your password:"
HEAR password
TALK "Confirm your password:"
HEAR confirm_password
IF password <> confirm_password THEN
TALK "Passwords don't match. Please try again."
RETURN false
END IF
REM Create user in database
LET user_id = GENERATE_UUID()
LET result = EXEC "INSERT INTO users (id, email, password_hash, created_at) VALUES (?, ?, ?, NOW())", user_id, email, SHA256(password)
IF result > 0 THEN
SET_USER user_id
TALK "Account created successfully! You are now logged in."
RETURN true
ELSE
TALK "Error creating account. Email may already exist."
RETURN false
END IF
ELSE IF choice = "login" THEN
TALK "Please enter your email:"
HEAR email
TALK "Enter your password:"
HEAR password
REM Query user from database
LET user = FIND "users", "email=" + email
IF user = NULL THEN
TALK "Invalid email or password."
RETURN false
END IF
LET password_hash = SHA256(password)
IF user.password_hash = password_hash THEN
SET_USER user.id
TALK "Welcome back! You are now logged in."
RETURN true
ELSE
TALK "Invalid email or password."
RETURN false
END IF
ELSE
TALK "Invalid option. Please type 'signup' or 'login'."
RETURN false
END IF

View file

@ -1,16 +1,9 @@
REM start.bas - Runs automatically when user connects via web
REM This is the entry point for each session
LET resume = GET_BOT_MEMORY("resume")
IF resume <> "" THEN
TALK resume
ELSE
TALK "Welcome! I'm loading the latest information..."
END IF
REM Add knowledge base for weekly announcements
ADD_KB "weekly"
TALK "You can ask me about any of the announcements or circulars."
TALK "If you'd like to login or signup, just type 'auth'."