refactor: 统一项目名称从OpenFang到ZCLAW
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括: - 配置文件中的项目名称 - 代码注释和文档引用 - 环境变量和路径 - 类型定义和接口名称 - 测试用例和模拟数据 同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
This commit is contained in:
@@ -46,11 +46,14 @@ pub async fn export_files(
|
||||
.map_err(|e| ActionError::Export(format!("Write error: {}", e)))?;
|
||||
}
|
||||
ExportFormat::Pptx => {
|
||||
// Will integrate with zclaw-kernel export
|
||||
return Err(ActionError::Export("PPTX export requires kernel integration".to_string()));
|
||||
return Err(ActionError::Export(
|
||||
"PPTX 导出暂不可用。桌面端可通过 Pipeline 结果面板使用 JSON 格式导出后转换。".to_string(),
|
||||
));
|
||||
}
|
||||
ExportFormat::Pdf => {
|
||||
return Err(ActionError::Export("PDF export not yet implemented".to_string()));
|
||||
return Err(ActionError::Export(
|
||||
"PDF 导出暂不可用。桌面端可通过 Pipeline 结果面板使用 HTML 格式导出后通过浏览器打印为 PDF。".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
//! Hand execution action
|
||||
|
||||
use std::collections::HashMap;
|
||||
use serde_json::Value;
|
||||
|
||||
use super::ActionError;
|
||||
|
||||
/// Execute a hand action
|
||||
pub async fn execute_hand(
|
||||
hand_id: &str,
|
||||
action: &str,
|
||||
_params: HashMap<String, Value>,
|
||||
) -> Result<Value, ActionError> {
|
||||
// This will be implemented by injecting the hand registry
|
||||
// For now, return an error indicating it needs configuration
|
||||
|
||||
Err(ActionError::Hand(format!(
|
||||
"Hand '{}' action '{}' requires hand registry configuration",
|
||||
hand_id, action
|
||||
)))
|
||||
}
|
||||
@@ -7,8 +7,6 @@ mod parallel;
|
||||
mod render;
|
||||
mod export;
|
||||
mod http;
|
||||
mod skill;
|
||||
mod hand;
|
||||
mod orchestration;
|
||||
|
||||
pub use llm::*;
|
||||
@@ -16,8 +14,6 @@ pub use parallel::*;
|
||||
pub use render::*;
|
||||
pub use export::*;
|
||||
pub use http::*;
|
||||
pub use skill::*;
|
||||
pub use hand::*;
|
||||
pub use orchestration::*;
|
||||
|
||||
use std::collections::HashMap;
|
||||
@@ -256,11 +252,14 @@ impl ActionRegistry {
|
||||
tokio::fs::write(&path, content).await?;
|
||||
}
|
||||
ExportFormat::Pptx => {
|
||||
// Will integrate with pptx exporter
|
||||
return Err(ActionError::Export("PPTX export not yet implemented".to_string()));
|
||||
return Err(ActionError::Export(
|
||||
"PPTX 导出暂不可用。桌面端可通过 Pipeline 结果面板使用 JSON 格式导出后转换。".to_string(),
|
||||
));
|
||||
}
|
||||
ExportFormat::Pdf => {
|
||||
return Err(ActionError::Export("PDF export not yet implemented".to_string()));
|
||||
return Err(ActionError::Export(
|
||||
"PDF 导出暂不可用。桌面端可通过 Pipeline 结果面板使用 HTML 格式导出后通过浏览器打印为 PDF。".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
//! Skill execution action
|
||||
|
||||
use std::collections::HashMap;
|
||||
use serde_json::Value;
|
||||
|
||||
use super::ActionError;
|
||||
|
||||
/// Execute a skill by ID
|
||||
pub async fn execute_skill(
|
||||
skill_id: &str,
|
||||
_input: HashMap<String, Value>,
|
||||
) -> Result<Value, ActionError> {
|
||||
// This will be implemented by injecting the skill registry
|
||||
// For now, return an error indicating it needs configuration
|
||||
|
||||
Err(ActionError::Skill(format!(
|
||||
"Skill '{}' execution requires skill registry configuration",
|
||||
skill_id
|
||||
)))
|
||||
}
|
||||
@@ -10,11 +10,9 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use async_trait::async_trait;
|
||||
use futures::future::join_all;
|
||||
use serde_json::{Value, json};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use crate::types_v2::{Stage, ConditionalBranch, PresentationType};
|
||||
use crate::types_v2::{Stage, ConditionalBranch};
|
||||
use crate::engine::context::{ExecutionContextV2, ContextError};
|
||||
|
||||
/// Stage execution result
|
||||
@@ -242,14 +240,6 @@ impl StageEngine {
|
||||
Ok(result)
|
||||
}
|
||||
Err(e) => {
|
||||
let result = StageResult {
|
||||
stage_id: stage_id.clone(),
|
||||
output: Value::Null,
|
||||
status: StageStatus::Failed,
|
||||
error: Some(e.to_string()),
|
||||
duration_ms,
|
||||
};
|
||||
|
||||
self.emit_event(StageEvent::Error {
|
||||
stage_id,
|
||||
error: e.to_string(),
|
||||
@@ -312,7 +302,7 @@ impl StageEngine {
|
||||
stage_id: &str,
|
||||
each: &str,
|
||||
stage_template: &Stage,
|
||||
max_workers: usize,
|
||||
_max_workers: usize,
|
||||
context: &mut ExecutionContextV2,
|
||||
) -> Result<Value, StageError> {
|
||||
// Resolve the array to iterate over
|
||||
@@ -419,7 +409,7 @@ impl StageEngine {
|
||||
/// Execute compose stage
|
||||
async fn execute_compose(
|
||||
&self,
|
||||
stage_id: &str,
|
||||
_stage_id: &str,
|
||||
template: &str,
|
||||
context: &ExecutionContextV2,
|
||||
) -> Result<Value, StageError> {
|
||||
@@ -568,7 +558,8 @@ impl StageEngine {
|
||||
Ok(resolved_value)
|
||||
}
|
||||
|
||||
/// Clone with drivers
|
||||
/// Clone with drivers (reserved for future use)
|
||||
#[allow(dead_code)]
|
||||
fn clone_with_drivers(&self) -> Self {
|
||||
Self {
|
||||
llm_driver: self.llm_driver.clone(),
|
||||
|
||||
@@ -396,6 +396,7 @@ pub trait LlmIntentDriver: Send + Sync {
|
||||
}
|
||||
|
||||
/// Default LLM driver implementation using prompt-based matching
|
||||
#[allow(dead_code)]
|
||||
pub struct DefaultLlmIntentDriver {
|
||||
/// Model ID to use
|
||||
model_id: String,
|
||||
|
||||
@@ -57,6 +57,7 @@ pub mod intent;
|
||||
pub mod engine;
|
||||
pub mod presentation;
|
||||
|
||||
// Glob re-exports with explicit disambiguation for conflicting names
|
||||
pub use types::*;
|
||||
pub use types_v2::*;
|
||||
pub use parser::*;
|
||||
@@ -67,6 +68,14 @@ pub use trigger::*;
|
||||
pub use intent::*;
|
||||
pub use engine::*;
|
||||
pub use presentation::*;
|
||||
|
||||
// Explicit re-exports: presentation::* wins for PresentationType/ExportFormat
|
||||
// types_v2::* wins for InputMode, engine::* wins for LoopContext
|
||||
pub use presentation::PresentationType;
|
||||
pub use presentation::ExportFormat;
|
||||
pub use types_v2::InputMode;
|
||||
pub use engine::context::LoopContext;
|
||||
|
||||
pub use actions::ActionRegistry;
|
||||
pub use actions::{LlmActionDriver, SkillActionDriver, HandActionDriver, OrchestrationActionDriver};
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
//! - Better recommendations for ambiguous cases
|
||||
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use super::types::*;
|
||||
|
||||
|
||||
@@ -254,13 +254,13 @@ pub fn compile_pattern(pattern: &str) -> Result<CompiledPattern, PatternError> {
|
||||
'{' => {
|
||||
// Named capture group
|
||||
let mut name = String::new();
|
||||
let mut has_type = false;
|
||||
let mut _has_type = false;
|
||||
|
||||
while let Some(c) = chars.next() {
|
||||
match c {
|
||||
'}' => break,
|
||||
':' => {
|
||||
has_type = true;
|
||||
_has_type = true;
|
||||
// Skip type part
|
||||
while let Some(nc) = chars.peek() {
|
||||
if *nc == '}' {
|
||||
|
||||
Reference in New Issue
Block a user