From 38b8e6549fd0d31661caedc958a4339832067a89 Mon Sep 17 00:00:00 2001 From: Thomas Zahner Date: Fri, 6 Jun 2025 11:39:35 +0200 Subject: [PATCH] ci: Check for broken links (#30844) This PR fixes some broken links that where found using [lychee](https://github.com/lycheeverse/lychee/) as discussed today with @JosephTLyons and @nathansobo at the RustNL hackathon. Using [lychee-action](https://github.com/lycheeverse/lychee-action/) we can scan for broken links daily to prevent issues in the future. There are still 6 broken links that I didn't know how to fix myself. See https://github.com/thomas-zahner/zed/actions/runs/15075808232 for details. ## Missing images ``` Errors in ./docs/src/channels.md [ERROR] file:///home/runner/work/zed/zed/docs/.gitbook/assets/channels-3.png | Cannot find file [ERROR] file:///home/runner/work/zed/zed/docs/.gitbook/assets/channels-1.png | Cannot find file [ERROR] file:///home/runner/work/zed/zed/docs/.gitbook/assets/channels-2.png | Cannot find file ``` These errors are showing up as missing images on https://zed.dev/docs/channels I tried to search the git history to see when or why they were deleted but didn't find anything. ## ./crates/assistant_tools/src/edit_agent/evals/fixtures/zode/prompt.md There are three errors in that file. I don't fully understand how these issues were caused historically. Technically it would be possible to ignore the files but of course if possible we should address the issues. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers Co-authored-by: Ben Kunkle --- .github/actions/build_docs/action.yml | 6 ++++ .../edit_agent/evals/fixtures/zode/prompt.md | 2 +- docs/src/ai/agent-panel.md | 2 +- docs/src/configuring-zed.md | 2 +- docs/src/extensions/context-servers.md | 2 +- docs/src/extensions/slash-commands.md | 2 +- docs/src/languages/json.md | 2 +- docs/src/languages/lua.md | 2 +- docs/src/languages/markdown.md | 2 +- legal/terms.md | 4 +-- lychee.toml | 29 +++++++++++++++++++ 11 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 lychee.toml diff --git a/.github/actions/build_docs/action.yml b/.github/actions/build_docs/action.yml index 27f0f37d4f87b03748c168c7ec64b806b0ccf040..19b8801123baf05ab821e10444ce3960770026c9 100644 --- a/.github/actions/build_docs/action.yml +++ b/.github/actions/build_docs/action.yml @@ -19,6 +19,12 @@ runs: shell: bash -euxo pipefail {0} run: ./script/linux + - name: Check for broken links + uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1 + with: + args: --no-progress './docs/src/**/*' + fail: true + - name: Build book shell: bash -euxo pipefail {0} run: | diff --git a/crates/assistant_tools/src/edit_agent/evals/fixtures/zode/prompt.md b/crates/assistant_tools/src/edit_agent/evals/fixtures/zode/prompt.md index 2496c3582be96bed9ad473cacb91bdd5622804eb..902e43857c3214cde68372f1c9ff5f8015528ae2 100644 --- a/crates/assistant_tools/src/edit_agent/evals/fixtures/zode/prompt.md +++ b/crates/assistant_tools/src/edit_agent/evals/fixtures/zode/prompt.md @@ -498,7 +498,7 @@ client.with_options(max_retries=5).messages.create( ### Timeouts By default requests time out after 10 minutes. You can configure this with a `timeout` option, -which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: +which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object: ```python from anthropic import Anthropic diff --git a/docs/src/ai/agent-panel.md b/docs/src/ai/agent-panel.md index e2bdc030c4e7759f7defdc63f3c15bc9f021b1b2..3c04ae5c43f87ee54e96a253300aa20524d6d844 100644 --- a/docs/src/ai/agent-panel.md +++ b/docs/src/ai/agent-panel.md @@ -3,7 +3,7 @@ The Agent Panel provides you with a way to interact with LLMs. You can use it for various tasks, such as generating code, asking questions about your code base, and general inquiries such as emails and documentation. -To open the Agent Panel, use the `agent: new thread` action in [the Command Palette](./getting-started.md#command-palette) or click the ✨ (sparkles) icon in the status bar. +To open the Agent Panel, use the `agent: new thread` action in [the Command Palette](../getting-started.md#command-palette) or click the ✨ (sparkles) icon in the status bar. If you're using the Agent Panel for the first time, you'll need to [configure at least one LLM provider](./configuration.md). diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index d32cd870031bbebacede8f84960bb77c5e415543..3c7167f980700e5ac79801236d9825dcd5cb7567 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -112,7 +112,7 @@ Non-negative `float` values **Options** -You can find the names of your currently installed extensions by listing the subfolders under the [extension installation location](./extensions/installing-extensions#installation-location): +You can find the names of your currently installed extensions by listing the subfolders under the [extension installation location](./extensions/installing-extensions.md#installation-location): On MacOS: diff --git a/docs/src/extensions/context-servers.md b/docs/src/extensions/context-servers.md index bd4c16126b82a18cb9b5a9a325ef61ce176b91ba..52d1f0e4427c78e6739d99626a6fdea91df5d939 100644 --- a/docs/src/extensions/context-servers.md +++ b/docs/src/extensions/context-servers.md @@ -6,7 +6,7 @@ Extensions may provide [context servers](../ai/mcp.md) for use in the Assistant. To see a working example of an extension that provides context servers, check out the [`postgres-context-server` extension](https://github.com/zed-extensions/postgres-context-server). -This extension can be [installed as a dev extension](./developing-extensions.html#developing-an-extension-locally) if you want to try it out for yourself. +This extension can be [installed as a dev extension](./developing-extensions.md#developing-an-extension-locally) if you want to try it out for yourself. ## Defining context servers diff --git a/docs/src/extensions/slash-commands.md b/docs/src/extensions/slash-commands.md index f9cf076f88f00cd70abbc7a016b033282b1dd75e..898649b3277c4fd589f1c621c36a92a1445d51a9 100644 --- a/docs/src/extensions/slash-commands.md +++ b/docs/src/extensions/slash-commands.md @@ -6,7 +6,7 @@ Extensions may provide slash commands for use in the Assistant. To see a working example of an extension that provides slash commands, check out the [`slash-commands-example` extension](https://github.com/zed-industries/zed/tree/main/extensions/slash-commands-example). -This extension can be [installed as a dev extension](./developing-extensions.html#developing-an-extension-locally) if you want to try it out for yourself. +This extension can be [installed as a dev extension](./developing-extensions.md#developing-an-extension-locally) if you want to try it out for yourself. ## Defining slash commands diff --git a/docs/src/languages/json.md b/docs/src/languages/json.md index 166f96c7191284fcf8f64982675110d84481c660..94f56999d51a3e2395f481be67d267172ba07075 100644 --- a/docs/src/languages/json.md +++ b/docs/src/languages/json.md @@ -32,7 +32,7 @@ To workaround this behavior you can add the following to your `.prettierrc` conf ## JSON Language Server -Zed automatically out of the box supports JSON Schema validation of `package.json` and `tsconfig.json` files, but `json-language-server` can use JSON Schema definitions in project files, from the [JSON Schema Store](https://www.schemastore.org/json/) or other publicly available URLs for JSON validation. +Zed automatically out of the box supports JSON Schema validation of `package.json` and `tsconfig.json` files, but `json-language-server` can use JSON Schema definitions in project files, from the [JSON Schema Store](https://www.schemastore.org) or other publicly available URLs for JSON validation. ### Inline Schema Specification diff --git a/docs/src/languages/lua.md b/docs/src/languages/lua.md index db060033a663903356b2f75383f411b9a4ee44b6..8fdaaafedb80af3c9f466e2fdfd44959364a8789 100644 --- a/docs/src/languages/lua.md +++ b/docs/src/languages/lua.md @@ -86,7 +86,7 @@ Then in your `.luarc.json`: ### Inlay Hints -To enable [Inlay Hints](../configuring-languages#inlay-hints) for LuaLS in Zed +To enable [Inlay Hints](../configuring-languages.md#inlay-hints) for LuaLS in Zed 1. Add the following to your Zed settings.json: diff --git a/docs/src/languages/markdown.md b/docs/src/languages/markdown.md index ef6c4d38f687aae3e67ba025954e4ebc6ee96f99..38a2b1c43f94b91097bcd0b1dc3301427e1b9685 100644 --- a/docs/src/languages/markdown.md +++ b/docs/src/languages/markdown.md @@ -23,7 +23,7 @@ def fib(n): ### Format -Zed supports using Prettier to automatically re-format Markdown documents. You can trigger this manually via the {#action editor::Format} action or via the {#kb editor::Format} keyboard shortcut. Alternately, you can automatically format by enabling [`format_on_save`](./configuring-zed.md#format-on-save) in your settings.json: +Zed supports using Prettier to automatically re-format Markdown documents. You can trigger this manually via the {#action editor::Format} action or via the {#kb editor::Format} keyboard shortcut. Alternately, you can automatically format by enabling [`format_on_save`](../configuring-zed.md#format-on-save) in your settings.json: ```json "languages": { diff --git a/legal/terms.md b/legal/terms.md index 20fc638dc5c7b6bd5f38f483b2b8a421fbf54f43..88afa36aa9cb17c55b1b2fe50a26893c4e5a3389 100644 --- a/legal/terms.md +++ b/legal/terms.md @@ -94,11 +94,11 @@ Output is provided "as is" without any warranties or guarantees of functionality When using Zed AI Services to provide Edit Predictions in connection with certain open source software projects, You may elect to share requests, responses and feedback comments (collectively "Model Improvement Feedback") with Zed, and Zed may use the same to improve Zed Edit Predictions models. You may opt-out of sharing Model Improvement Feedback at any time. -For more information on Zed Edit Predictions please see: [https://zed.dev/docs/ai-improvement](https://zed.dev/docs/ai-improvement) +For more information on Zed Edit Predictions please see: [https://zed.dev/docs/ai/ai-improvement](https://zed.dev/docs/ai/ai-improvement) When using Zed AI Services in connection with the Agent Panel, You may elect to share with Zed requests, responses and feedback regarding the Agent Panel and related Output (the “Agent Improvement Feedback”) with Zed, and Zed may use the same to improve the Agent Panel and related Output. Zed will only collect Agent Improvement Feedback when You elect to share the same. -For more information regarding the Agent Panel please see: [https://zed.dev/docs/ai-improvement](https://zed.dev/docs/ai-improvement) +For more information regarding the Agent Panel please see: [https://zed.dev/docs/ai/ai-improvement](https://zed.dev/docs/ai/ai-improvement) #### 3.4. Privacy Policy diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 0000000000000000000000000000000000000000..a769ae3b201bad4ef9743f3dbcca3dcc06e75b2d --- /dev/null +++ b/lychee.toml @@ -0,0 +1,29 @@ +retry_wait_time = 5 + +accept = ["200..=204", "429"] + +max_retries = 5 + +timeout = 45 + +exclude = [ + # Don't fail CI check if collab is down + 'https://staging-collab.zed.dev/', + "https://collab.zed.dev", + + # Slow and unreliable server. + 'https://repology.org', + + # The following websites are rate limited or use bot detection and aren't nice enough to respond with 429: + 'https://openai.com', + 'https://claude.ai/download', + 'https://www.perplexity.ai', + 'https://platform.deepseek.com', + 'https://console.anthropic.com', + 'https://platform.openai.com', + 'https://linux.die.net/man/1/sed', + 'https://allaboutcookies.org', + 'https://www.gnu.org', + 'https://auth.mistral.ai', + 'https://console.mistral.ai', +]