MCPcopy Create free account
hub / github.com/agent-tower/core / findById

Method findById

packages/server/src/services/task.service.ts:333–355  ·  view source on GitHub ↗

* 获取任务详情

(id: string)

Source from the content-addressed store, hash-verified

331 options: { omitDescription?: boolean } = {}
332) {
333 const titlePreview = buildTextPreview(task.title, TASK_TITLE_MAX_LENGTH);
334 const contentPreview = buildTextPreview(task.description);
335 const isTruncated =
336 task.title !== titlePreview
337 || Boolean(task.description && task.description !== contentPreview);
338
339 const base = {
340 ...task,
341 title: titlePreview,
342 titlePreview,
343 contentPreview: contentPreview || undefined,
344 isTruncated,
345 };
346
347 if (options.omitDescription) {
348 const withoutDescription = { ...base };
349 delete (withoutDescription as { description?: unknown }).description;
350 return withoutDescription;
351 }
352
353 return base;
354}
355
356type ProjectWithStoredGitCapability = {
357 repoPath: string;
358 isGitRepo: boolean | null;

Callers 4

taskRoutesFunction · 0.95
sessionRoutesFunction · 0.45

Calls 2

withTaskPreviewsFunction · 0.85
withProjectGitMetadataFunction · 0.85

Tested by

no test coverage detected