Commit graph

30389 commits

Author SHA1 Message Date
Conrad Irwin
67e7d1426c WIP 2025-08-18 23:13:49 -06:00
Conrad Irwin
3b7ad6236d Re-wire history 2025-08-18 23:02:51 -06:00
Conrad Irwin
8998cdee26 Wire through title update 2025-08-18 21:03:31 -06:00
Conrad Irwin
3ed2b7691b Generating thread title 2025-08-18 15:09:43 -06:00
Conrad Irwin
999449424e Merge branch 'main' into agent2-history 2025-08-18 14:29:33 -06:00
Conrad Irwin
8373884cdb TEMP 2025-08-18 14:24:53 -06:00
Conrad Irwin
5d88de13da Saving history with thread titles 2025-08-18 14:16:03 -06:00
Marshall Bowers
50819a9d20
client: Parse auth callback query parameters before showing sign-in success page (#36440)
This PR fixes an issue where we would redirect the user's browser to the
sign-in success page even if the OAuth callback was malformed.

We now parse the OAuth callback parameters from the query string and
only redirect to the sign-in success page when they are valid.

Release Notes:

- Updated the sign-in flow to not show the sign-in success page
prematurely.
2025-08-18 19:57:28 +00:00
Anthony Eid
3a3df5c011
gpui: Add support for custom prompt text in PathPromptOptions (#36410)
This will be used to improve the clarity of the git clone UI

### MacOS
<img width="1322" height="128" alt="image"
src="https://github.com/user-attachments/assets/3e511143-12c1-4440-89dd-841b21b2e98e"
/>

### Windows 
<img width="338" height="80" alt="image"
src="https://github.com/user-attachments/assets/766d08d6-0c72-4175-ad24-59dc6188d5f1"
/>

### Linux

<img width="387" height="72" alt="Screenshot From 2025-08-18 15-32-06"
src="https://github.com/user-attachments/assets/3125a7c4-3975-462a-a547-d5d4fac48f22"
/>



Release Notes:

- N/A
2025-08-18 19:48:02 +00:00
Marshall Bowers
fa61c3e24d
gpui: Fix typo in handle_gpui_events (#36431)
This PR fixes a typo I noticed in the `handle_gpui_events` method name.

Release Notes:

- N/A
2025-08-18 17:27:23 +00:00
Conrad Irwin
cc196427f0 Remove dbg!
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-18 11:25:22 -06:00
Conrad Irwin
fc076e84ca History mostly working
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-18 11:24:31 -06:00
Conrad Irwin
4b1a48e4de Wire up history completely
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-18 10:40:15 -06:00
Lukas Wirth
ed155ceba9
title_bar: Fix screensharing errors not being shown to the user (#36424)
Release Notes:

- N/A
2025-08-18 16:27:26 +00:00
tidely
e1d8e3bf6d
language: Clean up allocations (#36418)
- Correctly pre-allocate `Vec` when deserializing regexes
- Simplify manual `Vec::with_capacity` calls by using `Iterator::unzip`
- Collect directly into `Arc<[T]>` (uses `Vec` internally anyway, but
simplifies code)
- Remove unnecessary `LazyLock` around Atomics by not using const
incompatible `Default` for initialization.

Release Notes:

- N/A
2025-08-18 18:58:12 +03:00
Lucas Vieira
768b2de368
vim: Fix ap text object selection when there is line wrapping (#35485)
In Vim mode, `ap` text object (used in `vap`, `dap`, `cap`) was
selecting multiple paragraphs when soft wrap was enabled. The bug was
caused by using DisplayRow coordinates for arithmetic instead of buffer
row coordinates in the paragraph boundary calculation.

Fix by converting to buffer coordinates before arithmetic, then back to
display coordinates for the final result.

Closes #35085

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-18 09:57:53 -06:00
AidanV
e1d31cfcc3
vim: Display invisibles in mode indicator (#35760)
Release Notes:

- Fixes bug where `ctrl-k enter` while in `INSERT` mode would put a
newline in the Vim mode indicator


#### Old
<img width="729" height="486" alt="OldVimModeIndicator"
src="https://github.com/user-attachments/assets/58742745-5a58-4e7b-a1ef-29aa3ff1c4f7"
/>

#### New
<img width="729" height="486" alt="NewVimModeIndicator"
src="https://github.com/user-attachments/assets/e636359a-06b6-4cdd-9e62-5dc52c6f068f"
/>
2025-08-18 09:52:25 -06:00
Agus Zubiaga
48fed866e6
acp: Have AcpThread handle all interrupting (#36417)
The view was cancelling the generation, but `AcpThread` already handles
that, so we removed that extra code and fixed a bug where an update from
the first user message would appear after the second one.

Release Notes:

- N/A

Co-authored-by: Danilo <danilo@zed.dev>
2025-08-18 12:34:27 -03:00
Antonio Scandurra
d83210d978 WIP
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-18 17:30:12 +02:00
Piotr Osiewicz
9b78c46902
python: Use pip provided by our 'base' venv (#36414)
Closes #36218

Release Notes:

- Debugger: Python debugger installation no longer assumes that pip is
available in global Python installation
2025-08-18 14:48:38 +00:00
Agus Zubiaga
db31fa67f3
acp: Stay in edit mode when current completion ends (#36413)
When a turn ends and the checkpoint is updated, `AcpThread` emits
`EntryUpdated` with the index of the user message. This was causing the
message editor to be recreated and, therefore, lose focus.

Release Notes:

- N/A
2025-08-18 11:37:28 -03:00
Danilo Leal
6bf666958c
agent2: Allow to interrupt and send a new message (#36185)
Release Notes:

- N/A
2025-08-18 10:49:17 -03:00
Umesh Yadav
6f56ac50fe
Use upstream version of yawc (#36412)
As this was merged in upstream:
https://github.com/infinitefield/yawc/pull/16. It's safe to point yawc
to upstream instead of fork. cc @maxdeviant

Release Notes:

- N/A
2025-08-18 09:15:52 -04:00
Antonio Scandurra
205b1371aa Synchronize initial entries 2025-08-18 15:08:12 +02:00
Antonio Scandurra
e6e23d04f8 Checkpoint 2025-08-18 14:56:10 +02:00
Agus Zubiaga
e2db434920
acp thread view: Floating editing message controls (#36283)
Prevents layout shift when focusing the editor

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-08-18 12:50:29 +00:00
Finn Evers
58f7006898
editor: Add tests to ensure no horizontal scrolling is possible in soft wrap mode (#36411)
Prior to https://github.com/zed-industries/zed/pull/34564 as well as
https://github.com/zed-industries/zed/pull/26893, we would have cases
where editors would be scrollable even if `soft_wrap` was set to
`editor_width`. This has regressed and improved quite a few times back
and forth. The issue was only within the editor code, the code for the
wrap map was functioning and tested properly.

Hence, this PR adds two tests to the editor rendering code in an effort
to ensure that we maintain the current correct behavior.

Release Notes:

- N/A
2025-08-18 12:35:54 +00:00
Finn Evers
1add1d042d
Add option to disable auto indentation (#36259)
Closes https://github.com/zed-industries/zed/issues/11780

While auto indentation is generally nice to have, there are cases where
it is currently just not good enough for some languages (e.g. Haskell)
or users just straight up do not want their editor to auto indent for
them. Hence, this PR adds the possibilty to disable auto indentation for
either all language or on a per-language basis. Manual invocation via
the `editor: auto indent` action will continue to work.

Also takes a similar approach as
https://github.com/zed-industries/zed/pull/31569 to ensure performance
is fine for larger multicursor edits.

Release Notes:

- Added the possibility to configure auto indentation for all languages
and per language. Add `"auto_indent": false"` to your settings or
desired language to disable the feature.
2025-08-18 14:21:33 +02:00
Antonio Scandurra
199256e43e Checkpoint 2025-08-18 14:21:01 +02:00
Antonio Scandurra
3a0e55d9b6 Stream deserialized thread to AcpThread 2025-08-18 14:16:19 +02:00
Piotr Osiewicz
5225844c9e
lsp: Always report innermost workspace_folders (#36407)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-08-18 11:48:21 +00:00
Antonio Scandurra
5259c8692d WIP 2025-08-18 13:45:55 +02:00
Bennet Bo Fenner
57198f33c4
agent2: Show Zed AI onboarding (#36406)
Release Notes:

- N/A
2025-08-18 11:12:17 +00:00
Smit Barmase
d5711d44a5
editor: Fix panic in inlay hint while padding (#36405)
Closes #36247

Fix a panic when padding inlay hints if the last character is a
multi-byte character. Regressed in
https://github.com/zed-industries/zed/pull/35786.

Release Notes:

- Fixed a crash that could occur when an inlay hint ended with `...`.
2025-08-18 16:32:01 +05:30
Finn Evers
843336970a
keymap_ui: Ensure keybind with empty arguments can be saved (#36393)
Follow up to #36278 to ensure this bug is actually fixed. Also fixes
this on two layers and adds a test for the lower layer, as we cannot
properly test it in the UI.

Furthermore, this improves the error message to show some more context
and ensures the status toast is actually only shown when the keybind was
successfully updated: Before, we would show the success toast whilst
also showing an error in the editor.

Lastly, this also fixes some issues with the status toast (and
animations) where no status toast or no animation would show in certain
scenarios.

Release Notes:

- N/A
2025-08-18 11:01:32 +00:00
Kirill Bulatov
d83f341d27
Silence "minidump endpoint not set" errors' backtraces in the logs (#36404)
<img width="1899" height="693" alt="bad"
src="https://github.com/user-attachments/assets/6e6eb2d7-0933-4bb7-b339-ecebba00b60b"
/>

Release Notes:

- N/A
2025-08-18 10:45:51 +00:00
Lukas Wirth
472f1a8cc2
editor: Add right click context menu to buffer headers (#36398)
This adds a context menu to buffer headers mimicking that of pane tabs,
notably being able to copy the relative and absolute paths of the buffer
as well as opening a terminal in the parent.

Confusingly prior to this right clicking a buffer header used to open
the context menu of the underlying editor.

Release Notes:

- Added context menu for buffer titles
2025-08-18 10:40:39 +00:00
Bennet Bo Fenner
5591fc810e
agent: Restore last used agent session on startup (#36401)
Release Notes:

- N/A
2025-08-18 10:22:00 +00:00
Bennet Bo Fenner
2eadd5a396
agent2: Make model of Thread optional (#36395)
Related to #36394 

Release Notes:

- N/A
2025-08-18 09:56:02 +00:00
Mahmud Ridwan
2075627d6c
Suggest single tracked commit message only when nothing else is staged (#36347)
Closes #36341

<img width="543" height="548" alt="image"
src="https://github.com/user-attachments/assets/ab76a32c-c622-4025-9b28-5accc8d3f04c"
/>

In the case where commit message was suggested based on single tracked
entry, this PR adds a clause to the condition to ensure there are no
staged entries.

Release Notes:

- Fixed commit message suggestion when there is one unstaged tracked
file, but multiple untracked files are staged.
2025-08-18 12:54:45 +03:00
Piotr Osiewicz
b8a106632f
lsp: Identify language servers by their configuration (#35270)
- **WIP: reorganize dispositions**
- **Introduce a LocalToolchainStore trait and use it for LspAdapter
methods**

Closes #35782
Closes #27331

Release Notes:

- Python: Improved propagation of a selected virtual environment into
the LSP configuration. This should the make all language-related
features such as Go to definition or Find all references more reliable.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-08-18 11:43:52 +02:00
Oleksiy Syvokon
42ffa8900a
open_ai: Fix error response parsing (#36390)
Closes #35925

Release Notes:

- Fixed OpenAI error response parsing in some cases
2025-08-18 08:54:31 +00:00
Antonio Scandurra
501e72e8f0 Merge remote-tracking branch 'origin/main' into agent2-history 2025-08-18 10:40:55 +02:00
Cale Sennett
61ce07a91b
Add capabilities to OpenAI-compatible model settings (#36370)
### TL;DR
* Adds `capabilities` configuration for OpenAI-compatible models
* Relates to
https://github.com/zed-industries/zed/issues/36215#issuecomment-3193920491

### Summary
This PR introduces support for configuring model capabilities for
OpenAI-compatible language models. The implementation addresses the
issue that not all OpenAI-compatible APIs support the same features -
for example, Cerebras' API explicitly does not support
`parallel_tool_calls` as documented in their [OpenAI compatibility
guide](https://inference-docs.cerebras.ai/resources/openai#currently-unsupported-openai-features).

### Changes

1. **Model Capabilities Structure**:
- Added `ModelCapabilityToggles` struct for UI representation with
boolean toggle states
- Implemented proper parsing of capability toggles into
`ModelCapabilities`

2. **UI Updates**:
- Modified the "Add LLM Provider" modal to include checkboxes for each
capability
- Each OpenAI-compatible model can now be configured with its specific
capabilities through the UI

3. **Configuration File Structure**:
- Updated the settings schema to support a `capabilities` object for
each `openai_compatible` model
- Each capability (`tools`, `images`, `parallel_tool_calls`,
`prompt_cache_key`) can be individually specified per model

### Example Configuration

```json
{
  "openai_compatible": {
    "Cerebras": {
      "api_url": "https://api.cerebras.ai/v1",
      "available_models": [
        {
          "name": "gpt-oss-120b",
          "max_tokens": 131000,
          "capabilities": {
            "tools": true,
            "images": false,
            "parallel_tool_calls": false,
            "prompt_cache_key": false
          }
        }
      ]
    }
  }
}
```

### Tests Added

- Added tests to verify default capability values are correctly applied
- Added tests to verify that deselected toggles are properly parsed as
`false`
- Added tests to verify that mixed capability selections work correctly

Thanks to @osyvokon for the desired `capabilities` configuration
structure!


Release Notes:

- OpenAI-compatible models now have configurable capabilities (#36370;
thanks @calesennett)

---------

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
2025-08-18 11:36:52 +03:00
Antonio Scandurra
a231fd3ee5 Take a weak thread in EditFileTool to avoid cycle 2025-08-18 10:13:02 +02:00
Ben Brandt
ea828c0c59
agent2: Emit cancellation stop reason on cancel (#36381)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-18 07:58:30 +00:00
Ben Brandt
b3969ed427
Standardize on canceled instead of cancelled (#36385)
Release Notes:

- N/A
2025-08-18 04:07:32 +00:00
Smit Barmase
7dc4adbd40
gpui: Fix crash when starting Zed on macOS during texture creation (#36382)
Closes #36229

Fix zero-sized texture creation that triggers a SIGABRT in the Metal
renderer. Not sure why this happens yet, but it likely occurs when
`native_window.contentView()` returns a zero `NSSize` during initial
window creation, before the view size is computed.

Release Notes:

- Fixed a rare startup crash on macOS.
2025-08-18 08:16:17 +05:30
Cole Miller
2dbc951058
agent2: Start loading mentioned threads and text threads as soon as they're added (#36374)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-08-17 20:38:07 +00:00
Conrad Irwin
fae5900749 factor otu 2025-08-17 13:24:27 -06:00