Commit log

7e22d05 Cleanup

Click to expand commit body
* Remove the mutexes and have methods return the detected
  encoding.
* Try to handle the BOM safely...
* Clean up a bunch of code to make it more Zeddy

Conrad Irwin created

4330e5f - Change the order in which `cx` and `encoding` appear

Click to expand commit body
- Add a licence symlink to `encodings`

R Aadarsh created

2e18a5b Use `Buffer::update` and `Buffer::update_encoding` to set the `encoding`

Click to expand commit body
field of `Buffer`

R Aadarsh created

0b942fe - Use `EncodingOptions` for parameters

Click to expand commit body
- Implement `From` for `Encoding` and `Clone` for `EncodingOptions`

R Aadarsh created

08032bd Move the invalid encoding UI from `project` to `workspace`

R Aadarsh created

19b06e5 Fix conflicts

R Aadarsh created

0e89634 Fix conflicts

R Aadarsh created

c130110 Remove calls to `lock` and `unwrap` as they are no longer needed

R Aadarsh created

b2187e5 - Fix an issue that caused UTF-8 to be used when a file was closed and

Click to expand commit body
re-opened, while retaining the text.

- Fix an issue that prevented `InvalidBufferView` from being shown when
an incorrect encoding was chosen from the status bar.

- Centre the error message in `InvalidBufferView`.

R Aadarsh created

8580683 - Move the functionality in `fs::encodings` to a seperate crate

Click to expand commit body
`encodings`

- `EncodingWrapper` is replaced with `encodings::Encoding`

R Aadarsh created

1d95a18 Create a new crate `encodings` that will have all that is not related to

Click to expand commit body
UI. The `encodings_ui` crate will only have UI related components in the
future.

R Aadarsh created

0e38704 Fix an issue that caused the buffer to be in a modified state after

Click to expand commit body
choosing the correct encoding from `InvalidBufferView`

R Aadarsh created

25c6af4 Fix an issue that caused a reopened buffer to use UTF-8 even if the

Click to expand commit body
associated file was in a different encoding, rather than showing an
error.

R Aadarsh created

b629b1f Enable a file to be opened with an invalid encoding with the invalid

Click to expand commit body
bytes replaced with replacement characters

- Fix UTF-16 file handling

- Introduce a `ForceOpen` action to allow users to open files despite
encoding errors

- Add `force` and `detect_utf16` flags

- Update UI to provide "Accept the Risk and Open" button for invalid
encoding files

R Aadarsh created

0d3095a Clicking on `Choose another encoding` and selecting an encoding should

Click to expand commit body
now open the file in the chosen encoding if it is valid or show the
invalid screen again if not.

