mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 19:11:03 +08:00
fix: extract external URLs instead of excluding them from source link checker
The extraction script was overly aggressive in excluding URLs (GitHub, archives, JSON endpoints, images). These are real user-facing links that should be validated by lychee. Removed the blanket exclusions and reverted the lychee.toml additions — the docs checker already handles external link validation. Now extracts 77 URLs (up from 59).
This commit is contained in:
@@ -30,13 +30,4 @@ exclude = [
|
||||
'https://tbench.ai/',
|
||||
# GitHub URLs cause persistent HTTP/2 protocol errors when checked from GitHub Actions runners
|
||||
'^https?://github\.com/',
|
||||
'^https?://docs\.github\.com/',
|
||||
# Source-link exclusions (sites that block automated checks)
|
||||
'^https?://platform\.openai\.com',
|
||||
'^https?://cookbook\.openai\.com',
|
||||
# Short-link services that may rate-limit
|
||||
'^https?://vercel\.link/',
|
||||
'^https?://opncd\.ai',
|
||||
# Domain-only links (no path)
|
||||
'^https?://gitlab\.com/?$',
|
||||
]
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# Source Code Links
|
||||
|
||||
<!-- Auto-generated by script/extract-source-links.ts — DO NOT EDIT -->
|
||||
<!-- 59 unique URLs extracted from extension and CLI source -->
|
||||
<!-- 77 unique URLs extracted from extension and CLI source -->
|
||||
|
||||
- <https://api.kilo.ai>
|
||||
<!-- packages/opencode/src/cli/cmd/github.ts -->
|
||||
- <https://app.kilo.ai>
|
||||
<!-- packages/opencode/src/kilocode/kilo-commands.tsx -->
|
||||
<!-- packages/opencode/src/session/retry.ts -->
|
||||
- <https://app.kilo.ai/config.json>
|
||||
<!-- packages/opencode/src/config/config.ts -->
|
||||
- <https://app.kilo.ai/profile>
|
||||
<!-- packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx -->
|
||||
- <https://app.kilo.ai/usage>
|
||||
@@ -30,6 +32,37 @@
|
||||
<!-- packages/opencode/src/provider/transform.ts -->
|
||||
- <https://git-scm.com>
|
||||
<!-- packages/kilo-vscode/src/agent-manager/WorktreeManager.ts -->
|
||||
- <https://github.com/apps/kiloconnect>
|
||||
<!-- packages/opencode/src/cli/cmd/github.ts -->
|
||||
- <https://github.com/badlogic/pi-mono/blob/main/packages/ai/src/utils/overflow.ts>
|
||||
<!-- packages/opencode/src/provider/error.ts -->
|
||||
- <https://github.com/cline/cline/blob/main/evals/diff-edits/diff-apply/diff-06-23-25.ts>
|
||||
<!-- packages/opencode/src/tool/edit.ts -->
|
||||
- <https://github.com/cline/cline/blob/main/evals/diff-edits/diff-apply/diff-06-26-25.ts>
|
||||
<!-- packages/opencode/src/tool/edit.ts -->
|
||||
- <https://github.com/elixir-lsp/elixir-ls/archive/refs/heads/master.zip>
|
||||
<!-- packages/opencode/src/lsp/server.ts -->
|
||||
- <https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/utils/editCorrector.ts>
|
||||
<!-- packages/opencode/src/tool/edit.ts -->
|
||||
- <https://github.com/Kilo-Org/kilocode>
|
||||
<!-- packages/kilo-vscode/webview-ui/src/components/settings/AboutKiloCodeTab.tsx -->
|
||||
- <https://github.com/Kilo-Org/kilocode/issues/6986>
|
||||
<!-- packages/kilo-vscode/src/agent-manager/constants.ts -->
|
||||
- <https://github.com/Kilo-Org/kilocode/issues/new?template=bug-report.yml>
|
||||
<!-- packages/opencode/src/cli/cmd/tui/app.tsx -->
|
||||
- <https://github.com/Kilo-Org/kilocode/issues/new/choose>
|
||||
<!-- packages/kilo-vscode/webview-ui/src/components/chat/FeedbackDialog.tsx -->
|
||||
- <https://github.com/microsoft/vscode-eslint/archive/refs/heads/main.zip>
|
||||
<!-- packages/opencode/src/lsp/server.ts -->
|
||||
- <https://github.com/OpenRouterTeam/ai-sdk-provider/pull/344/>
|
||||
<!-- packages/opencode/src/provider/transform.ts -->
|
||||
- <https://github.com/oven-sh/bun/issues/16682>
|
||||
<!-- packages/opencode/src/provider/provider.ts -->
|
||||
- <https://github.com/oven-sh/bun/issues/19936>
|
||||
<!-- packages/opencode/src/bun/index.ts -->
|
||||
<!-- packages/opencode/src/config/config.ts -->
|
||||
- <https://github.com/vercel/ai/blob/2dc67e0ef538307f21368db32d5a12345d98831b/packages/ai/src/logger/log-warnings.ts#L85>
|
||||
<!-- packages/opencode/src/server/server.ts -->
|
||||
- <https://gitlab.com>
|
||||
<!-- packages/opencode/src/provider/provider.ts -->
|
||||
- <https://julialang.org/downloads/>
|
||||
@@ -74,6 +107,8 @@
|
||||
<!-- packages/opencode/src/cli/cmd/auth.ts -->
|
||||
- <https://opencode.ai/install>
|
||||
<!-- packages/opencode/src/installation/index.ts -->
|
||||
- <https://opencode.ai/tui.json>
|
||||
<!-- packages/opencode/src/config/migrate-tui-config.ts -->
|
||||
- <https://opencode.ai/zen>
|
||||
<!-- packages/kilo-vscode/webview-ui/src/i18n/en.ts -->
|
||||
- <https://openrouter.ai/docs/use-cases/usage-accounting>
|
||||
@@ -120,6 +155,8 @@
|
||||
<!-- packages/opencode/src/provider/transform.ts -->
|
||||
- <https://vercel.link/ai-gateway-token>
|
||||
<!-- packages/opencode/src/cli/cmd/auth.ts -->
|
||||
- <https://www.eclipse.org/downloads/download.php?file=/jdtls/snapshots/jdt-language-server-latest.tar.gz>
|
||||
<!-- packages/opencode/src/lsp/server.ts -->
|
||||
- <https://www.morphllm.com/>
|
||||
<!-- packages/opencode/src/tool/warpgrep.ts -->
|
||||
- <https://www.rfc-editor.org/rfc/rfc8628#section-3.5>
|
||||
|
||||
@@ -28,7 +28,9 @@ const EXTENSIONS = ["ts", "tsx", "js", "jsx"]
|
||||
// Matches http:// and https:// URLs in string literals or comments
|
||||
const URL_RE = /https?:\/\/[^\s"'`)\]},;*\\<>]+/g
|
||||
|
||||
// URLs to exclude — API endpoints, localhost, examples, dynamic templates, namespaces
|
||||
// URLs to exclude — only genuinely non-checkable URLs (API endpoints, localhost,
|
||||
// examples, dynamic templates, namespaces). Real external URLs should be extracted
|
||||
// and validated by lychee; add lychee.toml exclusions for sites that block bots.
|
||||
const EXCLUDE_PATTERNS = [
|
||||
// Localhost and internal
|
||||
/^https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0)/,
|
||||
@@ -57,21 +59,15 @@ const EXCLUDE_PATTERNS = [
|
||||
/^https?:\/\/www\.w3\.org\//,
|
||||
// URLs that are templates with interpolation (contain ${ after stripping)
|
||||
/\$\{/,
|
||||
// Schema/config JSON URLs
|
||||
/\.json$/,
|
||||
// Archive downloads (tarballs, zips — these are versioned and break often)
|
||||
/\.(tar\.gz|zip|tgz)$/,
|
||||
/\/archive\//,
|
||||
/\/releases\/download\//,
|
||||
/\/releases\/latest$/,
|
||||
// GitHub URLs — excluded because they cause HTTP/2 protocol errors on GH Actions
|
||||
/^https?:\/\/github\.com\//,
|
||||
// URLs ending in common non-page extensions
|
||||
/\.(png|jpg|jpeg|gif|svg|ico)$/,
|
||||
// Truncated/placeholder URLs (e.g., https://…) or bare protocols
|
||||
/^https?:\/\/[\W]*$/,
|
||||
// GHE example domains
|
||||
/^https?:\/\/company\.ghe\.com/,
|
||||
// Example/placeholder GitHub URLs used in docs/comments
|
||||
/^https?:\/\/github\.com\/owner\//,
|
||||
/^https?:\/\/github\.com\/\.extraheader/,
|
||||
/^https?:\/\/github\.com\/user-attachments\/assets\/xxxx/,
|
||||
/^https?:\/\/github\.com\/user-attachments\/files\/\d+\/api\.json/,
|
||||
// Example/template session URLs with placeholders
|
||||
/\/s\/abc123$/,
|
||||
// Truncated URL paths (e.g., /s/ with no ID)
|
||||
|
||||
Reference in New Issue
Block a user