fix: Resolve compilation errors
All checks were successful
BotServer CI / build (push) Successful in 13m3s

- Escape format placeholders in designer_ai.rs ({{botname}})
- Remove undefined 'prefix' filter in drive_monitor
- Fix type mismatch in use_tool.rs (str vs &String)
- Remove unused TextExpressionMethods import

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Rodrigo Rodriguez 2026-02-14 22:15:35 +00:00
parent e34848507d
commit 8a8008a72c
4 changed files with 5 additions and 7 deletions

View file

@ -330,8 +330,8 @@ Guidelines:
- STYLE: Changes to CSS files (colors, layout, fonts, spacing)
- HTML: Changes to HTML structure (forms, buttons, elements)
- DATABASE: Adding fields to tables.bas or creating new tables
- TOOL: Creating/modifying {botname}.gbdialog/tools/*.bas files
- SCHEDULER: Creating/modifying {botname}.gbdialog/schedulers/*.bas files
- TOOL: Creating/modifying {{botname}}.gbdialog/tools/*.bas files
- SCHEDULER: Creating/modifying {{botname}}.gbdialog/schedulers/*.bas files
- Require confirmation for: deletions, bulk changes, database schema changes
- Use the current_app and current_page context to determine which files to modify

View file

@ -21,12 +21,12 @@ pub fn use_tool_keyword(state: Arc<AppState>, user: UserSession, engine: &mut En
);
// Strip {bot_name}.gbdialog/ or .gbdialog/ prefix, and .bas suffix
let tool_name = if let Some(idx) = tool_path_str.find(".gbdialog/") {
tool_path_str[idx + 10..] // Skip past ".gbdialog/"
&tool_path_str[idx + 10..] // Skip past ".gbdialog/"
} else {
&tool_path_str
tool_path_str.as_str()
}
.strip_suffix(".bas")
.unwrap_or_else(|| &tool_path_str)
.unwrap_or_else(|| tool_path_str.as_str())
.to_string();
if tool_name.is_empty() {
return Err(Box::new(rhai::EvalAltResult::ErrorRuntime(

View file

@ -32,7 +32,6 @@ use diesel::ExpressionMethods;
use diesel::PgConnection;
use diesel::QueryDsl;
use diesel::RunQueryDsl;
use diesel::TextExpressionMethods;
use futures::{sink::SinkExt, stream::StreamExt};
#[cfg(feature = "llm")]
use log::trace;

View file

@ -517,7 +517,6 @@ impl DriveMonitor {
}
let previous_paths: Vec<String> = file_states
.keys()
.filter(|k| k.starts_with(prefix))
.cloned()
.collect();
for path in previous_paths {