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

feat: cost warning

オープン
#31 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
ai, cli

調査の方向性

まず、クエリが CLI パラメータとして指定された場合の --file オプションに関する既存のコスト計算と警告のフローを追跡します。コンテキストコストのしきい値を超えたときに、API 呼び出しの前に確認を求め、コストを利用できない場合はトークン数を使用するようになれば、作業は完了です。

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

説明

Is your feature request related to a problem? Please describe.
Currently there is a scenario when AI CLI can make expensive API call without user confirmation. This happens when user use --file option and asks a query in CLI params. In such case, even when the price threshold is exceeded and user gets a warning, he is not able to prevent this API call.

Describe the solution you'd like
In case file context is used, and user exceeds warning threshold for context and, and there is a query in CLI params: then CLI should ask user to confirm if it should make the API call before making it.

# ai -i --file file.md Some question
Using the provided file will increase conversation costs by $1.1193 per message.
Do you want to continue? [y/N]:

Describe alternatives you've considered
Warning as is, but there is a risk of making expensive API can which user would not want if he knew the costs.

Additional context
We should use current cost calculation features.
In rare case cost is not available, we should refer to token count.

主要言語
TypeScript
スター
46
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

callstack/ai-cli のほかの issue

callstack/ai-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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