fix(dashboard): re-apply agent Import button move
The previous commit's working-tree state lost the AgentsView/AgentDetailView edits during an auto-stash flow; re-applies the move so Import sits beside "New Agent" in the global header and is gone from the detail page and controls panel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
Settings, FileText, ActivitySquare, X, Copy,
|
||||
ExternalLink, CheckCircle, XCircle, Loader2, GitBranch, ListChecks,
|
||||
AlertCircle,
|
||||
ChevronDown, ChevronRight, ChevronLeft, BarChart3, BookOpen, Eye, FileEdit, Upload
|
||||
ChevronDown, ChevronRight, ChevronLeft, BarChart3, BookOpen, Eye, FileEdit
|
||||
} from "lucide-react";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
@@ -25,7 +25,6 @@ import { formatAgentSkillBadgeLabel } from "../utils/agentSkills";
|
||||
import { CustomModelDropdown } from "./CustomModelDropdown";
|
||||
import { useConfirm } from "../hooks/useConfirm";
|
||||
import { useModalResizePersist } from "../hooks/useModalResizePersist";
|
||||
import { AgentImportModal } from "./AgentImportModal";
|
||||
import { AgentAvatar } from "./AgentAvatar";
|
||||
import { AgentErrorIndicator } from "./AgentErrorDetailsModal";
|
||||
|
||||
@@ -133,7 +132,6 @@ export function AgentDetailView({ agentId, projectId, onClose, addToast, onChild
|
||||
const [agent, setAgent] = useState<AgentDetail | null>(null);
|
||||
const { confirm } = useConfirm();
|
||||
const [logs, setLogs] = useState<AgentLogEntry[]>([]);
|
||||
const [isImportModalOpen, setIsImportModalOpen] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [activeTab, setActiveTab] = useState<TabId>(initialTab ?? "dashboard");
|
||||
const [isStreaming, setIsStreaming] = useState(false);
|
||||
@@ -604,15 +602,6 @@ export function AgentDetailView({ agentId, projectId, onClose, addToast, onChild
|
||||
|
||||
{/* Utility actions: refresh + close */}
|
||||
<div className="agent-detail-utility-actions">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn--compact agent-detail-import-btn"
|
||||
onClick={() => setIsImportModalOpen(true)}
|
||||
aria-label="Import agents"
|
||||
>
|
||||
<Upload size={14} />
|
||||
Import
|
||||
</button>
|
||||
<button className="btn-icon" onClick={() => void loadAgent()} title="Refresh" aria-label="Refresh">
|
||||
<RefreshCw size={16} />
|
||||
</button>
|
||||
@@ -757,15 +746,6 @@ export function AgentDetailView({ agentId, projectId, onClose, addToast, onChild
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<AgentImportModal
|
||||
isOpen={isImportModalOpen}
|
||||
onClose={() => setIsImportModalOpen(false)}
|
||||
onImported={() => {
|
||||
void handleSavedMutation();
|
||||
}}
|
||||
projectId={projectId}
|
||||
initialInputMethod="browse"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -799,6 +799,18 @@ export function AgentsView({ addToast, projectId, onOpenTaskLogs, agentOnboardin
|
||||
>
|
||||
<RefreshCw size={16} className={isLoading ? "spin" : undefined} />
|
||||
</button>
|
||||
<button
|
||||
className="btn btn-sm"
|
||||
onClick={() => {
|
||||
setIsImporting(true);
|
||||
setIsControlsPanelOpen(false);
|
||||
}}
|
||||
aria-label="Import agents"
|
||||
title="Import agents"
|
||||
>
|
||||
<Upload size={16} />
|
||||
Import
|
||||
</button>
|
||||
<button
|
||||
className="btn btn-task-create btn-sm"
|
||||
onClick={() => {
|
||||
@@ -854,18 +866,6 @@ export function AgentsView({ addToast, projectId, onOpenTaskLogs, agentOnboardin
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="agent-controls-actions">
|
||||
<button
|
||||
className="btn"
|
||||
onClick={() => {
|
||||
setIsImporting(true);
|
||||
setIsControlsPanelOpen(false);
|
||||
}}
|
||||
>
|
||||
<Upload size={16} />
|
||||
Import
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="agent-global-controls">
|
||||
|
||||
Reference in New Issue
Block a user