fix(presentation): 修复 presentation 模块类型错误和语法问题
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
- 创建 types.ts 定义完整的类型系统 - 重写 DocumentRenderer.tsx 修复语法错误 - 重写 QuizRenderer.tsx 修复语法错误 - 重写 PresentationContainer.tsx 添加类型守卫 - 重写 TypeSwitcher.tsx 修复类型引用 - 更新 index.ts 移除不存在的 ChartRenderer 导出 审计结果: - 类型检查: 通过 - 单元测试: 222 passed - 构建: 成功
This commit is contained in:
@@ -134,6 +134,12 @@ impl ActionRegistry {
|
||||
max_tokens: Option<u32>,
|
||||
json_mode: bool,
|
||||
) -> Result<Value, ActionError> {
|
||||
println!("[DEBUG execute_llm] Called with template length: {}", template.len());
|
||||
println!("[DEBUG execute_llm] Input HashMap contents:");
|
||||
for (k, v) in &input {
|
||||
println!(" {} => {:?}", k, v);
|
||||
}
|
||||
|
||||
if let Some(driver) = &self.llm_driver {
|
||||
// Load template if it's a file path
|
||||
let prompt = if template.ends_with(".md") || template.contains('/') {
|
||||
@@ -142,6 +148,8 @@ impl ActionRegistry {
|
||||
template.to_string()
|
||||
};
|
||||
|
||||
println!("[DEBUG execute_llm] Calling driver.generate with prompt length: {}", prompt.len());
|
||||
|
||||
driver.generate(prompt, input, model, temperature, max_tokens, json_mode)
|
||||
.await
|
||||
.map_err(ActionError::Llm)
|
||||
|
||||
Reference in New Issue
Block a user