zed icon indicating copy to clipboard operation
zed copied to clipboard

Edit Predictions: Copilot not suggesting anything

Open EtienneBruines opened this issue 7 months ago • 10 comments

Summary

When enabling features.edit_prediction_provider: "copilot", no edit predictions appear. Neither automatically (because edit_predictions.mode: "eager" is configured, nor on-demand by running the editor: show edit prediction or copilot: suggest actions.

Steps to trigger the problem:

  1. Configure GitHub Copilot as the edit predictor.
  2. (Optional, not related) Confirm that it does work in the Assistant panel
  3. Write some code and see no suggestions

When switching to the zed provider, it immediately shows results.

Actual Behavior: No suggestions being shown.

Expected Behavior: Suggestions being shown.

Zed Version and System Specs

Zed: v0.180.3 (Zed) OS: Linux Wayland tuxedo 24.04 Memory: 31.2 GiB Architecture: x86_64 GPU: Intel(R) UHD Graphics 630 (CFL GT2) || Intel open-source Mesa driver || Mesa 25.0.2-1~24.04-tux1

Zed: v0.181.4 (Zed Preview) OS: Linux Wayland tuxedo 24.04 Memory: 31.2 GiB Architecture: x86_64 GPU: Intel(R) UHD Graphics 630 (CFL GT2) || Intel open-source Mesa driver || Mesa 25.0.2-1~24.04-tux1

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log
2025-04-08T09:31:09.74289231+02:00 [INFO] Language server with id 0 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[fetchCompletions] request.response: [https://proxy.business.githubcopilot.com/v1/engines/gpt-4o-copilot/completions] took 364.4774750000215 ms"
}
2025-04-08T09:31:09.74319883+02:00 [INFO] Language server with id 0 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[streamChoices] request done: headerRequestId: [a4a9a9c9-766c-4fbf-b6a2-fa57bf9f6fe7] model deployment ID: []"
}
2025-04-08T09:31:09.750246651+02:00 [INFO] Language server with id 0 sent unhandled notification didChangeStatus:
{
  "busy": false,
  "kind": "Normal"
}

EtienneBruines avatar Apr 08 '25 07:04 EtienneBruines

Can you try to set edit_predictions.mode to subtle ?

When I set both this and features.edit_prediction_provider to copilot , the code will not be hidden by default (not the same as zeta) . It seems that subtle mode only works for zeta for now , and if I switched to copilot , the display modes is removed.

Image

scbizu avatar Apr 29 '25 06:04 scbizu

I did not expect that to work, but it did! Thank you @scbizu! 😎

Setting edit_predictions.mode to subtle makes the suggestions from copilot appear - the behavior is consistent with the eager mode, it does not behave like subtle - no modifier key necessary. The suggestions pop up automatically.

EtienneBruines avatar Apr 29 '25 07:04 EtienneBruines

it does not behave like subtle - no modifier key necessary. The suggestions pop up automatically.

