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:
commit
70bd55a00f
1 changed files with 14 additions and 0 deletions
|
|
@ -1617,6 +1617,20 @@ function PromptsTab({
|
||||||
selectedFile: string;
|
selectedFile: string;
|
||||||
} | null>(null);
|
} | 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 =
|
const isLocal =
|
||||||
agent.adapterType === "claude_local" ||
|
agent.adapterType === "claude_local" ||
|
||||||
agent.adapterType === "codex_local" ||
|
agent.adapterType === "codex_local" ||
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue