zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.95k stars 2.7k forks source link

github copilot not working #16882

Open fmnisme opened 2 weeks ago

fmnisme commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

My Copilot works fine in rustcover, but in Zed, there's no suggestion and no error.

Environment

Zed: v0.149.5 (Zed) OS: macOS 14.0.0 Memory: 32 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

setting.json

{
  "proxy": "http://127.0.0.1:1194", // Same proxy works fine in rustcover.
  "languages": {
    "JSONC": {
      "show_inline_completions": true
    },
    "Rust": {
      "show_inline_completions": true
    }
  },
  "telemetry": {
    "metrics": true
  },
  "vim_mode": true,
  "ui_font_size": 15,
  "buffer_font_size": 13,
  "features": {
    "copilot": true
  }
}

ui

image

If applicable, attach your Zed.log file to this issue.

zed.log
[2024-08-26T22:56:10.23785+08:00 [INFO] ========== starting zed ==========
2024-08-26T22:56:10.239056+08:00 [INFO] Opening main db
2024-08-26T22:56:10.241897+08:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-08-26T22:56:10.348836+08:00 [INFO] set environment variables from shell:/bin/zsh, path:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/go/bin:/opt/puppetlabs/bin:/Users/admin1/.cargo/bin:/Users/admin1/go/bin:/opt/homebrew/anaconda3/bin
2024-08-26T22:56:10.395556+08:00 [INFO] initializing context server client
2024-08-26T22:56:10.395795+08:00 [INFO] Registering built-in prompt template: content_prompt
2024-08-26T22:56:10.396136+08:00 [INFO] Registering built-in prompt template: edit_workflow
2024-08-26T22:56:10.396487+08:00 [INFO] Registering built-in prompt template: step_resolution
2024-08-26T22:56:10.396972+08:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-08-26T22:56:10.397262+08:00 [INFO] No prompt template overrides directory found at /Users/admin1/.config/zed/prompt_overrides. Using built-in prompts.
2024-08-26T22:56:10.397729+08:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-08-26T22:56:10.398872+08:00 [INFO] performance metrics display disabled
2024-08-26T22:56:10.44469+08:00 [INFO] Opening main db
2024-08-26T22:56:10.503087+08:00 [INFO] Opening main db
2024-08-26T22:56:10.504078+08:00 [INFO] time to first window draw: 266.749334ms
2024-08-26T22:56:10.504335+08:00 [INFO] set status on client 0: Authenticating
2024-08-26T22:56:10.506976+08:00 [INFO] Opening main db
2024-08-26T22:56:10.518125+08:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-08-26T22:56:10.520992+08:00 [INFO] set status on client 224278: Connecting
2024-08-26T22:56:10.577056+08:00 [ERROR] No worktree for path: "/Users/admin1/.config/zed/settings.json"
2024-08-26T22:56:10.610211+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:56:10.610463+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:10.610758+08:00 [INFO] starting language server "rust-analyzer", path: "/Users/admin1/Documents/source/rust/goods_frontendsdcrs", id: 1
2024-08-26T22:56:10.611998+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:56:10.612273+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:10.612743+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:56:10.613009+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:10.613381+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:10.618111+08:00 [INFO] fetching latest version of language server "rust-analyzer"
2024-08-26T22:56:11.136538+08:00 [INFO] Node runtime install_if_needed
2024-08-26T22:56:11.290256+08:00 [INFO] starting language server. binary path: "/Users/admin1/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/", args: ["/Users/admin1/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-08-26T22:56:11.541922+08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-08-26T14:56:11.539Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-08-26T14:56:11.539Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-08-26T22:56:11.543141+08:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "a1ccb925-7a63-4db3-8f47-13659504067e",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-08-26T22:56:11.608767+08:00 [INFO] downloading language server "rust-analyzer"
2024-08-26T22:56:11.609094+08:00 [INFO] starting language server. binary path: "/Users/admin1/Library/Application Support/Zed/languages/rust-analyzer/rust-analyzer-2024-08-26", working directory: "/Users/admin1/Documents/source/rust/goods_frontendsdcrs", args: []
2024-08-26T22:56:11.936164+08:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-08-26T22:56:12.841716+08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-08-26T14:56:12.837Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-08-26T14:56:12.837Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-08-26T22:56:14.34197+08:00 [INFO] add connection to peer
2024-08-26T22:56:14.3422+08:00 [INFO] add_connection;
2024-08-26T22:56:14.342417+08:00 [INFO] waiting for server hello
2024-08-26T22:56:14.728963+08:00 [INFO] got server hello
2024-08-26T22:56:14.729177+08:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 500, id: 2706379 })
2024-08-26T22:56:14.729731+08:00 [INFO] set status on client 224278: Connected { peer_id: PeerId { owner_id: 500, id: 2706379 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }

2024-08-26T22:56:55.109753+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:56:55.110014+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:55.110215+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:55.131572+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:56:55.131835+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:56:55.131989+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:57:10.48632+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:57:10.48652+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:57:10.487103+08:00 [ERROR] no worktree found for diagnostics path "/Users/admin1/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/macros.rs"
2024-08-26T22:57:10.491831+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:57:10.492009+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:57:10.495551+08:00 [ERROR] no worktree found for diagnostics path "/Users/admin1/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/macros.rs"
2024-08-26T22:57:10.499921+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T22:57:10.500094+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T22:57:10.500269+08:00 [INFO] starting language server "rust-analyzer", path: "/Users/admin1/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/macros.rs", id: 2
2024-08-26T22:57:10.500666+08:00 [INFO] starting language server. binary path: "/Users/admin1/Library/Application Support/Zed/languages/rust-analyzer/rust-analyzer-2024-08-26", working directory: "/Users/admin1/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src", args: []
2024-08-26T22:57:11.565139+08:00 [ERROR] Language server rust-analyzer-2024-08-26 (id 2) status update: Failed to load workspaces.
2024-08-26T22:57:11.565546+08:00 [ERROR] Language server rust-analyzer-2024-08-26 (id 2) status update: Failed to load workspaces.
2024-08-26T22:59:07.451157+08:00 [ERROR] Cancelled LSP request task for "getCompletions" id 141 which took over 120s
2024-08-26T22:59:11.233334+08:00 [ERROR] no worktree found for diagnostics path "/Users/admin1/.cargo/registry/src/rsproxy.cn-0dccff568467c15b/once_cell-1.19.0/src/lib.rs"
2024-08-26T22:59:11.233932+08:00 [ERROR] no worktree found for diagnostics path "/Users/admin1/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs"
2024-08-26T23:00:37.816977+08:00 [INFO] open paths ["/Users/admin1/.config/zed/settings.json"]
2024-08-26T23:00:37.828145+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T23:00:37.828372+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-08-26T23:00:37.828537+08:00 [INFO] starting language server "json-language-server", path: "/Users/admin1/.config/zed/settings.json", id: 3
2024-08-26T23:00:37.828905+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T23:00:37.829068+08:00 [INFO] Initializing default prettier with plugins {}
2024-08-26T23:00:37.829221+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T23:00:37.829415+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-08-26T23:00:37.829576+08:00 [INFO] starting language servers for Rust: rust-analyzer
2024-08-26T23:00:37.830463+08:00 [INFO] fetching latest version of language server "json-language-server"
2024-08-26T23:00:37.830658+08:00 [INFO] Node runtime install_if_needed
2024-08-26T23:00:39.912871+08:00 [INFO] downloading language server "json-language-server"
2024-08-26T23:00:39.91395+08:00 [INFO] Node runtime install_if_needed
2024-08-26T23:00:40.034331+08:00 [INFO] starting language server. binary path: "/Users/admin1/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/Users/admin1/.config/zed", args: ["/Users/admin1/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
fmnisme commented 2 weeks ago

Additional information: My antivirus software reported the following error:

SentinelAgent 2024-08-27 11 10 57
notpeter commented 2 weeks ago

Can you confirm that there is an http proxy running on port 1194? Port 1194 is usually used by OpenVPN and I want to make sure you didn't get the ports confused.

Can you confirm the following works:

curl --proxy "http://127.0.0.1:1194" "https://ifconfig.co"
fmnisme commented 2 weeks ago

Can you confirm that there is an http proxy running on port 1194? Port 1194 is usually used by OpenVPN and I want to make sure you didn't get the ports confused.

Can you confirm the following works:

curl --proxy "http://127.0.0.1:1194" "https://ifconfig.co"

% curl --proxy "http://127.0.0.1:1194" "https://ifconfig.co" 2403:fbc0:1000::a092