Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from zed-industries:main #60

Merged
merged 11 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/issue_response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Issue Response

on:
schedule:
- cron: "0 12 * * 2"
workflow_dispatch:

jobs:
issue-response:
if: github.repository_owner == 'zed-industries'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9

- name: Setup Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: "script/issue_response/pnpm-lock.yaml"

- run: pnpm install --dir script/issue_response

- name: Run Issue Response
run: pnpm exec ts-node script/issue_response/main.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,8 @@
"right": "outline_panel::ExpandSelectedEntry",
"alt-copy": "outline_panel::CopyPath",
"ctrl-alt-c": "outline_panel::CopyPath",
"alt-shift-copy": "outline_panel::CopyRelativePath",
"alt-ctrl-shift-c": "outline_panel::CopyRelativePath",
"alt-shift-copy": "workspace::CopyRelativePath",
"alt-ctrl-shift-c": "workspace::CopyRelativePath",
"alt-ctrl-r": "outline_panel::RevealInFileManager",
"space": "outline_panel::Open",
"shift-down": "menu::SelectNext",
Expand Down Expand Up @@ -679,8 +679,8 @@
"ctrl-v": "project_panel::Paste",
"alt-copy": "project_panel::CopyPath",
"ctrl-alt-c": "project_panel::CopyPath",
"alt-shift-copy": "project_panel::CopyRelativePath",
"alt-ctrl-shift-c": "project_panel::CopyRelativePath",
"alt-shift-copy": "workspace::CopyRelativePath",
"alt-ctrl-shift-c": "workspace::CopyRelativePath",
"enter": "project_panel::Rename",
"f2": "project_panel::Rename",
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
Expand Down
8 changes: 4 additions & 4 deletions assets/keymaps/default-macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@
"escape": "menu::Cancel",
"left": "outline_panel::CollapseSelectedEntry",
"right": "outline_panel::ExpandSelectedEntry",
"cmd-alt-c": "outline_panel::CopyPath",
"alt-cmd-shift-c": "outline_panel::CopyRelativePath",
"cmd-alt-c": "workspace::CopyPath",
"alt-cmd-shift-c": "workspace::CopyRelativePath",
"alt-cmd-r": "outline_panel::RevealInFileManager",
"space": "outline_panel::Open",
"shift-down": "menu::SelectNext",
Expand All @@ -692,8 +692,8 @@
"cmd-x": "project_panel::Cut",
"cmd-c": "project_panel::Copy",
"cmd-v": "project_panel::Paste",
"cmd-alt-c": "project_panel::CopyPath",
"alt-cmd-shift-c": "project_panel::CopyRelativePath",
"cmd-alt-c": "workspace::CopyPath",
"alt-cmd-shift-c": "workspace::CopyRelativePath",
"enter": "project_panel::Rename",
"f2": "project_panel::Rename",
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
Expand Down
1 change: 1 addition & 0 deletions assets/settings/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@
"**/*.key",
"**/*.cert",
"**/*.crt",
"**/.dev.vars",
"**/secrets.yml"
],
// When to show edit predictions previews in buffer.
Expand Down
60 changes: 60 additions & 0 deletions assets/themes/gruvbox/gruvbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@
"terminal.ansi.bright_white": "#fbf1c7ff",
"terminal.ansi.dim_white": "#b0a189ff",
"link_text.hover": "#83a598ff",
"version_control.added": "#b7bb26ff",
"version_control.added_background": "#b7bb2614",
"version_control.deleted": "#fb4a35ff",
"version_control.deleted_background": "#fb4a3514",
"version_control.modified": "#f9bd2fff",
"version_control.modified_background": "#f9bd2f14",
"version_control.renamed": "#83a598ff",
"version_control.conflict": "#f9bd2fff",
"version_control.conflict_background": "#f9bd2f14",
"version_control.ignored": "#998b78ff",
"conflict": "#f9bd2fff",
"conflict.background": "#572e10ff",
"conflict.border": "#754916ff",
Expand Down Expand Up @@ -490,6 +500,16 @@
"terminal.ansi.bright_white": "#fbf1c7ff",
"terminal.ansi.dim_white": "#b0a189ff",
"link_text.hover": "#83a598ff",
"version_control.added": "#b7bb26ff",
"version_control.added_background": "#b7bb2614",
"version_control.deleted": "#fb4a35ff",
"version_control.deleted_background": "#fb4a3514",
"version_control.modified": "#f9bd2fff",
"version_control.modified_background": "#f9bd2f14",
"version_control.renamed": "#83a598ff",
"version_control.conflict": "#f9bd2fff",
"version_control.conflict_background": "#f9bd2f14",
"version_control.ignored": "#998b78ff",
"conflict": "#f9bd2fff",
"conflict.background": "#572e10ff",
"conflict.border": "#754916ff",
Expand Down Expand Up @@ -875,6 +895,16 @@
"terminal.ansi.bright_white": "#fbf1c7ff",
"terminal.ansi.dim_white": "#b0a189ff",
"link_text.hover": "#83a598ff",
"version_control.added": "#b7bb26ff",
"version_control.added_background": "#b7bb2614",
"version_control.deleted": "#fb4a35ff",
"version_control.deleted_background": "#fb4a3514",
"version_control.modified": "#f9bd2fff",
"version_control.modified_background": "#f9bd2f14",
"version_control.renamed": "#83a598ff",
"version_control.conflict": "#f9bd2fff",
"version_control.conflict_background": "#f9bd2f14",
"version_control.ignored": "#998b78ff",
"conflict": "#f9bd2fff",
"conflict.background": "#572e10ff",
"conflict.border": "#754916ff",
Expand Down Expand Up @@ -1260,6 +1290,16 @@
"terminal.ansi.bright_white": "#282828ff",
"terminal.ansi.dim_white": "#73675eff",
"link_text.hover": "#0b6678ff",
"version_control.added": "#79740eff",
"version_control.added_background": "#79740e14",
"version_control.deleted": "#9d0006ff",
"version_control.deleted_background": "#9d000614",
"version_control.modified": "#b57614ff",
"version_control.modified_background": "#b5761414",
"version_control.renamed": "#076678ff",
"version_control.conflict": "#b57614ff",
"version_control.conflict_background": "#b5761414",
"version_control.ignored": "#928374ff",
"conflict": "#b57615ff",
"conflict.background": "#f5e2d0ff",
"conflict.border": "#ebccabff",
Expand Down Expand Up @@ -1645,6 +1685,16 @@
"terminal.ansi.bright_white": "#282828ff",
"terminal.ansi.dim_white": "#73675eff",
"link_text.hover": "#0b6678ff",
"version_control.added": "#79740eff",
"version_control.added_background": "#79740e14",
"version_control.deleted": "#9d0006ff",
"version_control.deleted_background": "#9d000614",
"version_control.modified": "#b57614ff",
"version_control.modified_background": "#b5761414",
"version_control.renamed": "#076678ff",
"version_control.conflict": "#b57614ff",
"version_control.conflict_background": "#b5761414",
"version_control.ignored": "#928374ff",
"conflict": "#b57615ff",
"conflict.background": "#f5e2d0ff",
"conflict.border": "#ebccabff",
Expand Down Expand Up @@ -2030,6 +2080,16 @@
"terminal.ansi.bright_white": "#282828ff",
"terminal.ansi.dim_white": "#73675eff",
"link_text.hover": "#0b6678ff",
"version_control.added": "#79740eff",
"version_control.added_background": "#79740e14",
"version_control.deleted": "#9d0006ff",
"version_control.deleted_background": "#9d000614",
"version_control.modified": "#b57614ff",
"version_control.modified_background": "#b5761414",
"version_control.renamed": "#076678ff",
"version_control.conflict": "#b57614ff",
"version_control.conflict_background": "#b5761414",
"version_control.ignored": "#928374ff",
"conflict": "#b57615ff",
"conflict.background": "#f5e2d0ff",
"conflict.border": "#ebccabff",
Expand Down
10 changes: 10 additions & 0 deletions assets/themes/one/one.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@
"terminal.ansi.bright_white": "#dce0e5ff",
"terminal.ansi.dim_white": "#575d65ff",
"link_text.hover": "#74ade8ff",
"version_control.added": "#a1c181ff",
"version_control.added_background": "#a1c18114",
"version_control.deleted": "#d07277ff",
"version_control.deleted_background": "#d0727714",
"version_control.modified": "#dec184ff",
"version_control.modified_background": "#dec18414",
"version_control.renamed": "#74ade8ff",
"version_control.conflict": "#dec184ff",
"version_control.conflict_background": "#dec18414",
"version_control.ignored": "#878a98ff",
"conflict": "#dec184ff",
"conflict.background": "#dec1841a",
"conflict.border": "#5d4c2fff",
Expand Down
18 changes: 0 additions & 18 deletions crates/collab/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub mod extensions;
pub mod ips_file;
pub mod slack;

