From beed5308f1ff674d34f0a88a140dd8cb18ea1071 Mon Sep 17 00:00:00 2001 From: Apple Date: Sat, 29 Nov 2025 16:43:07 -0800 Subject: [PATCH] fix(governance): Rename AgentStatus to AgentGovStatus to avoid conflict Conflicts with existing AgentStatus from agents.ts --- .../src/components/governance/GovernanceLevelBadge.tsx | 8 ++++---- apps/web/src/lib/types/governance.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/web/src/components/governance/GovernanceLevelBadge.tsx b/apps/web/src/components/governance/GovernanceLevelBadge.tsx index 7086e3d3..4c2fbaed 100644 --- a/apps/web/src/components/governance/GovernanceLevelBadge.tsx +++ b/apps/web/src/components/governance/GovernanceLevelBadge.tsx @@ -2,12 +2,12 @@ import { Shield, User, Users, Briefcase, Star, Crown, Building2, Landmark } from 'lucide-react'; import { cn } from '@/lib/utils'; -import type { AgentGovLevel, AgentStatus } from '@/lib/types/governance'; -import { GOV_LEVEL_LABELS, AGENT_STATUS_LABELS } from '@/lib/types/governance'; +import type { AgentGovLevel, AgentGovStatus } from '@/lib/types/governance'; +import { GOV_LEVEL_LABELS, AGENT_GOV_STATUS_LABELS } from '@/lib/types/governance'; interface GovernanceLevelBadgeProps { level: AgentGovLevel; - status?: AgentStatus; + status?: AgentGovStatus; showLabel?: boolean; size?: 'sm' | 'md' | 'lg'; className?: string; @@ -126,7 +126,7 @@ export function GovernanceLevelBadge({ status === 'revoked' && 'bg-red-500/20 text-red-400' )} > - {AGENT_STATUS_LABELS[status]} + {AGENT_GOV_STATUS_LABELS[status]} )} diff --git a/apps/web/src/lib/types/governance.ts b/apps/web/src/lib/types/governance.ts index 604241e2..4c3c9705 100644 --- a/apps/web/src/lib/types/governance.ts +++ b/apps/web/src/lib/types/governance.ts @@ -53,12 +53,12 @@ export const GOV_LEVEL_COLORS: Record = { }; // ============================================================================ -// AGENT STATUS +// AGENT GOVERNANCE STATUS // ============================================================================ -export type AgentStatus = 'active' | 'suspended' | 'revoked'; +export type AgentGovStatus = 'active' | 'suspended' | 'revoked'; -export const AGENT_STATUS_LABELS: Record = { +export const AGENT_GOV_STATUS_LABELS: Record = { active: 'Активний', suspended: 'Призупинено', revoked: 'Заблоковано', @@ -234,7 +234,7 @@ export interface GovernanceEvent { export interface AgentRolesResponse { level: AgentGovLevel; - status: AgentStatus; + status: AgentGovStatus; powers: GovernancePower[]; assignments: Array<{ microdaoId: string; @@ -295,7 +295,7 @@ export interface GovernanceAgent { displayName: string; avatarUrl?: string; govLevel: AgentGovLevel; - status: AgentStatus; + status: AgentGovStatus; homeMicrodaoId?: string; homeMicrodaoName?: string; }