agent_ui: Improve UX when pasting code into message editor#45254
agent_ui: Improve UX when pasting code into message editor#45254
Conversation
|
/cherry-pick preview |
|
/cherry-pick stable |
|
🍒💥 Cherry-pick did not succeed |
|
🍒💥 Cherry-pick did not succeed |
Follow up to #42982 Release Notes: - agent: Allow pasting code without formatting via ctrl/cmd-shift-v. - agent: Fixed an issue where pasting a single line of code would always insert an @mention
Follow up to #42982 Release Notes: - agent: Allow pasting code without formatting via ctrl/cmd-shift-v. - agent: Fixed an issue where pasting a single line of code would always insert an @mention
|
Leaving this quote here from those following link from release notes: #42982 (comment)
|
|
So happy to see this! IMO, this should have never landed until the UX around whatever the "@mention code snippet" thing was vastly improved. There is currently no:
These were essential pre-requesites for this feature to not have been a massive UX regression. If I could expand the tag thingy after pasting in and verify what was included in the context, or if I could revert a tag to a raw block if I'm pasting into some example code i'm trying to write as a response - then this feature would never have been as controversial for me. Either way, very happy to see this back. Looking forwards to seeing this whole featureset improving for all! 👏 🙏 🙇 |
Now I have all the context needed to create a comprehensive documentation update summary. ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw` action, explaining automatic @mention formatting for pasted code and how to bypass it | PR #45254 | ### Rationale PR #45254 ("agent_ui: Improve UX when pasting code into message editor") introduced the `agent::PasteRaw` action, which allows users to paste clipboard content without automatic formatting. When users copy multi-line code from an editor buffer and paste it into the Agent panel, Zed now automatically formats it as an @mention with file context. The `PasteRaw` action provides a way to bypass this behavior when raw text is preferred. This documentation update ensures users can discover both: 1. The new automatic @mention formatting behavior 2. The keybinding to bypass it when needed ### Review Notes - The new paragraph was placed in the "Adding Context" section, immediately after the existing note about image pasting support—this maintains logical flow since both relate to pasting behavior - Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding references, consistent with other keybinding documentation in the file - The documentation passed Prettier formatting validation without modifications --- ### Condensed Version (for commit message) ``` docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting Added explanation that multi-line code pasted from editor buffers is automatically formatted as @mentions, with keybinding to paste raw text. Related: PR #45254 ``` Triggered by: PR #44914 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
…45503) ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | `docs/src/ai/edit-prediction.md` | Updated Codestral setup instructions to use Settings Editor path instead of outdated `agent::OpenSettings` action reference | Settings Editor provider configuration flow | ### Rationale The primary documentation update addresses outdated instructions in the Codestral setup section. The original text referenced an `agent::OpenSettings` action that directed users to an "Agent Panel settings view" which no longer reflects the current UI flow. The updated instructions now guide users through the Settings Editor with platform-specific keyboard shortcuts and provide an alternative status bar path. ### Review Notes - **Codestral instructions**: Reviewers should verify the Settings Editor navigation path (`Cmd+,` → search "Edit Predictions" → **Configure Providers**) matches the current Zed UI - **Status bar alternative**: The alternative path via "edit prediction icon in the status bar" should be confirmed as accurate --- ## Update from 2025-12-21 20:25 --- **Source**: [#44914](#44914) - settings_ui: Add Edit keybindings button **Author**: @probably-neb Now I have all the context needed to create a comprehensive documentation update summary. ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw` action, explaining automatic @mention formatting for pasted code and how to bypass it | PR #45254 | ### Rationale PR #45254 ("agent_ui: Improve UX when pasting code into message editor") introduced the `agent::PasteRaw` action, which allows users to paste clipboard content without automatic formatting. When users copy multi-line code from an editor buffer and paste it into the Agent panel, Zed now automatically formats it as an @mention with file context. The `PasteRaw` action provides a way to bypass this behavior when raw text is preferred. This documentation update ensures users can discover both: 1. The new automatic @mention formatting behavior 2. The keybinding to bypass it when needed ### Review Notes - The new paragraph was placed in the "Adding Context" section, immediately after the existing note about image pasting support—this maintains logical flow since both relate to pasting behavior - Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding references, consistent with other keybinding documentation in the file - The documentation passed Prettier formatting validation without modifications --- ### Condensed Version (for commit message) ``` docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting Added explanation that multi-line code pasted from editor buffers is automatically formatted as @mentions, with keybinding to paste raw text. Related: PR #45254 ``` Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Follow up to #42982 Release Notes: - agent: Allow pasting code without formatting via ctrl/cmd-shift-v. - agent: Fixed an issue where pasting a single line of code would always insert an @mention
…45503) ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | `docs/src/ai/edit-prediction.md` | Updated Codestral setup instructions to use Settings Editor path instead of outdated `agent::OpenSettings` action reference | Settings Editor provider configuration flow | ### Rationale The primary documentation update addresses outdated instructions in the Codestral setup section. The original text referenced an `agent::OpenSettings` action that directed users to an "Agent Panel settings view" which no longer reflects the current UI flow. The updated instructions now guide users through the Settings Editor with platform-specific keyboard shortcuts and provide an alternative status bar path. ### Review Notes - **Codestral instructions**: Reviewers should verify the Settings Editor navigation path (`Cmd+,` → search "Edit Predictions" → **Configure Providers**) matches the current Zed UI - **Status bar alternative**: The alternative path via "edit prediction icon in the status bar" should be confirmed as accurate --- ## Update from 2025-12-21 20:25 --- **Source**: [#44914](#44914) - settings_ui: Add Edit keybindings button **Author**: @probably-neb Now I have all the context needed to create a comprehensive documentation update summary. ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw` action, explaining automatic @mention formatting for pasted code and how to bypass it | PR #45254 | ### Rationale PR #45254 ("agent_ui: Improve UX when pasting code into message editor") introduced the `agent::PasteRaw` action, which allows users to paste clipboard content without automatic formatting. When users copy multi-line code from an editor buffer and paste it into the Agent panel, Zed now automatically formats it as an @mention with file context. The `PasteRaw` action provides a way to bypass this behavior when raw text is preferred. This documentation update ensures users can discover both: 1. The new automatic @mention formatting behavior 2. The keybinding to bypass it when needed ### Review Notes - The new paragraph was placed in the "Adding Context" section, immediately after the existing note about image pasting support—this maintains logical flow since both relate to pasting behavior - Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding references, consistent with other keybinding documentation in the file - The documentation passed Prettier formatting validation without modifications --- ### Condensed Version (for commit message) ``` docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting Added explanation that multi-line code pasted from editor buffers is automatically formatted as @mentions, with keybinding to paste raw text. Related: PR #45254 ``` Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
…tries#45254) Follow up to zed-industries#42982 Release Notes: - agent: Allow pasting code without formatting via ctrl/cmd-shift-v. - agent: Fixed an issue where pasting a single line of code would always insert an @mention
…ed-industries#45503) ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | `docs/src/ai/edit-prediction.md` | Updated Codestral setup instructions to use Settings Editor path instead of outdated `agent::OpenSettings` action reference | Settings Editor provider configuration flow | ### Rationale The primary documentation update addresses outdated instructions in the Codestral setup section. The original text referenced an `agent::OpenSettings` action that directed users to an "Agent Panel settings view" which no longer reflects the current UI flow. The updated instructions now guide users through the Settings Editor with platform-specific keyboard shortcuts and provide an alternative status bar path. ### Review Notes - **Codestral instructions**: Reviewers should verify the Settings Editor navigation path (`Cmd+,` → search "Edit Predictions" → **Configure Providers**) matches the current Zed UI - **Status bar alternative**: The alternative path via "edit prediction icon in the status bar" should be confirmed as accurate --- ## Update from 2025-12-21 20:25 --- **Source**: [zed-industries#44914](zed-industries#44914) - settings_ui: Add Edit keybindings button **Author**: @probably-neb Now I have all the context needed to create a comprehensive documentation update summary. ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw` action, explaining automatic @mention formatting for pasted code and how to bypass it | PR zed-industries#45254 | ### Rationale PR zed-industries#45254 ("agent_ui: Improve UX when pasting code into message editor") introduced the `agent::PasteRaw` action, which allows users to paste clipboard content without automatic formatting. When users copy multi-line code from an editor buffer and paste it into the Agent panel, Zed now automatically formats it as an @mention with file context. The `PasteRaw` action provides a way to bypass this behavior when raw text is preferred. This documentation update ensures users can discover both: 1. The new automatic @mention formatting behavior 2. The keybinding to bypass it when needed ### Review Notes - The new paragraph was placed in the "Adding Context" section, immediately after the existing note about image pasting support—this maintains logical flow since both relate to pasting behavior - Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding references, consistent with other keybinding documentation in the file - The documentation passed Prettier formatting validation without modifications --- ### Condensed Version (for commit message) ``` docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting Added explanation that multi-line code pasted from editor buffers is automatically formatted as @mentions, with keybinding to paste raw text. Related: PR zed-industries#45254 ``` Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
…tries#45254) Follow up to zed-industries#42982 Release Notes: - agent: Allow pasting code without formatting via ctrl/cmd-shift-v. - agent: Fixed an issue where pasting a single line of code would always insert an @mention
…ed-industries#45503) ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | `docs/src/ai/edit-prediction.md` | Updated Codestral setup instructions to use Settings Editor path instead of outdated `agent::OpenSettings` action reference | Settings Editor provider configuration flow | ### Rationale The primary documentation update addresses outdated instructions in the Codestral setup section. The original text referenced an `agent::OpenSettings` action that directed users to an "Agent Panel settings view" which no longer reflects the current UI flow. The updated instructions now guide users through the Settings Editor with platform-specific keyboard shortcuts and provide an alternative status bar path. ### Review Notes - **Codestral instructions**: Reviewers should verify the Settings Editor navigation path (`Cmd+,` → search "Edit Predictions" → **Configure Providers**) matches the current Zed UI - **Status bar alternative**: The alternative path via "edit prediction icon in the status bar" should be confirmed as accurate --- ## Update from 2025-12-21 20:25 --- **Source**: [zed-industries#44914](zed-industries#44914) - settings_ui: Add Edit keybindings button **Author**: @probably-neb Now I have all the context needed to create a comprehensive documentation update summary. ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw` action, explaining automatic @mention formatting for pasted code and how to bypass it | PR zed-industries#45254 | ### Rationale PR zed-industries#45254 ("agent_ui: Improve UX when pasting code into message editor") introduced the `agent::PasteRaw` action, which allows users to paste clipboard content without automatic formatting. When users copy multi-line code from an editor buffer and paste it into the Agent panel, Zed now automatically formats it as an @mention with file context. The `PasteRaw` action provides a way to bypass this behavior when raw text is preferred. This documentation update ensures users can discover both: 1. The new automatic @mention formatting behavior 2. The keybinding to bypass it when needed ### Review Notes - The new paragraph was placed in the "Adding Context" section, immediately after the existing note about image pasting support—this maintains logical flow since both relate to pasting behavior - Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding references, consistent with other keybinding documentation in the file - The documentation passed Prettier formatting validation without modifications --- ### Condensed Version (for commit message) ``` docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting Added explanation that multi-line code pasted from editor buffers is automatically formatted as @mentions, with keybinding to paste raw text. Related: PR zed-industries#45254 ``` Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
…tries#45254) Follow up to zed-industries#42982 Release Notes: - agent: Allow pasting code without formatting via ctrl/cmd-shift-v. - agent: Fixed an issue where pasting a single line of code would always insert an @mention
…ed-industries#45503) ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | `docs/src/ai/edit-prediction.md` | Updated Codestral setup instructions to use Settings Editor path instead of outdated `agent::OpenSettings` action reference | Settings Editor provider configuration flow | ### Rationale The primary documentation update addresses outdated instructions in the Codestral setup section. The original text referenced an `agent::OpenSettings` action that directed users to an "Agent Panel settings view" which no longer reflects the current UI flow. The updated instructions now guide users through the Settings Editor with platform-specific keyboard shortcuts and provide an alternative status bar path. ### Review Notes - **Codestral instructions**: Reviewers should verify the Settings Editor navigation path (`Cmd+,` → search "Edit Predictions" → **Configure Providers**) matches the current Zed UI - **Status bar alternative**: The alternative path via "edit prediction icon in the status bar" should be confirmed as accurate --- ## Update from 2025-12-21 20:25 --- **Source**: [zed-industries#44914](zed-industries#44914) - settings_ui: Add Edit keybindings button **Author**: @probably-neb Now I have all the context needed to create a comprehensive documentation update summary. ## Documentation Update Summary ### Changes Made | File | Change | Related Code | | --- | --- | --- | | docs/src/ai/agent-panel.md | Added documentation for `agent::PasteRaw` action, explaining automatic @mention formatting for pasted code and how to bypass it | PR zed-industries#45254 | ### Rationale PR zed-industries#45254 ("agent_ui: Improve UX when pasting code into message editor") introduced the `agent::PasteRaw` action, which allows users to paste clipboard content without automatic formatting. When users copy multi-line code from an editor buffer and paste it into the Agent panel, Zed now automatically formats it as an @mention with file context. The `PasteRaw` action provides a way to bypass this behavior when raw text is preferred. This documentation update ensures users can discover both: 1. The new automatic @mention formatting behavior 2. The keybinding to bypass it when needed ### Review Notes - The new paragraph was placed in the "Adding Context" section, immediately after the existing note about image pasting support—this maintains logical flow since both relate to pasting behavior - Uses the standard `{#kb agent::PasteRaw}` syntax for keybinding references, consistent with other keybinding documentation in the file - The documentation passed Prettier formatting validation without modifications --- ### Condensed Version (for commit message) ``` docs(agent-panel): Document PasteRaw action for bypassing auto @mention formatting Added explanation that multi-line code pasted from editor buffers is automatically formatted as @mentions, with keybinding to paste raw text. Related: PR zed-industries#45254 ``` Release Notes: - N/A --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Follow up to #42982
Release Notes: