mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-30 02:13:08 +00:00
Feature: Add PR review comments and resolution, improve AI prompt handling (#790)
* feat: Add PR review comments and resolution endpoints, improve prompt handling * Feature: File Editor (#789) * feat: Add file management feature * feat: Add auto-save functionality to file editor * fix: Replace HardDriveDownload icon with Save icon for consistency * fix: Prevent recursive copy/move and improve shell injection prevention * refactor: Extract editor settings form into separate component * ``` fix: Improve error handling and stabilize async operations - Add error event handlers to GraphQL process spawns to prevent unhandled rejections - Replace execAsync with execFile for safer command execution and better control - Fix timeout cleanup in withTimeout generator to prevent memory leaks - Improve outdated comment detection logic by removing redundant condition - Use resolveModelString for consistent model string handling - Replace || with ?? for proper falsy value handling in dialog initialization - Add comments clarifying branch name resolution logic for local branches with slashes - Add catch handler for project selection to handle async errors gracefully ``` * refactor: Extract PR review comments logic to dedicated service * fix: Improve robustness and UX for PR review and file operations * fix: Consolidate exec utilities and improve type safety * refactor: Replace ScrollArea with div and improve file tree layout
This commit is contained in:
@@ -650,6 +650,12 @@ export function FileEditorView({ initialPath }: FileEditorViewProps) {
|
||||
|
||||
const handleRenameItem = useCallback(
|
||||
async (oldPath: string, newName: string) => {
|
||||
// Extract the current file/folder name from the old path
|
||||
const oldName = oldPath.split('/').pop() || '';
|
||||
|
||||
// If the name hasn't changed, skip the rename entirely (no-op)
|
||||
if (newName === oldName) return;
|
||||
|
||||
const parentPath = oldPath.substring(0, oldPath.lastIndexOf('/'));
|
||||
const newPath = `${parentPath}/${newName}`;
|
||||
|
||||
@@ -1028,6 +1034,9 @@ export function FileEditorView({ initialPath }: FileEditorViewProps) {
|
||||
onTabSelect={setActiveTab}
|
||||
onTabClose={handleTabClose}
|
||||
onCloseAll={handleCloseAll}
|
||||
onSave={handleSave}
|
||||
isDirty={activeTab?.isDirty && !activeTab?.isBinary && !activeTab?.isTooLarge}
|
||||
showSaveButton={isMobile && !!activeTab && !activeTab.isBinary && !activeTab.isTooLarge}
|
||||
/>
|
||||
|
||||
{/* Editor content */}
|
||||
@@ -1320,24 +1329,6 @@ export function FileEditorView({ initialPath }: FileEditorViewProps) {
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
{/* Mobile: Save button in main toolbar */}
|
||||
{activeTab &&
|
||||
!activeTab.isBinary &&
|
||||
!activeTab.isTooLarge &&
|
||||
isMobile &&
|
||||
!mobileBrowserVisible && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon-sm"
|
||||
onClick={handleSave}
|
||||
disabled={!activeTab.isDirty}
|
||||
className="lg:hidden"
|
||||
title={editorAutoSave ? 'Auto-save enabled (Ctrl+S)' : 'Save file (Ctrl+S)'}
|
||||
>
|
||||
<Save className="w-4 h-4" />
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{/* Tablet/Mobile: actions panel trigger */}
|
||||
<HeaderActionsPanelTrigger
|
||||
isOpen={showActionsPanel}
|
||||
|
||||
Reference in New Issue
Block a user