[FEATURE]: Show HTTP response headers and status in opencode api

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

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

opencode api コマンドの実装と、そのフラグ(特に --header)が解析される箇所を特定してください。本文と非2xxステータスメッセージを出力するレスポンス処理が、新しい出力を置くべき場所です。ステータス行とレスポンスヘッダーを本文の前に出力するオプトインの --include フラグを追加し、本文のみの出力をデフォルトのままにしてください。ローカルサーバーからの空、成功、エラーのレスポンスで検証し、APIの検査に関するトラブルシューティングドキュメントのセクションで更新すべき文言を確認してください。

索引モデルが issue の本文から書いたものです。

説明

area/cli type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Add an opt-in mode to opencode api, such as --include, that displays the HTTP response status and headers alongside the body. Retain the existing body-only default.

The current command accepts outgoing --header values but prints only the response body, plus a status message for non-2xx responses. This makes it awkward to inspect an empty response or verify ETag, Last-Modified, Content-Type and Retry-After when testing OpenCode endpoints. The workaround is rebuilding the authenticated request in curl or an SDK script.

The mode should work for successful, empty and error responses. It would extend the API troubleshooting workflow already documented in Troubleshooting, using the command's existing server discovery and authentication.

This concerns responses from the OpenCode server. It is separate from provider-response metadata in #26091 and request-body file/stdin support in #51199.

主要言語
TypeScript
スター
227k
フォーク
30.7k
平均マージ
3時間 57分
マージ済み PR(30日)
484

環境構築

はじめの一歩

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

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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