feat: add project-aware agent workspace
This commit is contained in:
@@ -94,7 +94,7 @@ type ScheduledConditionFeedProps = {
|
||||
onLoadTaskEvidenceSnapshot?: (taskId: string, evidenceId: string) => Promise<OperationalTaskDataSnapshot>;
|
||||
onTaskRefresh?: () => void;
|
||||
onLoadTaskReports?: (taskId: string, offset: number) => Promise<OperationalTaskReportPage>;
|
||||
onLocate?: (targets: import("../api/investigation-report").InvestigationMapTarget[]) => void;
|
||||
onLocate?: (targets: import("../api/investigation-report").InvestigationMapTarget[]) => Promise<unknown> | void;
|
||||
onReportViewed?: (taskId: string, generation: number, revision: number) => void;
|
||||
onRefresh?: () => void | Promise<void>;
|
||||
};
|
||||
@@ -369,14 +369,15 @@ export function ScheduledConditionFeed({
|
||||
|
||||
if (condition.operationalTask) {
|
||||
onExpandAgent();
|
||||
void Promise.resolve(onOpenTaskCollaboration?.(condition.operationalTask.task_id, discussion))
|
||||
.catch((error) => showMapNotice({
|
||||
if (!onOpenTaskCollaboration) return false;
|
||||
return Promise.resolve(onOpenTaskCollaboration(condition.operationalTask.task_id, discussion))
|
||||
.then(() => true)
|
||||
.catch((error) => { showMapNotice({
|
||||
id: "operational-task-collaboration",
|
||||
tone: "error",
|
||||
title: "Agent 协作打开失败",
|
||||
message: error instanceof Error ? error.message : "无法打开这条任务的协作问答。"
|
||||
}));
|
||||
return;
|
||||
}); return false; });
|
||||
}
|
||||
|
||||
onExpandAgent();
|
||||
@@ -1103,6 +1104,7 @@ function ConditionTimelineRow({
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
data-condition-id={condition.id}
|
||||
aria-pressed={selected}
|
||||
onClick={onSelect}
|
||||
className={cn(
|
||||
|
||||
Reference in New Issue
Block a user