新增: AI 工具(download_file + http output_file + grep 窗口 + fetch_search 搜索 + get_app_config + generate_image)
download_file 跨平台 URL 到文件流式下载;http_request output_file 落盘 + 截断可配; grep context_chars 大单行窗口;fetch_search DuckDuckGo 免 key 搜索;get_app_config 只读返当前配置(治 AI 查配置绕 PowerShell);generate_image SenseNova 图像生成。
This commit is contained in:
@@ -174,6 +174,15 @@ impl LlmConcurrency {
|
||||
self.per_conv.lock().await.clear();
|
||||
}
|
||||
|
||||
/// 读当前 per_conv permits 生效值(对齐 set_per_conv 的写,补足读侧 getter)。
|
||||
///
|
||||
/// 用途:get_app_config AI 工具查「当前 LLM 并发配置」时返给 LLM(global 无对称 getter:
|
||||
/// Semaphore permits 封装在 Arc<Mutex<Arc<Semaphore>>> 内层无读取接口,故此处只返 per_conv,
|
||||
/// global 不返避免误导)。热改(set_per_conv)后立即反映,无需重启。
|
||||
pub fn current_per_conv_permits(&self) -> usize {
|
||||
self.per_conv_permits.load(std::sync::atomic::Ordering::SeqCst)
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase3 预留(批2-B): per_sub_flow 层 — 占位未接入调用点
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user