mirror of
https://github.com/cjo4m06/mcp-shrimp-task-manager.git
synced 2025-07-27 00:12:26 +08:00
新增任務模型與工具的關聯檔案支持,擴展任務參數以包含相關檔案列表,並更新驗證規則以確保檔案路徑、類型及描述的有效性,提升任務管理的靈活性與完整性。
This commit is contained in:
parent
95628091fb
commit
9df1c0b34b
@ -261,6 +261,7 @@ export async function batchCreateOrUpdateTasks(
|
|||||||
description: string;
|
description: string;
|
||||||
notes?: string;
|
notes?: string;
|
||||||
dependencies?: string[];
|
dependencies?: string[];
|
||||||
|
relatedFiles?: RelatedFile[];
|
||||||
}>,
|
}>,
|
||||||
isOverwrite: boolean
|
isOverwrite: boolean
|
||||||
): Promise<Task[]> {
|
): Promise<Task[]> {
|
||||||
@ -287,7 +288,8 @@ export async function batchCreateOrUpdateTasks(
|
|||||||
taskData.name,
|
taskData.name,
|
||||||
taskData.description,
|
taskData.description,
|
||||||
taskData.notes,
|
taskData.notes,
|
||||||
[] // 空依賴列表
|
[], // 空依賴列表
|
||||||
|
taskData.relatedFiles // 添加關聯檔案
|
||||||
);
|
);
|
||||||
|
|
||||||
// 將新任務添加到映射表
|
// 將新任務添加到映射表
|
||||||
|
@ -261,6 +261,24 @@ export const splitTasksSchema = z
|
|||||||
.describe(
|
.describe(
|
||||||
"此任務依賴的前置任務ID或任務名稱列表,支持兩種引用方式,名稱引用更直觀"
|
"此任務依賴的前置任務ID或任務名稱列表,支持兩種引用方式,名稱引用更直觀"
|
||||||
),
|
),
|
||||||
|
relatedFiles: z
|
||||||
|
.array(
|
||||||
|
z.object({
|
||||||
|
path: z
|
||||||
|
.string()
|
||||||
|
.min(1, { message: "檔案路徑不能為空" })
|
||||||
|
.describe("檔案路徑,相對於專案根目錄"),
|
||||||
|
type: z
|
||||||
|
.nativeEnum(RelatedFileType)
|
||||||
|
.describe("檔案類型,用於區分不同類型的檔案"),
|
||||||
|
description: z
|
||||||
|
.string()
|
||||||
|
.min(1, { message: "檔案描述不能為空" })
|
||||||
|
.describe("檔案描述,用於說明檔案的用途和內容"),
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.optional()
|
||||||
|
.describe("與任務相關的檔案列表,包含檔案路徑、類型和描述"),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.min(1, { message: "至少需要提供一個任務,請確保任務列表不為空" })
|
.min(1, { message: "至少需要提供一個任務,請確保任務列表不為空" })
|
||||||
|
@ -71,6 +71,7 @@ export interface SplitTasksArgs {
|
|||||||
description: string; // 詳細的任務描述,包含實施要點、技術細節和驗收標準
|
description: string; // 詳細的任務描述,包含實施要點、技術細節和驗收標準
|
||||||
notes?: string; // 補充說明、特殊處理要求或實施建議(選填)
|
notes?: string; // 補充說明、特殊處理要求或實施建議(選填)
|
||||||
dependencies?: string[]; // 此任務依賴的前置任務ID列表,形成任務的有向無環依賴圖
|
dependencies?: string[]; // 此任務依賴的前置任務ID列表,形成任務的有向無環依賴圖
|
||||||
|
relatedFiles?: RelatedFile[]; // 與任務相關的文件列表(選填)
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user