mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
fix: adress pr comments
- Added validation to check if the specified worktree path exists before generating commit messages. - Implemented a check to ensure the worktree path is a valid git repository by verifying the presence of the .git directory. - Improved error handling by returning appropriate responses for invalid paths and non-git repositories.
This commit is contained in:
@@ -20,14 +20,16 @@ export function AgentView() {
|
||||
const { currentProject } = useAppStore();
|
||||
const [input, setInput] = useState('');
|
||||
const [currentTool, setCurrentTool] = useState<string | null>(null);
|
||||
// Initialize session manager state based on screen size (hidden on mobile)
|
||||
const [showSessionManager, setShowSessionManager] = useState(() => {
|
||||
// Initialize session manager state - starts as true to match SSR
|
||||
// Then updates on mount based on actual screen size to prevent hydration mismatch
|
||||
const [showSessionManager, setShowSessionManager] = useState(true);
|
||||
|
||||
// Update session manager visibility based on screen size after mount
|
||||
useEffect(() => {
|
||||
// Check if we're on a mobile screen (< lg breakpoint = 1024px)
|
||||
if (typeof window !== 'undefined') {
|
||||
return window.innerWidth >= 1024;
|
||||
}
|
||||
return true; // Default to showing on SSR
|
||||
});
|
||||
const isDesktop = window.innerWidth >= 1024;
|
||||
setShowSessionManager(isDesktop);
|
||||
}, []);
|
||||
const [modelSelection, setModelSelection] = useState<PhaseModelEntry>({ model: 'sonnet' });
|
||||
|
||||
// Input ref for auto-focus
|
||||
|
||||
Reference in New Issue
Block a user