copilotkit project select rewrites INTELLIGENCE_API_KEY to CPK_INTELLIGENCE_API_KEY, which OpenDots never reads
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend, documentation
Hướng nghiên cứu
Bắt đầu với việc xử lý các khóa môi trường trong src/server/index.ts, sau đó xem xét các kiểm tra liên quan trong src/server/platform-config.ts và src/server/platform.ts. Tái hiện quy trình được ghi lại trong docs/SETUP.md bằng .env.example và xác nhận rằng khóa được CLI ghi vào được nhận diện, cảnh báo thiết lập biến mất, và các hướng dẫn thiết lập giải thích các tên được hỗ trợ cũng như thứ tự ưu tiên của chúng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
npx copilotkit@latest project select deletes the INTELLIGENCE_API_KEY line from .env and writes CPK_INTELLIGENCE_API_KEY instead. OpenDots reads only the unprefixed name and has no fallback, so the "Connect your Dot" banner stays and chat remains disabled even after a successful CLI login — with no error anywhere pointing at the name mismatch.
Verified against OpenDots c2569bb (2026-10-02) and [email protected].
OpenDots reads only INTELLIGENCE_API_KEY
src/server/index.ts:29—intelligenceKey: process.env.INTELLIGENCE_API_KEYsrc/server/platform-config.ts:32—!config.intelligenceKey && 'INTELLIGENCE_API_KEY'insetupStatus()(this is the list the Settings & setup sidebar renders)src/server/platform.ts:154—{ error: 'Setup required: INTELLIGENCE_API_KEY.' }
grep -rn "CPK_" src/ returns nothing, so the prefixed variable is invisible to the app. .env.example also seeds only the unprefixed name (INTELLIGENCE_API_KEY=).
The CLI prunes that line and writes a different name
[email protected], writeHostedApiKey() in the bundled index.js (around line 124155):
const standardizedContent = removeEnvAssignmentLine(
existingContent,
"INTELLIGENCE_API_KEY"
);
withFsErrorTag(
() => fs21.writeFileSync(
envPath,
upsertEnvAssignments(standardizedContent, [
["CPK_INTELLIGENCE_API_KEY", apiKey]
])
)
);
So the CLI removes the exact line .env.example provides and replaces it with a name OpenDots never reads. CPK_INTELLIGENCE_API_KEY is treated as canonical throughout the CLI (PROJECT_KEY_VARIABLE = "CPK_INTELLIGENCE_API_KEY", line 434080).
Why this is more than a docs gap
docs/SETUP.md:81 instructs users to run this in the Slack setup flow:
npx --yes copilotkit@latest project select
npx --yes copilotkit@latest channels add --name opendots --display-name "OpenDots" --adapter slack --json
Anyone who follows that documented command silently breaks an Intelligence credential that was already working. The failure mode is also misleading: the app reports the key as missing, so the natural conclusion is "the CLI didn't write my key" rather than "it wrote it under a different name and deleted the old line."
Repro
npm ci && cp .env.example .envnpx --yes copilotkit@latest login && npx --yes copilotkit@latest project selectgrep INTELLIGENCE .env→ showsCPK_INTELLIGENCE_API_KEY=cpk-…; theINTELLIGENCE_API_KEY=line is gonenpm run dev→ "Connect your Dot" banner persists and Settings & setup listsINTELLIGENCE_API_KEYas missing- Adding
INTELLIGENCE_API_KEY=cpk-…(same value) clears the banner and enables chat
Suggested fix
Accept both names, preferring the one the CLI writes:
intelligenceKey:
process.env.CPK_INTELLIGENCE_API_KEY ?? process.env.INTELLIGENCE_API_KEY,
and mention the precedence in docs/SETUP.md. A docs-only note would leave the documented Slack flow still self-defeating, so I'd lean toward the fallback in code.
One accuracy note: the CLI help describes COPILOTKIT_API_KEY as the deprecated name (line 442947), not INTELLIGENCE_API_KEY. So this isn't a case of OpenDots using an officially deprecated variable — it's an unprefixed/prefixed mismatch between a template and the CLI that edits that template's .env.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.8k
- Fork
- 344
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CopilotKit/OpenDots
-
Page conversation panel overflows horizontallyCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CopilotKit/OpenDots#69 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Long page titles are clipped in the page editorCó thể đã có người làm @charan-rathore đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CopilotKit/OpenDots#68 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Dependency DashboardĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
CopilotKit/OpenDots#111 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BAITAĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
CopilotKit/OpenDots#108 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
CopilotKit/OpenDots#100 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của CopilotKit/OpenDots
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rajbos/ai-engineering-fluency#2340 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community documentation first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
lingdojo/kana-dojo#31864 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
zenstackhq/zenstack#2873 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI: TUI shows onboarding when the provider's API key is only in the environment (e.g. OPENROUTER_API_KEY)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởCLI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
cline/cline#14923 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
paperclipai/paperclip#15490 ·
Maintainer thường phản hồi trong vòng 1 ngày