АРЧ - Добавить поддержку агентных смысловых прогонов в автопрогоны и правило AGENT в AGENTS.md

This commit is contained in:
2026-04-17 10:51:13 +03:00
parent dc8dfcf237
commit 1484c2375f
25 changed files with 10574 additions and 743 deletions
@@ -289,6 +289,27 @@ function formatAutoGenModeLabel(mode: AutoGenMode): string {
return mode;
}
function isAgentSemanticGeneration(item: AutoGenHistoryRecord | null | undefined): boolean {
if (!item) {
return false;
}
if (item.context?.agent_run === true) {
return true;
}
if (item.context?.saved_case_set_kind === "agent_semantic_scenario") {
return true;
}
return typeof item.title === "string" && item.title.trim().toUpperCase().startsWith("AGENT");
}
function formatAutoGenGenerationTitle(item: AutoGenHistoryRecord): string {
const fallback = item.title ?? formatDateTime(item.created_at);
if (isAgentSemanticGeneration(item) && !fallback.trim().toUpperCase().startsWith("AGENT")) {
return `AGENT | ${fallback}`;
}
return fallback;
}
function buildSavedSessionDefaultTitle(items: AssistantConversationItem[]): string {
const lastMessage = items[items.length - 1];
const timestamp = formatDateTime(lastMessage?.created_at ?? new Date().toISOString());
@@ -2375,7 +2396,7 @@ export function AutoRunsHistoryPanel({
) : null}
{visibleAutoGenHistory.map((item) => (
<option key={item.generation_id} value={item.generation_id}>
{formatDateTime(item.created_at)} | {item.title ?? formatAutoGenModeLabel(item.mode)} | {item.count}
{formatDateTime(item.created_at)} | {formatAutoGenGenerationTitle(item) ?? formatAutoGenModeLabel(item.mode)} | {item.count}
</option>
))}
</select>
@@ -2448,7 +2469,7 @@ export function AutoRunsHistoryPanel({
onClick={() => setSelectedAutogenGenerationId(item.generation_id)}
>
<header>
<strong>{item.title ?? formatDateTime(item.created_at)}</strong>
<strong>{formatAutoGenGenerationTitle(item)}</strong>
<div className="autoruns-autogen-card-actions">
<span>{formatDateTime(item.created_at)}</span>
<button
@@ -2488,6 +2509,13 @@ export function AutoRunsHistoryPanel({
<div className="autoruns-run-meta">
режим={formatAutoGenModeLabel(item.mode)} | count={item.count}
</div>
{isAgentSemanticGeneration(item) ? (
<div className="autoruns-run-meta">
тип=АГЕНТНЫЙ ПРОГОН
{item.context?.architecture_phase ? ` | этап=${item.context.architecture_phase}` : ""}
{item.context?.agent_focus ? ` | фокус=${item.context.agent_focus}` : ""}
</div>
) : null}
{item.domain || item.generated_by ? (
<div className="autoruns-run-meta">
{item.domain ? `домен=${item.domain}` : "домен=общий"}