before the great git rework

This commit is contained in:
2026-10-30 11:27:44 +01:00
parent 9bdda896af
commit b9c03a7637
45 changed files with 70 additions and 562 deletions
@@ -8,8 +8,6 @@ extension WorkspaceModel {
func overlayChanged(from old: Overlay, to new: Overlay) {
switch old {
case .note:
if let note { track { await note.save() } }
case .diff:
editor?.closeDiff()
default:
@@ -103,7 +101,7 @@ extension WorkspaceModel {
}
}
// MARK: Editor and the note
// MARK: Editor
func passSelection(_ info: TextSelectionInfo?) {
guard let editor, let path = editor.activePath else { return }
@@ -115,14 +113,6 @@ extension WorkspaceModel {
}
}
/// ⌘P with the note open: the whole note goes to the agent, and the note closes so the text is seen landing.
func passNote() {
guard let note, let text = note.passableText else { return }
terminal.insertIntoAgent(text: text)
overlay.dismiss()
toasts.show("Note passed to agent", detail: NoteStore.fileName)
}
func editorSelectionFirstLine() -> String {
guard let editor, let path = editor.activePath, let selection = editor.selection, selection.path == path else { return "" }
let lines = editor.text(for: path).split(separator: "\n", omittingEmptySubsequences: false)