(UTF-16 files aren't being handled correctly as of now)

R Aadarsh created

d515ddd - Add optional encoding parameter to Worktree::load_file

Click to expand commit body
- Remove the parameter from `BufferStore::open_buffer` as it is not
needed

R Aadarsh created

183bff5 - Add a field `encoding` in both `Workspace` and `Project`

Click to expand commit body
- Pass encoding to `ProjectRegistry::open_path` and set the `encoding`
field in `Project`

R Aadarsh created

44abaed - Return an error if the file contains invalid bytes for the specified

Click to expand commit body
encoding instead of replacing the invalid bytes with replacement
 characters

 - Add `encoding` field in `Workspace`

R Aadarsh created

37754b0 Add a call to `open_abs_path` to enable opening of files from

Click to expand commit body
`InvalidBufferView`

R Aadarsh created

13ea13b Pass file path to `EncodingSelector` via `Toggle` action, if there is

Click to expand commit body
one.

R Aadarsh created

8063144 Update `tests` in `copilot.rs` to match the new `load` method signature

R Aadarsh created

6561c89 - Make `File::load` use `load_with_encoding`

Click to expand commit body
- Update the places where `File::load` is called

WARNING: The changes were committed with an error

R Aadarsh created

9dc21f5 Re-Add `load_with_encoding` method to the `Fs` trait

R Aadarsh created

591fe9f - Remove `load_with_encoding` from the `Fs` trait and make appropriate

Click to expand commit body
changes to the file loading logic
- Add a module and an action in
`zed_actions` to open `EncodingSelector` from `InvalidBufferView`
- Add an `init` function in `encodings` crate to register the action handler

Clicking the second button in `InvalidBufferView` will cause the
`EncodingSelector` to be displayed. However, clicking on an encoding
currently does nothing.

R Aadarsh created

dd5ddbf - Remove unnecessary calls to `collect`

Click to expand commit body
- Simplify UTF-16 BOM detection

Co-authored-by: CrazyboyQCD

Release Notes:
- Add support for opening and saving files in different encodings and a setting to enable or disable the indicator

R Aadarsh created

fb6ec66 Fix an error caused by UTF-16 BOM checking when there are no BOMs

R Aadarsh created

2a193ae Make the `EncodingSaveOrReopenSelector` open only when the current buffer is associated with a file

R Aadarsh created

680a72b - Update encoding detection to automatically switch to UTF-16LE/BE if

Click to expand commit body
BOM is present

- Change `encoding` in `Buffer` to `Arc<Mutex<&\'static Encoding>>`

- Observe changes in the `encoding` field of `Buffer` and update the
status bar indicator

R Aadarsh created

27376e0 Write BOM once for UTF-16 files

R Aadarsh created

0e2eda0 Add UTF-16 LE/BE support and remove unused serde code

Click to expand commit body
- Add UTF-16 LE and UTF-16 BE to encoding lists and mappings

- Implement encode/decode for UTF-16LE/BE in `EncodingWrapper`

- Remove unused serde deserialisation code and tests

R Aadarsh created

81376dd Add a licence symlink

R Aadarsh created

009c4ea Fix issues caused by Cargo.lock

R Aadarsh created

3b77f57 - Format code properly

Click to expand commit body
- Remove unused dependencies

R Aadarsh created

93281b2 Fix cargo clippy errors

R Aadarsh created

6e1a5fa Migrate from `encoding` to `encoding_rs`

Click to expand commit body
Co-authored-by: GitHub Copilot

R Aadarsh and GitHub Copilot created

cca3bb8 - Fix cargo clippy errors

Click to expand commit body
- Add workspace-hack as a dependency

R Aadarsh created

a61d94d fix: Fix an issue which caused the focus to not be on `EncodingSelector` after an action was selected from `EncodingSaveOrReopenSelector`

R Aadarsh created

1078f85 feat: Make the encoding indicator appear only when an editor is open.

Click to expand commit body
feat: Enable the user to choose whether or not the encoding indicator should be displayed by enabling or disabling `encoding_indicator` in `settings.json`

R Aadarsh created

12e21b5 Add support for saving and opening files in different encodings. The implementation is now complete.

R Aadarsh created

d3e95b9 Add a new `load_with_encoding` function to handle files with various encodings.

Click to expand commit body
Modified `Buffer::reload` in `buffer.rs` to use this new function, allowing Zed
to open files with any encoding in UTF-8 mode. Files with characters that
are invalid in UTF-8 will have those bytes replaced with the � character.

Add comments and documentation.

R Aadarsh created

ee70462 Make the status bar encoding indicator update the encoding when an encoding from the selector is chosen.

R Aadarsh created

6c25c99 refactor: `encoding` in `EncodingIndicator` is now an optional trait object

Click to expand commit body
feat: Add all supported encodings, and open the encoding selector when an action(save or reopen) is chosen.

R Aadarsh created

18cd271 Implement the actual encoding selector. There are currently only two encodings in the selector used as placeholders, but more will be added in the future. As of now, the encoding picker is not actually triggered.

R Aadarsh created

678605a Add a status indicator to indicate the current file's encoding. When clicked a modal view opens that lets user choose to either reopen or save a file with a particular encoding. The actual implementations are incomplete

R Aadarsh created

1552e13 Fix telemetry in release builds (#41695)

Click to expand commit body
This was inadvertently broken in v0.211.1-pre when we rewrote the
release build

Release Notes:

- N/A

Conrad Irwin created

ade0f13 agent_ui: Prevent mode selector tooltip from going off-screen (#41589)

Click to expand commit body
Closes #41458 

Dynamically position mode selector tooltip to prevent clipping.

Position tooltip on the right when panel is docked left, otherwise on
the left. This ensures the tooltip remains visible regardless of panel
position.

**Note:** The tooltip currently vertically aligns with the bottom of the
menu rather than individual items. Would be great if it can be aligned
with the option it explains. But this doesn't seem trivial to me to
implement and not sure if it's important enough atm?

Before: 
<img width="431" height="248" alt="Screenshot 2025-10-30 at 22 21 09"
src="https://github.com/user-attachments/assets/073f5440-b1bf-420b-b12f-558928b627f1"
/>

After:
<img width="632" height="158" alt="Screenshot 2025-10-30 at 17 26 52"
src="https://github.com/user-attachments/assets/e999e390-bf23-435e-9df0-3126dbc14ecb"
/>
<img width="685" height="175" alt="Screenshot 2025-10-30 at 17 27 15"
src="https://github.com/user-attachments/assets/84efca94-7920-474b-bcf8-062c7b59a812"
/>


Release Notes:

- Improved the agent panel's mode selector by preventing it to go
off-screen in case the panel is docked to the left.

Dijana Pavlovic created

04f7b08 Give visual feedback when an operation is pending (#41686)

Click to expand commit body
Currently, if a commit operation takes some time, there's no visual
feedback in the UI that anything's happening.

This PR changes the colour of the text on the button to the
`Color::Disabled` colour when a commit operation is pending.

Release Notes:

- Improved UI feedback when a commit is in progress

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Joe Innes and Danilo Leal created

ecbdffc debugger: Fix Debugpy attach with connect session startup (#41690)

Click to expand commit body
Closes #38345, #34882, #33280

Debugpy has four distinct configuration scenarios, which are:
1. launch
2. attach with process id
3. attach with listen
4. attach with connect

Spawning Debugpy directly works with the first three scenarios but not
with "attach with connect". Which requires host/port arguments being
passed in both with an attach request and when starting up Debugpy. This
PR passes in the right arguments when spawning Debugpy in an attach with
connect scenario, thus fixing the bug.

The VsCode extension comment that explains this:
https://github.com/microsoft/vscode-python-debugger/blob/98f5b93ee4259f99b679d7c45163ba7babcbff6d/src/extension/debugger/adapter/factory.ts#L43-L51

Release Notes:

- debugger: Fix Python attach-based sessions not working with `connect`
or `port` arguments

Anthony Eid created

aa61f25 git: Make GitPanel more responsive to long-running staging ops (#41667)

Click to expand commit body
Currently, this only applies to long-running individually selected
unstaged files in the git panel. Next up I would like to make this work
for `Stage All`/`Unstage All` however this will most likely require
pushing `PendingOperation` into `GitStore` (from the `GitPanel`).

Release Notes:

- N/A

Jakub Konka created

d406409 Fix categorization of agent server extensions (#41689)

Click to expand commit body
We missed making extensions that provide agent servers fill the
`provides` field with `agent-servers`, and thus, filtering for this type
of extension in both the app and site wouldn't return anything.

Release Notes:

- N/A

Danilo Leal created