use crate::api::events::SnowflakeRow;
use crate::{
auth,
db::{User, UserId},
Expand Down Expand Up @@ -100,7 +99,6 @@ pub fn routes(rpc_server: Arc<rpc::Server>) -> Router<(), Body> {
.route("/user", get(get_authenticated_user))
.route("/users/:id/access_tokens", post(create_access_token))
.route("/rpc_server_snapshot", get(get_rpc_server_snapshot))
.route("/snowflake/events", post(write_snowflake_event))
.merge(billing::router())
.merge(contributors::router())
.layer(
Expand Down Expand Up @@ -247,19 +245,3 @@ async fn create_access_token(
encrypted_access_token,
}))
}

/// An endpoint that writes a Snowflake event to our event stream.
///
/// This endpoint is exposed such that other internal services can write
/// telemetry events without needing to talk to AWS Kinesis directly.
async fn write_snowflake_event(
Extension(app): Extension<Arc<AppState>>,
Json(event): Json<SnowflakeRow>,
) -> Result<()> {
let kinesis_client = app.kinesis_client.clone();
let kinesis_stream = app.config.kinesis_stream.clone();

event.write(&kinesis_client, &kinesis_stream).await?;

Ok(())
}
2 changes: 0 additions & 2 deletions crates/editor/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ gpui::actions!(
CopyHighlightJson,
CopyFileName,
CopyFileNameWithoutExtension,
CopyPath,
CopyPermalinkToLine,
CopyRelativePath,
Cut,
CutToEndOfLine,
Delete,
Expand Down
33 changes: 19 additions & 14 deletions crates/editor/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ use code_context_menus::{
use git::blame::GitBlame;
use gpui::{
div, impl_actions, point, prelude::*, pulsating_between, px, relative, size, Action, Animation,
AnimationExt, AnyElement, App, AsyncWindowContext, AvailableSpace, Background, Bounds,
ClipboardEntry, ClipboardItem, Context, DispatchPhase, ElementId, Entity, EntityInputHandler,
EventEmitter, FocusHandle, FocusOutEvent, Focusable, FontId, FontWeight, Global,
HighlightStyle, Hsla, InteractiveText, KeyContext, Modifiers, MouseButton, MouseDownEvent,
PaintQuad, ParentElement, Pixels, Render, SharedString, Size, Styled, StyledText, Subscription,
Task, TextStyle, TextStyleRefinement, UTF16Selection, UnderlineStyle, UniformListScrollHandle,
WeakEntity, WeakFocusHandle, Window,
AnimationExt, AnyElement, App, AsyncWindowContext, AvailableSpace, Bounds, ClipboardEntry,
ClipboardItem, Context, DispatchPhase, ElementId, Entity, EntityInputHandler, EventEmitter,
FocusHandle, FocusOutEvent, Focusable, FontId, FontWeight, Global, HighlightStyle, Hsla,
InteractiveText, KeyContext, Modifiers, MouseButton, MouseDownEvent, PaintQuad, ParentElement,
Pixels, Render, SharedString, Size, Styled, StyledText, Subscription, Task, TextStyle,
TextStyleRefinement, UTF16Selection, UnderlineStyle, UniformListScrollHandle, WeakEntity,
WeakFocusHandle, Window,
};
use highlight_matching_bracket::refresh_matching_bracket_highlights;
use hover_popover::{hide_hover, HoverState};
Expand Down Expand Up @@ -6975,10 +6975,10 @@ impl Editor {
cx: &mut Context<Self>,
) {
let selections = self.selections.all(cx).into_iter().map(|s| s.range());
self.revert_hunks_in_ranges(selections, window, cx);
self.discard_hunks_in_ranges(selections, window, cx);
}

fn revert_hunks_in_ranges(
fn discard_hunks_in_ranges(
&mut self,
ranges: impl Iterator<Item = Range<Point>>,
window: &mut Window,
Expand Down Expand Up @@ -13106,7 +13106,12 @@ impl Editor {
}
}

pub fn copy_path(&mut self, _: &CopyPath, _window: &mut Window, cx: &mut Context<Self>) {
pub fn copy_path(
&mut self,
_: &zed_actions::workspace::CopyPath,
_window: &mut Window,
cx: &mut Context<Self>,
) {
if let Some(path) = self.target_file_abs_path(cx) {
if let Some(path) = path.to_str() {
cx.write_to_clipboard(ClipboardItem::new_string(path.to_string()));
Expand All @@ -13116,7 +13121,7 @@ impl Editor {

pub fn copy_relative_path(
&mut self,
_: &CopyRelativePath,
_: &zed_actions::workspace::CopyRelativePath,
_window: &mut Window,
cx: &mut Context<Self>,
) {
Expand Down Expand Up @@ -13645,14 +13650,14 @@ impl Editor {
&self,
window: &mut Window,
cx: &mut App,
) -> BTreeMap<DisplayRow, Background> {
) -> BTreeMap<DisplayRow, Hsla> {
let snapshot = self.snapshot(window, cx);
let mut used_highlight_orders = HashMap::default();
self.highlighted_rows
.iter()
.flat_map(|(_, highlighted_rows)| highlighted_rows.iter())
.fold(
BTreeMap::<DisplayRow, Background>::new(),
BTreeMap::<DisplayRow, Hsla>::new(),
|mut unique_rows, highlight| {
let start = highlight.range.start.to_display_point(&snapshot);
let end = highlight.range.end.to_display_point(&snapshot);
Expand All @@ -13669,7 +13674,7 @@ impl Editor {
used_highlight_orders.entry(row).or_insert(highlight.index);
if highlight.index >= *used_index {
*used_index = highlight.index;
unique_rows.insert(DisplayRow(row), highlight.color.into());
unique_rows.insert(DisplayRow(row), highlight.color);
}
}
unique_rows
Expand Down
Loading