Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

create_new_file writes a JSON file on one line when the model sends its contents as a JSON value

オープン 初心者向け
#13,363 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@YauhenBichel がすでに取り組んでいます。

2026年10月9日 から。

  • #13364 @YauhenBichel による — オープン

評価

難易度
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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

continuedev/continue のほかの issue

continuedev/continue の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。