mirror of
https://github.com/paperclipai/paperclip
synced 2026-03-25 11:21:48 +00:00
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:
@@ -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" ||
|
||||
|
||||
Reference in New Issue
Block a user