create_new_file writes a JSON file on one line when the model sends its contents as a JSON value
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
バグは createNewFileImpl にあります。ここは getStringArg を通して contents を読み込みますが、そのヘルパーはオブジェクトに対して JSON.stringify(value) を実行するため、1行の出力になります。まず getStringArg と、createNewFileImpl がそれをどう使っているかを読み、次にissueの呼び出しで再現してください。完了の条件は、.json ファイルのオブジェクト contents がインデント付きJSON(JSON.stringify(value, null, 2))で書き出されること、そして他の文字列引数と既存のテストは従来のコンパクトな動作を保つことです。
索引モデルが issue の本文から書いたものです。
説明
Relevant environment info
- OS: macOS
- Continue version: 2.0.0 (also checked on main at 5522c6f)
- IDE version: VS Code 1.141.0
- Model: Qwen3.6-Coder 35B, served locally through an OpenAI-compatible API (provider
openai)
Description
When a model sends the contents of a new .json file as a JSON value instead of a string, create_new_file writes the file on a single line, for example:
{"name":"app","version":"1.0.0","scripts":{"build":"tsc"},"devDependencies":{"typescript":"^5.6.0"}}
A package.json or tsconfig.json written like this is valid, but nobody would write it that way, and every later edit produces a large diff.
Cause: createNewFileImpl reads the contents with getStringArg, which turns an object back into text with JSON.stringify(value). That compact form is right for other string arguments (and is what the existing tests expect), but for the contents of a file, indented JSON (JSON.stringify(value, null, 2)) is what the model meant.
To reproduce
Call createNewFileImpl({ filepath: "app/package.json", contents: { name: "app", private: true } }, extras): the file is written as {"name":"app","private":true}.
Log output
No response
- 主要言語
- TypeScript
- スター
- 36.2k
- フォーク
- 5.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
continuedev/continue のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
continuedev/continue#13352 ·
-
fetch: SSE ping comments silently drop data in the same chunk対応中かも @fhgffy が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
continuedev/continue#13347 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
continuedev/continue#13291 ·
-
Ollama provider drops `tools` after the first tool call, breaking multi-step agent loops対応中かも @dvd233 が 38 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
continuedev/continue#13254 · コメント 2 件 ·
-
[Bug] LanceDbIndex interpolates paths into LanceDB SQL predicates — apostrophes in file/workspace paths break index deletes (stale chunks stay retrievable) and retrieval対応中かも @seethinajayadileep が 44 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
continuedev/continue#13233 ·
continuedev/continue の issue をすべて見る
似ている issue
-
area: app type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ExpidetGames/code-reviewer#585 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
module-federation/core#5205 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
LanternOps/breeze#9392 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
engine-rs P3 review-deferral wasm
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
maniator/verticopolis#1154 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信