新增: 任务灵感归档后端
This commit is contained in:
@@ -644,6 +644,7 @@ fn create_task(ctx: &Ctx, args: Value) -> BoxFuture<'static, CallToolResult> {
|
||||
queue,
|
||||
parent_id,
|
||||
content_json,
|
||||
archived: false,
|
||||
created_at: now.clone(),
|
||||
updated_at: now,
|
||||
};
|
||||
@@ -705,6 +706,8 @@ fn update_task(ctx: &Ctx, args: Value) -> BoxFuture<'static, CallToolResult> {
|
||||
parent_id: existing.parent_id,
|
||||
module_id: existing.module_id,
|
||||
content_json: existing.content_json,
|
||||
// 归档标记不经 MCP 修改(归档走桌面端 archive_task 专用 IPC,防旁路)
|
||||
archived: existing.archived,
|
||||
created_at: existing.created_at,
|
||||
updated_at: now,
|
||||
};
|
||||
@@ -819,6 +822,7 @@ fn create_idea(ctx: &Ctx, args: Value) -> BoxFuture<'static, CallToolResult> {
|
||||
ai_analysis: None,
|
||||
scores: None,
|
||||
related_ids: None,
|
||||
archived: false,
|
||||
created_at: now.clone(),
|
||||
updated_at: now,
|
||||
};
|
||||
@@ -874,6 +878,7 @@ fn update_idea(ctx: &Ctx, args: Value) -> BoxFuture<'static, CallToolResult> {
|
||||
ai_analysis: existing.ai_analysis,
|
||||
scores: existing.scores,
|
||||
related_ids: existing.related_ids.clone(),
|
||||
archived: existing.archived,
|
||||
created_at: existing.created_at,
|
||||
updated_at: now,
|
||||
};
|
||||
@@ -1239,6 +1244,7 @@ mod tests {
|
||||
ai_analysis: None,
|
||||
scores: None,
|
||||
related_ids: None,
|
||||
archived: false,
|
||||
created_at: now.clone(),
|
||||
updated_at: now,
|
||||
};
|
||||
@@ -1285,6 +1291,7 @@ mod tests {
|
||||
queue: "todo".to_string(),
|
||||
parent_id: None,
|
||||
content_json: None,
|
||||
archived: false,
|
||||
created_at: now.clone(),
|
||||
updated_at: now,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user