Start on a database-backed prompt library (#12468)
Using the file system as a database seems like it's easy, but it's actually a real pain. I'd like to use LMDB to store the prompts locally so we have more control. We can always add an export option, but I want the source of truth to be somewhere other than the file system. So far, I have a PromptStore which is global to the application and can be initialized on startup. Then there's a `PromptLibrary` which is intended to be the root of a new kind of Zed window. I haven't actually seen pixels yet, but I've sketched out the basics needed to create a new prompt, save, etc. Still lots to figure out but the foundations of being backed by a DB and rendering in an independent window are in place. /cc @iamnbutler @as-cii Release Notes: - N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
18e2b43d6d
commit
5f98b9617a
25 changed files with 1427 additions and 1429 deletions
|
@ -12,9 +12,10 @@ use git::repository::GitFileStatus;
|
|||
use gpui::{
|
||||
actions, anchored, deferred, div, impl_actions, px, uniform_list, Action, AnyElement,
|
||||
AppContext, AssetSource, AsyncWindowContext, ClipboardItem, DismissEvent, Div, EventEmitter,
|
||||
FocusHandle, FocusableView, InteractiveElement, KeyContext, Model, MouseButton, MouseDownEvent,
|
||||
ParentElement, Pixels, Point, PromptLevel, Render, Stateful, Styled, Subscription, Task,
|
||||
UniformListScrollHandle, View, ViewContext, VisualContext as _, WeakView, WindowContext,
|
||||
FocusHandle, FocusableView, InteractiveElement, KeyContext, ListSizingBehavior, Model,
|
||||
MouseButton, MouseDownEvent, ParentElement, Pixels, Point, PromptLevel, Render, Stateful,
|
||||
Styled, Subscription, Task, UniformListScrollHandle, View, ViewContext, VisualContext as _,
|
||||
WeakView, WindowContext,
|
||||
};
|
||||
use menu::{Confirm, SelectFirst, SelectLast, SelectNext, SelectPrev};
|
||||
use project::{Entry, EntryKind, Fs, Project, ProjectEntryId, ProjectPath, Worktree, WorktreeId};
|
||||
|
@ -2217,6 +2218,7 @@ impl Render for ProjectPanel {
|
|||
},
|
||||
)
|
||||
.size_full()
|
||||
.with_sizing_behavior(ListSizingBehavior::Infer)
|
||||
.track_scroll(self.scroll_handle.clone()),
|
||||
)
|
||||
.children(self.context_menu.as_ref().map(|(menu, position, _)| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue