auto-claude: subtask-2-1 - Remove showFiles auto-expand on draft restore
Since the Referenced Files section is now always visible, remove the conditional setShowFiles(true) in the useEffect that loads drafts. Changes: - Remove unused showFiles state variable - Remove conditional that auto-expanded files section when restoring drafts - Remove auto-expand call in handleDragEnd (section is always visible) - Remove showFiles reset in resetForm 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,6 @@ export function TaskCreationWizard({
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [showAdvanced, setShowAdvanced] = useState(false);
|
||||
const [showImages, setShowImages] = useState(false);
|
||||
const [showFiles, setShowFiles] = useState(false);
|
||||
const [showFileExplorer, setShowFileExplorer] = useState(false);
|
||||
|
||||
// Get project path from project store
|
||||
@@ -168,9 +167,7 @@ export function TaskCreationWizard({
|
||||
if (draft.images.length > 0) {
|
||||
setShowImages(true);
|
||||
}
|
||||
if (draft.referencedFiles && draft.referencedFiles.length > 0) {
|
||||
setShowFiles(true);
|
||||
}
|
||||
// Note: Referenced Files section is always visible, no need to expand
|
||||
} else {
|
||||
// No draft - initialize model/thinkingLevel from selected profile
|
||||
setModel(selectedProfile.model);
|
||||
@@ -344,9 +341,7 @@ export function TaskCreationWizard({
|
||||
};
|
||||
|
||||
setReferencedFiles(prev => [...prev, newFile]);
|
||||
|
||||
// Auto-expand the files section when a file is added
|
||||
setShowFiles(true);
|
||||
// Note: Referenced Files section is always visible, no need to expand
|
||||
}, [referencedFiles]);
|
||||
|
||||
const handleCreate = async () => {
|
||||
@@ -408,7 +403,6 @@ export function TaskCreationWizard({
|
||||
setError(null);
|
||||
setShowAdvanced(false);
|
||||
setShowImages(false);
|
||||
setShowFiles(false);
|
||||
setShowFileExplorer(false);
|
||||
setIsDraftRestored(false);
|
||||
setPasteSuccess(false);
|
||||
|
||||
Reference in New Issue
Block a user