From 5e7f416c08db517b702ec5e42ef479a84fb73ec8 Mon Sep 17 00:00:00 2001 From: Horus Date: Fri, 27 Feb 2026 19:04:18 +0100 Subject: [PATCH] Council to top + Add/Edit/Delete tasks with recurring options --- components/council/AgentModal.tsx | 335 +++++++++++++++--- .../MissionControlDashboard.tsx | 12 +- data/execution-logs.json | 18 + data/recurring-templates.json | 10 +- 4 files changed, 325 insertions(+), 50 deletions(-) diff --git a/components/council/AgentModal.tsx b/components/council/AgentModal.tsx index d991f96..38e002d 100644 --- a/components/council/AgentModal.tsx +++ b/components/council/AgentModal.tsx @@ -2,23 +2,207 @@ import { useState, useEffect, useRef } from "react"; -const AGENT_CONFIG: Record = { - horus: { name: "Horus", avatar: "πŸ‘οΈ", color: "#ff7bc0", role: "Master Orchestrator", description: "Command center, delegates tasks, manages all agents", skills: ["Task delegation", "System orchestration", "Strategic planning"] }, - thoth: { name: "Thoth", avatar: "🧠", color: "#8b5cf6", role: "Strategy & Research", description: "SiteMente planning, research, analysis", skills: ["Market research", "Competitor analysis", "AI trends", "Lead research"] }, - "thoth-trading": { name: "Thoth Trading", avatar: "πŸ“ˆ", color: "#f59e0b", role: "Market Research", description: "Crypto market analysis and research", skills: ["Technical analysis", "Price alerts", "Portfolio tracking"] }, - ptah: { name: "Ptah", avatar: "πŸ—οΈ", color: "#10b981", role: "Dev & Ops", description: "Development, deployment, technical implementation", skills: ["Code review", "Deployments", "Infra management", "Bug fixes"] }, - seshat: { name: "Seshat", avatar: "πŸ“œ", color: "#ec4899", role: "Content & SEO", description: "Content strategy, SEO, marketing copy", skills: ["SEO optimization", "Copywriting", "Blog posts", "Social media"] }, - anubis: { name: "Anubis", avatar: "🐺", color: "#6366f1", role: "Outreach & Growth", description: "Lead generation, client acquisition", skills: ["Lead research", "Cold outreach", "Follow-ups", "Deal closing"] }, - sekhmet: { name: "Sekhmet", avatar: "βš”οΈ", color: "#ef4444", role: "Risk Management", description: "Trade execution and risk", skills: ["Risk assessment", "Trade execution", "Stop-loss management"] }, +const AGENT_CONFIG: Record = { + horus: { name: "Horus", avatar: "πŸ‘οΈ", color: "#ff7bc0", role: "Master Orchestrator", description: "Command center, delegates tasks, manages all agents", skills: ["Task delegation", "System orchestration", "Strategic planning"], project: "horus" }, + thoth: { name: "Thoth", avatar: "🧠", color: "#8b5cf6", role: "Strategy & Research", description: "SiteMente planning, research, analysis", skills: ["Market research", "Competitor analysis", "AI trends", "Lead research"], project: "sitemente" }, + "thoth-trading": { name: "Thoth Trading", avatar: "πŸ“ˆ", color: "#f59e0b", role: "Market Research", description: "Crypto market analysis and research", skills: ["Technical analysis", "Price alerts", "Portfolio tracking"], project: "trading" }, + ptah: { name: "Ptah", avatar: "πŸ—οΈ", color: "#10b981", role: "Dev & Ops", description: "Development, deployment, technical implementation", skills: ["Code review", "Deployments", "Infra management", "Bug fixes"], project: "infrastructure" }, + seshat: { name: "Seshat", avatar: "πŸ“œ", color: "#ec4899", role: "Content & SEO", description: "Content strategy, SEO, marketing copy", skills: ["SEO optimization", "Copywriting", "Blog posts", "Social media"], project: "sitemente" }, + anubis: { name: "Anubis", avatar: "🐺", color: "#6366f1", role: "Outreach & Growth", description: "Lead generation, client acquisition", skills: ["Lead research", "Cold outreach", "Follow-ups", "Deal closing"], project: "sitemente" }, + sekhmet: { name: "Sekhmet", avatar: "βš”οΈ", color: "#ef4444", role: "Risk Management", description: "Trade execution and risk", skills: ["Risk assessment", "Trade execution", "Stop-loss management"], project: "trading" }, }; +interface TaskModalProps { + agentId: string; + task?: any; + onClose: () => void; + onSave: (task: any) => void; +} + +function TaskModal({ agentId, task, onClose, onSave }: TaskModalProps) { + const agent = AGENT_CONFIG[agentId]; + const [title, setTitle] = useState(task?.title || ""); + const [description, setDescription] = useState(task?.description || ""); + const [priority, setPriority] = useState(task?.priority || "medium"); + const [isRecurring, setIsRecurring] = useState(false); + const [scheduleType, setScheduleType] = useState<"hourly" | "daily" | "weekly" | "monthly">("daily"); + const [scheduleTime, setScheduleTime] = useState("09:00"); + const [scheduleDay, setScheduleDay] = useState(1); + + const handleSave = () => { + if (!title.trim()) return; + + const newTask = { + id: task?.id || `task-${Date.now()}`, + title, + description, + priority, + assignee: agentId, + project: agent?.project || "sitemente", + status: "todo", + order: Date.now(), + ...(isRecurring && { + recurring: { + enabled: true, + type: scheduleType, + time: scheduleType !== "hourly" ? scheduleTime : undefined, + dayOfWeek: scheduleType === "weekly" ? scheduleDay : undefined, + dayOfMonth: scheduleType === "monthly" ? scheduleDay : undefined, + } + }) + }; + + onSave(newTask); + onClose(); + }; + + return ( +
+
+

{task ? "Edit Task" : "Add New Task"}

+ +
+
+ + setTitle(e.target.value)} + placeholder="What needs to be done?" + className="w-full mt-1 bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-sm" + autoFocus + /> +
+ +
+ +