mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
## Features - 版本升级至 0.68.0 ## Fixes - 修复 EmptyState 组件标题排版问题 - 修复"开始生成"按钮文字换行问题 - 修复加载历史对话失败问题 - 修复 parse_message_content 保留 ContentPart 结构 - 修复 convert_agent_message 添加 reasoning_content 处理 - 修复 WorkspaceType::from_str 命名冲突,重命名为 parse ## Code Quality - 修复所有 clippy 警告 - 修复 manual_flatten 警告 - 修复 ptr_arg 警告(使用 &Path 替代 &PathBuf) - 修复 manual_clamp 警告 - 修复 match_single_binding 警告 - 所有测试通过 (174 passed)
21 lines
545 B
Rust
21 lines
545 B
Rust
use serde::{Serialize, Deserialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
#[serde(tag = "type")]
|
|
pub enum TauriMessageContent {
|
|
#[serde(rename = "text")]
|
|
Text { text: String },
|
|
#[serde(rename = "thinking")]
|
|
Thinking { text: String },
|
|
}
|
|
|
|
fn main() {
|
|
let content = vec![
|
|
TauriMessageContent::Text { text: "Hello".to_string() },
|
|
TauriMessageContent::Thinking { text: "Thinking...".to_string() },
|
|
];
|
|
|
|
let json = serde_json::to_string_pretty(&content).unwrap();
|
|
println!("{}", json);
|
|
}
|