fix: Yolo-Modus akzeptiert Dateiänderungen automatisch [appimage]
Some checks failed
Build AppImage / build (push) Has been cancelled
Some checks failed
Build AppImage / build (push) Has been cancelled
Im acceptEdits/bypassPermissions-Modus werden file-change Events jetzt sofort via accept_change akzeptiert statt in pendingChanges zu landen. Keine ApprovalBar mehr wenn Yolo aktiv. Fallback auf manuelles Pending wenn auto-accept fehlschlägt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6b024fe342
commit
a6bdcd5c1d
1 changed files with 16 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ import {
|
|||
activeKnowledgeHints,
|
||||
agentMode,
|
||||
pendingChanges,
|
||||
permissionMode,
|
||||
appendTextToParts,
|
||||
appendToolToParts,
|
||||
updateToolInParts,
|
||||
|
|
@ -698,7 +699,21 @@ export async function initEventListeners(): Promise<void> {
|
|||
timestamp: new Date(),
|
||||
};
|
||||
|
||||
pendingChanges.update((changes) => [...changes, change]);
|
||||
// Im acceptEdits/bypassPermissions-Modus: automatisch akzeptieren
|
||||
const currentPermMode = get(permissionMode);
|
||||
|
||||
if (currentPermMode === 'acceptEdits' || currentPermMode === 'bypassPermissions') {
|
||||
// Automatisch akzeptieren — kein Pending
|
||||
invoke('accept_change', { toolId }).then(() => {
|
||||
console.log(`✅ Auto-Accept (${currentPermMode}): ${filePath}`);
|
||||
}).catch((err: unknown) => {
|
||||
console.error('Auto-Accept fehlgeschlagen:', err);
|
||||
// Fallback: doch als Pending anzeigen
|
||||
pendingChanges.update((changes) => [...changes, change]);
|
||||
});
|
||||
} else {
|
||||
pendingChanges.update((changes) => [...changes, change]);
|
||||
}
|
||||
|
||||
addMonitorEvent('tool', `Datei geaendert: ${filePath.split('/').pop()}`, {
|
||||
toolId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue