Finding (and recovering) your Amazon Q Developer prompt history
Wanted to share a very quick on something I learned that was pretty useful to me, so thought it might be useful to others. Here is a scenario that some of you might be familiar with: You have a successful Amazon Q Developer session, and then maybe a few days later, you are trying to recall exactly what you did and how you put your prompts together - what can you do? As it turns out, a recent update to Amazon Q Developer was a big help. In the Amazon Q Developer chat interface, there is a new icon next to the different tabs (its an icon of a click, which when you hover over says "View Chat History") which when you click on this, it will bring back a list of previous chats that have been recorded. What does this mean? In the "~/.aws/amazonq/" directory there is a "history" directory, and looking at it, it contains a number of time/date stamped json files. ├── history │ ├── chat-history-0f97086b54fd7d6128dfd80426dfd63d.json │ ├── chat-history-10d817f64fc99f04badf1568a6c23814.json │ ├── chat-history-deba93a681a17ae26ff2b977acf0ba97.json │ ├── chat-history-fa5091a7425e7938fe770a584b63076e.json │ └── chat-history-no-workspace.json These are what the Amazon Q Developer VSCode plugin now produces as you start using it. That said, because I had deleted my project, and so I was unable to get this from VSCode itself. Aarrgh, I thought to myself. Not to worry though. I still had the files in the history directory. So reviewing these with my favourite json viewer (I knew which file to use, aligning date stamps from these and the code files in my project workspace), allowed me to extract all the history, including prompts and responses. Very handy to know if you want to go back in time. This saved me, so hoping it will help others who are looking to recover what they did.

Wanted to share a very quick on something I learned that was pretty useful to me, so thought it might be useful to others. Here is a scenario that some of you might be familiar with:
You have a successful Amazon Q Developer session, and then maybe a few days later, you are trying to recall exactly what you did and how you put your prompts together - what can you do?
As it turns out, a recent update to Amazon Q Developer was a big help. In the Amazon Q Developer chat interface, there is a new icon next to the different tabs (its an icon of a click, which when you hover over says "View Chat History") which when you click on this, it will bring back a list of previous chats that have been recorded. What does this mean?
In the "~/.aws/amazonq/" directory there is a "history" directory, and looking at it, it contains a number of time/date stamped json files.
├── history
│ ├── chat-history-0f97086b54fd7d6128dfd80426dfd63d.json
│ ├── chat-history-10d817f64fc99f04badf1568a6c23814.json
│ ├── chat-history-deba93a681a17ae26ff2b977acf0ba97.json
│ ├── chat-history-fa5091a7425e7938fe770a584b63076e.json
│ └── chat-history-no-workspace.json
These are what the Amazon Q Developer VSCode plugin now produces as you start using it.
That said, because I had deleted my project, and so I was unable to get this from VSCode itself. Aarrgh, I thought to myself. Not to worry though. I still had the files in the history directory. So reviewing these with my favourite json viewer (I knew which file to use, aligning date stamps from these and the code files in my project workspace), allowed me to extract all the history, including prompts and responses. Very handy to know if you want to go back in time.
This saved me, so hoping it will help others who are looking to recover what they did.