aws / aws/amazon-q-developer-cli
Add transcript export feature
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
I find exporting the current session transcript to a persistent file helpful for the following reasons:
1. We are still very early on the wave for adoption; being able to share a human-readable transcript so other colleagues can see both my thought process and the agent's thought process and how we iterate is very helpful
1. `q` CLI errors out quite often (on tool use or file read/write, surprisingly) and the solution is to quit the q session and restart, but this loses context. I tell q to read the transcript on the next session start to resume working
1. I often find value in the intermediate work done, not just the starting input and the ultimate refined output, and this tracks that over time
I found someone's `bash` function for doing this automatically when starting a `q chat` session:
```
function qchat {
local timestamp=$(date +"%Y%m%d_%H%M%S")
local logfile="$HOME/q_chat_logs/q_chat_$timestamp.txt"
mkdir -p $HOME/q_chat_logs
script -q /dev/null $(which q) chat | tee $logfile
echo "Chat session saved to $logfile"
}
```
This failed in `zsh` (returned immediately) due to the `script -q` invocation. I adapted it to `zsh`:
```
function qchat {
local timestamp=$(date +"%Y%m%d_%H%M%S")
local logfile="$HOME/q_chat_logs/q_chat_$timestamp.txt"
mkdir -p $HOME/q_chat_logs
$(which q) chat | tee -a $logfile
echo "Chat session saved to $logfile"
}
```
Making this native functionality of `q` would be very helpful.
Contributor guide
Assessment
This issue has not been assessed yet.