Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
More styling
Antonio Scandurra7c5200e757fe
diff --git a/styles/src/style_tree/assistant.ts b/styles/src/style_tree/assistant.tsindex 97bb3402b6b..bdca8a16e56 100644--- a/styles/src/style_tree/assistant.ts+++ b/styles/src/style_tree/assistant.ts@@ -60,13 +60,14 @@ export default function assistant(): any {padding: { left: 12 },},inline: {+ margin: { top: 3, bottom: 3 },border: border(theme.lowest, "on", {top: true,bottom: true,overlay: true,}),editor: {- text: text(theme.lowest, "mono", "on", { size: "sm" }),+ text: text(theme.highest, "mono", "default", { size: "sm" }),placeholder_text: text(theme.lowest, "sans", "on", "disabled"),selection: theme.players[0],},diff --git a/todo.md b/todo.mdindex e07d19bc95f..8a9a8b5b3db 100644--- a/todo.md+++ b/todo.md@@ -1,36 +1,25 @@-- Style the current inline editor-- Find a way to understand whether we want to refactor or append, or both. (function calls)-- Add a system prompt that makes GPT an expert of language X-- Provide context around the cursor/selection. We should try to fill the context window as much as possible (try to fill half of it so that we can spit out another half)-- When you hit escape, the assistant should stop.-- When you hit undo and you undo a transaction from the assistant, we should stop generating.-- Keep the inline editor around until the assistant is done. Add a cancel button to stop, and and undo button to undo the whole thing. (Interactive<IconButton>)---# 9:39 AM--- Hit `ctrl-enter`--- Puts me in assistant mode with the selected text highlighted in a special color. If text was selected, I'm in transformation mode.-- If there's no selection, put me on the line below, aligned with the indent of the line.-- Enter starts generation-- Ctrl-enter inserts a newline-- Once generations starts, enter "confirms it" by dismissing the inline editor.-- Escape in the inline editor cancels/undoes/dismisses.-- To generate text in reference to other text, we can *mark* text.--- Hit ctrl-enter deploys an edit prompt- Empty selection (cursor) => append text- On end of line: Edit prompt on end of line.- - Middle of line: Edit prompt near cursor head on a different line+ - [x] Middle of line: Edit prompt near cursor head on a different line- Non-empty selection => refactor- - Edit prompt near cursor head on a different line- - What was selected when you hit ctrl-enter is colored.-- Selection is cleared and cursor is moved to prompt input+ - [x] Edit prompt near cursor head on a different line+ - [x] What was selected when you hit ctrl-enter is colored.+- [x] Add placeholder text+ - If non-empty selection: Enter prompt to transform selected text+ - If empty selection: Enter prompt to generate text- When cursor is inside a prompt- - Escape cancels/undoes- - Enter confirms+ - [x] Escape cancels/undoes+ - [x] Enter confirms+- [ ] Selection is cleared and cursor is moved to prompt input+- [ ] Ability to highlight background multiple times for the same type+- [x] Basic Styling+- [ ] Match lowest indentation level of selected lines when inserting an inline assist+- [ ] Look into why insert prompts have a weird indentation sometimes++++- Multicursor- Run the same prompt for every selection in parallel- Position the prompt editor at the newest cursor