update
This commit is contained in:
1 parent
09971cabc2
commit
9145572422
163 files changed
+3348
-2874
No files matched your search
@@ -36,7 +36,7 @@ export function resolveAttachmentContent(
|
||||
}
|
||||
|
||||
const docEntries = entries.filter(
|
||||
(e) => e.type === "document" && typeof e.id === "string",
|
||||
(e): e is typeof e & { id: string } => e.type === "document" && typeof e.id === "string",
|
||||
);
|
||||
if (docEntries.length === 0) return "";
|
||||
|
||||
@@ -44,7 +44,7 @@ export function resolveAttachmentContent(
|
||||
const resolved: Array<{ title: string; content: string }> = [];
|
||||
|
||||
for (const entry of docEntries) {
|
||||
const doc = docMap.get(entry.id!);
|
||||
const doc = docMap.get(entry.id);
|
||||
if (!doc || !doc.content) continue;
|
||||
resolved.push({ title: doc.title || entry.title || "Untitled", content: doc.content });
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ ${task.projectId ? `- Project: ${projects.find((p) => p.id === task.projectId)?.
|
||||
${task.goalId ? `- Goal: ${goals.find((g) => g.id === task.goalId)?.title ?? task.goalId}` : ""}
|
||||
`);
|
||||
|
||||
const taskType = ((task as unknown as Record<string, unknown>).task_type as string) ?? inferTaskType(agent.department);
|
||||
const taskType = task.taskType ?? inferTaskType(agent.department);
|
||||
|
||||
if (taskType === "research") {
|
||||
lines.push(`# Deliverable Requirements (Research Task)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { DEPARTMENT_LABELS } from "@shared/constants";
|
||||
import type { DepartmentId } from "@shared/types";
|
||||
import { getLocalePromptInstruction } from "@shared/localization";
|
||||
import {
|
||||
buildTaskSection,
|
||||
@@ -229,7 +230,7 @@ ${deptMembers.map((a) => `- ${a.name} (${a.role}) [${a.status}]`).join("\n")}` :
|
||||
}
|
||||
if (deptMap.size > 1) {
|
||||
const deptLines = Array.from(deptMap.entries()).map(([dept, members]) => {
|
||||
const label = DEPARTMENT_LABELS[dept] ?? dept;
|
||||
const label = DEPARTMENT_LABELS[dept as DepartmentId] ?? dept;
|
||||
return ` ${label} (${members.length}): ${members.map((m) => m.name).join(", ")}`;
|
||||
});
|
||||
sections.push(`# Company Department Map
|
||||
|
||||
Reference in new issue
Block a user