I don't think this is a expected behavior though 🤔 , the subtle mode really helps , I don't want AI to disturb my thought but I need some auto completions for the boring coding stuff (like code template or unit testing , etc ). I set the "show_edit_predictions" to false now , and if I need him I will toggle it manually (inspired by #27480).

APPEND: I found that I can set this command into the keymap (toggle zed: open keymap, add "bindings": {"ctrl-?": "editor::ShowEditPrediction"}) , and now I can simulate the subtle mode with no AI feature by default unless I hit the AI key(ctrl-?).

BTW I am happy it helps you @EtienneBruines .

scbizu avatar Apr 29 '25 08:04 scbizu

Anyone else still running in to this and/or could help me?

When I set this in my settings:

"features": {
    "edit_prediction_provider": "copilot"
  },
  "edit_predictions": {
    "mode": "subtle"
  }

I get regular suggestions, but I do not get edit predictions suggesting me where to move the cursor. Changing it back to zed immediately works. I've tried toggling the mode from subtle to eager, but that doesn't seem to change anything for me. I'm not seeing any meaningful output in my logs related to this either.

reppiee avatar May 13 '25 09:05 reppiee

@reppiee maybe I can give some help if we could share your full zed settings.json , and could you check your GitHub copilot is really work first ?

scbizu avatar May 13 '25 10:05 scbizu

Sure thing!

Yes I verified and GitHub copilot is working in the sense that it is giving (meaningful) code suggestions, however it is not providing the "jump to edit" functionality from edit_predictions that I get when I change the provider to zed.

Here is my full `settings.json`
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette
{
  "features": {
    "edit_prediction_provider": "copilot"
  },
  "edit_predictions": {
    "mode": "subtle"
  },
  "preferred_line_length": 120,
  "tab_size": 2,
  "use_autoclose": false,
  "tab_bar": {
    "show_icons": false,
    "show": true
  },
  "double_click_in_multibuffer": "open",
  "calls": {
    "mute_on_join": true,
    "share_on_join": false
  },
  "terminal": {
    "toolbar": {
      "breadcrumbs": false
    },
    "dock": "bottom",
    "blinking": "on",
    "button": false,
    "working_directory": "current_project_directory"
  },
  "ui_font_size": 16,
  "buffer_font_size": 16.0,
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "Catbox"
  },
  "tabs": { "file_icons": false },
  "languages": {
    "TSX": {
      "code_actions_on_format": {
        "source.organizeImports": false
      }
    },
    "JavaScript": {
      "code_actions_on_format": {
        "source.organizeImports": false
      }
    },
    "Ruby": {
      // We enable rubocop because pull-based diagnostics within ruby-lsp are not supported yet in zed
      "show_edit_predictions": true,
      "language_servers": ["ruby-lsp", "!solargraph", "rubocop"],
      "formatter": "auto"
    }
  },
  "file_scan_exclusions": [
    "**/.git",
    "**/.svn",
    "**/.hg",
    "**/CVS",
    "**/.DS_Store",
    "**/Thumbs.db",
    "**/.classpath",
    "**/.settings",
    "**/mimic/reports.json",
    "**/mimic/teams.json",
    "**/build/static",
    "**/node_modules"
  ],
  "lsp": {
    "ruby-lsp": {
      "initialization_options": {
        "enabledFeatures": {
          "codeActions": true,
          "codeLens": true,
          "completion": true,
          "definition": true,
          "diagnostics": false, // pull based Diagnostics not supported yet in Zed
          "documentHighlights": true,
          "documentLink": true,
          "documentSymbols": true,
          "foldingRanges": true,
          "formatting": true,
          "hover": true,
          "inlayHint": true,
          "onTypeFormatting": true,
          "selectionRanges": true,
          "semanticHighlighting": true,
          "signatureHelp": true,
          "typeHierarchy": true,
          "workspaceSymbol": true
        },
        "formatter": "auto",
        "linters": ["rubocop", "standard"]
      }
    }
  },
  "journal": {
    // The path of the directory where journal entries are stored
    "path": "~",
    // What format to display the hours in
    // May take 2 values:
    // 1. hour12
    // 2. hour24
    "hour_format": "hour24"
  }
}

reppiee avatar May 13 '25 11:05 reppiee

@reppiee zeta provides full Edit Predictions features , but it seems that Copilot not , it only provides (per doc):

  • next edit prediction
  • previous edit prediction

scbizu avatar May 14 '25 02:05 scbizu

Ah ok - I guess I am not entirely understanding the difference.

I would expect to see suggestions like in the image below. This is when I set my provider to zed. When I set it to copilot, these suggestions of where my cursor should jump to (beyond where my cursor currently is) do not show up at all. Would you say that is expected?

Cursor jump suggestion with edit_prediction_provider set to zed: Image

reppiee avatar May 15 '25 06:05 reppiee

@reppiee The difference is that:

  • with edit_prediction_provider: zed: The AI features (like Edit Predictions) is provided by Zeta(Zed's self-maintained LLM), so they can set these advance features as LLM built-in.
  • with edit_prediction_provider` to others: The AI features is provided by 3rd providers (SuperMaven or Copilot) , so they need to impl these features in other ways (like prompts engineering ?) , so some advance features(like Jump to Edit you mentioned or Subtle Mode) are still on development.

I don't know whether I am expressing myself well now XD

scbizu avatar May 15 '25 08:05 scbizu

Ahh yes that makes sense! I was under the impression that was already fully implemented, but now it makes sense. Thank you for your patience :D

reppiee avatar May 15 '25 08:05 reppiee

I believe what you are asking for is that Zed should add support for:

  • https://github.com/zed-industries/zed/issues/30124

Thanks for reporting.

notpeter avatar May 27 '25 14:05 notpeter