refactor: skill.rs → types.rs 重命名
类型定义重命名,消除过时的 'skill' 概念
This commit is contained in:
+5
-5
@@ -15,7 +15,7 @@ use db::Database;
|
||||
use llm::{Conversation, ConversationConfig, DEFAULT_SYSTEM_PROMPT, ToolExecutor, Usage};
|
||||
use std::sync::Arc;
|
||||
use tools::approval::{ApprovalDecision, ApprovalManager};
|
||||
use tools::skill::ExecutionContext;
|
||||
use tools::types::ExecutionContext;
|
||||
use tracing::{error, info};
|
||||
use wechat::client::WeChatClient;
|
||||
|
||||
@@ -293,7 +293,7 @@ async fn cmd_listen(
|
||||
let session = conv.session();
|
||||
let approval = approval_manager.clone();
|
||||
let memory_store = memory_store.clone();
|
||||
let send_wechat: tools::skill::WechatSender = {
|
||||
let send_wechat: tools::types::WechatSender = {
|
||||
let client = client.clone();
|
||||
Arc::new(move |user_id: &str, text: &str| {
|
||||
let client = client.clone();
|
||||
@@ -816,7 +816,7 @@ async fn cmd_send(
|
||||
}
|
||||
|
||||
|
||||
use tools::skill::SkillResult;
|
||||
use tools::types::SkillResult;
|
||||
|
||||
async fn builtin_approve(ctx: &ExecutionContext, name: &str) -> Result<bool, String> {
|
||||
let manager = match ctx.approval_manager.as_ref() {
|
||||
@@ -841,10 +841,10 @@ async fn builtin_approve(ctx: &ExecutionContext, name: &str) -> Result<bool, Str
|
||||
}
|
||||
}
|
||||
|
||||
fn build_capability_list(specs: &[tools::skill::SkillSpec]) -> String {
|
||||
fn build_capability_list(specs: &[tools::types::SkillSpec]) -> String {
|
||||
let mut lines = vec!["📋 可用工具:".to_string()];
|
||||
for spec in specs {
|
||||
let risk = if spec.risk_level == tools::skill::RiskLevel::High {
|
||||
let risk = if spec.risk_level == tools::types::RiskLevel::High {
|
||||
" ⚠️需确认"
|
||||
} else {
|
||||
""
|
||||
|
||||
Reference in New Issue
Block a user