新增: F-260619-01 任务可关联灵感(tasks.idea_id 1对1 单向)
- df-storage V20 迁移:tasks 加 idea_id TEXT REFERENCES ideas(id)(填预留空位, 幂等 column_exists 探测)+ V9_SQL 同步 + TaskRecord.idea_id + task_repo SQL/SELECT + 白名单 - AI 工具 create_task 加 idea_id 参数;update_task 经白名单自动支持 - IPC commands/task.rs CreateTaskInput 加 idea_id - 前端 types TaskRecord/CreateTaskInput idea_id + TaskDetail.vue 关联灵感展示 (router-link 友好 title 非裸 id)+ i18n - 补 idea_id 字段:df-mcp tools / df-nodes 测试 helper - 单向 1对1,Option 可空,复用 projects.idea_id 模式,老任务 None 兼容 自验: df-storage 47 passed(含 V20 2)+ workspace EXIT 0 + vue-tsc EXIT 0
This commit is contained in:
@@ -21,6 +21,9 @@ pub struct CreateTaskInput {
|
||||
pub priority: i32,
|
||||
pub branch_name: Option<String>,
|
||||
pub assignee: Option<String>,
|
||||
/// 关联灵感 ID(F-260619-01,1对1 单向,可空=不关联)。
|
||||
/// 空字符串视为不关联(与 AI 工具层一致)。
|
||||
pub idea_id: Option<String>,
|
||||
}
|
||||
|
||||
fn default_priority() -> i32 {
|
||||
@@ -79,6 +82,8 @@ pub async fn create_task(
|
||||
base_branch: None,
|
||||
review_rounds: 0,
|
||||
output_json: None,
|
||||
// F-260619-01:空字符串视为不关联(与 AI 工具层一致)
|
||||
idea_id: input.idea_id.filter(|s| !s.is_empty()),
|
||||
created_at: now.clone(),
|
||||
updated_at: now,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user