Bug: Include the invalid path when workspace additional-directory validation fails
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
まず、エラー文字列 workspace.additional_dir must exist and be a directory が発生している箇所を探してください。この文字列は、プロジェクトローカルの設定読み込みと、additionalDirectories に対する ACP の session/new の処理の両方で共有されています。両方の経路が問題の値をこのチェックに渡しているか確認してください。完了条件は、メッセージに解決済みのパスが含まれること、空のエントリが空であると報告されること、そして両方のエントリポイントがテストでカバーされていることです。Issue では、PR を開く前にメンテナーの承認が必要とされています。
索引モデルが issue の本文から書いたものです。
説明
What version of Kimi Code is running?
2.1.1
Which open platform/subscription were you using?
N/A. This occurs during local workspace configuration or ACP session setup, before any provider request.
Which model were you using?
N/A. The error occurs before a model request.
What platform is your computer?
Linux 7.2.9-200.nobara.fc44.x86_64 x86_64 unknown
What issue are you seeing?
Kimi reports this error when an additional workspace directory is unavailable:
workspace.additional_dir must exist and be a directory
The message does not include the invalid path.
This affects both project-local configuration and ACP:
- A project can contain one or more invalid entries in
.kimi-code/local.toml. - An ACP client can send
session/new.params.additionalDirectories. Kimi advertises support for this capability, but an IDE does not necessarily show users which paths it sent. Diagnosing a missing path currently requires capturing ACP traffic.
In either case, users cannot identify the offending directory from the Kimi error.
What steps can reproduce the bug?
Project-local configuration
From a Git repository, create .kimi-code/local.toml:
[workspace]
additional_dir = ["/tmp/kimi-directory-that-does-not-exist"]
Start Kimi from that repository.
ACP session setup
-
Start Kimi in ACP mode:
kimi acp -
Send
initialize. Kimi advertises support for additional directories. -
Send
session/newwith a validcwdand an unavailable additional directory:{ "jsonrpc": "2.0", "id": 2, "method": "session/new", "params": { "cwd": "/path/to/project", "mcpServers": [], "additionalDirectories": [ "/path/that-is-not-available-to-kimi" ] } } -
Kimi returns the generic error without identifying the path.
What is the expected behavior?
The error should include the resolved invalid path, for example:
workspace.additional_dir must exist and be a directory: /path/that-is-not-available-to-kimi
An empty additional-directory value should report that the value is empty.
Additional information
I encountered this through JetBrains AI Assistant using Kimi via aicage, which runs the agent in a container.
JetBrains sent an additional directory that was valid on the host but unavailable inside the container.
The same missing-path diagnostic also affects non-containerized project-local configuration.
Contribution
- I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 1.3k
- 平均マージ
- 18時間 15分
- マージ済み PR(30日)
- 160
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MoonshotAI/kimi-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MoonshotAI/kimi-code#4177 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MoonshotAI/kimi-code#4170 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#4146 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#4141 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#4140 ·
メンテナーはふだん 1 日以内に返信
MoonshotAI/kimi-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
status:approved type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
stage:4
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ilan-pinto/roaring-lions#598 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Frontmatter next to `src:` is applied to every imported slide, not only the first (undocumented)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信