1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Amazon Q Developer CLI のtangentスラッシュコマンドについて(tangent tailも)

Posted at

Amazon Q Developer CLIバージョン1.16.0リリースにて/tangent tailが追加されたとの記載があったので、新機能を試しつつtangentモードについて整理したく記載しています。

/tangentとは?

Amazon Q Developer CLIにて会話のチェックポイント作成できる機能です。
通常の会話がmainブランチだとしたら別ブランチを切ってQ Devと会話できるイメージを個人的に持っています。

実験的機能のため、q settings chat.enableTangentMode trueで有効化できます。(できなければ/experimentスラッシュコマンドを実行し、tangentにてEnterを押してください)

通常の会話の中で/tangentを実行すると別ブランチにて会話ができます。

mainのコンテキストを汚さずに別アイデアを出してもらうという使い方が良いかもしれないですね。次が使用方法のイメージです。
image.png

参考

Tangent mode creates conversation checkpoints, allowing you to explore side topics without disrupting your main conversation flow. Enable it with:
(tangentモードは会話のチェックポイントを作成し、メインの会話の流れを中断することなく、サイドトピックを探ることができます。以下の方法で有効化してください。)
https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-experimental-features.html#experimental-tangent-mode

/tangent tail

tangentで会話した内容をmainの会話にマージできたらなあと思っていたのでちょうど良いリリースだと思いました。

使ってみる

まずは関数を作成してもらう
image.png
![[Pasted image 20250918071336.png]]

/tangentにてtangentモードを起動し「世界各地の現地時間での日付と天気を取得する関数を作成して。作成したファイル名を最後に教えて。」とお願いします。
image.png

ファイルを作成してくれました。
image.png

この時点で次のとおり作業をしています。

環境 作成したファイル
通常のq weather.py
tangentモード global_weather.py

通常の場合

crtl + T(若しくは/tangent入力して) + Enterにてtangentモードを抜けます。
image.png

通常のq(tangentモード無効化)にて「これまでの作業で作成したファイル名を教えてください」と聞いてみます。
tangentモードで作成したファイル名は記録に含まれていませんね。
image.png

/tangent tailを実行して会話を復元する

ではangentモードにて会話した内容をmainのqに統合します。

tangentモードに切り替えたままで、/tangent tailを実行します。
image.png

/tangent tailを実行すると通常のq に戻るため、「これまでの作業で作成したファイル名を教えてください」と聞いてみます。
⇒2025年9月18日時点では/tangent tailを試してもエラーがでて回答してくれませんでした。数回同じ作業を行いましたが、同じエラーが出ていたので仕様の問題??

image.png

↯ > /tangent tail

Restored conversation from checkpoint (↯) with last conversation entry preserved.

> これまでの作業で作成したファイル名を教えてください

Amazon Q is having trouble responding right now: 
   0: Failed to send the request: unhandled error (ValidationException)
   1: unhandled error (ValidationException)
   2: service error
   3: unhandled error (ValidationException)
   4: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "ed7bf93a-6350-4648-a016-07f2d5fc0524" }

Location:
   crates/chat-cli/src/cli/chat/mod.rs:1072

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

感想

新機能かつ実験的機能なので不具合があるのは仕方がないですね!
他の1.16.0アップデート内容も試してみたい!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?