From a732bb272d4c0da8d9210314a3d8993aeea5cb50 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 21 Apr 2025 10:50:34 -0700 Subject: [PATCH] fix CI --- .../Command Palette/CommandPalette.swift | 16 ++-------------- src/input/command.zig | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/macos/Sources/Features/Command Palette/CommandPalette.swift b/macos/Sources/Features/Command Palette/CommandPalette.swift index 887ea3464..09b216a39 100644 --- a/macos/Sources/Features/Command Palette/CommandPalette.swift +++ b/macos/Sources/Features/Command Palette/CommandPalette.swift @@ -13,24 +13,12 @@ struct CommandOption: Identifiable, Hashable { func hash(into hasher: inout Hasher) { hasher.combine(id) } - - // Sample data remains the same - static let sampleData: [CommandOption] = [ - .init(title: "assistant: copy code", shortcut: nil, action: {}), - .init(title: "assistant: inline assist", shortcut: "⌃⏎", action: {}), - .init(title: "assistant: insert into editor", shortcut: "⌘<", action: {}), - .init(title: "assistant: new chat", shortcut: nil, action: {}), - .init(title: "assistant: open prompt library", shortcut: nil, action: {}), - .init(title: "assistant: quote selection", shortcut: "⌘>", action: {}), - .init(title: "assistant: show configuration", shortcut: nil, action: {}), - .init(title: "assistant: toggle focus", shortcut: "⌘?", action: {}), - ] } struct CommandPaletteView: View { @Binding var isPresented: Bool var backgroundColor: Color = Color(nsColor: .windowBackgroundColor) - var options: [CommandOption] = CommandOption.sampleData + var options: [CommandOption] @State private var query = "" @State private var selectedIndex: UInt = 0 @State private var hoveredOptionID: UUID? = nil @@ -158,7 +146,7 @@ fileprivate struct CommandPaletteQuery: View { } fileprivate struct CommandTable: View { - var options: [CommandOption] = CommandOption.sampleData + var options: [CommandOption] @Binding var selectedIndex: UInt @Binding var hoveredOptionID: UUID? var action: (CommandOption) -> Void diff --git a/src/input/command.zig b/src/input/command.zig index 017a14a18..a36232d48 100644 --- a/src/input/command.zig +++ b/src/input/command.zig @@ -2,7 +2,7 @@ const std = @import("std"); const builtin = @import("builtin"); const assert = std.debug.assert; const Allocator = std.mem.Allocator; -const Action = @import("binding.zig").Action; +const Action = @import("Binding.zig").Action; /// A command is a named binding action that can be executed from /// something like a command palette.