Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Checkpoint SKF project format and export updates
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { WorkplaneShape } from "@/types/sketchforge";
|
||||
import { canonicalizeShape, serializeShapesForSync } from "@/lib/workplaneShapes";
|
||||
|
||||
export const MAX_EDITOR_HISTORY_ENTRIES = 100;
|
||||
export const MAX_EDITOR_HISTORY_ENTRIES = 5000;
|
||||
export const MAX_EDITOR_HISTORY_BYTES = 64 * 1024 * 1024;
|
||||
export type EditorHistoryExportLimit = "unlimited" | 100 | 50 | 30;
|
||||
|
||||
export type EditorHistoryEntry = {
|
||||
shapes: WorkplaneShape[];
|
||||
@@ -105,3 +106,18 @@ export function hydrateEditorHistoryState(
|
||||
return { entries: [fallback], index: 0 };
|
||||
}
|
||||
}
|
||||
|
||||
export function editorHistoryForExport(
|
||||
entries: EditorHistoryEntry[],
|
||||
requestedIndex: number,
|
||||
limit: EditorHistoryExportLimit,
|
||||
): EditorHistoryState {
|
||||
if (entries.length === 0) return { entries: [], index: 0 };
|
||||
const index = Math.min(Math.max(0, requestedIndex), entries.length - 1);
|
||||
if (limit === "unlimited") return { entries, index };
|
||||
const start = Math.max(0, index - limit);
|
||||
return {
|
||||
entries: entries.slice(start, index + 1),
|
||||
index: index - start,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user