Merge pull request #1669 from paperclipai/pr/pap-803-agent-instructions-tab-reset

Fix instructions tab state on agent switch
This commit is contained in:
Dotta 2026-03-23 21:27:51 -05:00 committed by GitHub
commit 70bd55a00f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1617,6 +1617,20 @@ function PromptsTab({
selectedFile: string;
} | null>(null);
useEffect(() => {
setSelectedFile("AGENTS.md");
setShowFilePanel(false);
setDraft(null);
setBundleDraft(null);
setNewFilePath("");
setShowNewFileInput(false);
setPendingFiles([]);
setExpandedDirs(new Set());
setAwaitingRefresh(false);
lastFileVersionRef.current = null;
externalBundleRef.current = null;
}, [agent.id]);
const isLocal =
agent.adapterType === "claude_local" ||
agent.adapterType === "codex_local" ||